How can I install and setup Pytest framework?

0 votes
How can I install and setup Pytest framework?
Aug 21 in Selenium by Yasmin
54 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 by Anvi
• 13,400 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,420 points
147 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,420 points
157 views
0 votes
1 answer
0 votes
0 answers

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

Hi, I want to select a country from ...READ MORE

Mar 14 in Selenium by ch Praveen
361 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,090 points
768 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,130 points
1,011 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,130 points
719 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 in Selenium by Anvi
• 13,400 points
66 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 in Selenium by Anvi
• 13,400 points
64 views