What I'm Thinking

Earlier I wrote an article on how to re-use a session in Selenium using Java. @Jim Hazen asked if the I could provide the implementation of same in C#. So here it is The first time I worked out this approach was in C# only, but that was back in 2014. That time I copied code from the Selenium source code and modified it. This makes upgrading Selenium version difficult. ... Read More
Parameterized config files are a must to create customizable and flexible docker images. There are many tools available for doing the same. To name a few, consul-template, confd But in this article I want to discuss about few of the basic approaches. So why basic ones? Well, when you can do the job with a knife, why use a gun! Approach 1 - Using Bash Substituion This uses shell parameter and file redirection. ... Read More
In one of our projects we wanted to capture and document incoming traffic to our server. The requirements for recording/capturing the incoming traffic were as below Capture both GET and POST requests Capture only certain locations Back-end service involved were PHP, Java and some NodeJS also Capture Response Code, Response Text and Duration also Mask certain sensitive data like emails, credit card numbers The plan was to use this data for creating simulated production replay and make sure any changes made to code doesn’t impact existing working flows. ... Read More
A10 Networks provides hardware Load Balancer, which can be used to balance loads in your data center. A10 Load Balancer (LB) have a web based interface to perform different task. Once the server definitions tasks are created, the common thing is to disable and enable servers out of LB. Going to the web interface and performing these activities is a tedious task. Also many time the Linux operations teams want to view the status of these server. ... Read More
Recently while moving one of our projects to Docker, we had a weird error that our python script would not output any data in docker logs. We thought the scripts were stuck, but later we realized the logs had a delayed output When we were running the script inside the docker image through bash they would give all output on the console fine. Which kind of puzzled us So we created a simple project to recreate the issue ... Read More
One of the aim of moving project’s deployment to docker, is to be able to build a image on any system without any manual setup. This articles shows how you can clone your private git repos inside a docker image without the need of username and password using SSH keys. Generating the SSH key pairs First we would generate a SSH key pair, which will be used by the docker image ... Read More
Sometimes its required for us to be able to communicate with a remote host using automation. To do it in bash we can use the expect command. But do it in Python, we can use a package named paramiko. Installing Paramiko Installation is quite simple. It can be done using the pip or pip3 command $ pip install paramiko Note: based on your setup, you might need to use sudo as well before the pip command ... Read More
Some testing scenarios requires that the Popup blocking be disabled. In this article we will look at ways for disabling popup blocker for different browser Disabling Popup blocker in InternetExplorer This can be done by setting a registry setting. from _winreg import * def set_popupblocker_status(enabled): key = OpenKey(HKEY_CURRENT_USER, r"Software\Microsoft\Internet Explorer\New Windows", 0, KEY_ALL_ACCESS) SetValueEx(key, "PopupMgr", 0, REG_SZ, enabled) CloseKey(key) set_popupblocker_status("no") Disabling Popup blocker in Firefox For firefox, this can be done using a preference setting dom. ... Read More
Yesterday I wrote an article on how to re-use a session in Selenium using Python. @Aditya Baraskar asked if the same was possible in Java. Once you know the concepts, languages usually is no barrier. So I tried using the same approach that we did in Python and see how it works out in Java Attempt 1 ChromeDriver driver = new ChromeDriver(); HttpCommandExecutor executor = (HttpCommandExecutor) driver.getCommandExecutor(); URL url = executor. ... Read More
Comparison between Selenium and UFT Behavior For those of us who come from a QTP/UFT background, being able to test the same browser after a disconnect is usually a piece of cake 1. systemutil.run "iexplore.exe" 2. x = 2/0 3. Browser("index:=0").navigate ("http://www.google.com") If we run the above script in QTP/UFT, the script will error out on Line #2 and we can re-run the script from Line #3 and it would still work and navigate inside the browser we had opened earlier. ... Read More