Read data from excel sheet and assign the value to Select Tag to change value in Drop down menu.

i have used script from here – Permalink link

in above script, the data is read and send to the username and password field.  assume there are dropdown of Username and Password, so how we can handle that??

How can i do it??

tried using
var newValue = 24;
document.getElementById(‘projectID’).value = newValue;

but of no use.  Please suggest any alternate method.

Rishi_D Train Asked on April 23, 2015 in Selenium WebDriver.
Add Comment
1 Answer(s)

This is not the way we assign drop downs value. By this way you can assign value to a edit box only.

Coming to your problem, find this tutorial here to see how to deal with drop downs in webdriver.

http://www.toolsqa.com/selenium-webdriver/dropdown-multiple-select-operations/

Virender

Virender Singh Professor Answered on April 23, 2015.

Yes Virender, i have gone through the tutorial;

but what i want to do is that, i am taking the value of Select tag from Excel Sheet, and from this value only i want to select the drop-down menu.

any way that i can take this from excel sheet and select the appropriate value from drop down.

on April 25, 2015.
Add Comment

Your Answer

By posting your answer, you agree to the privacy policy and terms of service.