selenium+python之窗口切换

1、获取当前窗口句柄:current_handle = driver.current_window_handle;

2、获取所有窗口句柄:all_handles = driver.window_handles;

3、切换到特定句柄窗口:driver.switch_to.window(handleName);

转载于:https://www.cnblogs.com/mingshengling/p/6682167.html

你可能感兴趣的:(python)