TesterHQ - The Evil Tester Blog Aggregator

Sep 6, 2016 - 3 minute read - Dear Evil Tester Evil Tester

Dear Evil Tester: I think that if I 'learn automation' I can get this specific type of job

TLDR; Learn with an end goal in mind. That will keep you focussed. Following on from the ‘How do I learn ‘automation’?” question. We had to ask questions to see what they would do with this newly learned ability to automate. If it was to find a job, and they had a specific type of job in mind then I think we could probably answer the question. If you have a better job in mind For the marketplace, if you want to ‘learn automation’ because:

Sep 5, 2016 - 7 minute read - Evil Tester Tools

A Model of Automating

TLDR; I automate tasks by using tools and writing code. Understand what they abstract to learn more. A Model of Automating What do you automate? I automate tasks. Sometimes I use a tool to automate tasks. Sometimes I write code. But of course my model that underlies that statement doesn’t have as clear a separation as the words suggest. My ‘tool’ and ‘code’ models do not have a clear separation.

Sep 2, 2016 - 4 minute read - Dear Evil Tester Evil Tester

Dear Evil Tester: "How can I learn Automation?"

TLDR; Don’t just ‘learn automation’. Learn it for a reason. When I attend conferences and meetups, people often ask me how they can learn to automate stuff. I then have to ask some follow up questions. This is not my normal approach for a “Dear Evil Tester” answer. A “Dear Evil Tester” answer makes assumptions and takes the question and the words in the question at face value. Because that is funnier, and allows me to address generic points.

Aug 25, 2016 - 1 minute read - FAQ Selenium Simplified Selenium Simplified Blog

How to Select a Web Element with an id containing '.'

TLDR: \. Lesson learned. I was working with a site and trying to select an element via its id e.g. <p id="select.me.by.id">Select Me By My id</p> Simples thought me: #select.me.by.id Nope. So I did what all good Selenium debuggers do… I tried in the browser but Chrome didn’t match it. Tempted though I was to blame Chrome, I tried with XPath, and that worked fine: //p[@id='select.me.by.id'] After a bit of web searching, the solution was clear.

Aug 18, 2016 - 2 minute read - Evil Tester Technical Testing

Remove X-Frame-Options header when testing responsive web applications and sites

TLDR; Some sites issue an X-FRAME-OPTIONS header that stops them loading in an iframe, remove it for responsive web testing with a proxy. Does your favourite responsive testing tool fail to display the site you want to test? Have you blamed the tool and now rely on browser dev tools? Well, here’s a possible solution for you. But before that, let’s look at that situation in more detail: you want to practice your responsive web testing, you have your responsive web testing tool it loads your chosen web site into an iframe your chosen web site doesn’t want to load in an iframe your tool displays a blank image, with no error, instead of the page you curse and go back to the browser dev tools Stop.

Aug 17, 2016 - 5 minute read - Selenium Simplified Blog WebDriver

How to Debug WebDriver JavascriptExecutor in Java

TLDR; JavascriptExecutor requires us to learn JavaScript and use the Browser Console, and check your locator assumptions using FirePath A common theme when debugging WebDriver code is the need to jump between breakpoints, evaluate and browser dev tools. And we shall do exactly that in this ‘how to’, when we look at debugging JavascriptExecutor. This is a hypothetical set of actions built around a sample test I was sent by a blog reader.

Aug 16, 2016 - 3 minute read - Selenium Simplified Blog WebDriver

How to debug chained WebDriver `findElement` methods in Java

TLDR; split code across lines and breakpoint, and use browser dev tools to test the locators used. Have you ever had an argument about fluent code? Discussions about “train wrecks” and “impossible to debug”? WebDriver has the ability to chain findElement calls, and create such “train wrecks”. How do you debug it if you use it? (There is a summary video at the bottom of this post.) Example: WebElement element = driver.

Aug 8, 2016 - 2 minute read - IntelliJ Java For Testers JUnit

How to convert a breakpoint into a conditional breakpoint in IntelliJ

TLDR; right click on a breakpoint and add code that returns a boolean to make it a conditional breakpoint Breakpoints are great. You find the section of code that you want to investigate. Click on the side of the screen to create a breakpoint. Run the code in debug and it stops where you want it. But what if you only wanted to stop on that breakpoint sometimes. What do you do?

Aug 5, 2016 - 1 minute read - Selenium Simplified Blog WebDriver

Selenium WebDriver 3.0.0-beta2 and JUnit and GeckoDriver v 0.10.0

I started to have a look at Selenium WebDriver 3.0.0-beta2 And my @Test methods were running from the IDE, but not running on CI. The effect in CI was, no tests executing at all: Running TestSuite Configuring TestNG with: org.apache.maven.surefire.testng.conf.TestNG652Configurator@77468bd Tests run: 0, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.424 sec I don’t use TestNG, I use JUnit. Since this only happened when I switched to 3.

Aug 5, 2016 - 2 minute read - Selenium Simplified Blog WebDriver

WebDriver Windows 10 Anniversary Build and Edge 14393

TLDR; if your version of Edge is not listed on the WebDriver Edge page, try the insider build. I am experimenting with Selenium WebDriver 3.0.0 beta2 at the moment - more on that later. And this morning I could not get MS Edge to work. I could not understand how the beta was affecting Edge. And then I remembered that I upgraded to Windows 10 Anniversary last night so now Edge is on a new version: