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
Post a Comment