Forum Discussion

brijmitchell's avatar
brijmitchell
Contributor
9 years ago

Why has wItemList disappeared

For some reason the wItem property has seem to have disappeared from the object we are using.

 

This is preventing the test from selecting the correct option from the dropdown, i dont believe anything has changed as it was working one minute and not another.

 

so our current function does not work, does anyone have any ideas?

 

function selectDropDownItem(theDropDown, theItem) {
  theDropDown.WaitProperty("Exists", true, MEDIUM_LENGTH_TIMEOUT);
  theDropDown.WaitProperty("VisibleOnScreen", true, MEDIUM_LENGTH_TIMEOUT);
  //theDropDown.Click(); //This was commented out as it was clicking out of place see TAP-381
  //theDropDown.parent.Click(); //This was commented out as it was clicking out of place see TAP-381
  var list = (theDropDown.wItemList)
  //LogToHTML(list);
  var tokens = tokenize(list, ";");
  
  for (var i = 0; i < tokens.length; i++) {
    //LogToHTML(tokens[i]);
    if (aqString.Trim(tokens[i]) == theItem) {
      var index = i;
      break;
    }
  
  }
  LogToHTML(index);
  theDropDown.WaitProperty("Exists", true, MEDIUM_LENGTH_TIMEOUT);
  theDropDown.WaitProperty("VisibleOnScreen", true, MEDIUM_LENGTH_TIMEOUT);
  //theDropDown.Click();//added this to get the report items styles to work - may have broken other code elsewhere?
  theDropDown.ClickItem(index);
  

 

When i run the function i get the following error, The object with the specified attributes does not exist.

 

This is odd as this function has been working perfectly fine for ages, when i try and remap the object i am still not seeing the wItemList.

6 Replies

  • Marsha_R's avatar
    Marsha_R
    Champion Level 3

    We just lost ClickTab on one screen, again on an old test that always ran before.  I wonder if this is contagious.   ;)

    • brijmitchell's avatar
      brijmitchell
      Contributor

      I truely hope not, i have tried restarting, multiple browsers. deleting the mapping and remapping and nothing is working.

       

      Its seems to be on every dropdown list in the application to add insult to injury.

      • brijmitchell's avatar
        brijmitchell
        Contributor

        I have raised a isse for this as i need this fixed fairly quickly as its currecntly affecting every test.