Could you please help me with the next.
I found out the issue and could not resolve it.
When I am using next code, the browser has started and the test has passed:
import unittest
from selenium import webdriver
driver = webdriver.Chrome('D:chromedriverchromedriver.exe')
driver.get("site URL")
BUT same with class and methods return message: "Process finished with exit code 0":
import unittest
from selenium import webdriver
class GlossaryPage(unittest.TestCase):
def setUp(self):
self.driver = webdriver.Chrome(executable_path='D:chromedriverchromedriver.exe')
self.driver.maximize_window()
self.driver.implicitly_wait(10)
def NoLorem(self):
driver = self.driver
driver.get("site URL")
def tearDown(self):
unittest.quit()
How can I get the browser opened using 2nd case (with methods and class)?
Thanks a lot for any help.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…