Open GoogleCodeExporter opened 9 years ago
The text typed in an input is stored in the attribute named "value" and not as
inner text (see by yourself the html source).
That's why there is no text returned in your case.
The equivalent to getValue("id") is findElementById("id").getAttribute("value").
Here is an example :
Set driver = CreateObject("SeleniumWrapper.WebDriver")
driver.start "firefox", "http://www.google.com"
driver.open "/"
driver.type "name=q", "Eiffel tower"
driver.keyPress "name=q", "\13"
wscript.echo driver.getValue("name=q") 'Selenium 1
wscript.echo driver.findElementByName("q").getAttribute("value") 'Selenium 2
Original comment by florentbr
on 29 Dec 2013 at 1:11
findElementById("id").getAttribute("value") works ! Thank you !
Am i right - object SeleniumWrapper.WebElement is not registered ? Therefore
Set element = CreateObject("SeleniumWrapper.WebElement")
is crashed with "ActiveX component can't create object
"SeleniumWrapper.WebElement".
Original comment by alex.fir...@gmail.com
on 30 Dec 2013 at 8:38
Attachments:
Original comment by florentbr
on 8 Sep 2014 at 5:40
Original issue reported on code.google.com by
alex.fir...@gmail.com
on 29 Dec 2013 at 12:13Attachments: