You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Operating system and version (32/64bit) : XP SP3 (32bit)
.Net Framework version :
Office name and version(32/64bit) :
Browser name and version : Firefox 26
SeleniumWrapper version : 1.0.17.0
First, I would like to thank you for SeleniumWrapper. It is excellent tool !
1. Me tried to edit your QuickTest.vbs file in order to access text in input
element but it doesnt work as me expected
Dim selenium, mytext
Set selenium = CreateObject("SeleniumWrapper.WebDriver")
......
' mytext = selenium.getValue("lst-ib")
mytext = selenium.findElementById("lst-ib").Text
wscript.echo "Searched for: " & mytext
selenium.stop
What is the expected output? What do you see instead?
The empty string was returned by
selenium.findElementById("lst-ib").Text
if i use mytext = selenium.getValue("lst-ib") it works and "Eiffel tower" is
returned
2. I tried to use WebElement like this:
Dim selenium, element, mytext
Set selenium = CreateObject("SeleniumWrapper.WebDriver")
Set element = CreateObject("SeleniumWrapper.WebElement")
element = selenium.findElementById("lst-ib")
mytext = element.Text
it crashed with "ActiveX component can't create object
"SeleniumWrapper.WebElement".
BTW, i dont see SeleniumWrapper.WebElement entry in registry.
Could you please provide your expert opinion ?
Thanks in advance !
Original issue reported on code.google.com by alex.fir...@gmail.com on 29 Dec 2013 at 12:13
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
Original issue reported on code.google.com by
alex.fir...@gmail.com
on 29 Dec 2013 at 12:13Attachments:
The text was updated successfully, but these errors were encountered: