Is Selenium That Useful?

NOOR MOHIDEEN S
featurepreneur
Published in
3 min readMay 19, 2021

--

Logo of Selenium driver

I am an intern from Tactlabs internship, one day they assigned me to work on a selenium project but I am a fresher about selenium. So, I search every about it on Google but didn’t get the meaning of it. Finally, approach the team leads and get the idea about it. So, I came up with the plan that I will write about it with a brief logical explanation. Let’s learn with our interest and devotion.

Introduction:

Selenium is a portable framework for testing web applications. Selenium provides a playback tool for authorizing functional tests without the need to learn a test scripting language (Selenium IDE). It is mainly used in software testing areas. Selenium runs on Windows, Linux, and macOS. It is open-source software released under the Apache License 2.0. It also provides a test domain-specific language to write tests in a number of popular programming languages, including C#, Groovy, Java, Perl, PHP, Python, Ruby, and Scala.

Selenium Web Driver:

Selenium Web Driver accepts commands and sends them to a browser. Most browser drivers actually launch and access a browser application such as Firefox, Google Chrome, Internet Explorer, Safari, or Microsoft Edge.

We can download the Web Driver for the required browser application. I mentioned some of the well-known drivers below:

For Google Chrome Web browser- https://chromedriver.chromium.org/downloads

For Mozilla Firefox- https://github.com/mozilla/geckodriver/releases

Google Chrome created their Web Driver as ChromeDriver and Mozilla Firefox created their Web Driver as GeckoDriver.

Selenium Grid:

Selenium Grid is a tool used along with Selenium RC to run parallel tests across different machines and different browsers all at the same time. Parallel execution means running multiple tests at once.

How to Choose the Right Selenium Tool for Your Need:

Selenium IDE

  • To learn about concepts on automated testing and Selenium, including:
  • Selenese commands such as type, open, click and Wait, assert, verify, etc.
  • Locators such as id, name, XPath, CSS selector, etc.
  • Executing customized JavaScript code using run Script
  • Exporting test cases in various formats.
  • To create tests with little or no prior knowledge in programming.
  • To create simple test cases and test suites that you can export later to RC or Web Driver.
  • To test a web application against Firefox and Chrome only.

WebDriver

  • To use a certain programming language in designing your test case.
  • To test applications that are rich in AJAX-based functionalities.
  • To execute tests on the Html Unit browser.
  • To create customized test results.

Example:

If you have installed Selenium Python bindings, you can start using it from Python like this.

from selenium import webdriver
from selenium.webdriver.common.keys import Keys

driver = webdriver.Firefox()
driver.get("http://www.python.org")
assert "Python" in driver.title
elem = driver.find_element_by_name("q")
elem.clear()
elem.send_keys("pycon")
elem.send_keys(Keys.RETURN)
assert "No results found." not in driver.page_source
driver.close()

The above program illustrated the working of selenium automation work. I have used the Firefox web driver so that the automation works on Firefox. The link is the link of the Python website and in that, it automatically opens the search bar and types “pycon”. It is the way the selenium works.

Conclusion:

These are the major topics to be covered in Selenium. you can also apply this method on your mobile phone app. We have just given you a glimpse of all topics in the Selenium, Still, there is more to Cover. So, Keep exploring !. If you like to extend your knowledge in Selenium using python.

#Selenium

--

--

NOOR MOHIDEEN S
featurepreneur

I am an intern in Tactlabs .I'm a Machine Learning Engineer.I’m currently learning everything in data science