Did you know you can tell Selenium IDE to execute certain commands only if a specific element exists on the page? The if element exists trick makes your web app testing scripts far more interesting. Here is a quick example using Selenium IDE 3 — the “new” Selenium IDE.
Log out a standard user
In this use case a WordPress multisite standard user is logged in. We can only execute our commands if we are a super admin. When trying to open a URL that is only available to the super admin an error page shows up. Thankfully this page also comes with an easily identifiable body ID set to error-page.Read More
After a year-long hiatus, one of my favorite web app testing tools is back. It is nice to have Selenium IDE back as a viable option. Yes, it is similar to the old version. No, it is not perfect. It is a lot easier to use than nearly any other web app testing option available.Read More
Digging into Cypress.IO in a sprint to replace my almost-completely-useless stack of Selenium IDE tests for Store Locator Plus, I’ve run into some issues that seem to go beyond my lack of knowledge with the tool.
Yes, it is a great step in the right direction and it can be man-handled to do what I need. For now. But tools should not be forcing you to do things a specific way. That are supposed to make you more efficient, no re-train you or add extra steps.
Cypress.IO has shortcomings when it comes to doing real-world end-to-end testing of web apps. Order of tests is one of them.
Testing Store Locator Plus with lots of locations is a chore. Thankfully Cypress.IO data list processing makes this a lot easier.
It turns out that the old-school Selenium IDE scripts that we’ve been using to test Store Locator Plus for years will no longer work. We already knew Firefox versions beyond 54 broke things — but we kept an old install on hand so while we port 500+ test scripts to a new system. What finally broke the old-school Firefox bandaid was moving Store Locator Plus towards a reactive application using Vue.
After discussing projects over the past week, one of the guys at Automattic brought up CypressIO. If you’ve been following the recent posts on Lance.Bio you know that the path to running automated web testing has run from Selenium IDE, the QA tool of choice for the past few years for Store Locator Plus, to recent forays into Selenium Webdriver. Webdriver is powerful but difficult to code and soon led to the discovery of WebdriverIO, then Mocha and Chai on top of that. The new stack makes it easier to write more advanced tests than we could in Selenium IDE — but it was like pulling teeth to get all the right pieces installed and working.
More info, less pain
That is what CypressIO promotes on their home page. “Test your code, not your patience.” and “No more async hell.” — if you’ve gone through the Selenium Webdriver setup you’ll understand what both of these mean. It takes several false starts to understand all the pieces you MUST install to get Selenium Webdriver working. CypressIO has made it easy; it is even easier than they promote on their website with the most recent builds.
I’ve only started simple test writing but in less than 20 minutes I had a fully functional test running with all the extras from a completely “clean” install base. If you have NodeJS and NPM up-to-date and a faster Internet connection than we have in tech-orphan Charleston South Carolina, you can be up and running in 5 minutes.