English 中文(简体)
HTML Selenese 的测试
原标题:Selenium testing with HTML Selenese
  • 时间:2012-05-24 17:35:25
  •  标签:
  • selenium

I am doing some testing in Selenium using the selenium maven plugin and HTML selenese scripts. Everything works pretty well except for this scenario I have: I am clicking on a submit button and it takes me to a redirect url. The server for that URL is not running but the web service that redirect the URL create a code query parameter and add it to the redirect URL. I want to be able to click submit and use storeLocation selenese command to extract the redirect url and extract that code parameter. When I use clickAndWait, the redirect happens but the test fails because the page tries to load and eventually the maven build. When I use just click command, the test passes, but the page doesn t load and storeLocation doesn t contain the value of the redirect url I need with the code parameter. Anyone know how to get selenium to click and wait but IGNORE the fact that the page will not load? I think it needs to involve some javascript and maybe the use of waitForCondition command but I can t find any example of it being done. basically, the redirect URL has no server running it, but my service create a token param that I need to extract from and pass it to another test case

问题回答

页面加载计时是否退出? 如果您可以增加默认超时( 应该为 30 秒), 或者您可以使用点击事件, 然后进行等待时间与您想要的新的 URL( 带有重定向参数) 匹配 。 这将给您再等待30 秒( 如单击和等待) 。 但是您也可以在单击和等待延长页面装载时间而不触动默认时间之间添加一个暂停命令 。





相关问题
Javascript communication with Selenium (RC)

My Application has a lot of calculation being done in JavaScript according to how and when the user acts on the application. The project prints out valuable information (through console calls) as to ...

Running automated Web browser tests under Hudson

I m running Hudson for my automated builds and love it. I d now like to create automated Web browser tests using either WaTiN (preferred) or Selenium. As my Hudson runs as a Windows service (under ...

Using a Java library with Scala reserved words

I m using an external library written in Java (Selenium). One of the function calls has the signature type(String, String), and I keep getting compiler errors when trying to call it from Scala, that ...

Heightened privilege selenium browsers on Windows 7 (x64)

I make use of *firefox and *iexplore etc. within my selenium tests to get around the issue of self-signed SSL certificates on my local machine. Unfortunately, now that I ve moved from XP over to 7, ...

Selenium not working with Firefox 3.x on linux

I am using selenium-server , selenium rc for UI testing in my application . My dev box is Windows with FireFox 3.5 and every thing is running fine and cool. But when i try to run selenium tests on my ...

Selenium IDE: Incrementing values by 1 and 71

Currently I m incrementing a value called wert by 1 with the following code: getEval storedVars[ wert ]=${wert}+1; The value wert is something like 80401299. I want to add 1 to the value, if it ...

热门标签