4

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.

I'm using Capybara with Ruby.

halfer
  • 19,824
  • 17
  • 99
  • 186
Mustaq
  • 49
  • 4
  • can you show your site's javascript / html which opens multiple tabs? from what i've gathered, capyara just uses the concept of windows, not tabs, and i'd be curious if it would work here. http://stackoverflow.com/a/25093517/2981429 – max pleaner Nov 08 '16 at 04:31
  • 1
    Possible duplicate of [With Capybara, how do I switch to the new window for links with "\_blank" targets?](http://stackoverflow.com/questions/7612038/with-capybara-how-do-i-switch-to-the-new-window-for-links-with-blank-targets) – fabdurso Nov 08 '16 at 08:54

1 Answers1

-1

From the java answer you need to send Command and T keys to open a new tab.

Dorian
  • 22,759
  • 8
  • 120
  • 116