selenium 2.0b3中的Firefox 4确认对话框 [英] Firefox 4 confirmation dialog in selenium 2.0b3
问题描述
这是代码(很简单):
choose_ok_on_next_confirmation
click(delete_button)
get_confirmation
wait_for_page_to_load
我已经搜索了很多,并尝试了许多其他的东西,如assert_confirmation或store_confirmation。即使 is_confirmation_present
也无效。他们无法检测到我想到的对话框。
我降级为Firefox 3.6,并且运行正常。
有人知道原因吗我不太了解Firefox 4的工作原理。我仍然需要向我的合作伙伴解释这个问题。
page.evaluate_script 'window.confirm = function(){
return true;
}')
工作
I have worked with selenium for like 3 months. My tests worked fine in Firefox 3.6. However, when I update to Firefox 4 and selenium-server 2.0b3, there is a problem with the confirmation dialog.
Here is the code (very simple):
choose_ok_on_next_confirmation
click("delete_button")
get_confirmation
wait_for_page_to_load
I have searched a lot and tried many other things like assert_confirmation or store_confirmation. Even is_confirmation_present
didn't work. They can't detect the dialog I think.
I downgraded to firefox 3.6 and it worked fine.
Anybody know the reason? I don't know much about how Firefox 4 work. And I still have to explain this problem to my partner.
page.evaluate_script('window.confirm = function(){
return true;
}')
works
这篇关于selenium 2.0b3中的Firefox 4确认对话框的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!