I am unable to find module in python test file configuration

0 votes

i am working on POM in selenium using python .in order to run Test ,first i go run> edit configuration >the python test .Where i create new file and in this file i selected Target "Module" (named my login test) should be appear. but it does not;

code..
from selenium import webdriver
import time
import unittest

import os

class LoginTest(unittest.TestCase):
    @classmethod
    def setUpClass(cls):
        cls.driver=webdriver.Chrome()
        cls.driver.implicitly_wait(10)
        cls.driver.maximize_window()
    def login_valid_test(self):
        self.driver.get("https://opensource-demo.orangehrmlive.com/")
        self.driver.find_element_by_id("txtUsername").send_keys("Admin")
        self.driver.find_element_by_id("txtPassword").send_keys("admin123")
        self.driver.find_element_by_id("btnLogin").click()
        self.driver.find_element_by_id("welcome").click()
        self.driver.find_element_by_link_text("Login").click()
        time.sleep(10)
    @classmethod
    def tearDownClass(cls):
        cls.driver.close()
        cls.driver.quit()
        cls.print("test pass")
Mar 20, 2020 in Selenium by umair
• 150 points
840 views
Are your modules located in the same folder?

No answer to this question. Be the first to respond.

Your answer

Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.

Related Questions In Selenium

0 votes
2 answers

Unable to Click on an Element in Selenium (Python) even after finding it.

Here, I give you working script which ...READ MORE

answered Sep 19, 2018 in Selenium by Priyaj
• 58,100 points
24,015 views
0 votes
1 answer
0 votes
1 answer

How to find Elements by their Attribute in Python Selenium WebDriver

To find all the <td> tags which have attribute data-sortable-id you ...READ MORE

answered Jul 19, 2018 in Selenium by Samarpit
• 5,910 points
10,531 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
868 views
0 votes
1 answer

i am not able to perform this method in selenium driver.get("google")

Hi Sachin, are you getting any errors ...READ MORE

answered May 15, 2019 in Selenium by Abha
• 28,140 points
1,766 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,500 points
13,493 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,190 points
9,031 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,910 points
7,145 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 3, 2020 in Selenium by Sri
• 3,190 points
7,816 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP