Odin Technology - Automated Software Testing

Axe Test Automation Platform

General discussion relating to the Axe Test Automation Platform from Odin Technology

Posts by Odin employees marked:

Using 'wait for page to load' with WebDriver axe project

Using: Axe 3.3/ WebDriver (Selenium 2) & C#

Hi

In a Selenium RC (1) project, I had added an action for the button and link classes named SetAndWait which clicks on the button/link then waits for a period of time before executing the next command (unless the page load completes before this time, in which case, continue execution).  The command for this action was as follows:

selenium.Click("&properties&");
selenium.WaitForPageToLoad("180000");

I am attempting to implement the same in Webdriver (Selenium 2) using the following commands:

selenium.Click("&properties&");
IWait wait = new WebDriverWait(driver, TimeSpan.FromSeconds(30));
IWebElement element = wait.Until(driver => FindElement(selenium, "&properties&"));


Unfortunately, I am getting an error:
XXXX.cs(84,1): error CS0305: Using the generic type 'OpenQA.Selenium.Support.UI.IWait<TSource>' requires 1 type arguments


Could you please point out where I am going wrong with this?

Many thanks
Mark

Wednesday, August 15, 2012
 
 
Sorry - the Selenium 2 command I am getting the error with is actually:

FindElement(selenium, "&properties&").Click();

IWait wait = new WebDriverWait(driver, TimeSpan.FromSeconds(3));
IWebElement element = wait.Until(driver => FindElement(selenium, "&properties&"));
Mark
Wednesday, August 15, 2012
 
 
Hi Mark,

This question is very specific to Selenium so you might have more luck posting it in a dedicated Selenium forum.

However, it is worth noting that Selenium is constantly being updated by the open source community. We have also found that the behavior of Selenium WebDriver is not consistent across the various browsers or the language bindings (C# and Java).

So it could be worth trying a newer version. You can easily update Axe to use a later version by changing the <version> tag for the Selenium tool entry in AxeConfig.xml

Sam
Sam Warwick Send private email
Thursday, August 23, 2012
 
 
Thanks Sam

Have you had any other customers migrate to Selenium 2? if so, have they provided to you a library of functions that may prove useful, or detailed any lessons they have learned from the migration?

Thanks

Mark
Mark
Wednesday, August 29, 2012
 
 

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics