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:

Abort Index was outside the boundaries of the array

Webdriver (Selenium 2), Axe v3.3

Hi Sam

I am running a first test of our project using Webdriver and am receiving a failure on the Page set command with the exception 'Index was outside the boundaries of the array'.
I've made no changes to the standard ActionMap so this is confusing.

I'm unsure what else you may need to diagnose the issue, if you let me know, I can provide?

Thanks

Mark
Mark
Thursday, August 30, 2012
 
 
Hi Mark,

I cant think of anything obvious that would cause this error. I suspect that it is either an error in your object map entry for the Page or something wrong with the Run Config file.

What language are you generating the Axe code for?
Which web browser are you testing against?
Which version of Selenium are you using?
Does the OdinPortal Axe sample run ok for the combination you are using? If so, maybe compare that with your own Axe project settings.

Sam
Sam Warwick Send private email
Friday, August 31, 2012
 
 
Just a thought here, could it be something to do with a list of values? i.e. You may be trying to select something in a list of values (e.g. in a dropdown) and it can't find the data. It's possible the code in WebDriver to select from the list doesn't exit cleanly?
Duncan Brigginshaw Send private email
Monday, September 3, 2012
 
 
Hi
Thanks for the response
I've tracked the issue down to Object Maps where the page object's properties are set to null.  This worked fine for Axe with Selenium 1 (RC) but causes issues with Axe using Selenium 2 (Webdriver).

We need to use null (or an equivalent) for pages which do not have titles, or for the Common object map, which contains things like header and footer links.

Do you have any suggestions on a way forward with this?

Thanks in advance
Mark
Thursday, September 6, 2012
 
 
continuation of above...

It could be the SetWindow function in the SeleniumCSharp.ActionMap which does not expect a null value to be supplied (reproduced below)?

      public static void SetWindow(IWebDriver driver, WebDriverWait wait, string recstring)
        {
                string[] property = recstring.Split('=');
                DateTime start = DateTime.Now;

                while (DateTime.Now.Subtract(start).Seconds <= wait.Timeout.TotalSeconds)
                {
                    if (driver.Title == property[1])
                    {
                        return;
                    }
                    System.Threading.Thread.Sleep(500);
                }
                throw new Exception(String.Format("Window not found after {0}s. Expected: {1}, Actual: {2}", DateTime.Now.Subtract(start).Seconds, property[1], driver.Title)); 
      }
Mark
Thursday, September 6, 2012
 
 
I have added a condition to your standard SetWindow in test_suffix to fix this. Is it worth considering including this in the standard SeleniumCSharp.ActionMap to aid other migrators from Selenium 1?

if(recstring == "null")
{
  return;
}
Mark
Thursday, September 6, 2012
 
 

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

Other recent topics Other recent topics