简体   繁体   English

使用capybara web在浏览器选项卡之间切换

[英]Switching between the browser tabs using capybara web

I'm trying to automate an ecommerce website, wherein when I click on a particular link it creates multiple browser tabs and related pages will be displayed within the respected tabs. 我正在尝试自动化电子商务网站,当我点击特定链接时,它会创建多个浏览器标签,相关页面将显示在受尊重的标签中。

Problem here is I want to switch between these browser tabs to automate the web pages within that tabs, but I don't know how to switch between browser tabs using Capybara. 这里的问题是我想在这些浏览器选项卡之间切换以自动化该选项卡中的网页,但我不知道如何使用Capybara在浏览器选项卡之间切换。

I'm using Capybara with Ruby. 我正在使用带有Ruby的Capybara。

java答案中,您需要发送CommandT键以打开新选项卡。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM