How To Loop Through Multiple Chrome Browser Tabs With Selenium And Python?
I'm using Selenium Web Driver and Python. How would I loop through multiple open Chrome browser tabs and stay on each page for 30 seconds, then loop back to the first URL and go th
Solution 1:
Open all tabs in once, Then you should count the tabs you have. Then loop on each on:
cnt = len(driver.window_handles)
for x in range(cnt):
driver.switch_to.window(driver.window_handles[x])
sleep(30) #30sec
Baca Juga
- How To Address Chrome Displaying "aw, Snap!" Page While Executing Tests Through Chromedriver And Selenium Through Python 3
- Selenium Webdriverexception: Message: Unknown Error: Cannot Determine Loading Status From Unknown Error: Missing Or Invalid 'entry.level'
- Can I Minimize Chrome Window While Selenium Is Running?
Post a Comment for "How To Loop Through Multiple Chrome Browser Tabs With Selenium And Python?"