How can I install and setup Pytest framework?

0 votes
How can I install and setup Pytest framework?
Aug 21, 2019 in Selenium by Yasmin
128 views

1 answer to this question.

0 votes

Hey Yashmin, follow these steps to install and setup Pytest framework: 

  1. Pytest doesn't come with standard Python installation and needs to be installed separately. To install pytest, execute the following command on the command prompt:

    • ​​pip install –U pytest
  2. Once the installation is complete, you can verify whether the installed pytest version, by typing the following command:

    • pytest --version
      
  3. Next, for Pytest development you can download PyCharm Edu version from here: https://www.jetbrains.com/pycharm-edu/download/#section=windows

  4. Once PyCharm is installed, navigate to File -> Settings -> Tools -> Python Integrated Tools and change Default test runner to Pytest for performing test automation using pytest with Selenium WebDriver:

  5. Now install the Selenium package for Python to perform test automation using pytest with Selenium WebDriver by invoking the following command in PyCharm terminal:

    • pip install -U selenium

And that's it, you have your pytest completely setup for Test Automation using Selenium Webdriver.

answered Aug 22, 2019 by Anvi
• 14,090 points

Related Questions In Selenium

0 votes
1 answer

How can I Install Selenium IDE in Firefox

Selenium IDE works with all Firefox versions, ...READ MORE

answered Apr 13, 2018 in Selenium by Meci Matt
• 9,460 points
524 views
0 votes
1 answer

How can I setup Selenium Grid in Selenium 3.0

Below is the stepwise solution for setting ...READ MORE

answered Apr 27, 2018 in Selenium by Meci Matt
• 9,460 points
318 views
0 votes
1 answer
0 votes
1 answer

How to write a code for combo box and how can i select a country from country dropdown?

https://stackoverflow.com/questions/40017443/how-to-perform-dropdow ...READ MORE

answered May 8 in Selenium by vaibhav
480 views
0 votes
1 answer

Finding WebDriver element with Class Name in java

The better way to handle this element ...READ MORE

answered Apr 10, 2018 in Selenium by nsv999
• 5,510 points
3,181 views
0 votes
1 answer
0 votes
1 answer

Geo-location microphone camera pop up

To Allow or Block the notification, access using Selenium and you have to ...READ MORE

answered May 11, 2018 in Selenium by Samarpit
• 5,890 points
2,383 views
0 votes
1 answer

How to use such xpath to find web elements

It's much simpler to use: #MyDiv123 > div.super or ...READ MORE

answered Jun 14, 2018 in Selenium by Samarpit
• 5,890 points
2,535 views
0 votes
1 answer

How can I write test scripts in Selenium with python?

Hey Khushi, writing test scripts in Selenium ...READ MORE

answered May 9, 2019 in Selenium by Anvi
• 14,090 points
181 views
0 votes
1 answer

How can I create a POM test case in Selenium Webdriver?

Hey Akshay, follow these steps to create ...READ MORE

answered May 12, 2019 in Selenium by Anvi
• 14,090 points
320 views