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
236 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,150 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
1,079 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
446 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, 2020 in Selenium by vaibhav
631 views
0 votes
2 answers

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,520 points
5,084 views
0 votes
2 answers

Problem while using InternetExplorerDriver in Selenium WebDriver

enable trusted connection  in internet explorer by ...READ MORE

answered Aug 31, 2020 in Selenium by Sri
• 3,010 points
5,818 views
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
3,582 views
0 votes
2 answers

How to use such xpath to find web elements

xpath are two types. 1) Absolute XPath:    /html/b ...READ MORE

answered Sep 2, 2020 in Selenium by Sri
• 3,010 points
4,324 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,150 points
253 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,150 points
568 views