Home » OpKey VS Selenium

OpKey VS Selenium

  • by
Spread the love

In this age of rapid digitalization of consumer experience and ERP transformation, Test Automation is no longer a question of “Why or If”. It has rather become a question of “How”…How efficiently we can create test scripts. How easily we can maintain tests with changing application. And How we can scale test automation to increase test coverage. 

And in that context, Selenium Webdriver is one of the most recognized Test Automation tool in industry. Developed by Jason Huggins in 2004, it really took off after merging with Webdriver in 2009. It is estimated that developers and test engineers across 50,000+ organizations worldwide use Selenium Webdriver to automate their regression (and other) testing

But one fact to keep in mind is Selenium is primarily a tool for Developers or SDETs (Software Developer Engineer in Test) as many companies like to call them. However, as many enterprises are realizing that to truly enhance test automation adoption, it has to be adopted by functional testers as much as developers. These functional testers are strong testers who may not like to code or may be even don’t know how to write a code. They can be functional users, manual testers, Business users or any such of these people.

And that’s where platforms like “OpKey” are gaining fast traction amongst enterprises.

We are often asked how OpKey compares to Selenium. Or “If we have Selenium, why do we need OpKey”. So we thought of putting together a small comparison between selenium webdriver and OpKey. Please don’t get us wrong. In no way are we be-rating WebDriver. In fact everyone in our team is inspired by Selenium WebDriver and what it has done for Test community. We just want to put forward some alternate arguments so that you can make the best choice depending on your situation. 

So, let’s get started

About Selenium

Selenium is an open-source test automation tool that provide its APIs to automate the tests carried out on web browsers. Any action can be performed through the actions like click, set text, etc. by writing a piece of code. It also provides different options to write code. For example, user can write a code in java, python, C#, Ruby, javascript, etc. 

Benefits of using Selenium?

Here are reasons behind Selenium’s ever growing popularity:

  • It’s an open-source tool hence there is no licensing cost involved
  • It allows us to write test cases in different programming languages like JavaPythonC#PHPRubyPerl & .Net
  • Tests can be carried out in any of these Operating systems : WindowsMac or Linux
  • Supports all major browsers including Mozilla Firefox, Internet Explorer, Google Chrome, Safari or Opera
  • Gives feature to integrate with tools such as TestNG JUnit for managing test cases and generating reports
  • Can also be integrated with MavenJenkins Docker to achieve Continuous Testing
  • Also possess an option to run parallel executions with cloud provides like Saucelabs and BrowserStack

Being open-source, it becomes the first choice when any organization goes for test automation. And enterprises hire engineers who are good in programming and have years of experience writing reusable and maintainable code.

Let’s move ahead and try to explain what all it takes to create a short test automation script with Selenium

  1. Open a Chrome browser and 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 should appear “Please enter valid Email ID/Mobile number”
  5. Close the browser

We’ll see how this above code can be written in Selenium WebDriver and then try to replicate the same scenario with OpKey and see the difference

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

An example of Selenium automation, written in java

Let us now explain what’s there 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. If test fails, debug it and resolve the code
  7. Run again and see results till the code runs successfully
  8. Conclude the test

Now, just to let you know it looks quite simple as per the above steps but simple only for an experienced selenium coder and again the word “simple” can be categorised differently by users having different skill sets. An experienced Selenium coder might take 20 minutes to write a code like this but for someone like me, a functional user, writing the above code, it failed 3-4 times since it was not able to find the element with the “class” property given.

 Error snapshot while running selenium code

And then I realized, it’s not as straightforward as it looks. While looking for solutions, it was mentioned on one of the google search links, it was mentioned that use another property. But, again, there was no other property defined. (Have a look at the below screenshot and you’ll see that no other property is defined there like id, name, etc.)

So, it all comes to another property called as xpath. Although, there are multiple third party extensions and tools available online to create xpath for you but isn’t it an overhead? For an experienced selenium coder, it’s easy to create xpath but not for the others. Well, I somehow created the xpath (Remember I belong to the non-coding background) and executed the test and it finally ran successfully. 

Now, let me take you through to the same test that I created with OpKey, my partner in creating automated test cases for our customers. Here’s the snapshot of the same code written in OpKey.

Look at the screenshot above, it just 5 simple predefined keywords added to create this script. And the process of creating this short test case is even more exciting to know. OpKey has a recorder which can record the steps as and what you perform on the screen. Here’s the screenshot below which hardly took me a minute to record and create this script.

The hard and the sad part of the story is that even for selenium professionals, the code becomes unmaintainable as it grows with time. Any new member of the team takes time to understand this code and hence time will be heavily involved. So, basically I want to convey here is that resource dependency would be there. Organizations like to believe that Selenium, being an open-source tool doesn’t involve cost but generally it’s not the case. Obviously, they might have not seen and analysed these low code/no code platforms.

Video Demonstration: Selenium vs. OpKey

Pros and Cons of using Selenium and OpKey

Usability and Adoption
 Using Selenium WebDriverUsing OpKey
Coding skills requiredYes, can be used by programmers who knows either of the below programming language (C#, Java, Python, PHP, etc).No, absolutely zero coding skills needed here. Anyone can code and create test cases by dragging and dropping the prebuilt set of 800+ keywords
Object finding skills (how to create xpath)Yes, very much required as in case of dynamic websites, object attributes like name, id and class are similar4 different sets of xpath gets automatically created while recording the tests. 
Data-driven automationSelenium doesn’t provide inbuilt data sheets to store. So, it needs heavy coding skills to create and save excel sheets of data and map it with the code.Inbuilt data repository (global and local) is part of OpKey used only for data driven automation. Just provide data to it and it will automatically iterate your tests
Learning curveSelenium typically takes 3-6 months for an initial learning as it involved learning specific coding language that works with Selenium. On top of it, another 6 months to create a frameworkGenerally, within a 8 to 16 hours of training can allow any specific user to create simple tests
Future enhancementsSelenium is an open source tool, so there is no such roadmap and it depends completely upon the programmers across the globe to contribute for new featuresOpKey always tries to contribute to the latest technologies and enhancements. Impact Analysis, Self-healing and Model Based Testing are just few examples here
Training and SupportLot of online communities and youtube videos are available to find the training material but coding skills are required to understand.  No official support is there.OpKey gives online support and chat services in both India and US time zone. Moreover, complete online help portal including videos are available. Training is also an integral part of the system.

Dashboard and Reporting
 Selenium WebDriverOpKey
Reporting and debuggingNo reporting structure available. Programmers have to create their framework including reporting to get proper results and debuggingReporting and dashboards are included out of the box. Debugging can be easily understood by any OpKey user as it captures step by step screenshot and gives reasons of failure of any particular step
Inbuilt Object repository Selenium does not include an inbuilt object repository but they can create and implement one. For example – Page Object ModelObject repository is inbuilt which saves all the object attributes. It gets created automatically while recording the tests, hence no separate effort required.
Audit trails for trackingNo such feature available with SeleniumSince multiple user implementation is there, audit trails are part of tracking things. OpKey comes up out of the box different levels of audit trails
End to End AutomationSelenium can only automate web applciationsOpKey can automate a flow which can start with web, goes to mobile apps and then to back-end database. Any other combination can also be tested seamlessly with OpKey

Supported Applications
 Selenium WebDriverOpKey
Mobile applicationsSelenium doesn’t support mobile apps automationOpKey comes up a seamless mobile apps (Android and iOS) automation solution
SAPSelenium only supports automation of web applications. SAP is not supportedOpKey has SAP GUI recorder (S/4 Hana and SuccessFactors) built-in along with prebuilt set of test cases for SAP
Windows applicationsNot supported as they are outside the browserDifferent windows applications are supported like WPF, C#, Win forms, Telerik, etc.
Citrix applicationsCitrix applications are not supported.Works across all platforms and technologies. Citrix and other such technologies are supported with advanced text and image recognition capabilities.
Mainframe applicationsMainframe terminal applications are not supported with SeleniumSpecific mainframe terminal recorder is available in OpKey that can work on it seamlessly
Java and Oracle applicationsJava applications and Oracle Forms are not supported in SeleniumOpKey has inbuilt recorder available for Oracle EBS and Java applications which can be utilised.
API and DatabasesAPIs and Databases can be automated with Selenium but advanced skills are requiredOut of the box support with  prebuilt keywords for databases and service repository for APIs

Test Execution and Integrations

 Selenium WebDriverOpKey
Scheduler  No scheduler is included. Programmers can use a unit-test framework in combination with a custom-built scheduler or build pipeline.Inbuilt scheduler is there and runs can also be triggered through CI tools like Jenkins, Bitbucket, Azure DevOps, etc.
Auto SynchronizationWith Selenium, it is all about adding implicit and explicit waits in the scripts but that becomes useful when application objects loads up separately as per the browser statusOpKey has its own AI login written at plugin level that automatically waits for different back-end calls running and hence absolutely zero wait times are needed
Parallel ExecutionSelenium allows runs in distributed and parallel environments, but requires programmers to build a custom automation framework which typically takes 6-9 months of effort.OpKey has a concept of agent which can be installed on any windows machine and can be used for distributed and parallel executions. 
OS – Browser platformSelenium tests can be integrated with third party platforms like BrowserStack, etc. to execute runs in parallel on different OS – Browser combinationsOpKey has its own platform pCloudy which gives different OS – Browser combinations. It also integrates with BrowserStack and SauceLabs to execute tests.
Built-in CI/CD pluginsAlmost all CI/CD platforms can be used by custom-built solutions but again only skilled programmers can use the sameOpKey comes with Day 1 integration with almost all popular CI tools like Jenkins, Hudson, Bit-Bucket, Azure DevOps, etc.

Other Path Breaking Features for OpKey

  1. Prebuilt Accelerators – OpKey comes with prebuilt accelerators for applications like SAP, Oracle EBS, Oracle Cloud, Salesforce, Workday, MS Dynamics, Trackwise, Kronos, etc. This allows users to use the prebuilt test cases without even creating the same from scratch. Just fill in the data and execute.
  2. Impact Analysis and Self-Healing – If you have worked with applications like Salesforce, Oracle Cloud, MS Dynamics, Workday, etc, then you must be knowing how difficult is to maintain the test cases once the new upgrade comes in. This is not the case with OpKey though, OpKey can detect and identify the changes between 2 versions of these applications and highlight the impacted test cases. Then it also gives option to self-heal (auto-heal) the scripts by a click of a button. Isn’t it cool?
  3. Model Based Testing – OpKey comes up with Model Based Testing feature that can be used to perform automated exploratory testing. It can generate automatic test cases and can also perform impact analysis once a user performs any change in the created model. All impacted test cases can be highlighted and can be self-healed by a click of a button.
  4. Self-Configuring Tests – OpKey provides a unique feature it can read the back-end configurations of applications like Oracle and Salesforce and create required sets of positive and negative data for the tests. This saves tons of time for creating and maintaining data for the test cases.
  5. Image based and Text based Object Identification – This is again a feature where OpKey provides inbuilt keywords which can find objects just by providing either a snapshot or the text. Although this can be performed through selenium by integrating some third party libraries but it requires immense amount of programing skills and time to take it over.

Finally, at the end I would like to conclude that try OpKey to see the difference yourself. We already had our customers realise the power of it and we would certainly like to showcase it to all our future customers.

Author: Vivek Tomar

Related posts:

Leave a Reply

Your email address will not be published. Required fields are marked *

55  +    =  64