In the below code am trying to use the same browser session in different test cases, but after running its observed that two different browser sessions are opened for each test case. Please guide me to fix this issue:
driver1 = webdriver.Chrome(
executable_path="C:\\Program Files (x86)\\chromedriver.exe")
class Test_Trials(unittest.TestCase):
def test_1(self):
driver1.set_page_load_timeout(20)
driver1.get("http://192.168.221.238:8180/tnp/")
driver1.maximize_window()
def test_2(self):
driver1.find_element_by_id("j_username").send_keys("admin")
driver1.find_element_by_name("j_password").send_keys("admin1001")
driver1.find_element_by_class_name("gwt-Button").click()
driver1.set_page_load_timeout(20)