click - How can I switch new opened tab for watching test execution -


i use radrails watir tests. here code:

ie.link(:text, "first").click ie.link(:text, "second").click ie1 = watir::ie.attach(:title, "second") 

next watch test execution. see ie windows. after clicking second window opens in new browser window in new tab. want operate in new tab, in ie displaying first tab. want see how commands executed in new tab called second. suggest how this?

to knowledge, watir not have direct support working browser tabs.

however, given want view tab, can use ie's keyboard shortcuts working tabs (http://windows.microsoft.com/en-us/windows7/internet-explorer-keyboard-shortcuts).

assuming tab opened last one, can switch using:

ie.send_keys([:control, '9']) 

or if next tab, can switch using:

ie.send_keys([:control, :tab]) 

Comments

Popular posts from this blog

django - How can I change user group without delete record -

java - Need to add SOAP security token -

java - EclipseLink JPA Object is not a known entity type -