watir - focus on window without title -


i use watir in radrails ide. need attach new window it's title, in web application there error, title missed. can't use code: ie3=watir::ie.attach(:title, 'mt title').

the page loaded , can perform actions there. there way focus on window not using page title? or how can define page title?

maybe there possibility of choosing window name or other attribute , if not know exact name can define or define names of opened windows?

if there 1 ie window work:

browser = watir::browser.attach(:title, //) 

if want check if there page title, try this:

begin   browser = watir::browser.attach(:title, "teh codez") rescue watir::exception::nomatchingwindowfoundexception   puts "could not find browser" end 

Comments

Popular posts from this blog

c# - SVN Error : "svnadmin: E205000: Too many arguments" -

c++ - Using OpenSSL in a multi-threaded application -

All overlapping substrings matching a java regex -