BreadcrumbHomeResourcesBlog What Is Automated Testing In Selenium? March 19, 2020 What Is Automated Testing In Selenium?AutomationContinuous TestingBy Eran KinsbrunerMany teams are using Selenium for testing. But what is Selenium? What is Selenium functional testing? Here we cover what Selenium is, how it works, and if using Selenium is a good idea for your team.Read along or jump ahead to whichever section interests you most:Table of ContentsWhat Is Automated Testing In Selenium?Introduction to Automated Testing In SeleniumHow Selenium Works3 Components of the Selenium PlatformUsing Selenium With PerfectoTable of Contents1 - What Is Automated Testing In Selenium?2 - Introduction to Automated Testing In Selenium3 - How Selenium Works4 - 3 Components of the Selenium Platform5 - Using Selenium With PerfectoBack to topWhat Is Automated Testing In Selenium?How Selenium works: Selenium is a set of open-source tools that automate web testing in a single interface, allowing you to test in multiple programming languages, including Ruby, Java, NodeJS, PHP, Perl, Python, and C#.Unlike some tools out there, Selenium is pretty easy to define:“Selenium automates browsers. That's it!” — SeleniumHQIt’s really that simple. Obviously, in practice, there’s a little more to it than that. Back to topIntroduction to Automated Testing In SeleniumSelenium was born in 2004 when Jason Huggins — an engineer at ThoughtWorks — was working on an application that required lots of manual testing.He developed JavaScript code that could automate control of the browser, greatly streamlining the test process. This code came to be called “Selenium Remote Control” and was open-sourced later that year.Over the next few years, other developers got involved in the project and a few Selenium-related projects were spawned, including Selenium Grid, Selenium IDE, and Selenium WebDriver. This increasingly powerful set of tools is, as of now, essentially one fully coordinated test framework. [Related Content: Testing With Selenium] Back to topHow Selenium WorksNow that we've answered the high-level question "What is Selenium?", we will explore in more depth how Selenium works. Selenium is a test automation framework that allows you to automate web app testing. With languages like Java, Python, Ruby, C#, you can write test scripts to run against browsers and VMs. Some teams do this themselves, and some rely on a cloud-based solution.How Is Selenium Used for Automated Testing?Selenium is an automated testing framework. The framework executes test scripts against different web browsers, like Chrome, Firefox, and Safari.What Cannot Be Automated Using Selenium?Selenium cannot automate mobile app tests, as it is only for web app testing. Selenium cannot automate captcha. Selenium WebDriver cannot read bar codes. And Selenium cannot automate OTP submissions either.What Types of Testing Can Be Done Using Selenium?There are many types of testing that can be done with Selenium. You can do smoke testing, sanity, testing, UI testing, regression testing, and more.Ready to start automated testing in Selenium? Get started with the industry's most-trusted automated testing platform. Try Perfecto FREE today!Start TrialHow Do You Write a Selenium Test?The Selenium framework supports numerous languages. You can write a test script using Java, Python, Ruby, C#, JavaScript, Perl, or PHP. You may need to import a few packages or statements into your code. You can also use XPath in Selenium to find objects.When Should Selenium Be Used?Selenium should be used to automate web tests that occur frequently and are repetitive. If it is time consuming to do manually and the requirements are low risk, then the test should be automated with Selenium.Related Reading: How to Decide Which Types of Test Cases to AutomateBack to top3 Components of the Selenium PlatformGoing a level deeper, there are 3 main components in the Selenium platform.1. Selenium IDEThe Selenium IDE is a browser-plugin-based GUI tool. It facilitates recording, playback, and testing of user actions in the browser. It’s also a great way to get a feel for what Selenium can do.Selenium IDE is suitable for creating quick and simple test scripts for bug hunting and basic functional testing.Quite recently, the Selenium IDE project was redesigned. It now works on both Chrome and Firefox browsers.2. WebDriver (aka Selenium 2.0)Often referred to as “Selenium 2.0”, WebDriver expands and improves on Selenium Remote Control. WebDriver does what it says. It drives web browsers at a lower level than Selenium IDE.WebDriver consists of a set of APIs that allow the tester to control the browser from an OS level. This can lead to much greater efficiencies in more complex automation setups. It supports headless browsers as well, which can also really speed up your testing.WebDriver is more suitable for more advanced, complex, scalable automation.In Selenium 4 — WebDriver protocol is W3C compliant. It replaces the older JSON Wire Protocol. 4. Test all Types of AspectsSelenium is typically associated with functional test automation. However, a winning test strategy must consider all testing types:FunctionalNonfunctionalAccessibilityExploratoryUnitAPIAnd moreEnsure that you have allocated time blocks within your development cycle and inside your CI for:Performance testingAccessibilityAPIVisual validationsOther relevant scenariosThis is important to maximize quality and mitigate your business risks.5. Run Your Selenium TestsTime to see how your tests do!6. Use Test ReportingManaging tests and reports is the #1 headache for practitioners — especially in a fast-paced DevOps environment where code is changing all the time. Whether you need enterprise-grade results or just spend less time debugging flaky tests, consider the advantages Perfecto offers.7. Fix Defects & RepeatWith the actionable insights from your test reporting and analytics, go into your tests, fix any defects you may have found, and repeat.Back to topUsing Selenium With PerfectoSo, what is Selenium? Selenium is the #1 choice for automating testing across different browsers and platforms. And Selenium is here to stay.You can get more out of using Selenium by pairing it with Perfecto.Perfecto and Selenium are seamlessly integrated. This allows customers to run their Selenium test automation scripts on real browsers in the Perfecto-secured and enterprise-grade testing cloud. You’ll get all of the benefits of using Selenium — without the drawbacks.See for yourself how Perfecto can help you maximize Selenium. Get started with a free trial today.Try Perfecto With Selenium Related ContentCross-Browser Testing With Selenium: Web Testing TutorialTesting With Selenium: A Selenium OverviewCypress vs. SeleniumHow to Use Selenium With PerfectoBeginner's Guide to Test Automation FrameworksBack to top
Eran Kinsbruner DevOps Chief Evangelist & Sr. Director at Perforce Software, Perfecto Eran Kinsbruner is a person overflowing with ideas and inspiration, beyond that, he makes them happen. He is a best-selling author, continuous-testing and DevOps thought-leader, patent-holding inventor (test exclusion automated mechanisms for mobile J2ME testing), international speaker, and blogger. With a background of over 20 years of experience in development and testing, Eran empowers clients to create products that their customers love, igniting real results for their companies.