Selenium IDE Archives - Automated Visual Testing | Applitools https://applitools.com/blog/tag/selenium-ide/ Applitools delivers the next generation of test automation powered by AI assisted computer vision technology known as Visual AI. Thu, 26 Jan 2023 20:13:18 +0000 en-US hourly 1 Playwright vs Selenium: What are the Main Differences and Which is Better? https://applitools.com/blog/playwright-vs-selenium/ Fri, 12 Aug 2022 17:41:46 +0000 https://applitools.com/?p=41852 Wondering how to choose between Playwright vs Selenium for your test automation? Check out a comparison between the two popular test automation tools.

The post Playwright vs Selenium: What are the Main Differences and Which is Better? appeared first on Automated Visual Testing | Applitools.

]]>

Wondering how to choose between Playwright vs Selenium for your test automation? Read on to see a comparison between the two popular test automation tools.

When it comes to web test automation, Selenium has been the dominant industry tool for several years. However, there are many other automated testing tools on the market. Playwright is a newer tool that has been gaining popularity. How do their features compare, and which one should you choose?

What is Selenium?

Selenium is a long-running open source tool for browser automation. It was originally conceived in 2004 by Jason Huggins, and has been actively developed ever since. Selenium is a widely-used tool with a huge community of users, and the Selenium WebDriver interface even became an official W3C Recommendation in 2018.

The framework is capable of automating and controlling web browsers and interacting with UI elements, and it’s the most popular framework in the industry today. There are several tools in the Selenium suite, including:

  • Selenium WebDriver: WebDriver provides a flexible collection of open source APIs that can be used to easily test web applications
  • Selenium IDE: This record-and-playback tool enables rapid test development for both engineers and non-technical users
  • Selenium Grid: The Grid lets you distribute and run tests in parallel on multiple machines

The impact of Selenium goes even beyond the core framework, as a number of other popular tools, such as Appium and WebDriverIO, have been built directly on top of Selenium’s API.

Selenium is under active development and recently unveiled a major version update to Selenium 4. It supports just about all major browsers and popular programming languages. Thanks to a wide footprint of use and extensive community support, the Selenium open source project continues to be a formidable presence in the browser automation space.

What is Playwright?

Playwright is a relatively new open source tool for browser automation, with its first version released by Microsoft in 2020. It was built by the team behind Puppeteer, which is a headless testing framework for Chrome/Chromium. Playwright goes beyond Puppeteer and provides support for multiple browsers, among other changes.

Playwright is designed for end-to-end automated testing of web apps. It’s cross-platform, cross-browser and cross-language, and includes helpful features like auto-waiting. It is specifically engineered for the modern web and generally runs very quickly, even for complex testing projects.

While far newer than Selenium, Playwright is picking up steam quickly and has a growing following. Due in part to its young age, it supports fewer browsers/languages than Selenium, but by the same token it also includes newer features and capabilities that are more aligned with the modern web. It is actively developed by Microsoft.

Selenium vs Playwright

Selenium and Playwright are both capable web automation tools, and each has its own strengths and weaknesses. Depending on your needs, either one could serve you best. Do you need a wider array of browser/language support? How much does a long track record of support and active development matter to you? Is test execution speed paramount? 

Each tool is open source, cross-language and developer friendly. Both support CI/CD (via Jenkins, Azure Pipelines, etc.), and advanced features like screenshot testing and automated visual testing. However, there are some key architectural and historical differences between the two that explain some of their biggest differences.

Selenium Architecture and History

  • Architecture: Selenium uses the WebDriver API to interact between web browsers and browser drivers. It operates by translating test cases into JSON and sending them to the browsers, which then execute the commands and send an HTTP response back.
  • History: Selenium has been in continuous operation and development for 18+ years. As a longstanding open source project, it offers broad support for browsers/languages, a wide range of community resources and an ecosystem of support.

Playwright Architecture and History

  • Architecture: Playwright uses a WebSocket connection rather than the WebDriver API and HTTP. This stays open for the duration of the test, so everything is sent on one connection. This is one reason why Playwright’s execution speeds tend to be faster.
  • History: Playwright is fairly new to the automation scene. It is faster than Selenium and has capabilities that Selenium lacks, but it does not yet have as broad a range of support for browsers/languages or community support. It is open source and backed by Microsoft.

Comparing Playwright vs Selenium Features

It’s important to consider your own needs and pain points when choosing your next test automation framework. The table below will help you compare Playwright vs Selenium.

CriteriaPlaywrightSelenium
Browser SupportChromium, Firefox, and WebKit (note: Playwright tests browser projects, not stock browsers)Chrome, Safari, Firefox, Opera, Edge, and IE
Language SupportJava, Python, .NET C#, TypeScript and JavaScript.Java, Python, C#, Ruby, Perl, PHP, and JavaScript
Test Runner Frameworks SupportJest/Jasmine, AVA, Mocha, and VitestJest/Jasmine, Mocha, WebDriver IO, Protractor, TestNG, JUnit, and NUnit
Operating System SupportWindows, Mac OS and LinuxWindows, Mac OS, Linux and Solaris
ArchitectureHeadless browser with event-driven architecture4-layer architecture (Selenium Client Library, JSON Wire Protocol, Browser Drivers and Browsers)
Integration with CIYesYes
PrerequisitesNodeJSSelenium Bindings (for your language), Browser Drivers and Selenium Standalone Server
Real Device SupportNative mobile emulation (and experimental real Android support)Real device clouds and remote servers
Community SupportSmaller but growing set of community resourcesLarge, established collection of documentation and support options
Open SourceFree and open source, backed by MicrosoftFree and open source, backed by large community

Should You Use Selenium or Playwright for Test Automation?

Is Selenium better than Playwright? Or is Playwright better than Selenium? Selenium and Playwright both have a number of things going for them – there’s no easy answer here. When choosing between Selenium vs Playwright, it’s important to understand your own requirements and research your options before deciding on a winner.

Selenium vs Playwright: Let the Code Speak

A helpful way to go beyond lists of features and try to get a feel for the practical advantages of each tool is to go straight to the code and compare real-world examples side by side. At Applitools, our goal is to make test automation easier for you – so that’s what we did! 

In the video below, you can see a head to head comparison of Playwright vs Selenium. Angie Jones and Andrew Knight take you through ten rounds of a straight-to-the-code battle, with the live audience deciding the winning framework for each round. Check it out for a unique look at the differences between Playwright and Selenium.

If you like these code battles and want more, we’ve also pitted Playwright vs Cypress and Selenium vs Cypress – check out all our versus battles here.

In fact, our original Playwright vs Cypress battle (recap here) was so popular that we’ve even scheduled our first rematch. Who will win this time? Register for the Playwright vs Cypress Rematch now to join in and vote for the winner yourself!

Learn More about Playwright vs Selenium

Want to learn more about Playwright or Selenium? Keep reading below to dig deeper into the two tools.

The post Playwright vs Selenium: What are the Main Differences and Which is Better? appeared first on Automated Visual Testing | Applitools.

]]>
What’s New In Selenium 4? https://applitools.com/blog/selenium-4/ Thu, 14 Oct 2021 07:37:00 +0000 https://applitools.com/?p=19463 There are a lot of cool new things coming up in Selenium 4. We're getting very close to the official release, and we've got a full review of what's coming for you.

The post What’s New In Selenium 4? appeared first on Automated Visual Testing | Applitools.

]]>

(Editor’s Note: This post has been recently updated for accuracy and completeness. It was originally published in June 2020 by Manoj Kumar.) 

There are a lot of cool and new things that just arrived in Selenium 4. If you haven’t heard, the official Selenium 4 release came out yesterday, and we’re excited by all the latest updates. We’ve got a full review of this long-awaited release ready for you, but first here’s a quick refresher on a few of the most interesting updates for Selenium 4.

What’s New in Selenium 4?

After an extensive alpha and beta period to get everything right, Selenium 4 has now been officially released!

In the new release, there have been changes made to the highly anticipated feature, Relative Locators, where the returned elements are now sorted by proximity to make the results more deterministic. By proximity, it means being sorted based on the distance from the midpoints of each element’s bounding client rect. Also new is the ability to use any selector (not just tagname) to find any relative locators.

Also in this release, work for NetworkInterceptor has begun. This functionality, once complete, will be a part of the new ChromeDevTools feature and will allow testers to stub out responses to network requests!

A Refresher: Getting Started with Selenium 4

Here are a few links outlining how you can get started with Selenium 4:

Watch Simon Stewart Break Down the Selenium 4 Updates

Although Selenium 4 is designed as a drop-in replacement for Selenium 3, it has some new tricks to help make your life as a tester easier. These include things like “relative locators,” and new support for intercepting network traffic, changes in how you can create a new Selenium instance, and more! Catch Selenium project lead Simon Stewart as he explains how these new features work, and also demonstrates how to use them. Learn how to take advantage of all that Selenium 4 can offer your tests!

What is your plan to move to Selenium 4.0? If you do not plan to upgrade, why not? What is preventing you from upgrading now that the official release is out?

To recap everything that’s new in the latest version of Selenium, keep reading for a full review of the cool things that have arrived in Selenium 4:

What’s New in Selenium 4

Selenium 4 is now released!

A lot of developments have happened since Selenium 4 was announced during the State of the Union Keynote by Simon Stewart and Manoj Kumar. There has been a significant amount of work done and we’ve released at least six alpha versions and four betas of Selenium 4 for users to try out and report back with any potential bugs so that we can make it right. Now, the official release is here.

Manoj Kumar

It is exciting times for the Selenium community as we have a lot of new features and enhancements that make Selenium WebDriver even more usable and scalable for practical use cases.

Selenium is a suite of tools designed to support different user groups:

  • Selenium IDE supports rapid test development, and doesn’t require extensive programming knowledge
  • WebDriver provides a friendly and flexible API for browser automation in most major programming languages
  • Grid makes it possible to distribute and run your tests across more than just one machine.

Let us dive in and take a look at some of the significant features that were released in each of these tools and share some of the cool upcoming features that are now available in Selenium 4.

Selenium WebDriver

One of the main reasons to release WebDriver as a major version (Selenium 4) is because of the complete W3C protocol adoption. The W3C protocol dialect has been available since the 3.8 version of Selenium WebDriver along with the JSON wire protocol. This change in protocol isn’t going to impact the users in any way, as all major browser drivers (such as geckodriver and chromedriver), and many third party projects, have already fully adopted the W3C protocol.

However, there are some notable new APIs, as well as the removal of deprecated APIs in the WebDriver API, such as:

  • Elements:
    • The FindsBy* interfaces (e.g. FindsByID, FindsByCss …) have been deleted. The recommended alternative is to use a `By` instance passed to `findElements` instead.
    • Relative locators”: a friendly way of locating elements using terms that users use, like “near”, “left of”, “right of”, “above” and “below”. This was inspired by an automation tool called Sahi by Narayan Raman, and the approach has also been adopted by tools like Taiko by ThoughtWorks.
    • A richer set of exceptions, providing better information about why a test might have failed. These include exceptions like ElementClickInterceptedError, NoSuchCookieError & more.
  • Chrome Debugging Protocol (CDP):
    • Although Selenium works on every browser, for those browsers that support it, Selenium 4 offers CDP integration, which allows us to take advantage of the enhanced visibility into the browser that a debugging protocol gives.
    • Because the CDP is, as the name suggests, designed for debuggers, it’s not the most user friendly of APIs. Fortunately, the Selenium team is working to provide comfortable cross-language APIs to cover common requirements, such as network stubbing, capturing logs, mocking geolocation, and more.
  • Browser Specifics:
    • A new ChromiumDriver extends packages for both Chrome and Edge browsers.
    • A new method to allow install and uninstall add-ons for Firefox browser at runtime.
  • Window Handling:
    • Users can go in full-screen mode during script executions.
    • Better control of whether new windows open as tabs, or in their own window.
  • Screenshots:
    • An option to grab a screenshot at UI element level. Unlike the usual view-port level screenshot.
    • Full Page Screenshot support for Firefox browser.

What’s next in WebDriver beyond Selenium 4?

It would be nice to have users extend the locator strategy like FindByImage or FindbyAI (like in Appium) – right now we have a hardcoded list of element location strategies. Providing a lightweight way of extending this set, particularly when using Selenium Grid, is on the roadmap.

Selenium IDE

The original Selenium IDE reached its end of life in August 2017, when Mozilla released Firefox 55, which switched its add-ons from the Mozilla-specific “XPI” format to the standardised “Web Extension” mechanism. This meant that the original Selenium IDE would no longer work in Firefox versions moving forwards.

Thanks to Applitools, Selenium IDE has been revived! It is one of the significant improvements in Selenium 4 and includes notable changes like:

  • A new shiny UI, for better user experience.
  • A web-extensions based plugin that makes it possible to be available in Chrome and Firefox browsers as well as for any other browser that allows web-extension based plugins. It will soon be available in the MS Edge store.
  • Code export is available now for all the official language bindings such as Java, .Net, Python, Ruby & JavaScript.
  • A new plugin system that can allow users to create new commands, code exports for new languages and frameworks. The plugins can be shipped as extensions. An example of a plugin is Applitools for Selenium IDE which enables codeless visual testing.
  • A new CLI runner called the “Selenium-side-runner” running on NodeJs. It allows users to execute the recorded tests in parallel with multi-browser capability.
  • A control flow mechanism which helps users write better tests using “while” & “if” conditions.
  • A backup element selector that can fall back and select elements using a different locator strategy like ID, CSS & XPath based on the recorded information. This helps make tests more stable and reliable.
  • Selenium IDE is accessible! We’ve gone above and beyond to make sure that it conforms to some of the latest accessibility guidelines and supports necessary controls like focus order, roles, tooltips, announcing the start of recording, color and design.

What’s next in Selenium IDE?

A remarkable milestone for Selenium IDE is that it’s going to be available as a standalone app, re-written to be an Electron app. By binding tightly to the browser, this would allow us to listen out for events from the browser, making test recording more powerful and feature-rich.

Selenium Grid

One of the essential improvements in Selenium 4 is the ability to use Docker to spin up containers instead of users setting up heavy virtual machines. Selenium Grid has been redesigned so that users can deploy it on Kubernetes for excellent scaling and self-healing capabilities.

Let’s look at some of the significant improvements:

  • We’ve enhanced Selenium Grid deployment for more scalable and traceable infrastructure.
  • Users can deploy Grid, either as Standalone, Hub-Node or in a distributed mode with different processes like in the below picture,
A deployment of Selenium Grid in a distributed mode with different processes.
  • Observability is a way of measuring systems’ internal state; a much-needed capability to trace what happens when an API is invoked or a new session creation is requested. This can help admins and developers when debugging, as providing insight into the root cause when strange problems arise.
  • Selenium Grid, by default, communicates via HTTP. This is fine for most use cases within the firewall but problematic when your server is exposed to the internet. Now users can have their Grid communicate via the HTTPS protocol with support for TLS connections.
  • Unlike in the old versions, where we’ve allowed only IPV4 based IP addresses,  now we support IPV6 addresses as well.
  • Grid has always allowed you to use configuration files when spinning up Grid instances. In Grid 4, those files can be written using TOML, which makes them easier for humans to understand..

What’s next in Selenium Grid?

As you follow, there have been exciting changes and performance improvements. There are a few more that expected to be added like:

  • A revived UI for Grid console
  • GraphQL for querying Grid
  • More work on Grid stability and resilience

More Goodies

We’ve also refreshed our branding, documentation, and the website, so check out Selenium.dev!

Selenium is an Open-Source project, and we do this voluntarily so there are never definite timelines that can be promised, but thanks for sticking with us and we’re excited that the new release is now here.

Please come and give us a hand if you have the energy and time! Happy hacking!

Thanks Simon Stewart in helping review this post!

Manoj Kumar is a Principal Consultant at ThoughtWorks. Manoj is an avid open-source enthusiast and a committer to the Selenium & Appium project. And a member of the project leadership committee for Selenium. Manoj has also contributed to various libraries and frameworks in the automated testing ecosystem like ngWebDriver, Protractor and Serenity to name a few. An avid accessibility practitioner who loves to share knowledge and is a voluntary member of the W3C ACT-R group. In his free time, he contributes to Open-Source projects or research on Accessibility and enjoys spending time with his family. He blogs at AssertSelenium.

Supercharge Selenium with Applitools Visual AI

Get STarted

Read More

Cover Photo by Sepp Rutz on Unsplash

The post What’s New In Selenium 4? appeared first on Automated Visual Testing | Applitools.

]]>
16 reasons why to use Selenium IDE in 2021 (and 1 why not) https://applitools.com/blog/why-selenium-ide-2019/ Tue, 27 Apr 2021 16:31:56 +0000 https://applitools.com/blog/?p=4344 (Editor’s Note: This post has been recently updated for accuracy and completeness. It was originally published in March 2019 by Al Sargent.)  Have you tried using Selenium IDE for your...

The post 16 reasons why to use Selenium IDE in 2021 (and 1 why not) appeared first on Automated Visual Testing | Applitools.

]]>

(Editor’s Note: This post has been recently updated for accuracy and completeness. It was originally published in March 2019 by Al Sargent.) 

Have you tried using Selenium IDE for your QA test automation?

You can find lots of feedback from users around the world.

Still skeptical? That makes sense.

There’s been plenty of stigma around using record and replay tools like Selenium IDE rather than scripted QA automation tools like Selenium Webdriver, Cypress, and WebdriverIO. And, for seemingly good reason.

Traditionally, record and playback tools suffer from a litany of issues, including:

  1. No cross-browser support
  2. Brittle tests
  3. Difficult to wait for app under test
  4. No conditional logic
  5. Chaining one test script to call another not available
  6. Unable to embed code into recorded scripts
  7. No way to edit scripts once recorded
  8. Lacking a script debugger
  9. No way to run scripts in parallel
  10. No way to run tests from Continuous Integration build scripts
  11. Lack of integration with source code control systems
  12. No plugins to extend functionality
  13. No way to do visual UI testing
  14. Poor support for responsive web
  15. No way to quickly diagnose front-end bugs
  16. Unable to export tests to languages like Java
  17. No way to enable data-driven tests

Revising Selenium IDE

Back in 2019, Applitools helped revise the Selenium IDE project. Two years earlier, the project had effectively died. Selenium IDE only ran on Firefox. With Firefox 55, Selenium IDE broke, and there seemed to be no motivation to fix it.

Plenty of articles back then explained why Selenium IDE was bad. There was this Quora thread comparing Selenium IDE with Selenium Webdriver. And plenty of issues listed in the Selenium IDE questions on Stackoverflow. Plus this top 10 list of issues with record & replay.

However, Applitools engineers got involved and addressed the bugs – as well as some of the shortcomings. In a major enhancement, Applitools made it possible to run Selenium IDE on both Chrome and Firefox. The team expanded the code export functionality from IDE-captured tests. Also, the team provided code hooks allowing others to write their own export hooks.

With great Applitools integration, Selenium IDE can help engineers with or without coding skills build effective tests quickly.

Sixteen Reasons Outlined

Here’s a list of 16 reasons why — and one why not – to try Selenium IDE. Read them, and let Applitools know what you think.

Let’s dive in.

#1: Selenium IDE is cross-browser

Selenium IDE first came out in 2006.

It was a different time. iPhones didn’t exist, the Motorola Razr flip phone was the must-have device, and Borat topped the movie box office. Firefox was the shiny new browser, and Chrome wouldn’t come out for two more years.

So it’s no surprise that Selenium IDE hitched its wagon to Firefox. Unfortunately, it remained that way for over a decade, frustrating the heck out of users with its single-browser support.

No more.

Selenium IDE runs as a Google Chrome Extension

….and Firefox Add-on:

Even better, Selenium IDE can run its tests on Selenium WebDriver servers. You can do this using Selenium IDE’s command line test runner, called SIDE Runner.

You can think of SIDE Runner as blending elements of Selenium IDE and Selenium Webdriver. It takes a Selenium IDE script, saved as a .side file, and runs that using browser drivers should as ChromeDriver, EdgeDriver, Firefox’s geckodriver, IEDriver, and SafariDriver.

SIDE Runner, and the drivers above, are available as a straightforward npm installs. Here’s what it looks like in action:

#2 Robust Tests

For years, brittle tests have been an issue for functional tests — whether you record them or code them by hand. A huge contributor to this problem has been object locators. These are how your QA automation tool identifies which field to fill, or which button to click. These can be a button label, an XPath expression, or something else.

Developers are constantly sadistically tormenting QA teams releasing new features, and as a result, their UI code is constantly changing as well. When UI changes, object locators often do as well.

Selenium IDE fixes that by capturing multiple object locators when you record your script. During playback, if Selenium IDE can’t find one locator, it tries each of the other locators until it finds one that works. Your test will fail only if none of the locators work.

This doesn’t guarantee scripts will always playback but it does insulate scripts against many changes. Here’s a screenshot of how it works. As you can see, Selenium IDE captures linkText, an XPath expression, and CSS-based locators.

Imagine building this functionality in Selenium Webdriver. You’d have to first gather up all potential Xpath locators, then all CSS locators, then iterate through each until you find an object match. It’d be a huge chunk of time to automate just one interaction, and you’d be left with a mess of hard-to-maintain code.

Selenium IDE provides an alternative that is fast, resilient, and easy-to-maintain.

#3 Wait For Your App

When running tests, it’s essential to give your application time to catch up to your test automation tool. This can include time for backend operations, fetching page elements, and rendering the page. It’s especially necessary when running on staging servers that are under-resourced.

Why does waiting matter? If your test script tries to interact with some page element (field, button, etc.) that hasn’t loaded, it will stop running.

Thankfully, the new Selenium IDE knows automatically wait for your page to load. Also, commands that interact with some element wait for the element to appear on the page. This should eliminate most, if not all, of your explicit waits.

But, if that’s not enough, the new Selenium IDE gives you other options.

In the new Selenium IDE there’s a global set speed command that you can use to pause after every test step. Even better, you can set this from the toolbar in the new Selenium IDE. Check it out below.

Between automatic waits and global set speed, you should have a lot fewer pause commands. That means your tests will be simpler and easier to maintain.

If you need more fine-grained control, Selenium IDE lets you insert steps to wait for an element to meet some condition: editable, present, or visible — or the opposite (not editable, not present, or not visible).

Finally, there’s the pause command that you can insert after individual steps. Selenium IDE has had this for a long time; feel free to use if you’re feeling nostalgic.

#4 Conditional Logic

When testing web applications, your scripts have to handle intermittent user interface elements that can randomly appear in your app. These are those oh-so-helpful cookie notices, as well as popups for special offers, quote requests, newsletter subscriptions, paywall notifications, and adblocker requests.

Conditional logic is a great way to handle these intermittent UI annoyances features. You want your scripts to say, If X appears, click the link to make it go away.

You can easily insert conditional logic — also called control flow —  into your Selenium IDE scripts. Here are details, and how it looks:

#5 Modular Test Scripts

Just like application code, test scripts need to be modular. Why?

Many of your test scripts will have steps to sign into your app, sign up for an account, and sign out of an app. It’s a waste of time to re-create those test steps over and over.

Selenium IDE lets one script run another. Let’s say you have a login script that all your other scripts call. You can easily insert this step into Selenium IDE. Here’s how it looks:

This way, if your sign in, sign up, or sign out functionality changes, you only have one test script to change. That makes test maintenance a lot easier.

Here’s a quick demo of this in action:

#6 Selenium IDE supports embedded code

As broad as the Selenium IDE API is, it doesn’t do everything. For this reason, Selenium IDE has execute script and execute async script commands that lets your script call a JavaScript snippet.

This provides you with a tremendous amount of flexibility by being able to take advantage of the flexibility of JavaScript and wide range of JavaScript libraries.

To use it, click on the test step where you want JavaScript to run, choose Insert new command, and type execute script or execute async script in the command field, as shown below:

#7 Scripts Can Be Edited

In the old Selenium IDE, scripts couldn’t be edited. For this reason, Selenium IDE tests were considered throwaway scripts: if they didn’t work, you’d have to delete them and re-record a test.

With the new Selenium IDE, you can easily modify your tests. Insert, modify, and delete commands, as you can see below. No more throwaway scripts!

#8 Available Debugger

Pretty much every IDE on the market has combined an editor and a debugger. (That is, after all, what’s meant by Integrated Development Environment.)

But not the old Selenium IDE. It had no debugger. (Whoops.)

The new Selenium IDE lives up to its name, and provides a way for you to set breakpoints in your script. Just click on the left margin of your test.

This way, you can inspect your browser’s state when your script stops due to a breakpoint. Here’s how it looks:

This makes it a lot easier to troubleshoot issues. (Speaking of troubleshooting, check out #16 below.)

#9 Run Scripts In Parallel

With the old Selenium IDE tests could only be run one at a time. This made tests take much longer. Alternatives like Selenium Grid were only available when used with Selenium WebDriver.

Selenium IDE can run tests in parallel. This lets you get through your test suites much faster.

To run multiple SIDE Runner tests in parallel, just tell it the number of parallel processes you want. Here’s an example of running three tests at once:

No, that’s not a Bandersnatch reference…

Here’s a quick video of this in action (view in full screen since the fonts are small):

#10 Run From CI Build Scripts

Because SIDE Runner is called from the command line, you can easily fit into your continuous integration build scripts, so long as your CI server can call selenium-ide-runner and upload the .side file (your test script) as a build artifact. For example, here’s how to upload an input file in Jenkins, Travis, and CircleCI.

This means that Selenium IDE can be better integrated into your DevOps toolchain. The scripts created by your less-technical QA team members — including business analysts — can be run with every build. This helps align QA with the rest of the business and ensures that you have fewer bugs escaped into production.

#12 Selenium IDE scripts can be managed in a code repository

Other record and replay tools store their tests in a range of binary file formats. (For example, here are UFT’s binary file formats.) You could check these into a source code repo, such as GitHub or GitLab, but it wouldn’t be all that useful since you couldn’t inspect test scripts, compare differences, or selectively pull in changes.

In contrast, the new Selenium IDE stores test scripts as JSON files. This makes them easy to inspect, diff, and modify. Here’s a script I recorded, viewed in Sublime text editor. You can easily change the starting URL, window size, and object locators.

If you manage your Selenium Webdriver scripts in GitHub, GitLab, Bitbucket, Azure DevOps, AWS CodeCommit, Google Cloud Source, or some other source code repo, you can now do the same for your Selenium IDE scripts.

#12 Extensible With Plugins

Unlike the old Selenium IDE, the new Selenium IDE supports third-party plugins to extend its functionality. Here’s how to build your own Selenium IDE plugin.

This is pretty exciting. You can imagine companies building plugins to have Selenium IDE do all kinds of things — upload scripts to a functional testing cloud, a load testing cloud, or a production application monitoring service like New Relic Synthetics.

Plenty of companies have integrated Selenium Webdriver into their offerings. I bet the same will happen with Selenium IDE as well.

Speaking of new plugins…

#13 Do Visual UI Testing

We here at Applitools have built a Selenium IDE plugin to do AI-powered visual validations on Selenium IDE, called Applitools for Selenium IDE. (Imaginative, right?)

To get it, head to the Chrome and Firefox stores, do the three-second install, plugin your Applitools API key, and you’re ready to go.

Create a Selenium IDE script, choose Insert new command, type eyes (that’s the name of our product), and insert a visual checkpoint into your test script. Like this:

Visual checkpoints are a great way to ensure that your UI renders correctly. Rather than a bunch of assert statements on all your UI elements — which would be a pain to maintain — one visual checkpoint checks all your page elements.

Best of all, Applitools uses visual AI to look at your web app the same way a human does, ignoring minor differences. This means fewer fake bugs to frustrate you and your developers — a problem that often leads simple pixel comparison tools to fail. When Applitools finds a visual bug, it’s worth paying attention to.

Here’s an example of Applitools Visual AI in action, finding a missing logo on a GitHub page. We didn’t have to create an assert statement on the logo; Applitools visual AI figured this out on its own.

#14 Visually Test Responsive Web Apps

When you’re testing the visual layout of your responsive web apps, it’s a good idea to do it on a wide range screen sizes (also called viewports) to ensure that nothing appears out of whack. It’s all too easy for responsive web bug to creep in.

And when they do, the results can range of merely cosmetic to business-stopping. Here’s Southwest Airlines putting the kibosh on their checkout process with a responsive bug that covers up the Continue button:

Not good, right?

When you use Applitools for Selenium IDE, you can visually test your webpages on Applitools Ultrafast Grid. This cloud-based testing service has over 100 combinations of browsers, emulated devices, and viewport sizes. This lets you do thorough visual testing on all your web apps.

Here’s how you specify which combinations to test on:

Once your tests run on Ultrafast Grid, you can easily check your test results on all the various combinations, like this:

Your responsive web bugs can run but they cannot hide…

#15 Pinpoint The Cause Of Front-end Bugs

Every Selenium IDE script you run with Ultrafast Grid can be analyzed with our Root Cause Analysis.

This matters because, to bastardize Jerry Seinfeld, it’s not enough to FIND a bug. You have to FIX the bug.

Like the Seinfeld car rental company, every testing tool I know of finds bugs, but doesn’t tell you how to fix them.

Except Applitools.

When you find a visual bug in Applitools, click on it, and view the relevant DOM and CSS diffs, as shown below:

I want to point out that we don’t show all DOM and CSS diffs — just the handful that are likely to have caused a visual bug. This makes debugging visual bugs go much faster.

We covered a ton of different ways Selenium IDE and Applitools work together. Here’s a visual summary:

#16 Export Webdriver scripts 

Originally, Selenium IDE could export to Webdriver Java, but the 2019 refresh required additional coding. That code has been written for the following exports:

  • C# NUnit
  • C# xUnit
  • Java JUnit
  • JavaScript Mocha
  • Python pytest
  • Ruby RSpec

Additionally, you can create and contribute your own code export package. You can find the instructions in the Selenium IDE documentation.

Selenium IDE Limitations

Since this document first got posted, the two limitations have been addressed substantially. Originally, code export needed to be completed, and it was – with Java support in early 2019. As mentioned above, anyone can contribute scripting export code to the project, which is how the export set has grown.

Selenium IDE doesn’t support data-driven scripts directly

In the original design, Selenium IDE could not import a bunch of tabular data, like a CSV file or database table, and then run a parameterized test once for each row of data. The direct feature is still of interest – but remains blocked by a bug. You can track progress here.

However, intrepid engineers have proposed a work-around using SIDE Runner.  Contributor PawelSuwinski writes:

“With SIDE runner is a just matter of side file preprocessing before running. I did it in some php project as part of a composer script, I do not have any JS npm run-script working example but would use templates concept this way:

  1. For CSV data use something like csv2json to get data in JSON format
  2. Creating template SIDE file use store json with Target like ex. %DATA%
  3. In preprocessor replace all ‘%DATA%’ in template side file with target data (ex. using rexreplace) and save it as a target side file (in cache/ tmp area)
  4. Run side runner on target side file”

Work on this feature continues. Let Applitools know if you have tried the workaround successfully.

Summary

Here’s how Selenium IDE compares to traditional record & replay:

CapabilityTraditional Record & ReplaySelenium IDE
Cross-browser supportNoYes
Resilient testsNoYes
Automatically wait for app under testNoYes
Conditional logicNoYes
Run one test from anotherNoYes
Embed code into scriptsNoYes
Edit scriptsNoYes
Debug scriptsNoYes
Run scripts in parallelNoYes
Run scripts during CI buildsNoYes
Manage scripts in source code repoNoYes
Plugins to extend functionalityNoYes
Visual UI testingNoYes (w/ plugin)
Responsive web supportNoYes (w/ plugin)
Diagnose root cause of visual bugsNoYes (w/ plugin)
Export tests to codeNoYes
Data-driven testsNoWorkaround proposed

‘Less is more

Selenium IDE is part of a larger trend of software making life simpler for technical folks. One example: the broad range of codeless tools for developing applications.

Other examples: Serverless offerings like AWS Lambda make it easier to write just the code you need to get a job done. And Schemaless databases like MongoDB provide architects with much more flexibility to innovate versus tightly constricted SQL databases.

Codeless, serverless, schemaless — and now scriptless, with Selenium IDE. We might be seeing a trend here.

Go deeper

To get started, check out this tutorial on Selenium IDE. It’s done by Raja Rao, a former QA manager who’s been using Selenium Webdriver for over a decade. So he knows what he’s talking about.

Beyond that, here’s a fairly complete list of resources to learn the new Selenium IDE in 2021:

Selenium IDE pages

Applitools for Selenium IDE pages

Videos

How do you plan on using Selenium IDE? Let us know!

The post 16 reasons why to use Selenium IDE in 2021 (and 1 why not) appeared first on Automated Visual Testing | Applitools.

]]>
What Not To Miss At Selenium Conf 2020 https://applitools.com/blog/selenium-conf-2020/ Wed, 09 Sep 2020 23:27:42 +0000 https://applitools.com/?p=22431 As a company that focuses on browser-based functional tests, Applitools stays on top of all things Selenium. We are excited to be Gold Sponsors of the virtual Selenium Conf 2020,...

The post What Not To Miss At Selenium Conf 2020 appeared first on Automated Visual Testing | Applitools.

]]>

As a company that focuses on browser-based functional tests, Applitools stays on top of all things Selenium. We are excited to be Gold Sponsors of the virtual Selenium Conf 2020, which starts with online workshops tomorrow morning in India and tonight in the United States. There will be lots to learn, whether you are just getting started with Selenium or if you are a hard-core contributor.

Here is our list of five ‘what not to miss’ sessions and workshops at this year’s conference.

Simon Stewart’s Keynote

pasted image 0 1

Simon Stewart talks about the State of Selenium 2020, including a discussion of what’s new in Selenium 4. Hear about contributors, lots of new contributions, and lots to discuss. Simon knows both the project’s history and can help predict its future. Expect Simon’s keynote to cover lots of ground.

Friday, 11 September 2020, 18:00 IST

US Times:

Friday, 11 September 2020, 08:30 EDT

Friday, 11 September 2020, 05:30 PDT

Anand Bagmar’s Workshop – Get Up To Speed

pasted image 0 3

Anand Bagmar is holding a “Selenium Deep Dive” workshop on Thursday, 10 September, from 10:00 to 18:00. Anand and Alexei will dive into the ins and outs of using Selenium. Anand hosts the Essence of Testing blog. He’s passionate about testing and test automation using Selenium. And, Anand is a Quality Evangelist & Solution Architect at Applitools

Thursday, 10 September 2020, 10:00-18:00 

US Times:

Thursday, 10 September 2020, 0:30-08:30 EDT

Wednesday 09 September 2020, 21:30 – Thursday 10 September 2020 05:30 PDT

Gaurav Singh on Automation Frameworks

pasted image 0

Gaurav Singh writes passionately about best practices in building test frameworks. He posts his blogs on automationhacks.io, and he has written a blog about test frameworks for Applitools. Gaurav cuts through all the information you can find on the Internet and gives you a robust way to think about modeling, building, and operating a test framework to make you more efficient.

Friday, 11 September 2020, 11:30-12:15 IST

US Times:

Friday, 11 September 2020, 02:00-02:45 EDT

Thursday, 10 September 2020, 23:00-23:45 PDT

Moshe Milman on Test Automation and CI/CD

pasted image 0 4

Moshe Milman works for Applitools and has a broad knowledge of test and test strategies. He’ll focus on the prime issues in CICD automation – the combination of change volume and the increasing pace of changes. The solution involves optimizing your tests, looking at organization needs and tradeoffs, choosing the right tools, and deploying the right processes. Moshe will share tips and tricks as well.

Friday, 11 September 2020, 10:30-11:15 IST

US Times:

Friday, 11 September 2020, 01:00-01:45 EDT

Thursday, 10 September 2020, 22:00 – 22:45 PDT

Sujasree Kurapati on Accessibility Testing

pasted image 0 2

Legal requirements and business opportunities drive organizations to ensure the accessibility of their web applications. Deque software has focused on providing tools for testing for software accessibility tests. Hear Sujasree Kurapati’s talk about a11y APIs and a11y testing that help organizations automate validation to ensure they meet accessibility goals.

Friday, 11 September 2020, 15:15-15:35 IST

US Times:

Friday, 11 September 2020, 05:45-06:05 EDT

Friday, 11 September 2020, 02:45-03:05 PDT

Jim Evans’s Keynote

Jim Evans

After all gets said and done, be sure to catch Jim Evans’s Saturday keynote, I’m Not Special. All projects have key people who contribute greatly to the project’s success. Jim wants you to understand what really matters when you contribute to a software project. He wants you to walk away with a different perspective on people, processes, projects, and software.

Saturday, 12 September 2020, 16:00-16:45 IST

US Times:

Saturday, 12 September 2020, 06:30-07:15 EDT

Saturday, 12 September 2020, 03:30-04:15 PDT

Wishing you all a good SeleniumConf 2020!

Learn More about Applitools and Selenium

The post What Not To Miss At Selenium Conf 2020 appeared first on Automated Visual Testing | Applitools.

]]>
Selenium Functional Testing with Applitools https://applitools.com/blog/selenium/ Fri, 23 Aug 2019 19:15:49 +0000 https://applitools.com/blog/?p=6047 We want you to have one place to show you all things Selenium. We know this is a tall order; you could be a Selenium expert, or you could be getting started with Selenium. No matter where you are on this spectrum, from novice to expert, here are all our Selenium-related articles, webinars, and tutorials in one place.

The post Selenium Functional Testing with Applitools appeared first on Automated Visual Testing | Applitools.

]]>

We have written a lot about Selenium, and about using Selenium and Applitools.

We want you to have one place to show you all things Selenium. We know this is a tall order; you could be a Selenium expert, or you could be getting started with Selenium. Perhaps you would like to:

  • Learn some advanced Selenium skills and capabilities
  • Compare Selenium with other test automation tools
  • Learn about user experiences with Selenium and Applitools
  • Understand what makes the combination of Applitools and Selenium so valuable.

No matter where you are on this spectrum, from novice to expert, here are all our Selenium-related articles, webinars, and tutorials in one place.

Getting Started – Learn about Selenium and Applitools

If you are interested in learning how to get started with Selenium, or how to use Selenium with Applitools, we have a lot of content to help you get started. These include:

Test Automation University

We have courses that teach you Selenium in detail for specific languages.

We have a course to teach you how to use Selenium IDE.

We also have courses that utilize Selenium as part of learning test automation, including:

Tutorials

Applitools has posted the following tutorials for using Applitools with Selenium.

Blog Posts

If you are looking to read about Selenium, we have you covered. Over several years we have written a number of blog posts to help readers get up to speed on test automation with Selenium. Here are some of those key posts.

Selenium tutorial

Webinar Recordings

If you would prefer to watch a webinar instead of reading a blog post, we have also hosted webinars on a range of topics about Selenium. The recordings can be accessed from our blog. These webinar recordings include:

Selenium Conference

Advanced Topics with Selenium and Applitools

Once you have proceeded past the basics, it’s time to dig deeply into test topics that will help you master using Selenium to achieve your larger test goals.

Blog Posts

Webinar Recordings

Comparing Selenium Versus…

Once you know something about Selenium, it becomes important to understand how other test automation tools compare with Selenium. Do they all use the webdriver to apply tests? Do they work on all browsers that support webdriver? Do you get the wealth of programming languages you find with Selenium? Here are some blog posts and webinars that compare and contrast Selenium with other test technologies – including how they link with Applitools.

Blog Posts

Webinars

Customer Stories – Selenium and Applitools

Finally, you’d like to know how companies use Selenium and Applitools together for greater engineering efficiency, greater test quality, and faster time to market. Here are a few stories to review.

 

The post Selenium Functional Testing with Applitools appeared first on Automated Visual Testing | Applitools.

]]>
Why I joined Applitools: Dave Haeffner https://applitools.com/blog/team-dave-haeffner/ Tue, 09 Jul 2019 00:14:37 +0000 https://applitools.com/blog/?p=5845 Dave Haeffner has had a varied career that began with a degree in networking engineering. He worked various roles in IT operations, eventually stumbling into QA and test automation without...

The post Why I joined Applitools: Dave Haeffner appeared first on Automated Visual Testing | Applitools.

]]>

Dave Haeffner

Dave Haeffner has had a varied career that began with a degree in networking engineering. He worked various roles in IT operations, eventually stumbling into QA and test automation without a background in programming. This started him on a path that ultimately lead him to author ‘The Selenium Guidebook‘. Along the way, he’s helped various companies implement automated acceptance testing (The Motley Fool, ManTech International, Sittercity, and Animoto), spoken at numerous conferences and meetups around the world about how to use Selenium successfully, and is an active contributor to the open source Selenium project.

In June 2018 he moved to Tel Aviv from the US to join Applitools as the second member of our open-source Selenium IDE team, working closely with Tomer Steinfeld. We sat down with Dave to talk us through his career path and the work he currently does to improve Selenium IDE.

Hi Dave! Thank for joining us! To begin with, could you tell us a little about your background and how you ended up becoming a Selenium expert?

I actually went to college for network engineering at a small state school in upstate New York, which is a business school. I chose this program because, at the time, I was really into computer networking and gaming. When I discovered that there was a degree that meant I could do the things I love for a living I was sold!

After qualifying, I began working as a network engineer in a state hospital. It was a very specific role. I quickly realized I needed more opportunities for career growth. With this in mind, I moved to DC to work as a support engineer for a boutique consulting firm. Eventually, I got burnt out on the work and became intrigued by the startup culture that was beginning to flourish in the tech industry.

A friend of mine worked at The Motley Fool. The concept of a flat organizational structure, working with great people and learning more about software testing drew me in. I joined The Motley Fool as part of their desktop support team and used this platform to learn more about their software development team. After a couple of years in that position, there was an opportunity to transition into a role in QA. I wasn’t really sure what that entailed, but I was up for a new challenge.

How Was Your Transition to QA?

As it turns out, test automation was a hard thing in 2009. My new team had invested quite a lot of effort into test scripts with Selenium IDE and were having loads of issues with maintaining them. Like me, none of my teammates had a background in programming. This is really where my software testing story began.

I was fortunate to be in complete ignorance of how much I didn’t know. I dug in and started to look for ways to make the Selenium IDE scripts more maintainable and reliable. The wisdom of the crowd suggested that you needed to export your tests to a programming language and mold this code into something reasonable (e.g., a test harness). Unsure if we were on the right track, we gave it a shot. It seemed to help, but it was difficult as we were all fairly new to programming. That same year I had the opportunity to attend the annual Agile conference. While there, I got to meet the creator of Selenium, Jason Huggins. I told him about our trials and tribulations with Selenium IDE and code export. He said ‘It’s really hard, but you’re on the right track, kid.”

Filled with props from Selenium’s creator, I returned from the conference eager to keep going. Along with the help of some of my developer colleagues, we were able to make significant improvements in our automated testing practice. The following year, I returned to Agile as a speaker to share our story and lessons learned. As a result, Selenium became such a big part of my life that it afforded me the opportunity to branch out on my own and move into the world of consulting.

What was it like branching out on your own into consulting?

I’d always wanted to be an entrepreneur and the consulting thing naturally grew from my interest in Selenium. Working with a group of customers I gained insight into the limitations that teams encountered when trying to adopt practices using Selenium and how difficult it can be for teams to use test automation. I quickly realized that a lot of the problems around the tooling were the same – the same impediments, the same questions, even in the same order. It was like a Power Law! So I began writing them down and decided to organize a local Meetup to connect and learn from other practitioners.

I kept getting a lot of the same questions over email about Selenium and realized that it would be a lot easier to answer the question once, publish the solution online, and refer people to it. This is how I started my weekly Selenium tip newsletter (Elemental Selenium). Eventually, my work with Selenium started to become a known quantity, and my book (The Selenium Guidebook) evolved from this.

What convinced you to move your family to Tel Aviv and work for Applitools?

Back when I was applying for college, I had the opportunity to look at computer science. At that point, after being homeschooled I wasn’t confident in my math abilities, which put me off applying. I guess, I always wondered what it would be like. So, while I was consulting I tried to fill that void through self-teaching – starting with some of the fundamental programming books (e.g., The Gang of Four book, Working Effectively with Legacy Code, and Refactoring) and applying them to projects as I went along.

To be honest, I was hesitant to work with a company. After being self-employed for the better part of a decade I thought it would be a tough transition. Also, I wasn’t sure if a company would be open to hiring someone who is an expert in one area but mediocre in others. But Adam Carmi (CTO at Applitools) saw an opportunity for my expertise that would also allow me to work on my software development skills. Applitools is making an impressive investment in the IDE, with two people to working full-time on its development (me & Tomer Steinfeld). It was a unique and rare opportunity that I couldn’t pass up. Plus, I’d always wanted to live in another country.

Right now, I’m working with Doron Zavelevsky and Tomer Steinfeld. Their depth of knowledge is impressive, as is their willingness for knowledge sharing. As I work on Selenium IDE, I often reflect back to my early days with the tool and think — I’ve come full circle.

Sounds like it’s working out to be a great match! Could you tell us a little about your role?

Working in open source is great, but it’s not without challenges. We have a lot of constraints, both technical limitations and a large backlog of development and feature requests. Selenium IDE is built as a web extension which also presents some unique challenges. As does writing record and playback functionality in the browser (hello edge cases!). But it’s a lot of fun, and we learn something new every day.

You Must Have A Lot On Your Plate!

Absolutely, but that’s what makes it interesting. Selenium IDE has a history of neglect. It’s been good enough for some, but terrible for others. The amount of interest to push the tool forward often peters out. Here, it’s our job to make it into a robust tool that helps people with end-to-end testing in the browser. We’re working to make the tool more reliable, more powerful, and more intuitive. Ultimately my goal in this role is to remove the stigma attached to Selenium IDE and record-and-playback. I continue to learn good software development practices along the way (and also improve my Hebrew!).

What Else Do You Want Readers to Know About Applitools?

Our engineering team is hiring! Take a look at our job openings and get in contact to find out more: www.applitools.com/careers

The post Why I joined Applitools: Dave Haeffner appeared first on Automated Visual Testing | Applitools.

]]>
7 Must-read Selenium Tutorials https://applitools.com/blog/7-must-read-selenium-tutorials/ Mon, 17 Jun 2019 17:41:00 +0000 http://162.243.59.116/2014/09/02/7-must-read-selenium-tutorials/ By reading this article, you clearly want to know more about Selenium. You might even be using Selenium. The open source Selenium project supports popular development languages. Selenium tests a...

The post 7 Must-read Selenium Tutorials appeared first on Automated Visual Testing | Applitools.

]]>
Selenium tutorial

By reading this article, you clearly want to know more about Selenium. You might even be using Selenium. The open source Selenium project supports popular development languages. Selenium tests a large percentage of web and mobile applications developed globally.

If you are new to Selenium, stuck on specific ways to leverage the drivers, or on the hunt for tools to run your perfect scripts, it can be a challenge. Here are the top 7 Selenium tutorials to make your life a little easier.

Getting Started

First, create your scripts (Test Cases). Record test cases via Selenium IDE, or write your scripts directly in the language of your choice, using the appropriate Selenium reference, and your favorite browsers driver.  Here are two posts to get you introduced to the platform:

1)  Writing your First Test Case In Selenium WebDriver (via Software Testing Mentor)

2) Creating your First Script in Selenium IDE (via Udemy)

Digging Deeper

Once you have your basic Selenium script, you need to do a test run. You might need to investigate more complex scripting, such as getting access to authentication only pages.  Check out these three Selenium tutorials:

3) Using Selenium to Test User Login (via StackOverflow)

4) Using Selenium to test page performance (via Dean Hume)

5) Selenium Tutorial for Beginners: Learn Selenium in 7 Days (Guru99)

Getting Results

Once you have done your test runs, and have your perfect scripts, you need a great tool to run them.

That’s where Applitools comes in. Selenium gives you the functional test to ensure that your application behaves correctly in your selected combination of hardware, screen size, browser, and operating system. Validating visual behavior across each combination hits the limits of snapshot tools, but not Applitools. With Applitools, you find visual only errors that a user would find visually distinct and flag as an error – overcoming the false fails that plague standard snapshot tools.

If you are interested in using Selenium and Applitools together, we have plenty of resources and tutorials available to make you successful.  Take a look at these two:

6) Applitools Selenium Javascript Tutorial

7) Applitools Selenium IDE Tutorial

Selenium lets you ensure that your app behaves correctly. However, Applitools lets you both see that the Selenium script behaves as expected both functionally and visually. Applitools makes it much easier to scale your testing across all the browsers, devices, and screen sizes your customers run.

Have a Favorite Selenium Tutorial?

If you have a favorite tutorial on how to use Selenium let us know. We like to learn from Dave Haeffner.  Check out this webinar about Selenium tips and tricks. Read this blog post on the resurgence of Selenium IDE.

Find Out More

Check out all the Applitools Tutorials, including the ones on Selenium.

Take the course Codeless Test Automation with Selenium IDE from Test Automation University.

Take the course Intro to Selenium WebDriver with .NET Core from Test Automation University.

To get started with Applitools, request a demo or sign up for a free Applitools account.

The post 7 Must-read Selenium Tutorials appeared first on Automated Visual Testing | Applitools.

]]>
Code Export in Selenium IDE https://applitools.com/blog/code-export-selenium-ide/ Tue, 28 May 2019 16:35:12 +0000 https://applitools.com/blog/?p=5196 Selenium IDE is not sitting still. Since its relaunch earlier this year, Selenium IDE developers have been busy responding to user enhancement requests.  One highly-requested has just been released –...

The post Code Export in Selenium IDE appeared first on Automated Visual Testing | Applitools.

]]>

Selenium IDE is not sitting still. Since its relaunch earlier this year, Selenium IDE developers have been busy responding to user enhancement requests.  One highly-requested has just been released – the ability to export code from Selenium IDE for use in Selenium WebDriver. Code export from Selenium IDE today works with Java JUnit. The development team is looking for community members like you to add to the capabilities of Selenium IDE.

The code is being hosted and is available on Github. You can see examples as well as develop your own export capabilities.

But, first, here is what’s new.

Getting Started

You can export either a test or suite of tests to WebDriver code by right-clicking on a

right click    menu

test or a suite, selecting Export,   choosing your target language, and clicking Export.

This will save a file containing the exported code for your target language to your browser’s download directory.

Origin Tracing Code Comments

When exporting there is an optional toggle to enable origin tracing code comments.

This will place inline code comments in the exported file with details about the test step in Selenium IDE that generated it.

Supported Exports

Currently, Selenium IDE export to Java. Specifically, Java for JUnit.

The Selenium IDE team intends to support all of the officially supported programming language bindings for Selenium (e.g., Java, JavaScript, C#, Python, and Ruby) in at least one testing framework for each language.

Contributions are welcome to help add new languages and test frameworks for a given language. See How To Contribute for details on how.

Java JUnit

The exported code for Java JUnit is built to work with Java 8, JUnit 4.12, and the latest version of Selenium 3.

You should be able to take the exported Java file and place it into a standard Maven directory structure with a pom.xml file listing these dependencies and run it.

Contributing to Code Export for Selenium IDE

Code export was built in a modular way to help enable contributions.

Each language and test framework will have its own package containing the code to be exported. Each snippet of code maps to a command in Selenium IDE and each of these packages rely on an underlying “core” package which does all of the heavy lifting.

Here are the steps to create a package for a new language or for a new test framework within an already established language.

1. Create a new package

First, copy an existing language package (e.g., packages/code-export-java-junit) and rename it (e.g., the folder and the details in the package.json file) to the target language and framework you’d like to contribute (e.g., packages/code-export-ruby-rspec, etc.).

Next, add the new package as a dependency to the package.json in code-export.

Lastly, run yarn from the root of the project.

2. Update the locators and commands

The core function of code export is generating the language specific strings. The most prominent of these are the commands and locator strategies (e.g., the syntax for the “by” lookups).

For a given language, there is a file for each, along with accompanying test files.

You can see an example of that in github: packages/code-export-java-junit.

When declaring new commands you can either specify its output as a string, or as an object which specifies indentation levels).

Built into code-export is a prettifier which controls the indentation of the outputted code. This structure is useful if a command’s output is verbose and you want to be explicit. Or if the command changes the indentation level of the commands that come after it.

3. Create the hooks

Hooks make up a majority of the structure of the code to be exported (e.g., a suite, a test, and all of the things that go into it like setup, teardown, etc.). They are also what enables plugins to export code to different parts of a test or a suite.

There are 9 different hooks:

  • afterAll (after all tests have completed)
  • afterEach (after each test has been completed – before afterAll)
  • beforeAll (before all tests have been run)
  • beforeEach (before each test has been run – after beforeAll)
  • command (emit code for a new command added by a plugin)
  • dependency (add an addittional language dependency)
  • inEachBegin (in each test, at the beginning of it)
  • inEachEnd (in each test, at the end of it)
  • variable (declare a new variable to be used throughout the suite)

See an example of hooks being implemented in packages/code-export-java-junit here: Hooks

4. Update the language specific attributes

In each language you need to specify some low-level details. Things like how many spaces to indent, how to declare a method, a test, a suite, etc.

Find an example of this being implemented in packages/code-export-java-junit here: Language specific options

5. Add it to the mix

Once you’ve got everything else in place, wire it up for use in the UI.

This is possible in packages/code-export/src/index.js.

You will need to:

  1. Import your new code-export package
  2. Update availableLanguages with details about your code-export language
  3. Update exporter to reference your code-export name and import

6. Test and tune

The best end-to-end test for code export applies a series of tests and verify that they run as you would expect.

From a development build, access the seed tests and verify that all of the standard library commands work for your new language.

Test, fix, and test again until you have confidence with the end result.

7. Submit a PR

You’ve done the hard part. Now simply submit a PR. Please do so against the v3branch.

For More Information on Selenium IDE:

The original version of this article appears in the Selenium IDE documentation site.

Selenium IDE pages

Applitools for Selenium IDE pages

Selenium IDE videos

 

The post Code Export in Selenium IDE appeared first on Automated Visual Testing | Applitools.

]]>
Integrate test results into Slack [step-by-step tutorial] https://applitools.com/blog/integrate-test-results-slack/ Thu, 04 Apr 2019 18:45:13 +0000 https://applitools.com/blog/?p=4559 Update: We have recently released a new, native Slack integration. For additional details please visit our step by step guide for Applitools & Slack integration. One of the great things...

The post Integrate test results into Slack [step-by-step tutorial] appeared first on Automated Visual Testing | Applitools.

]]>

Update: We have recently released a new, native Slack integration. For additional details please visit our step by step guide for Applitools & Slack integration.

One of the great things about Slack is the long list of integrations available. Whether it’s an integration as foundational as Google Drive, GitHub, or Zendesk — or as whimsical as Lunch Train — there are Slack integrations for a wide range of use cases.

Here’s an example of Slack’s GitHub integration:

pasted image 0 8

With that backdrop, we’d like to show you how to integrate your Applitools Eyes visual UI test results into one of your Slack channels — something that our customers have frequently requested.

This step-by-step tutorial uses the Slack incoming webhooks API.

First, some background:

Slack provides APIs to users to create applications and to automate processes, such as sending automatic notifications based on human input, sending alerts on specified conditions, and more. The Slack API has been noted for its compatibility with many types of applications, frameworks, and services.

Once you build this tutorial, you’ll be able to view test results on any Slack client: your laptop, your phone. Or even via notifications on your Apple Watch, if you’re stuck in a meeting and don’t want to open your phone. You’ll be the first to know if your app has a visual glitch that you’ll need to fix.

With that, let’s dive into what you need to do  to bring Applitools into your Slack channel:

Step 1: Set up your Slack endpoint

  1. Per Slack recommendations, create a “sandbox” account for Slack for your experiments before integrating it with your team Slack account: https://slack.com/create
  2. Follow these instructions to see how you post your first “Hello world” message to your new Slack channel: https://api.slack.com/tutorials/slack-apps-hello-world
  3. Copy and keep your webhook URL (always better to add this webhook URL to your environment variables, but I’ll leave it to you).

hw incoming webhook table after

Step 2: Getting Applitools Eyes Test Results

  1. Switch to whatever IDE you use to write automated test scripts that call the Applitools API, and open one of those scripts.
  2. Towards the end of your test scripts, you should have a call to eyes.Close(). Here’s its documentation for our Java, JavaScript, C#, and Python SDKs. For scripts written in Java, it will look something like this:
    TestResults res = eyes.close(false);
  3. This call returns a TestResults object. Additional information about Applitools TestResults can be found here.
    
    

Step 3: Connecting The Dots

The example below is in Java; however, you can figure out how to achieve this in any language you are using (with minor differences) as the TestResults object is accessible also in JavaScript, Python, Ruby, C#, and PHP. I’ve followed the instructions in this article to create the code below but feel free to customize it to your specific team needs.

1. Create class EyesSlack and add the following code in it:

View the code on Gist.

2. Now let’s see how we use this class in our tests:

View the code on Gist.

3. All you need to do now is run it to see your Applitools Eyes Test Results right in your Slack channel.

Here is an example of the screen message in Slack:

pasted image 0 9

If you want to see my own experience putting together this blog post, check out this video:

Now that you tested it in your sandbox you are ready to merge into your team slack account – simply replace the webhook URL and you are good to go.

Looking for additional integrations with Applitools? Here are my favorites:

The post Integrate test results into Slack [step-by-step tutorial] appeared first on Automated Visual Testing | Applitools.

]]>
The New Selenium IDE: See How It Can Turbo-charge Your Testing Efforts https://applitools.com/blog/selenium-ide-with-dave-haeffner/ Fri, 22 Feb 2019 23:37:18 +0000 https://applitools.com/blog/?p=4241 Watch this webinar, where Selenium Guru Dave Haeffner and Software Developer Tomer Steinfeld, showcase the New Selenium IDE. In this webinar, you’ll learn how the newly re-factored Selenium IDE is...

The post The New Selenium IDE: See How It Can Turbo-charge Your Testing Efforts appeared first on Automated Visual Testing | Applitools.

]]>
Selenium IDE (logo)

Dave Haeffner and Tomer Steinfeld - software developers @ Applitools. and full-time maintainers of Selenium IDE

Watch this webinar, where Selenium Guru Dave Haeffner and Software Developer Tomer Steinfeld, showcase the New Selenium IDE.

In this webinar, you’ll learn how the newly re-factored Selenium IDE is guaranteed to augment your testing efforts, regardless of your team’s automation “maturity” level, or your personal technical knowledge or experience.

Watch this session with Dave Haeffner and Tomer Steinfeld – full-time maintainers of Selenium IDE — and learn: 

  • Why codeless solutions are worth paying attention to
  • 10 traits of a great codeless testing tool
  • Key features in the New Selenium IDE:
    • Reliable test playback with “locator fallback”
    • Enhance tests with control flow logic (e.g. if, else if, else, while, do, while, times)
    • Built-in debugger for diagnosing issues in your tests
    • Turn-key parallel, cross-browser execution that can be used on CI
    • Add/modify commands in the IDE, or integrate with a third-party provider through plugins
  • Roadmap – what’s in store for the New Selenium IDE

Dave also shared how he went from a record-and-playback naysayer to the Selenium IDE maintainer.

In addition, this session includes 20 minutes of live Q-and-A with Dave and Tomer.

Full slide-deck:

 

Full webinar recording:

 

Demos (from the session):
Parallel execution with the Runner (slide 13 in the slide deck):

Reusable Test Case (slide 17 in the slide deck):

Additional Materials and Recommended Reading:

10 Features Every Codeless Test Automation Tool Should Offer” — article by Angie Jones (as mentioned in the session by Dave)

Selenium IDE Page – on the Selenium Project website

Selenium Conf London – October 7-8, 2019, London UK – Join 600 test automation pros and an amazing lineup of speakers, including: Richard BradshawAsh Coleman, and more. CFP and Early Bird Ticket Sales open on Feb 27!

Selenium IDE: The Next Generation — webinar with the Godfather of Selenium: Simon Stewart, inventor of Selenium WebDriver.

Release Apps with Flawless UI: Open your Free Applitools Account, and start visual testing today.

Test Automation U — the most-talked-about test automation initiative of the year: online education platform led by Angie Jones, offering free test automation courses by industry leaders. Sign up and start showing off your test automation badges!

 

— HAPPY TESTING —

 

The post The New Selenium IDE: See How It Can Turbo-charge Your Testing Efforts appeared first on Automated Visual Testing | Applitools.

]]>
Tomer Steinfeld: Why I joined Applitools https://applitools.com/blog/life-at-applitools-tomer-steinfeld/ Tue, 22 Jan 2019 20:55:31 +0000 https://applitools.com/blog/?p=4097 Tomer Steinfeld has been working as a Frontend Developer with Applitools for over a year now. He’s an expert developer and the nicest of people! His current focus has been rewriting Selenium...

The post Tomer Steinfeld: Why I joined Applitools appeared first on Automated Visual Testing | Applitools.

]]>

Tomer Steinfeld

Tomer Steinfeld has been working as a Frontend Developer with Applitools for over a year now. He’s an expert developer and the nicest of people! His current focus has been rewriting Selenium IDE from scratch to bring it up to date with modern web standards. It is now both a Google Chrome extension and Firefox add-on, is written in React and MobX and does very challenging things. These include recording user interactions, playing them back, supporting many types of UI selectors, supporting interaction with other extensions to extend functionality, emitting code and exporting it, dealing with security constraints, and much more.

We sat down with Tomer to find out what brought him to work in web development and Applitools, and how he continues to learn and build on his skills within his role.

What is your current role?

I work in the test automation space, and because of my love for open source, I am in charge of Selenium IDE, an open source, record-playback tool based on Selenium. It’s an extension that allows people who don’t know how to code to automate web interactions.

Can you tell us about your background?

I started writing code around 4th grade, specifically JavaScript, because I was really curious about how the web worked. Then around the time I was in High School I really got into iOS development, got a Mac and everything, and invested a lot of time teaching myself, still couldn’t understand the block syntax. When I was 17, Apple offered me a scholarship to go to WWDC and I missed my finals in Physics to attend it! (I still had to pay for the flight though…)

After that, I published a few apps to the App Store (check them out here), I got enlisted, and was placed within the computing division of the Israel Defense Forces (IDF). For the first time in my life, I was writing code professionally, rather than for myself, which meant I had to be a team player. Particularly important was how to implement workflows and how to make sure the code I was writing was readable and understandable by my teammates. This proved to be an advantage when I was released from the service and started to look for a job in the tech industry.

Since there was no iOS development in the army, I naturally got back into web development by default. However, going back to the web gave me the opportunity to learn about React and the technologies I rely on today at Applitools.

What motivated you to apply to Applitools?

Looking for your first job is a pretty difficult process because even if you’re good, and you have no problem finding a job, the first one had to be one that would challenge you and make you improve as a developer. Starting on the wrong foot can really be detrimental to your career, so I was careful in selecting the companies I approached and assessing any red-flags.

During my time at the IDF, I learned the value of having a good manager. Within my unit, I had a manager who I felt I could really learn from and that was a great change for me. He pushed me to learn and achieve more, and he challenged the limits of my knowledge.

During my job search, a friend who knows Doron Zavelevsky recommended that I talk to him because he thought working with him could be a similar experience. Doron is known in React circles and from other open-source projects and all that sparked my interest. I wanted to find someone I could learn from, run ideas against and have a good second opinion. After meeting him, I felt working at Applitools and having Doron as a manager was good insurance to progressing my career and challenging and improving my skill set.

What surprised you most about Applitools?

After joining Applitools, I was surprised to find out how much it is known in the test automation industry, particularly for such a small company. This is largely due to that fact that we hire top talent. Each person has a very defined role and skillset and a well-defined problem area to work on. Working here every day, it’s easy to get used to this, but because of the Applitools people and their unique specialized skillsets, we are able to maintain relationships with industry leaders and have people look forward to what Applitools has to offer.

Could you tell me about your Selenium IDE project?

Selenium IDE is an open-source test automation tool, designed to record website interactions and then play them back. It is developed with the Selenium community, which has its own challenges outside writing code, managing the community, coordinating work with other contributors and more.

I was interested because it was open-source, a new project, and I could do it the way I wanted and using the tools I wanted to use to build it. It’s fun! Initially, we thought this project would just be part of my role. At the beginning there was a lot of pressure to get something working and be able to say that we were doing this properly, we thought things might slow down after. But instead the project has continued to grow and we’ve hired Dave Haeffner to share the load!

What can we find you doing outside of work?

Recently, I’ve been working on a new personal blog, I’m using GatsbyJS both because it’s React based, and I like React, but also because it generates a static website at the end of it. Hosting a static website is free nowadays (even with SSL), so I don’t have to pay a dime for it. You can check it out here.

What’s next for you at Applitools?

I’m not ready to make a big move just yet within Applitools, because I feel that my Selenium IDE project isn’t mature enough to stop working on it full-time, but once it gets to that point, I really want to get into more diverse projects and work with more people within R&D. This would open up seeing R&D from other people’s points of view. There are plenty of opportunities to challenge me further here – it’s just a case of deciding where to focus.

Interested in hearing more about opportunities to progress your career with Applitools? Check out our careers page or contact one of us to hear more!

The post Tomer Steinfeld: Why I joined Applitools appeared first on Automated Visual Testing | Applitools.

]]>
Selenium IDE: The Next Generation – presented by Simon Stewart https://applitools.com/blog/selenium-ide-by-simon-stewart/ Fri, 16 Nov 2018 19:52:12 +0000 https://applitools.com/blog/?p=3792 Selenium IDE got a new long overdue overhaul, and Simon Stewart, Selenium Project Lead and Creator of WebDriver, unveiled the new Selenium IDE in a special live session, including capabilities, features, and...

The post Selenium IDE: The Next Generation – presented by Simon Stewart appeared first on Automated Visual Testing | Applitools.

]]>
Selenium IDE (logo)

Simon Stewart - Selenium Project Lead and Creator of WebDriver
Simon Stewart – Selenium Project Lead and Creator of WebDriver

Selenium IDE got a new long overdue overhaul, and Simon Stewart, Selenium Project Lead and Creator of WebDriver, unveiled the new Selenium IDE in a special live session, including capabilities, features, and roadmap — now available on-demand.  

The Selenium Project is composed of several different pieces.

For power users, Selenium Grid allows people to scale their tests horizontally, for developers, there are bindings available in almost every known programming language.

But what about the case where you’re not an experienced developer? Or when you want to bootstrap a new test suite? Or file a bug against a site and provide a reproducible test case? This is where Selenium IDE fits in perfectly.

In this webinar, Simon explored the new Selenium IDE, looking at where it fits into the Selenium ecosystem, how to install it, and how to use it. He will also look at planned features that are coming your way, and the roadmap from the current alphas to a release.

Useful Links:
Simon’s slide-deck:

Full webinar recording:

Advanced Materials & Additional Reading:

Test Automation U — is a free, community-driven education platform, focused on increasing test automation success rates. Angie Jones, who is leading Test Automation U, will be unveiling this exciting new initiative in a special live session — click here for more details.

JavaScript Asynchrony and async/await in Selenium WebDriver Tests – “how to” post by Gil Tayar

How to Automate Your Video Testing using Selenium – “how to” post by Justin Ison

Comparing JavaScript Browser Automation Frameworks: Selenium vs Webdriver.io vs Puppeteer – “how to” post by Gil Tayar

Cypress vs Selenium WebDriver: Better, or just different – post by Gil Tayar

Start visual testing today with Applitools Eyes – open your free account now.

 

The post Selenium IDE: The Next Generation – presented by Simon Stewart appeared first on Automated Visual Testing | Applitools.

]]>