banner



How To Install Selenium Package In Pycharm

Are you afraid that you won't be able to larn or exercise automation? It is the fright that virtually of the people take in their mind when they think of learning Automation tools and techniques. Due to a lack of guidance, they resist moving towards automation testing. I myself had this thought in mind before practically trying it. And then, this commodity is to requite you a quick get-go of automation testing using Selenium Webdriver.

Components of Selenium

There are four components of Selenium

  1. Selenium Integrated Development Environment (IDE)
  2. Selenium Remote Control (RC)
  3. WebDriver
  4. Selenium Grid

from which we'll exist using Selenium Spider web driver.

Steps to Install Selenium WebDriver

  1. Download and install Python from the following link " python ", from the "Downloads" tab, click on "Python for windows."
  2. Download and Install PyCharm IDE for Python Developers from the link " Pycharm link ".

Configure PyCharm with WebDriver

  1. Open PyCharm.
  2. Go to " File" bill of fare > New Project > Select " Pure Python " > Click " Create " > Select " This Window ."
  3. Get to the " File" menu > Click on " Settings " > Click on " Project: Your Projection name " > Click on " Project Interpreter ."

  1. Click on the "+" sign on the correct side of the window > Type " Selenium " in the search field > Click on the " Selenium " option > Click on " Install Bundle ".
  2. What will install the Packet successfully?

Installing Gecko Driver

Gecko is a web browser engine used in many applications developed by Mozilla Foundation and the Mozilla Corporation. Gecko-Driver is the link between your tests in Selenium and the Firefox browser. Gecko Driver is an executable file that you lot need to take in ane of the organisation paths earlier starting your tests. To install Gecko, follow the following steps:

  1. Go to Github Mozilla Release  > Select the Gecko version according to your Bone > Download it and extract it > You will get the " geckodriver.exe " file.
  2. Copy it and paste information technology into the folder where your python projects are existence created.

First WebDriver Code

Below is an instance of exam case that will check thatGoogle opens and searches annihilation that user types Successfully.

fromseleniumimportwebdriver
fromselenium.webdriver.common.keysimportKeys

commuter = webdriver.Firefox()
commuter.get("https://google.com")
assert "Google" incommuter.title
elem = driver.find_element_by_name("q")
elem.clear()
elem.send_keys("pycon")
elem.send_keys(Keys.RETURN)
assert "No results found." non indriver.page_source
driver.close()

Running the Test Case

To run the exam example, Correct Click on Exam Case > Click on "Run 'Your File Proper noun'".

Output:

automation testing

Testing and quality assurance services at Tkxel can assist you meliorate the quality of your software and make your product more reliable. Drop us a line!

Source: https://tkxel.com/blog/download-and-install-selenium-webdriver-get-started-with-test-automation/

Posted by: teetersbefiscure.blogspot.com

0 Response to "How To Install Selenium Package In Pycharm"

Post a Comment

Iklan Atas Artikel

Iklan Tengah Artikel 1

Iklan Tengah Artikel 2

Iklan Bawah Artikel