1
I need to do a for loop to open an x number of tabs and each tab uses a different "Dashboard". The first part I’ve done how could I do the second? Remembering preferably with Xpath using JS and Python. Here’s the code:
# Abre qnt de abas de acordo com os dashboards
for i in range(0, len(config['idDashboard'])):
browser.execute_script('window.open("' + config['url'] + ' ", "_blank");')
time.sleep(2)
# Configura um dashboard por aba
for i in range(0, len(config['idDashboard'])):
time.sleep(10)
browser.switch_to_window(browser.window_handles[i])
driver.switchTo().window(mainWindowHandle);