我試圖檢測Facebook彈出窗口何時顯示,然後填寫Facebook登錄窗體。我曾嘗試連接方法,也wait方法和睡眠方法,但似乎只要我推出了新的一頁所有連接丟失:Watir webdriver附加窗口並等待
#this output is displayed
puts "lets the game begingsx"
$b.goto("javascript:gigya.services.socialize.plugins.login.providerClick('loginPluginDiv','facebook')")
#this output is never displayed
puts "lets start sleep"
$b.window(:title,/Log In | Facebook/i).use do
$b.text_field(:id => 'email').when_present.set("[email protected]")
end