<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:blogger='http://schemas.google.com/blogger/2008' xmlns:georss='http://www.georss.org/georss' xmlns:gd="http://schemas.google.com/g/2005" xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-7923360702512529890</id><updated>2020-01-18T14:52:03.027+09:00</updated><category term="webdriver"/><category term="selenium"/><category term="ruby"/><category term="linux"/><category term="javascript"/><category term="jmeter"/><category term="java"/><category term="bash"/><category term="nodejs"/><category term="ajax"/><category term="chronos"/><category term="hudson"/><category term="maven"/><category term="shell"/><category term="watir"/><category term="applitools"/><category term="powershell"/><category term="regexp"/><category term="saucelabs"/><category term="sftp"/><category term="about"/><category term="android"/><category term="ant"/><category term="apache"/><category term="authorization"/><category term="aws"/><category term="c#"/><category term="casperjs"/><category term="click"/><category term="cloud9"/><category term="continuous integration"/><category term="cucumber"/><category term="database"/><category term="getopts"/><category term="gitlab"/><category term="html"/><category term="iphone"/><category term="japanese"/><category term="jekyll"/><category term="keyboard"/><category term="load testing"/><category term="mobile"/><category term="nvidia"/><category term="phantomjs"/><category term="postgresql"/><category term="screenshot"/><category term="seam"/><category term="sed"/><category term="ssh"/><category term="test/unit"/><category term="testobject"/><category term="tr"/><category term="tutorial"/><category term="webelement"/><category term="xpath"/><title type='text'>Artem Nagornyi&#39;s IT blog and a cup of coffee</title><subtitle type='html'>test automation, scripting, system administration, etc.</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://anahorny.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7923360702512529890/posts/default?redirect=false'/><link rel='alternate' type='text/html' href='http://anahorny.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><link rel='next' type='application/atom+xml' href='http://www.blogger.com/feeds/7923360702512529890/posts/default?start-index=26&amp;max-results=25&amp;redirect=false'/><author><name>Artem Nagornyi</name><uri>http://www.blogger.com/profile/09232985113515879251</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='18' height='32' src='http://1.bp.blogspot.com/-WjOu15GC7Tg/VQohpIOwmvI/AAAAAAAAIAA/CgL3rMsgXTo/s1600/*'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>58</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-7923360702512529890.post-9176299097405748322</id><published>3000-08-24T06:14:00.000+09:00</published><updated>2018-08-28T19:48:09.413+09:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="about"/><title type='text'>About this blog</title><content type='html'>This blog is mostly dedicated to automated testing. It also covers a wide range of topics related to load testing, Web development, Android development and Linux administration. You can support this blog by disabling AdBlock in your browser.</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7923360702512529890/posts/default/9176299097405748322'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7923360702512529890/posts/default/9176299097405748322'/><link rel='alternate' type='text/html' href='http://anahorny.blogspot.com/2010/07/blog-post.html' title='About this blog'/><author><name>Artem Nagornyi</name><uri>http://www.blogger.com/profile/09232985113515879251</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='18' height='32' src='http://1.bp.blogspot.com/-WjOu15GC7Tg/VQohpIOwmvI/AAAAAAAAIAA/CgL3rMsgXTo/s1600/*'/></author></entry><entry><id>tag:blogger.com,1999:blog-7923360702512529890.post-881911870793955370</id><published>2019-03-08T13:45:00.001+09:00</published><updated>2019-03-08T13:48:20.247+09:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="applitools"/><category scheme="http://www.blogger.com/atom/ns#" term="nodejs"/><category scheme="http://www.blogger.com/atom/ns#" term="webdriver"/><title type='text'>How to dynamically add coded ignore regions in Applitools</title><content type='html'>There is a special feature in in &lt;a href=&quot;https://applitools.com/&quot;&gt;Applitools Eyes&lt;/a&gt; that&#39;s called &quot;coded ignore regions&quot; to handle dynamic data. It&#39;s often used in Strict mode to increase test coverage if you don&#39;t want to switch to Layout mode. You can add coded ignore regions to the screenshot like this: &lt;b&gt;target = target.ignore(By.id(&#39;reg1&#39;)).ignore(By.id(&#39;reg2&#39;)).ignore(By.id(&#39;reg3&#39;));&lt;/b&gt;&lt;p&gt;But what if these elements are created dynamically and you don&#39;t know how many of them will appear on the page? There could be 5 elements, or maybe 100... You cannot just add them in a chain by modifying a target like that. The answer is - you have to count them first and then add them in a loop. You can see the complete solution below for JavaScript. &lt;p&gt;&lt;script src=&quot;https://pastebin.com/embed_js/DGW8Xd1w&quot;&gt;&lt;/script&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7923360702512529890/posts/default/881911870793955370'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7923360702512529890/posts/default/881911870793955370'/><link rel='alternate' type='text/html' href='http://anahorny.blogspot.com/2019/03/ignore-multiple-coded-regions-in.html' title='How to dynamically add coded ignore regions in Applitools'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author></entry><entry><id>tag:blogger.com,1999:blog-7923360702512529890.post-715828637857393721</id><published>2019-02-18T12:17:00.000+09:00</published><updated>2019-02-18T12:17:27.649+09:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="javascript"/><category scheme="http://www.blogger.com/atom/ns#" term="regexp"/><title type='text'>Accurate Word Count for non-Latin characters in Javascript regex</title><content type='html'>There is a problem that involves Javascript and regular expressions. The JS implementation of regexp does not support Unicode properly, for example &lt;br/&gt;&lt;b&gt;/\b\S+\b/g&lt;/b&gt;&lt;br/&gt;regular expression will not count words with Unicode characters of many national alphabets and scripts, such as Cyrillic, Greek and Hindi. Unfortunately &lt;b&gt;\S&lt;/b&gt; is restricted to Latin-only characters of English alphabet. &lt;br/&gt;To solve this problem we must explicitly include all Unicode characters. My solution is to use this regular expression instead: &lt;br/&gt;&lt;b&gt;/([\u0080-\uFFFF\w]\u0027?)+/g&lt;/b&gt;&lt;br/&gt;It covers the wide range of Unicode characters (from 0080 to FFFF) that includes all national alphabets + apostrophe symbol (0027). &lt;br/&gt;This regex has been tested with the following sample text and it counts all 55 words accurately, ignoring all special characters and punctuation, I used &lt;a href=&quot;https://regexr.com&quot;&gt;https://regexr.com&lt;/a&gt; to check it.  &lt;pre&gt;&lt;br /&gt;One Jack&#39;s two &quot;three&quot; &#39;happy&#39; Кав′ярня два три нав&#39;язливо ένα δύο τρία âêîôû,O’Brien/ëïü,är en häst बर्ताव करना चाहिए।.!@#$%^&amp;*()-+=&lt;&gt;?~`|\{}[],.?&lt;br /&gt;Jess&#39; pencils are sharp.&lt;br /&gt;Direct speech in British English - &#39;That,&#39; he said, &#39;is nonsense.&#39;&lt;br /&gt;Direct speech in American English - &quot;What time will he arrive?&quot; she asked.&lt;br /&gt;What does &#39;integrated circuit&#39; mean?&lt;br /&gt;Rock &#39;n&#39; Roll&lt;br /&gt;&lt;/pre&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7923360702512529890/posts/default/715828637857393721'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7923360702512529890/posts/default/715828637857393721'/><link rel='alternate' type='text/html' href='http://anahorny.blogspot.com/2019/02/accurate-word-count-for-non-latin.html' title='Accurate Word Count for non-Latin characters in Javascript regex'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author></entry><entry><id>tag:blogger.com,1999:blog-7923360702512529890.post-3959607807820974468</id><published>2019-02-10T13:51:00.001+09:00</published><updated>2019-03-16T14:32:15.253+09:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="keyboard"/><category scheme="http://www.blogger.com/atom/ns#" term="linux"/><title type='text'>Switching between keyboard layouts in Openbox (Arch Linux)</title><content type='html'>Switching between two (or more) keyboard layouts in Openbox DE is a task that&#39;s quite easy to accomplish, although it might not be so obvious as in other desktop environments. This solution was tested on Arch Linux. You just need to edit this file (assuming you want to switch between English and Ukrainian Phonetic layouts with Alt-Shift): &lt;b&gt;/etc/X11/xorg.conf.d/01-keyboard-layout.conf&lt;/b&gt;&lt;pre&gt;&lt;br /&gt;Section &quot;InputClass&quot;&lt;br /&gt;  Identifier &quot;keyboard-layout&quot;&lt;br /&gt;  Driver &quot;evdev&quot;&lt;br /&gt;  MatchIsKeyboard &quot;yes&quot;&lt;br /&gt;  Option &quot;XkbLayout&quot; &quot;us,ua(phonetic)&quot;&lt;br /&gt;  Option &quot;XkbModel&quot; &quot;pc105&quot;&lt;br /&gt;  Option &quot;XkbOptions&quot; &quot;grp:alt_shift_toggle&quot;&lt;br /&gt;EndSection&lt;br /&gt;&lt;/pre&gt;If you have Nvidia card, don&#39;t forget to edit &lt;b&gt;/etc/X11/xorg.conf.d/20-nvidia.conf&lt;/b&gt; and change Driver from &quot;kbd&quot; to &quot;evdev&quot; in InputDevice section: &lt;pre&gt;&lt;br /&gt;Section &quot;InputDevice&quot;&lt;br /&gt;  Identifier     &quot;Keyboard0&quot;&lt;br /&gt;  Driver         &quot;evdev&quot;&lt;br /&gt;EndSection&lt;br /&gt;&lt;/pre&gt;You would also need to edit &lt;b&gt;~/.config/openbox/autostart&lt;/b&gt; file and comment out &lt;b&gt;setxkbmap&lt;/b&gt; line to prevent conflict with evdev. Alternative solution would be not to use evdev rules at all and just put &lt;b&gt;setxkbmap -layout &quot;us,ua(phonetic)&quot; -option &quot;grp:alt_shift_toggle&quot;&lt;/b&gt; into this file, though it&#39;s recommended to use evdev because it&#39;s more modern approach to managing layouts on Linux.</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7923360702512529890/posts/default/3959607807820974468'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7923360702512529890/posts/default/3959607807820974468'/><link rel='alternate' type='text/html' href='http://anahorny.blogspot.com/2019/02/switching-between-keyboard-layouts-in.html' title='Switching between keyboard layouts in Openbox (Arch Linux)'/><author><name>Artem Nagornyi</name><uri>http://www.blogger.com/profile/09232985113515879251</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='18' height='32' src='http://1.bp.blogspot.com/-WjOu15GC7Tg/VQohpIOwmvI/AAAAAAAAIAA/CgL3rMsgXTo/s1600/*'/></author></entry><entry><id>tag:blogger.com,1999:blog-7923360702512529890.post-3401837411233923696</id><published>2019-01-26T15:10:00.000+09:00</published><updated>2020-01-18T14:52:02.956+09:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="linux"/><category scheme="http://www.blogger.com/atom/ns#" term="nvidia"/><title type='text'>How to prevent screen tearing with NVIDIA proprietary drivers in Firefox browser on Linux</title><content type='html'>You might have noticed occasional screen tearing with NVIDIA proprietary drivers in Firefox browser on Linux. Fortunately the solution is easy. Setting &lt;b&gt;layers.acceleration.force-enabled&lt;/b&gt; setting to &lt;b&gt;true&lt;/b&gt; in &lt;b&gt;about:config&lt;/b&gt; prevents screen tearing and makes scrolling really smooth because it forces NVIDIA hardware acceleration that is disabled by default. &lt;br/&gt;&lt;a href=&quot;https://3.bp.blogspot.com/-hJjmyxvsaVk/XEv5QK_uePI/AAAAAAAAQXk/dhDLv1F276kgSh-zSJap8dUnUrqFtlYVwCLcBGAs/s1600/Screenshot%2Bfrom%2B2019-01-26%2B15-02-27.png&quot; imageanchor=&quot;1&quot; &gt;&lt;img border=&quot;0&quot; src=&quot;https://3.bp.blogspot.com/-hJjmyxvsaVk/XEv5QK_uePI/AAAAAAAAQXk/dhDLv1F276kgSh-zSJap8dUnUrqFtlYVwCLcBGAs/s640/Screenshot%2Bfrom%2B2019-01-26%2B15-02-27.png&quot; width=&quot;640&quot; height=&quot;92&quot; data-original-width=&quot;1069&quot; data-original-height=&quot;153&quot; /&gt;&lt;/a&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7923360702512529890/posts/default/3401837411233923696'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7923360702512529890/posts/default/3401837411233923696'/><link rel='alternate' type='text/html' href='http://anahorny.blogspot.com/2019/01/how-to-prevent-screen-tearing-on-nvidia.html' title='How to prevent screen tearing with NVIDIA proprietary drivers in Firefox browser on Linux'/><author><name>Artem Nagornyi</name><uri>http://www.blogger.com/profile/09232985113515879251</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='18' height='32' src='http://1.bp.blogspot.com/-WjOu15GC7Tg/VQohpIOwmvI/AAAAAAAAIAA/CgL3rMsgXTo/s1600/*'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://3.bp.blogspot.com/-hJjmyxvsaVk/XEv5QK_uePI/AAAAAAAAQXk/dhDLv1F276kgSh-zSJap8dUnUrqFtlYVwCLcBGAs/s72-c/Screenshot%2Bfrom%2B2019-01-26%2B15-02-27.png" height="72" width="72"/></entry><entry><id>tag:blogger.com,1999:blog-7923360702512529890.post-6471545138430677069</id><published>2018-08-28T17:35:00.000+09:00</published><updated>2018-08-28T17:35:00.801+09:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="applitools"/><category scheme="http://www.blogger.com/atom/ns#" term="javascript"/><category scheme="http://www.blogger.com/atom/ns#" term="selenium"/><category scheme="http://www.blogger.com/atom/ns#" term="webdriver"/><title type='text'>Hiding a blinking caret (cursor) on the page with Webdriver and Javascript</title><content type='html'>When you use Applitools for testing, it is important to keep all pages in the same state as they used to be when the baseline Applitools screenshot was taken. In Applitools visual difference means a bug. This is why a blinking caret (cursor) can become a problem when the baseline screenshot was taken with a caret either visible or invisible, as long as the actual screenshot was captured with a different state of the caret. We can avoid this issue if we hide the caret by making it transparent before taking a screenshot in Applitools. This is how we can do it in Selenium Webdriver (Javascript bindings) (assuming that you initialized the driver object with Webdriver). &lt;p&gt;&lt;script src=&quot;https://pastebin.com/embed_js/496DTjhr&quot;&gt;&lt;/script&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7923360702512529890/posts/default/6471545138430677069'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7923360702512529890/posts/default/6471545138430677069'/><link rel='alternate' type='text/html' href='http://anahorny.blogspot.com/2018/08/hiding-blinking-caret-cursor-on-page.html' title='Hiding a blinking caret (cursor) on the page with Webdriver and Javascript'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author></entry><entry><id>tag:blogger.com,1999:blog-7923360702512529890.post-7512216379613222604</id><published>2018-01-25T12:37:00.000+09:00</published><updated>2018-01-25T13:05:26.887+09:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="android"/><category scheme="http://www.blogger.com/atom/ns#" term="iphone"/><category scheme="http://www.blogger.com/atom/ns#" term="javascript"/><category scheme="http://www.blogger.com/atom/ns#" term="mobile"/><category scheme="http://www.blogger.com/atom/ns#" term="nodejs"/><category scheme="http://www.blogger.com/atom/ns#" term="saucelabs"/><category scheme="http://www.blogger.com/atom/ns#" term="testobject"/><category scheme="http://www.blogger.com/atom/ns#" term="webdriver"/><title type='text'>Basic setup and configuration of TestObject in Node JS for testing of a web application</title><content type='html'>If you are already using &lt;a href=&quot;https://saucelabs.com&quot;&gt;SauceLabs&lt;/a&gt; for automated web UI testing on mobile devices, then you could be interested in trying &lt;a href=&quot;https://testobject.com/&quot;&gt;TestObject&lt;/a&gt; cloud service that was acquired and became a part of SauceLabs family in 2017. It allows you to run your existing tests on real devices (Android and iPhone). SauceLabs provides emulators, which work quite well, but, depending on the requirements of your project, you may need to execute tests on real hardware. Another reason for switching to TestObject could be using the latest version of Android OS which may not be available at SauceLabs. At the moment of posting this article the latest supported version was Android 7.1 on SauceLabs and Android 8.1 on TestObject. Luckily the transition to TestObject is quite seamless. You don&#39;t need to modify your existing automated tests, only the provider endpoint and a few capabilities. The disanvantage of using a free Testobject account is that you are limited to only a few devices which are marked as Free in the list, and you cannot execute your tests in more than one thread. Also you have to share a free device with the rest of the world, all 7.6 billions of human populace, and you have to wait a considerable amount of time before you can start using a free device, from 30 sec to the eternity, depending on how heavily it is used at the moment. And I can assure you that free devices are used very heavily, even after midnight when testers are supposed to go to bed. It could be much easier if SauceLabs and TestObject used the same plan. But they don&#39;t, and it sucks, especially if you need to run your tests on desktop browsers as well, and you already pay for a SauceLabs subscription. Hopefully this inconvenience will be solved in the future. Here is a step-by-step instruction how to make a basic TestObject setup and configuration with a little Node JS example. &lt;p&gt;&lt;b&gt;Step 1. Press Access Real Devices button, your free TestObject account will be created automatically&lt;/b&gt;&lt;p&gt;&lt;a href=&quot;https://2.bp.blogspot.com/-E78JiGnecHE/WmlLtiMwKJI/AAAAAAAABNs/cb9GPcq1A248fAtvZj_v-27KSNN0nqpUACLcBGAs/s1600/Screenshot%2Bat%2BJan%2B25%2B11-51-06.png&quot; imageanchor=&quot;1&quot; &gt;&lt;img border=&quot;0&quot; src=&quot;https://2.bp.blogspot.com/-E78JiGnecHE/WmlLtiMwKJI/AAAAAAAABNs/cb9GPcq1A248fAtvZj_v-27KSNN0nqpUACLcBGAs/s320/Screenshot%2Bat%2BJan%2B25%2B11-51-06.png&quot; width=&quot;182&quot; height=&quot;320&quot; data-original-width=&quot;246&quot; data-original-height=&quot;432&quot; /&gt;&lt;/a&gt;&lt;p&gt;&lt;b&gt;Step 2.&lt;/b&gt;&lt;p&gt;&lt;a href=&quot;https://1.bp.blogspot.com/-dF7tkQuCEz4/WmlMLwbKN-I/AAAAAAAABNw/L2_JjI-p1_I_vuT77jNLq0eKS9ltDReJgCLcBGAs/s1600/Screenshot%2Bat%2BJan%2B25%2B11-51-41.png&quot; imageanchor=&quot;1&quot; &gt;&lt;img border=&quot;0&quot; src=&quot;https://1.bp.blogspot.com/-dF7tkQuCEz4/WmlMLwbKN-I/AAAAAAAABNw/L2_JjI-p1_I_vuT77jNLq0eKS9ltDReJgCLcBGAs/s320/Screenshot%2Bat%2BJan%2B25%2B11-51-41.png&quot; width=&quot;320&quot; height=&quot;129&quot; data-original-width=&quot;151&quot; data-original-height=&quot;61&quot; /&gt;&lt;/a&gt;&lt;p&gt;&lt;b&gt;Step 3.&lt;/b&gt;&lt;p&gt;&lt;a href=&quot;https://1.bp.blogspot.com/-UxxKvRV6SNs/WmlMSxmmWqI/AAAAAAAABN4/ZtquM9sTdKsAkPZ84wvLsg87Uc7RjM2IwCLcBGAs/s1600/Screenshot%2Bat%2BJan%2B25%2B11-52-43.png&quot; imageanchor=&quot;1&quot; &gt;&lt;img border=&quot;0&quot; src=&quot;https://1.bp.blogspot.com/-UxxKvRV6SNs/WmlMSxmmWqI/AAAAAAAABN4/ZtquM9sTdKsAkPZ84wvLsg87Uc7RjM2IwCLcBGAs/s320/Screenshot%2Bat%2BJan%2B25%2B11-52-43.png&quot; width=&quot;320&quot; height=&quot;155&quot; data-original-width=&quot;1202&quot; data-original-height=&quot;584&quot; /&gt;&lt;/a&gt;&lt;p&gt;&lt;b&gt;Step 4. Enter the URL of your web application, its name and version&lt;/b&gt;&lt;p&gt;&lt;a href=&quot;https://3.bp.blogspot.com/-qHKjIfNqD_4/WmlMmr21g_I/AAAAAAAABOQ/DF4dmF_R-9o9O9rZ2BLyfAjc30ZiCMrMACLcBGAs/s1600/Screenshot%2Bat%2BJan%2B25%2B11-53-17.png&quot; imageanchor=&quot;1&quot; &gt;&lt;img border=&quot;0&quot; src=&quot;https://3.bp.blogspot.com/-qHKjIfNqD_4/WmlMmr21g_I/AAAAAAAABOQ/DF4dmF_R-9o9O9rZ2BLyfAjc30ZiCMrMACLcBGAs/s320/Screenshot%2Bat%2BJan%2B25%2B11-53-17.png&quot; width=&quot;320&quot; height=&quot;237&quot; data-original-width=&quot;627&quot; data-original-height=&quot;465&quot; /&gt;&lt;/a&gt;&lt;p&gt;&lt;b&gt;Step 5.&lt;/b&gt;&lt;p&gt;&lt;a href=&quot;https://4.bp.blogspot.com/-HODwcVWvXxg/WmlMwCbqXAI/AAAAAAAABOU/pgKl2Dl2zgsJ5QJpgZM6rHHlNjd3wfzPACLcBGAs/s1600/Screenshot%2Bat%2BJan%2B25%2B11-54-59.png&quot; imageanchor=&quot;1&quot; &gt;&lt;img border=&quot;0&quot; src=&quot;https://4.bp.blogspot.com/-HODwcVWvXxg/WmlMwCbqXAI/AAAAAAAABOU/pgKl2Dl2zgsJ5QJpgZM6rHHlNjd3wfzPACLcBGAs/s320/Screenshot%2Bat%2BJan%2B25%2B11-54-59.png&quot; width=&quot;320&quot; height=&quot;34&quot; data-original-width=&quot;1227&quot; data-original-height=&quot;129&quot; /&gt;&lt;/a&gt;&lt;p&gt;&lt;b&gt;Step 6.&lt;/b&gt;&lt;p&gt;&lt;a href=&quot;https://1.bp.blogspot.com/-FhYuQ5_5dN8/WmlM3oQEzOI/AAAAAAAABOY/MnpG1NleTzY8zy_Rc2-JY7ybdO34bES8QCLcBGAs/s1600/Screenshot%2Bat%2BJan%2B25%2B11-55-44.png&quot; imageanchor=&quot;1&quot; &gt;&lt;img border=&quot;0&quot; src=&quot;https://1.bp.blogspot.com/-FhYuQ5_5dN8/WmlM3oQEzOI/AAAAAAAABOY/MnpG1NleTzY8zy_Rc2-JY7ybdO34bES8QCLcBGAs/s320/Screenshot%2Bat%2BJan%2B25%2B11-55-44.png&quot; width=&quot;320&quot; height=&quot;37&quot; data-original-width=&quot;1233&quot; data-original-height=&quot;142&quot; /&gt;&lt;/a&gt;&lt;p&gt;&lt;b&gt;Step 7. You can use the generated API key and a URL (choose from EU or US center)&lt;/b&gt;&lt;p&gt;&lt;a href=&quot;https://4.bp.blogspot.com/-MH0muGFMbOM/WmlQK58TUDI/AAAAAAAABO8/wemr7ne9qDkNitWGZ1pbFfiKfM_k3HO5QCLcBGAs/s1600/Screenshot%2Bat%2BJan%2B25%2B12-33-42.png&quot; imageanchor=&quot;1&quot; &gt;&lt;img border=&quot;0&quot; src=&quot;https://4.bp.blogspot.com/-MH0muGFMbOM/WmlQK58TUDI/AAAAAAAABO8/wemr7ne9qDkNitWGZ1pbFfiKfM_k3HO5QCLcBGAs/s320/Screenshot%2Bat%2BJan%2B25%2B12-33-42.png&quot; width=&quot;320&quot; height=&quot;156&quot; data-original-width=&quot;1206&quot; data-original-height=&quot;588&quot; /&gt;&lt;/a&gt;&lt;p&gt;&lt;b&gt;Step 8. If you have a Free account, you can only use devices marked as Free in this list&lt;/b&gt;&lt;p&gt;&lt;a href=&quot;https://4.bp.blogspot.com/-Ub2ehjIE0nQ/WmlNCoikpII/AAAAAAAABOo/p9rfxNLCdDsQrvFkV4rY8I7T3m77u3wWgCLcBGAs/s1600/Screenshot%2Bat%2BJan%2B25%2B11-57-56.png&quot; imageanchor=&quot;1&quot; &gt;&lt;img border=&quot;0&quot; src=&quot;https://4.bp.blogspot.com/-Ub2ehjIE0nQ/WmlNCoikpII/AAAAAAAABOo/p9rfxNLCdDsQrvFkV4rY8I7T3m77u3wWgCLcBGAs/s320/Screenshot%2Bat%2BJan%2B25%2B11-57-56.png&quot; width=&quot;320&quot; height=&quot;202&quot; data-original-width=&quot;1213&quot; data-original-height=&quot;767&quot; /&gt;&lt;/a&gt;&lt;p&gt;&lt;b&gt;Step 9. Basic Node JS configuration that starts a Selenium webdriver on a TestObject device&lt;/b&gt;&lt;p&gt;&lt;script src=&quot;https://pastebin.com/embed_js/s3ADmVer&quot;&gt;&lt;/script&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7923360702512529890/posts/default/7512216379613222604'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7923360702512529890/posts/default/7512216379613222604'/><link rel='alternate' type='text/html' href='http://anahorny.blogspot.com/2018/01/basic-setup-and-configuration-of.html' title='Basic setup and configuration of TestObject in Node JS for testing of a web application'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://2.bp.blogspot.com/-E78JiGnecHE/WmlLtiMwKJI/AAAAAAAABNs/cb9GPcq1A248fAtvZj_v-27KSNN0nqpUACLcBGAs/s72-c/Screenshot%2Bat%2BJan%2B25%2B11-51-06.png" height="72" width="72"/></entry><entry><id>tag:blogger.com,1999:blog-7923360702512529890.post-6797527257439831475</id><published>2017-12-19T13:00:00.000+09:00</published><updated>2017-12-19T13:07:48.724+09:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="nodejs"/><category scheme="http://www.blogger.com/atom/ns#" term="saucelabs"/><category scheme="http://www.blogger.com/atom/ns#" term="selenium"/><category scheme="http://www.blogger.com/atom/ns#" term="webdriver"/><title type='text'>Annotating Sauce Labs tests in Node JS</title><content type='html'>SauceLabs does not annotate jobs by default, showing the question marks instead of statuses, and the name of a job is always set to &quot;Unnamed job&quot;. Luckily we have all the powers of &lt;a href=&quot;https://wiki.saucelabs.com/display/DOCS/The+Sauce+Labs+REST+API&quot;&gt;Sauce Labs REST API&lt;/a&gt; in our hands and can both set the name of a job and its final status to something more meaningful. This example demonstrates how it can be done in Node JS. Every Sauce Labs job has a unique ID. We get this ID from the Webdriver object. &lt;p&gt;&lt;b&gt;saucelabs.js&lt;/b&gt;&lt;script src=&quot;https://pastebin.com/embed_js/q7vzqV2m&quot;&gt;&lt;/script&gt;&lt;p&gt;&lt;b&gt;main.js&lt;/b&gt;&lt;script src=&quot;https://pastebin.com/embed_js/hFQsaFCb&quot;&gt;&lt;/script&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7923360702512529890/posts/default/6797527257439831475'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7923360702512529890/posts/default/6797527257439831475'/><link rel='alternate' type='text/html' href='http://anahorny.blogspot.com/2017/12/annotating-sauce-labs-tests-in-node-js.html' title='Annotating Sauce Labs tests in Node JS'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author></entry><entry><id>tag:blogger.com,1999:blog-7923360702512529890.post-2301981327798204967</id><published>2017-12-11T13:51:00.000+09:00</published><updated>2017-12-19T13:17:15.319+09:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="gitlab"/><category scheme="http://www.blogger.com/atom/ns#" term="javascript"/><category scheme="http://www.blogger.com/atom/ns#" term="nodejs"/><title type='text'>Reading a Gitlab pipeline variable in NodeJS synchronously</title><content type='html'>I&#39;m assuming you already created your project on Gitlab and got your personal access &lt;a href=&quot;https://docs.gitlab.com/ce/user/profile/personal_access_tokens.html&quot;&gt;token&lt;/a&gt;. This is a simple synchronous function that reads a Gitlab pipeline variable in NodeJS using Gitlab REST API v3. It uses &lt;a href=&quot;https://www.npmjs.com/package/sync-request&quot;&gt;sync-request&lt;/a&gt; that is not recommended to use in a production environment, although it can be successfully used in automated testing and various scripts. &lt;p&gt;&lt;script src=&quot;https://pastebin.com/embed_js/C7B0sFzE&quot;&gt;&lt;/script&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7923360702512529890/posts/default/2301981327798204967'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7923360702512529890/posts/default/2301981327798204967'/><link rel='alternate' type='text/html' href='http://anahorny.blogspot.com/2017/12/reading-gitlab-pipeline-variable-in.html' title='Reading a Gitlab pipeline variable in NodeJS synchronously'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author></entry><entry><id>tag:blogger.com,1999:blog-7923360702512529890.post-765646709317859525</id><published>2016-04-26T09:50:00.000+09:00</published><updated>2017-12-11T13:12:32.263+09:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="html"/><category scheme="http://www.blogger.com/atom/ns#" term="javascript"/><title type='text'>S3 Bucket Browser that doesn&#39;t suck</title><content type='html'>&lt;br /&gt;&lt;a href=&quot;https://github.com/anahorny/pretty-s3-index-html&quot;&gt;https://github.com/anahorny/pretty-s3-index-html&lt;/a&gt;&lt;br /&gt;This S3 browser displays the list of files and virtual folders in your Amazon S3 bucket&lt;br /&gt;&lt;br /&gt;This is a fork of Nolan Lawson&#39;s S3 browser (&lt;a href=&quot;https://github.com/nolanlawson/pretty-s3-index-html&quot;&gt;https://github.com/nolanlawson/pretty-s3-index-html&lt;/a&gt;) with multiple fixes and enhancements. Also I completely redesigned the implementation of virtual folders.&lt;br /&gt;&lt;br /&gt;How to use it?&lt;br /&gt;&lt;br /&gt;Just put the &lt;i&gt;index.html&lt;/i&gt; file in the root of your bucket and give it all necessary permissions.&lt;br /&gt;&lt;br /&gt;Use the full path to open the S3 browser (including &lt;i&gt;index.html&lt;/i&gt; part): &lt;span style=&quot;color: red;&quot;&gt;http://yourbucketname.s3.amazonaws.com/index.html&lt;/span&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7923360702512529890/posts/default/765646709317859525'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7923360702512529890/posts/default/765646709317859525'/><link rel='alternate' type='text/html' href='http://anahorny.blogspot.com/2016/04/s3-bucket-browser-that-doesnt-suck.html' title='S3 Bucket Browser that doesn&#39;t suck'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author></entry><entry><id>tag:blogger.com,1999:blog-7923360702512529890.post-2178400710125673304</id><published>2016-03-26T18:49:00.001+09:00</published><updated>2016-03-26T18:49:15.226+09:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="linux"/><title type='text'>Increasing sound volume for recorded files on Linux</title><content type='html'>One-liner for increasing sound volume for recorded files on Linux (make sure ffmpeg is installed):&lt;br /&gt;&lt;br /&gt;&lt;b&gt;for file in *.3gp; do ffmpeg -i &quot;$file&quot; -af &quot;volume=15.0&quot; ./conv/&quot;${file%.3gp}&quot;.mp3; done&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;The line above will increase sound 15X for all files with .3gp extension in the current directory and saves the resulting .mp3 files into ./conv subdirectory (make sure it exists).</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7923360702512529890/posts/default/2178400710125673304'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7923360702512529890/posts/default/2178400710125673304'/><link rel='alternate' type='text/html' href='http://anahorny.blogspot.com/2016/03/increasing-sound-volume-for-recorded.html' title='Increasing sound volume for recorded files on Linux'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author></entry><entry><id>tag:blogger.com,1999:blog-7923360702512529890.post-4996355431644451643</id><published>2015-12-29T14:49:00.000+09:00</published><updated>2015-12-29T14:52:11.756+09:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="jmeter"/><title type='text'>JMeter: getting a value from the randomly selected variable</title><content type='html'>Assuming we have a CSV Data Source with multiple rows and 10 values in every row. We are parsing and storing the values into a set of variables, named var1,var2,var3,var4,var5,var6,var7,var8,var9,var10.&lt;br /&gt;&lt;br /&gt;Now we can use these variables in any step using ${varN} reference. But what if we want to select a variable from this list randomly? So that one iteration would use var3, and another iteration would use var7, selected randomly.&lt;br /&gt;&lt;br /&gt;I have used the following solution:&lt;br /&gt;&lt;ol&gt;&lt;li&gt;Create additional user defined variable varTmp using &quot;User Defined Variables&quot; config element.&lt;/li&gt;&lt;li&gt;Create &quot;Random Variable&quot; config element with variable name &quot;rnd&quot;, minimum value 1 and maximum value 10.&lt;/li&gt;&lt;li&gt;Then use&amp;nbsp;BeanShell PostProcessor that will store the value from randomly selected variable (var1-var10) into varTmp. We need to define two fields in the config element:&amp;nbsp;&lt;/li&gt;&lt;/ol&gt;&lt;ul&gt;&lt;li&gt;Parameters:&amp;nbsp;${__V(var${rnd})}&lt;/li&gt;&lt;li&gt;Script: vars.put(&quot;varTmp&quot;, bsh.args[0]);&lt;/li&gt;&lt;/ul&gt;&lt;div&gt;Now we can use ${varTmp} as a reference to the randomly selected varN variable.&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7923360702512529890/posts/default/4996355431644451643'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7923360702512529890/posts/default/4996355431644451643'/><link rel='alternate' type='text/html' href='http://anahorny.blogspot.com/2015/12/jmeter-getting-value-from-randomly.html' title='JMeter: getting a value from the randomly selected variable'/><author><name>Artem Nagornyi</name><uri>http://www.blogger.com/profile/09232985113515879251</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='18' height='32' src='http://1.bp.blogspot.com/-WjOu15GC7Tg/VQohpIOwmvI/AAAAAAAAIAA/CgL3rMsgXTo/s1600/*'/></author></entry><entry><id>tag:blogger.com,1999:blog-7923360702512529890.post-8905471085279009796</id><published>2015-12-24T21:29:00.000+09:00</published><updated>2016-02-29T11:30:52.830+09:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="linux"/><title type='text'>Avoiding eye strain and cutting blue light in Linux</title><content type='html'>You can cut the blue light emitted from your screen using a wonderful Linux program called Redshift. It really helps to remove the eyestrain at nighttime, making reading from screen and late night coding much more comfortable. It is available as a binary from the official site: &lt;a href=&quot;http://jonls.dk/redshift/&quot;&gt;http://jonls.dk/redshift/&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;On Fedora 22 you can just install it from the repository: &lt;pre class=&quot;brush: bash&quot;&gt;&lt;br /&gt;sudo dnf install redshift&lt;br /&gt;sudo dnf install redshift-gtk&lt;br /&gt;&lt;/pre&gt;The second one is a Redshift GUI that lives in a Gnome shell tray.&lt;br /&gt;&lt;br /&gt;Sometimes during startup it gives you the error message &quot;geoclue2 provider: Unable to start GeoClue client&quot;. To fix this problem just add a new section to /etc/geoclue/geoclue.conf file, this works on Fedora, not sure about other distros: &lt;pre class=&quot;brush: text&quot;&gt;&lt;br /&gt;[redshift]&lt;br /&gt;allowed=true&lt;br /&gt;system=false&lt;br /&gt;users=&lt;br /&gt;&lt;/pre&gt;Redshift reads your geolocation data and adjusts the screen color temperature according to the local time. It is similar to &lt;a href=&quot;https://justgetflux.com/&quot;&gt;f.lux&lt;/a&gt; application for Mac OS X platform.</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7923360702512529890/posts/default/8905471085279009796'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7923360702512529890/posts/default/8905471085279009796'/><link rel='alternate' type='text/html' href='http://anahorny.blogspot.com/2015/12/cutting-blue-light-in-linux.html' title='Avoiding eye strain and cutting blue light in Linux'/><author><name>Artem Nagornyi</name><uri>http://www.blogger.com/profile/09232985113515879251</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='18' height='32' src='http://1.bp.blogspot.com/-WjOu15GC7Tg/VQohpIOwmvI/AAAAAAAAIAA/CgL3rMsgXTo/s1600/*'/></author></entry><entry><id>tag:blogger.com,1999:blog-7923360702512529890.post-7412916639782048804</id><published>2015-08-14T00:32:00.001+09:00</published><updated>2015-08-14T00:42:03.418+09:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="ajax"/><category scheme="http://www.blogger.com/atom/ns#" term="java"/><category scheme="http://www.blogger.com/atom/ns#" term="jmeter"/><title type='text'>AJAX Sampler for Jmeter</title><content type='html'>This is my Jmeter sampler for simulating AJAX/XHR calls: &lt;a href=&quot;https://github.com/anahorny/ajax-sampler&quot;&gt;https://github.com/anahorny/ajax-sampler&lt;/a&gt;&lt;br/&gt;&lt;br/&gt;This sampler was originally a fork of Blazemeter example AJAX Sampler: https://bitbucket.org/blazemeter/ajax-sampler &lt;br/&gt;&lt;br/&gt;The purpose of this sampler is to execute parallel HTTP requests to multiple endpoints overriding JMeter Thread Group settings and spawning a thread per URL provided. &lt;br/&gt;&lt;br/&gt;It&#39;s fully working, really easy to use (just compile and put the jar file into /lib/ext/ directory within Jmeter), but quite memory-hungry at the moment. Feel free to use, fork and contribute.</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7923360702512529890/posts/default/7412916639782048804'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7923360702512529890/posts/default/7412916639782048804'/><link rel='alternate' type='text/html' href='http://anahorny.blogspot.com/2015/08/ajax-sampler-for-jmeter.html' title='AJAX Sampler for Jmeter'/><author><name>Artem Nagornyi</name><uri>http://www.blogger.com/profile/09232985113515879251</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='18' height='32' src='http://1.bp.blogspot.com/-WjOu15GC7Tg/VQohpIOwmvI/AAAAAAAAIAA/CgL3rMsgXTo/s1600/*'/></author></entry><entry><id>tag:blogger.com,1999:blog-7923360702512529890.post-8262053857910771000</id><published>2015-08-11T16:58:00.002+09:00</published><updated>2017-12-19T13:38:20.827+09:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="bash"/><category scheme="http://www.blogger.com/atom/ns#" term="linux"/><category scheme="http://www.blogger.com/atom/ns#" term="shell"/><title type='text'>Shell script to wait until your site becomes reachable and returns code 200</title><content type='html'>Sometimes you don&#39;t know when a server becomes reachable and you just need to wait, while continuously pinging it with a certain interval. This is a shell script that does everything for you (including a timeout if host is not available during a specified period of time). It accepts two parameters: hostname of your site and a timeout in seconds. &lt;p&gt;&lt;script src=&quot;https://pastebin.com/embed_js/cnB6JCUQ&quot;&gt;&lt;/script&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7923360702512529890/posts/default/8262053857910771000'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7923360702512529890/posts/default/8262053857910771000'/><link rel='alternate' type='text/html' href='http://anahorny.blogspot.com/2015/08/shell-script-to-wait-until-your-site.html' title='Shell script to wait until your site becomes reachable and returns code 200'/><author><name>Artem Nagornyi</name><uri>http://www.blogger.com/profile/09232985113515879251</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='18' height='32' src='http://1.bp.blogspot.com/-WjOu15GC7Tg/VQohpIOwmvI/AAAAAAAAIAA/CgL3rMsgXTo/s1600/*'/></author></entry><entry><id>tag:blogger.com,1999:blog-7923360702512529890.post-4687432780444944491</id><published>2015-07-30T15:02:00.001+09:00</published><updated>2017-12-19T14:06:45.066+09:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="bash"/><category scheme="http://www.blogger.com/atom/ns#" term="getopts"/><title type='text'>How to accept long options with getopts in your shell script</title><content type='html'>Normally you can only have single-character options when processing your arguments with a standard getopts utility in Linux or Mac OS X. You can use getopt for long options, but it is not included in the standard Mac OS X installation. So this is a trick that will allow you to simulate long options with a standard getopts, that will work on all *nix platforms without additional software installations. This function will also print a usage tip if you execute the script without parameters (or with -h parameter). &lt;p&gt;&lt;script src=&quot;https://pastebin.com/embed_js/Le564S8s&quot;&gt;&lt;/script&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7923360702512529890/posts/default/4687432780444944491'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7923360702512529890/posts/default/4687432780444944491'/><link rel='alternate' type='text/html' href='http://anahorny.blogspot.com/2015/07/how-to-accept-long-options-with-getopts.html' title='How to accept long options with getopts in your shell script'/><author><name>Artem Nagornyi</name><uri>http://www.blogger.com/profile/09232985113515879251</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='18' height='32' src='http://1.bp.blogspot.com/-WjOu15GC7Tg/VQohpIOwmvI/AAAAAAAAIAA/CgL3rMsgXTo/s1600/*'/></author></entry><entry><id>tag:blogger.com,1999:blog-7923360702512529890.post-2918666766625193914</id><published>2015-07-30T14:43:00.000+09:00</published><updated>2017-12-19T14:10:22.534+09:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="bash"/><category scheme="http://www.blogger.com/atom/ns#" term="powershell"/><title type='text'>Print your text surrounded by a frame (box) in a terminal (Bash and Powershell examples)</title><content type='html'>If you want to draw a box (a simple frame that is using only symbol characters |, = and /) around your text in a terminal output, you can use the following Bash function, that also allows you to use different colors: &lt;p&gt;&lt;script src=&quot;https://pastebin.com/embed_js/PCinSCyZ&quot;&gt;&lt;/script&gt;&lt;p&gt;And in Windows Powershell you can use the following function: &lt;p&gt;&lt;script src=&quot;https://pastebin.com/embed_js/2bDv74un&quot;&gt;&lt;/script&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7923360702512529890/posts/default/2918666766625193914'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7923360702512529890/posts/default/2918666766625193914'/><link rel='alternate' type='text/html' href='http://anahorny.blogspot.com/2015/07/print-your-text-surrounded-by-frame-box.html' title='Print your text surrounded by a frame (box) in a terminal (Bash and Powershell examples)'/><author><name>Artem Nagornyi</name><uri>http://www.blogger.com/profile/09232985113515879251</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='18' height='32' src='http://1.bp.blogspot.com/-WjOu15GC7Tg/VQohpIOwmvI/AAAAAAAAIAA/CgL3rMsgXTo/s1600/*'/></author></entry><entry><id>tag:blogger.com,1999:blog-7923360702512529890.post-5691108277686158862</id><published>2015-07-24T23:56:00.000+09:00</published><updated>2018-06-11T00:36:00.769+09:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="japanese"/><title type='text'>Japanese air conditioner kanji</title><content type='html'>It&#39;s becoming unbearably hot (or cold as long as you are residing in Southern Hemisphere of the planet Earth), so I&#39;ve translated this from my Sharp air conditioner remote control, your remote control may have slightly different kanji: &lt;br/&gt;&lt;br/&gt;冷房 cooling the air &lt;br/&gt;&lt;br/&gt;除湿 drying the air &lt;br/&gt;&lt;br/&gt;暖房 heating the air &lt;br/&gt;&lt;br/&gt;温度 change desired temperature &lt;br/&gt;&lt;br/&gt;風量 change speed of fan &lt;br/&gt;&lt;br/&gt;停止 turn off A/C &lt;br/&gt;&lt;br/&gt;上下風向 change direction of fan &lt;br/&gt;&lt;br/&gt;死類消臭 bring the fresh air into the room &lt;br/&gt;&lt;br/&gt;内部洗浄 A/C self-cleaning &lt;br/&gt;&lt;br/&gt;(入) タイマー set time to turn on the A/C (in hours) &lt;br/&gt;&lt;br/&gt;(切) タイマー set time to turn off the A/C (in hours) &lt;br/&gt;&lt;br/&gt;ねむリズム special mode that helps to save energy on A/C during sleeping</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7923360702512529890/posts/default/5691108277686158862'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7923360702512529890/posts/default/5691108277686158862'/><link rel='alternate' type='text/html' href='http://anahorny.blogspot.com/2015/07/japanese-air-conditioner-kanji.html' title='Japanese air conditioner kanji'/><author><name>Artem Nagornyi</name><uri>http://www.blogger.com/profile/09232985113515879251</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='18' height='32' src='http://1.bp.blogspot.com/-WjOu15GC7Tg/VQohpIOwmvI/AAAAAAAAIAA/CgL3rMsgXTo/s1600/*'/></author></entry><entry><id>tag:blogger.com,1999:blog-7923360702512529890.post-7985443689242352505</id><published>2015-03-25T17:53:00.001+09:00</published><updated>2017-12-19T15:55:00.907+09:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="ajax"/><category scheme="http://www.blogger.com/atom/ns#" term="casperjs"/><category scheme="http://www.blogger.com/atom/ns#" term="javascript"/><category scheme="http://www.blogger.com/atom/ns#" term="phantomjs"/><title type='text'>Verify condition synchronously with CasperJS / PhantomJS in case of AJAX call and dynamic content</title><content type='html'>Synchronously waiting for a condition to be met in CasperJS, implementation of helper methods: &lt;p&gt;&lt;script src=&quot;https://pastebin.com/embed_js/ydkhsFJw&quot;&gt;&lt;/script&gt;&lt;p&gt;And now we can dynamically verify that our startup dialog has some text (in case text is loaded by AJAX call some time after the dialog was called): &lt;p&gt;&lt;script src=&quot;https://pastebin.com/embed_js/HJ5ZtX2z&quot;&gt;&lt;/script&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7923360702512529890/posts/default/7985443689242352505'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7923360702512529890/posts/default/7985443689242352505'/><link rel='alternate' type='text/html' href='http://anahorny.blogspot.com/2015/03/verify-condition-synchronously-with.html' title='Verify condition synchronously with CasperJS / PhantomJS in case of AJAX call and dynamic content'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author></entry><entry><id>tag:blogger.com,1999:blog-7923360702512529890.post-1124747081480426501</id><published>2015-03-20T18:57:00.001+09:00</published><updated>2017-12-19T15:59:40.601+09:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="chronos"/><category scheme="http://www.blogger.com/atom/ns#" term="jmeter"/><category scheme="http://www.blogger.com/atom/ns#" term="load testing"/><category scheme="http://www.blogger.com/atom/ns#" term="maven"/><title type='text'>Maven pom.xml configuration file for executing Jmeter tests and generating HTML reports</title><content type='html'>Example of a Maven pom.xml file for executing Jmeter tests that will generate HTML reports and historical trends with pretty graphs with the help of a Chronos plugin. &lt;p&gt;&lt;script src=&quot;https://pastebin.com/embed_js/1kyMzzjZ&quot;&gt;&lt;/script&gt;&lt;p&gt;- So you install Maven and make sure it works &lt;br/&gt;- Create some testmyapp.jmx Jmeter script and put it into ${basedir}/tests/ directory &lt;br/&gt;- Unpack the latest version of Jmeter into jmeter.home directory &lt;br/&gt;- And finally you execute the following commands (-Dbuild.number parameter can be your build number and you can set it dynamically in your continuous integration system, this is just for convenience and even greater coolness of the script): &lt;p&gt;&lt;script src=&quot;https://pastebin.com/embed_js/MTawAsX0&quot;&gt;&lt;/script&gt;&lt;p&gt;And then enjoy looking at your pretty HTML reports generated by Chronos.</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7923360702512529890/posts/default/1124747081480426501'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7923360702512529890/posts/default/1124747081480426501'/><link rel='alternate' type='text/html' href='http://anahorny.blogspot.com/2015/03/maven-pomxml-configuration-file-for.html' title='Maven pom.xml configuration file for executing Jmeter tests and generating HTML reports'/><author><name>Artem Nagornyi</name><uri>http://www.blogger.com/profile/09232985113515879251</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='18' height='32' src='http://1.bp.blogspot.com/-WjOu15GC7Tg/VQohpIOwmvI/AAAAAAAAIAA/CgL3rMsgXTo/s1600/*'/></author></entry><entry><id>tag:blogger.com,1999:blog-7923360702512529890.post-3012039667214398847</id><published>2015-03-20T15:18:00.000+09:00</published><updated>2018-08-28T13:29:52.240+09:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="c#"/><category scheme="http://www.blogger.com/atom/ns#" term="click"/><category scheme="http://www.blogger.com/atom/ns#" term="webdriver"/><category scheme="http://www.blogger.com/atom/ns#" term="webelement"/><category scheme="http://www.blogger.com/atom/ns#" term="xpath"/><title type='text'>More robust way to click on WebElement in Selenium Webdriver</title><content type='html'>Introducing a much more robust way to click on the WebElement in situations when the native WebDriver click method doesn&#39;t work for some unknown yet obscure and annoying reason. Example of implementation in C# is given below. Probably porting of this code to Java wouldn&#39;t take too much time as well. Everything you need is a getter method with a CSS selector, which is automatically converted into Xpath in generateXpath method, and then the click event is triggered using JavaScript evaluate in ClickJS method. Works like a charm, also makes my tests more robust, especially in a multithreaded mode. &lt;p&gt;&lt;script src=&quot;https://pastebin.com/embed_js/fqf4Gb3X&quot;&gt;&lt;/script&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7923360702512529890/posts/default/3012039667214398847'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7923360702512529890/posts/default/3012039667214398847'/><link rel='alternate' type='text/html' href='http://anahorny.blogspot.com/2015/03/more-robust-way-to-click-on-webelement.html' title='More robust way to click on WebElement in Selenium Webdriver'/><author><name>Artem Nagornyi</name><uri>http://www.blogger.com/profile/09232985113515879251</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='18' height='32' src='http://1.bp.blogspot.com/-WjOu15GC7Tg/VQohpIOwmvI/AAAAAAAAIAA/CgL3rMsgXTo/s1600/*'/></author></entry><entry><id>tag:blogger.com,1999:blog-7923360702512529890.post-3503740951435549058</id><published>2015-03-16T16:14:00.000+09:00</published><updated>2015-03-16T16:17:35.229+09:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="bash"/><category scheme="http://www.blogger.com/atom/ns#" term="linux"/><category scheme="http://www.blogger.com/atom/ns#" term="powershell"/><title type='text'>Rounding float numbers in Bash and Powershell</title><content type='html'>Bash:  &lt;br /&gt; &lt;script class=&quot;brush:shell&quot; type=&quot;syntaxhighlighter&quot;&gt;&lt;![CDATA[ testme=34.23 res=$(printf %.2f $(echo $testme/4 | bc -l)) echo $res ]]&gt;&lt;/script&gt; &lt;b&gt;Output: 8.56&lt;/b&gt; &lt;br /&gt;&lt;br /&gt; Powershell:  &lt;br /&gt; &lt;script class=&quot;brush:shell&quot; type=&quot;syntaxhighlighter&quot;&gt;&lt;![CDATA[ $testme=34.23 $res=[math]::round($testme/4, 2) echo $res ]]&gt;&lt;/script&gt; &lt;b&gt;Output: 8.56&lt;/b&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7923360702512529890/posts/default/3503740951435549058'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7923360702512529890/posts/default/3503740951435549058'/><link rel='alternate' type='text/html' href='http://anahorny.blogspot.com/2015/03/rounding-float-numbers-in-bash-and.html' title='Rounding float numbers in Bash and Powershell'/><author><name>Artem Nagornyi</name><uri>http://www.blogger.com/profile/09232985113515879251</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='18' height='32' src='http://1.bp.blogspot.com/-WjOu15GC7Tg/VQohpIOwmvI/AAAAAAAAIAA/CgL3rMsgXTo/s1600/*'/></author></entry><entry><id>tag:blogger.com,1999:blog-7923360702512529890.post-4733998991332694869</id><published>2015-02-24T09:38:00.000+09:00</published><updated>2016-02-29T16:29:53.555+09:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="aws"/><category scheme="http://www.blogger.com/atom/ns#" term="jmeter"/><title type='text'>Simple solution to a common problem with Jmeter Server: &quot;Server Failed To Start: Java.rmi.RemoteException: Cannot Start ...&quot;</title><content type='html'>In some cases jmeter-server process cannot start because it cannot bind itself to a correct IP address. It happens sometimes on EC2. There is a simple and straightforward solution. Just modify jmeter-server script like this: &lt;br /&gt;&lt;pre class=&quot;brush:shell&quot;&gt;&lt;br /&gt;public_ip=$(curl -s checkip.dyndns.org | sed -e &#39;s/.*Current IP Address: //&#39; -e &#39;s/&amp;lt;.*$//&#39;)&lt;br /&gt;&lt;br /&gt;RMI_HOST_DEF=-Djava.rmi.server.hostname=$public_ip&lt;br /&gt;&lt;br /&gt;${DIRNAME}/jmeter ${RMI_HOST_DEF} -Dserver_port=${SERVER_PORT:-1099} -s -j jmeter-server.log &quot;$@&quot;&lt;br /&gt;&lt;/pre&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7923360702512529890/posts/default/4733998991332694869'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7923360702512529890/posts/default/4733998991332694869'/><link rel='alternate' type='text/html' href='http://anahorny.blogspot.com/2015/02/simple-solution-to-common-problem-with.html' title='Simple solution to a common problem with Jmeter Server: &quot;Server Failed To Start: Java.rmi.RemoteException: Cannot Start ...&quot;'/><author><name>Artem Nagornyi</name><uri>http://www.blogger.com/profile/09232985113515879251</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='18' height='32' src='http://1.bp.blogspot.com/-WjOu15GC7Tg/VQohpIOwmvI/AAAAAAAAIAA/CgL3rMsgXTo/s1600/*'/></author></entry><entry><id>tag:blogger.com,1999:blog-7923360702512529890.post-7866878977409149268</id><published>2015-01-22T10:41:00.000+09:00</published><updated>2015-01-22T10:45:38.700+09:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="cloud9"/><category scheme="http://www.blogger.com/atom/ns#" term="jekyll"/><title type='text'>How to run Jekyll server on Cloud9</title><content type='html'>So you already have your Cloud9 account and your Jekyll site is in your workspace. Now you want to run the server. It is actually very simple.   In a fresh Could9 workspace you only need to execute the following commands in the terminal window:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;gem install jekyll&lt;/li&gt;&lt;li&gt;jekyll serve --host 0.0.0.0 --port 8080&lt;/li&gt;&lt;/ul&gt;After executing these two commands you can open your site in the browser using the following link: &lt;b&gt;https://[workspacename]-c9-[username].c9.io&lt;/b&gt;&lt;br /&gt;Important note: Only port 8080 works for me in Cloud9, other ports are closed. Also assigning host to 0.0.0.0 is necessary.</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7923360702512529890/posts/default/7866878977409149268'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7923360702512529890/posts/default/7866878977409149268'/><link rel='alternate' type='text/html' href='http://anahorny.blogspot.com/2015/01/how-to-run-jekyll-server-on-cloud9.html' title='How to run Jekyll server on Cloud9'/><author><name>Artem Nagornyi</name><uri>http://www.blogger.com/profile/09232985113515879251</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='18' height='32' src='http://1.bp.blogspot.com/-WjOu15GC7Tg/VQohpIOwmvI/AAAAAAAAIAA/CgL3rMsgXTo/s1600/*'/></author></entry><entry><id>tag:blogger.com,1999:blog-7923360702512529890.post-234594073694442316</id><published>2014-09-18T23:58:00.002+09:00</published><updated>2016-02-29T16:24:38.374+09:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="linux"/><category scheme="http://www.blogger.com/atom/ns#" term="shell"/><title type='text'>Killing a process by name in Linux</title><content type='html'>How to easily kill a process in Linux by its name or part of name: &lt;pre class=&quot;brush:shell&quot;&gt;&lt;br /&gt;kill $(ps aux | grep &#39;[j]meter&#39; | awk &#39;{print $2}&#39;)&lt;br /&gt;&lt;/pre&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7923360702512529890/posts/default/234594073694442316'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7923360702512529890/posts/default/234594073694442316'/><link rel='alternate' type='text/html' href='http://anahorny.blogspot.com/2014/09/killing-process-by-name-in-linux.html' title='Killing a process by name in Linux'/><author><name>Artem Nagornyi</name><uri>http://www.blogger.com/profile/09232985113515879251</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='18' height='32' src='http://1.bp.blogspot.com/-WjOu15GC7Tg/VQohpIOwmvI/AAAAAAAAIAA/CgL3rMsgXTo/s1600/*'/></author></entry></feed>