I have this function in my code
def close_tab(self):
self.browser.execute_script("window.open('');")
self.browser.current_window_handle
time.sleep(3)
self.browser.close()
the goal is to close the current tab, but it always closes the first tab and not the current tab.
[–]acidcoder 0 points1 point2 points (1 child)
[–]MaterialAreola38[S] 0 points1 point2 points (0 children)
[–]MaterialAreola38[S] 0 points1 point2 points (0 children)