I recently used a neat solution that involved JavaScript evaluate() and XPaths as part of an automated GUI check. I am good with Python and writing XPaths for locators but not so good with JavaScript. I needed to locate an element in the DOM and then change a specific attribute. The solution was simple enough that I did not have […]
JavaScript evaluate() and XPaths
Obtaining BrowserStack screenshots and video links
At Qxf2 we use BrowserStack to run our automated checks against different browsers. BrowserStack is a cloud-based, cross-browser, testing tool that takes away the pain of maintaining a physical lab and saves us a lot of time. Why this post? BrowserStack is a great tool to execute your automated tests. However BrowserStack is not a good tool to report the […]
How to compare PDFs using Python
Problem:How do you compare two PDF files programmatically using Python? Adobe makes it easy to compare the changes in two PDF files. However as testers, we sometimes need to compare a lot of PDF files (especially reports!) against some preset baselines. In these cases, it helps to have a script that can compare PDF files and tell you if they […]
Getting started with MongoDB and Python
I was recently playing around with MongoDB. It took me a little while to get setup and write some simple Python scripts to access it. I thought I would write up a summary and share my learning. Why this post? Companies have begun adopting MongoDB at a good clip. I think, interacting with a NoSQL database will soon become a […]
InsecurePlatformWarning: A true SSLContext object is not available
I was using Python’s Requests module at a recent client engagement. I and ran into this error: requests/packages/urllib3/util/ssl_.py:100: InsecurePlatformWarning: A true SSLContext object is not available. This prevents urllib3 from configuring SSL appropriately and may cause certain SSL connections to fail. For more information, see https://urllib3.readthedocs.org/en/latest/security.html#insecureplatformwarning.requests/packages/urllib3/util/ssl_.py:100: InsecurePlatformWarning: A true SSLContext object is not available. This prevents urllib3 from configuring SSL […]
Reporting automation results to TestRail using Python
We have been hard at work integrating our Python based GUI automation framework (that uses the Page Object pattern) with a test case management tool for reporting purposes. In this post we will show you how to report the results of your automated checks to a visual test case management tool – TestRail. TestRail offers a free trial – so […]
Selenium & HTML5 canvas: Verify what was drawn
Problem: How do you verify what was drawn on a canvas element using Selenium? Why this post? The HTML5 canvas element is opaque to Selenium and does not lend itself well to GUI automation. An application I was testing had an HTML5 canvas element that users could interact with. Users could place pre-defined objects upon the canvas element and then […]
Selenium tutorial for beginners
We recently presented a Selenium tutorial aimed at beginners. Avinash Shetty of Qxf2 Services presented the tutorial as part of the Mangaluru Software Testing group meetup at Mangalore Infotech’s spacious office. Several members who attended the meetup found the talk and examples useful. So we thought we would share the material on our blog too. You can practice your Selenium […]
Don’t hardcode usernames and passwords in your test scripts
If your application needs to authenticate users, you need some way for your automation to know your credentials. You may be providing these credentials in the test script itself. But this could lead to a possible breach of security. E.g: We learnt that BrowserStack keeps logs of every line of code executed. So if you had hard coded your username […]
Run your API tests in parallel: MapReduce/Python
At a recent client engagement, I used MapReduce to run some API level checks in parallel. It was surprisingly simple and needed me to change less than a dozen lines of code in my tests. Generally MapReduce makes people think they need a farm of servers. But in this case I did it using only my local machine. I was […]