Home > OS >  Taking screenshots of multiple open browser tabs using Python
Taking screenshots of multiple open browser tabs using Python

Time:06-24

Is it possible to create a python script to take screenshots of multiple open tabs? If anyone can point me in the right direction

CodePudding user response:

You have to switch to each window and take screenshot of each window. All window in one screenshot is not possible. Use window handle to switch to each window and capture screenshot of each window.

CodePudding user response:

Something like this would switch to different tabs (x being the iterator). 0 Would be the first tab and then 1,2 so on.

driver.switch_to.window(driver.window_handles[x])

  • Related