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")