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:

Determine if a page is hanging

Hi

I am using AXE v3.1 and Selenium

Apologies if this is more of a Selenium question than an AXE issue, however I could find nothing useful in Selenium forums and wondered if the problem could be solved in AXE?

Occassionally when running tests the browser hangs after a button is clicked and a subsequent page is loaded. AXE then fires up the next text which generates a browser alert box "Do you wish to leave the page" as the previous values have not been saved.

If this is seen by the tester it can be rectified by manually clicking the application's next button again.

the current set action for the Button class is:

selenium.click("&properties&");
selenium.waitForPageToLoad("180000");

Ideally I suppose there needs to be some sort of if condition which somehow checks whether the page has loaded and if not perform the previous action again (perhaps also capturing a screenshot to aid debugging) - is this something you could assist me with at all?

Many thanks

Mark
Mark Winspear
Friday, August 12, 2011
 
 
Hi Mark,

Sorry but it is not entirely clear to me what is required here. Is your application really taking more than 180 seconds to load a web page and wouldnt you still want the test to abort in that case?
If you just wanted to retry the two lines of code in your example then that could easily be achieved in a custom Java wrapper function.

Sam
Sam Warwick Send private email
Monday, August 15, 2011
 
 
Hi Sam

It doesn't happen during manual testing only randomly during automation execution.  If I am watching the script, I can intervene manually and repeat the action (eg clicking a button) and the page loads fine.

I presume I would need to modify the _testSuffix action for the setWindow class in the SeleniumJava.ActionMap file around the following code:

                if (!error)
                {           
                    selenium.waitForCondition("selenium.browserbot.getCurrentWindow().document.readyState == 'complete'", timeoutms);
                    return;

However, I am totally clueless as to how I could get this code to repeat the previous action (ie clicking the object) - any help you can provide would be fantastic!

Thanks

Mark
Mark Winspear Send private email
Monday, August 22, 2011
 
 
Hi Mark,

It sounds like its some kind of issue with Selenium, so it might be worth exploring that a bit further first.
Have you tried adjusting any of the Selenium run-time settings such as 'Delay' and 'Timeout'? Also what version of Selenium and browsers are you using?
It may be possible to code-up some custom actions in the Axe ActionMap but it would be better to get to the bottom of the problem with the underlying tool (ie. Selenium) first, if possible.

Sam
Sam Warwick Send private email
Tuesday, August 23, 2011
 
 
Thanks Sam.  I'm not sure where the issue would lie as from Selenium's standpoint it has successfully performed the set action and is waiting for the page load.  I suppose it could be related to the speed that the test executes at that causes the issue, however I don't want to start adding small waits between set actions as this would then apply to all actions.  It could also be that this is one of the problems caused by using Selenium 1 in that it uses JavaScript to interact with the browser as opposed to natively driving it. 

I figured a custom function would be the simplest way forward as I know it's not a bug in the AUT and it only affects probably around 10 in 1500 tests.

I'm looking forward to the release of AXE with Selenium 2 support later this year to hopefully get around this.
Mark Winspear Send private email
Tuesday, August 23, 2011
 
 
Hi Mark,
The current Axe release will work with Selenium 2.x. You just need to change the paths in AxeConfig.xml
Sam
Sam Warwick Send private email
Wednesday, August 24, 2011
 
 
Oh, really? David mentioned that v4 would have support. How would I configure AXE such that the selenium server is not invoked? (Selenium 2 does not require the selenium server to be running for local testing) - is there a guide for getting this up an running?
Thanks
Mark Winspear Send private email
Wednesday, August 24, 2011
 
 
.....continuation from above

Also - ActionMaps and standard AXE functions would need updating to reflect the Selenium 2 API.
Mark Winspear Send private email
Wednesday, August 24, 2011
 
 
Hi Mark,
We currently only support the existing Selenium server api. It is easy to plug in the latest 2.x version by changing a couple of path and filename references in AxeConfig.xml.
As you say, the webdriver api is completely different. This really needs to be treated as a new tool integration and we do not have any fixed timescales for doing that yet, although we have started to look at it.
Sam
Sam Warwick Send private email
Thursday, August 25, 2011
 
 
Ok, I see what you mean now.  Yes, I am already using Selenium server 2.4 with Selenium 1 Java bindings. I understood from David that your testing with Selenium 2 had gone well, and I look forward to the version of AXE which supports the Selenium 2 API

Thursday, August 25, 2011
 
 

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

Other recent topics Other recent topics