在Web自动化测试过程中,有时单击某个链接会弹出新的窗口,这时就需要切换到新打开的窗口中进行操作。WebDriver 提供的switch_to.window()方法可以实现在不同的窗口之间进行切换。
Usually I would use :hover, but I want my website to be accessible on touchscreen media too. I know I can use :active, but as soon as I let go of the mouse button, it goes back to its inactive state.