简体   繁体   English

Xebium,fitnesse和硒暂停

[英]Xebium, fitnesse & Selenium Pause

Im currently using Xebium, which is allows Selenium to be used with Fitnesse testing. 我目前正在使用Xebium,它允许Selenium与Fitnesse测试一起使用。 In Selenium i can set a pause for 3000 milliseconds. 在Selenium中,我可以将暂停设置为3000毫秒。 When i look at the source code for fitnesse it has the following line : 当我查看fitnesse的源代码时,它具有以下行:

| do | pause | on | 3000 |

However when i run this test in fitnesse it doesn't wait for 3 seconds liek i thought it would and goes on to the next line instead. 但是,当我在fitnesse中运行此测试时,它不会等待3秒钟,我以为可以,而是继续进行下一行。

I need the pause for the screen to load a button properly. 我需要暂停屏幕才能正确加载按钮。 I think fitnesse has a problem with seleniums use of pause or interrupts it another way. 我认为fitnesse在硒使用暂停或以其他方式中断硒方面存在问题。

I tried this and it worked: 我尝试了一下,它起作用了:

ensure | do | pause | on | 3000 |

I know it's been more than two years but I hope this will help people like me who have just started working on Xebium. 我知道已经过去两年多了,但是我希望这将对像我这样刚刚开始从事Xebium工作的人们有所帮助。 Cheers 干杯

A bit late, but for future visitors: Have you tried waiting for the button to appear? 有点晚了,但对未来的访问者:您是否尝试过等待按钮出现? Selenium documentation suggests doing this: 硒文档建议这样做:

Many Actions can be called with the “AndWait” suffix, eg “clickAndWait”. 可以使用“ AndWait”后缀来调用许多操作,例如“ clickAndWait”。 This suffix tells Selenium that the action will cause the browser to make a call to the server, and that Selenium should wait for a new page to load. 该后缀告诉Selenium,该操作将导致浏览器调用服务器,并且Selenium应该等待新页面加载。

Found at http://seleniumhq.org/docs/02_selenium_ide.jsp#selenium-commands-selenese 可在http://seleniumhq.org/docs/02_selenium_ide.jsp#selenium-commands-selenese找到

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM