Ask a Question

TC6 - Selecting item combo box in IE8

bulaboy_1
New Contributor

TC6 - Selecting item combo box in IE8

Hi there



I know there is an issue with trying to select items in a combo box list on IE8, which is fixed in TC7.5

However, I'm stuck with TC6 for the moment - does anyone have an idea of a work-around to get past this?

I'm using the ClickItem method on a <select> object.



Cheers



N.
7 REPLIES 7
YMinaev
Staff

RE: TC6 - Selecting item combo box in IE8

Hi,



I'd recommend that you try using the selectedItem property instead of ClickItem. Does this help?

------
Yuri
TestComplete Customer Care Engineer

Did my reply answer your question? Give Kudos or Accept it as a Solution to help others. ⬇️⬇️⬇️
bulaboy_1
New Contributor

RE: TC6 - Selecting item combo box in IE8

Hi Jared



Thanks for your prompt reply. selectedItem doesn't seem to be a property I can access for this particular object in TC6 (6.53.454.7).

I have selectedIndex property - but I need to be able to select an element from a dropdown box - which I can see ClickItem seems to be the only method for doing so. Any suggestions?



Thanks



N.
YMinaev
Staff

RE: TC6 - Selecting item combo box in IE8

Hi,



In this case, it looks like you need to upgrade TC. TC 6 doesn't support IE 8, and we cannot guarantee that it will work with this browser.

------
Yuri
TestComplete Customer Care Engineer

Did my reply answer your question? Give Kudos or Accept it as a Solution to help others. ⬇️⬇️⬇️
bulaboy_1
New Contributor

RE: TC6 - Selecting item combo box in IE8

Thanks for your help.
roger_2
Not applicable

RE: TC6 - Selecting item combo box in IE8

I am using Test complete 7.5... and it recognizes click and selectedIndex, but ClickItem does not work.
YMinaev
Staff

RE: TC6 - Selecting item combo box in IE8

Hi,



Do you use TC 7.52 or 7.50? If you use 7.50, install the latest update. If this doesn't help, let us know exactly what happens when you call ClickItem. Do you see errors in the log?

------
Yuri
TestComplete Customer Care Engineer

Did my reply answer your question? Give Kudos or Accept it as a Solution to help others. ⬇️⬇️⬇️
cbruck_1
Occasional Contributor

RE: TC6 - Selecting item combo box in IE8

I had to use TC 6 at my previous employer after TC 7 was released.  Here's a snippet from our framework that I think might accomplish what you're looking for.  Basically, you have to search through the children of the object and check their value (apparently for some it was contained in .text, hence the multiple conditions on the if statement).  When you find it, you set the .value property for the object and fire the "onchange" event.  I think this effecticely does a ClickItem (after finding the right item in the list).



case "SELECT" : {

  for (var i = 0; i < fieldObject.children.length; i++) { 

    if ((uppercase(value) == uppercase(fieldObject.children.value)) ||

        (uppercase(value) == uppercase(fieldObject.children.text))) { 

      returnText = stripJunk(fieldObject.children.value); //return the text of the selected entry.

      fieldObject.value = fieldObject.children.value;

      fieldObject.FireEvent("onchange");

      server.Page.Wait();

    }

  }

  return returnText;

  break;

}
cancel
Showing results for 
Search instead for 
Did you mean: