cancel
Showing results for 
Search instead for 
Did you mean: 

Option keyword is not working on firfox using Jscript for web automation

SOLVED
Regular Visitor

Option keyword is not working on firfox using Jscript for web automation

Hi Team,

 

I am unable to use the option keyword while getting all the values of dropdown in firefox. Is there any other way to get all the dropdown value ?

 

Example:
if (desiredObject.Exists) {
Log.Message("Dropdown list Found");
var opts = desiredObject.options;     // This line on working of IE but not for Firefox
for (i = 0; i < opts.length; i++) {
ddlArray[i] = opts.options[i].value;

}

 

Thank You.

1 ACCEPTED SOLUTION

Accepted Solutions
Community Manager

Re: Option keyword is not working on firfox using Jscript for web automation

Hi @haseeb_saleem,

 

Try using Object Spy to identify the property you can use to get the content. For web controls, there should be many options, innerHTML, contetnText, etc.

 

 

---------
Tanya Gorbunova
SmartBear Community Manager

Did my reply answer your question? Give Kudos or Accept it as a Solution to help others.↓↓↓↓↓

View solution in original post

2 REPLIES 2
Community Hero

Re: Option keyword is not working on firfox using Jscript for web automation

One of the things to realize is that not all properties, etc., translate from one browser to another.  So, what might work in IE might not work in firefox.

Not knowing the control you're using, I can't tell you what property to use.  You might want to look for something like wItemList or something like that.  It would allow us to help you more if you could take a screenshot of the object in question in your Object Browser so we can see what properties are available.


Robert Martin
[Community Expert Group]
Please consider giving a Kudo if I write good stuff
----

Why automate?  I do automated testing because there's only so much a human being can do and remain healthy.  Sleep is a requirement.  So, while people sleep, automation that I create does what I've described above in order to make sure that nothing gets past the final defense of the testing group.
I love good food, good books, good friends, and good fun.

Mysterious Gremlin Master
Vegas Thrill Rider
Extensions available
Community Manager

Re: Option keyword is not working on firfox using Jscript for web automation

Hi @haseeb_saleem,

 

Try using Object Spy to identify the property you can use to get the content. For web controls, there should be many options, innerHTML, contetnText, etc.

 

 

---------
Tanya Gorbunova
SmartBear Community Manager

Did my reply answer your question? Give Kudos or Accept it as a Solution to help others.↓↓↓↓↓

View solution in original post