Webinar: The Keys to a Successful Oracle EBS upgrade, Dec 7th, 2022, 10:00 AM EST →  Register now!
x

Opkey vs. Selenium

October 10, 2020
   /   
by 
Iffat Ara Khanam

This is the age of ERP transformation, and test automation is no longer a question of “Why?” or “If.” It is a question of “How?”

  • How can we efficiently create test scripts? 
  • How easily we can maintain tests with constantly changing applications? 
  • How can we easily scale test automation to increase test coverage?

In this context, Selenium WebDriver is one of the most recognized test automation tools in the industry. Developed by Jason Huggins in 2004, the tool took off after merging with WebDriver in 2009. It is estimated that developers and test engineers across 50,000+ organizations use Selenium WebDriver to automate their regression testing, as well as other types of tests.

Despite its wide adoption, Selenium has one major drawback: it’s primarily a tool for developers or SDETs (Software Developer Engineer in Test). In other words, users must be technically trained to get the most out of Selenium. And as many enterprises now realize, testing should be an enterprise-wide activity involving non-technical business users (non-coders).

Enter Opkey, the industry’s leading test automation platform, easy enough for any employee to use.

Opkey provides no-code automated testing fo­r business enterprises, both large and small. While Selenium needs an IT-literate coder, Opkey’s automation saves enterprises time and money in testing because of its drag-and-drop interface, allowing business users to test their daily business processes themselves. Aside from eliminating technical resources, Opkey has pre-built accelerators for 14 of the most popular enterprise applications, and Selenium can do the same, but with lots of programming support.

We are often asked how Opkey compares to Selenium, or if Selenium users need Opkey. We are not degrading WebDriver. In fact, our team is inspired by Selenium WebDriver and what it has done for the testing community. The following information compares Selenium WebDriver and Opkey so you can make the best choice for your enterprise. Let’s get started.

About Selenium

Selenium is an open-source test automation tool that allows APIs to automate the tests carried out in web browsers. Any action can be performed, such as click, set text, etc., by writing a piece of code. It also provides different options to write code. For example, a user can write a code in Java, Python, C#, Ruby, JavaScript, etc... 

Benefits of using Selenium

These are the main reasons behind Selenium’s popularity:

  • It’s an open-source tool; there is no licensing cost involved.
  • It allows test cases to be written in different programming languages like JavaPythonC#PHPRubyPerl & .Net.
  • Tests can be carried out in Windows, Mac, or Linux.
  • Support for all major browsers including Mozilla Firefox, Internet Explorer, Google Chrome, Safari, or Opera.
  • Features can integrate with tools such as TestNG JUnit for managing test cases and generating reports.
  • Integrations with Maven, Jenkins & Docker can achieve continuous testing.
  • It allows users to run parallel executions with cloud providers like SauceLabs and BrowserStack.

Because it’s open source (free), Selenium is often the first choice when any organization attempts to automate their testing. This leads enterprises to hire engineers who are good at programming and have years of experience writing reusable and maintainable code.

Here are the steps to create a short test automation script with Selenium:

  1. Open a Chrome browser, navigate to flipkart.com, and maximize the window.
  2. It will auto-launch the sign-in page.
  3. Type a random email/mobile number and password and hit the login button.
  4. Validate that an error message appears: “Please enter valid Email ID/Mobile number.”
  5. Close the browser.

Let’s look at how this above code can be written in Selenium WebDriver, and then replicate the same scenario with Opkey.

First, here’s what the Selenium code looks like written in Java:

Let’s explore what’s behind the written code:

  1. Create a WebDriver instance.
  2. Navigate to the flipkart website.
  3. Locate all the elements on the web page through the “Inspect Element” functionality.
  4. Perform actions on the elements.
  5. Anticipate the browser response to the action.
  6. Run tests and see the results.
  7. If the test fails, debug it and resolve the code.
  8. Run it again and see results until the code runs successfully.
  9. Conclude the test.

While the above code may seem straightforward to write, it’s more complicated on the backend. An experienced Selenium coder might take 20 minutes to write code like this, but for someone like me (a functional user), writing the above code took 4x longer since I was not able to find the element with the “class” property given.

 Error snapshot while running Selenium code.

After doing some online research to figure out my error, I found an article suggesting that I use another property. There was still no defined property—look at the below screenshot where there are no defined properties such as id, name, etc…

After about an hour of digging, I came across something I thought might help: a property called an Xpath. Although there are multiple third-party extensions and tools available online to help create Xpath for you, it took time for me to figure it out. After about 4 hours of toying with Xpath and Selenium, I got my test to run.

Let’s run the same test with Opkey. Here’s a snapshot of the code:

For the screenshot above, it took me hours to write this in Selenium, but with 5 predefined keywords in Opkey, the same code took me 3 minutes.

Another benefit of Opkey over Selenium: Opkey has a recorder which records each step from your screen. The below script took me 2 minutes to create and record.

The final issue with Selenium is that the code becomes unmaintainable as it grows. When a new member joins the team, they must learn about the scripts from the coders who wrote them—a long and difficult process. Scripts cannot easily be duplicated or shared, meaning enterprises become overly reliant on the people who wrote them.

While businesses are initially drawn to Selenium because it’s an open source and free tool, no-code platforms like Opkey provide far more cost & time savings in the long run —they’re also easier to use. 😊

Video Demonstration: Selenium vs. Opkey

Pros and Cons of using Selenium and Opkey

Selenium and Opkey
Selenium and Opkey
Selenium and Opkey

Opkey’s out of the box key features:

  1. Pre-built accelerators– Opkey comes with pre-built accelerators for 14 enterprise applications, including Oracle, SAP, Salesforce, and more. These accelerators allow users to easily build test cases in seconds—there’s no need to code or build from scratch.
  2. Impact analysis and self-healing– If you have worked with applications like Oracle, Salesforce, or MS Dynamics, you know how difficult it is to maintain test cases after an update. Opkey solves this issue by instantly detecting and identifying the changes between old and new versions of these applications and highlights the impacted test cases. You can then self-heal (auto-heal) the scripts with a click of a button.
  3. Self-configuring tests– Opkey’s technology can read the backend configurations of applications like Oracle and Salesforce to create required sets of positive and negative data for tests. This saves time that Selenium users typically spend creating and maintaining data for test cases.
  4. Image-based and text-based object identification– Opkey provides built-in keywords, which can find objects simply by providing a snapshot or text. Although this can be performed through Selenium with third-party integrations, it requires an immense amount of programming skills.
Webinar
December 7, 2022 10:00 AM
 EST
The Keys to a Successful Oracle EBS upgrade
Speakers & Conferences
Dimpy Sharma
VP of Product Solutions, Opkey
www.opkey.com
Follow us: