0

Been fighting with this for couple days now and reviewed many a web post without success. Can you view this site and see an actual (successful) correct way to retrieve and store the values from these first Select controls on this page?

http://halls.md/body-surface-area/bsa.htm

I have to use "browser.driver.findElement" and I target the Select control with:

var tempstr = browser.driver.findElement(by.xpath('//select[@name="wu"]/option[1]')); 
  optionval = tempstr.getText();
  console.log(optionval);

but no success: *script executes successfully but I can't get the list items of "pounds" and "kilograms" pulled out.

ColtsFan
  • 13
  • 4
  • specific to the website link. tried all kinds of different locators but unsuccessful digging out the values on these controls. not the same as earlier. – ColtsFan Mar 29 '15 at 17:40
  • went back to your code example and comparing with my browser.driver.findElements attempt. thanks for your tip. good now! – ColtsFan Mar 29 '15 at 17:46

0 Answers0