VineGlobal / selenium-vba

Automatically exported from code.google.com/p/selenium-vba
1 stars 0 forks source link

correct usage of "replace" #54

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
Operating system : Win 7
.Net Framework version :
Office Version : 2010
SeleniumWrapper version : 1.0.16.0

What is your issue ?
Hi,

Can you please explain the correct way to use "replace"
I tried to replace a value ("90") in a textbox using the following code, but it 
didnt work:-

driver.findElementByID("accTempForm_RODays").Replace "90", "180"

Original issue reported on code.google.com by rohan.ka...@gmail.com on 21 Feb 2014 at 9:42

GoogleCodeExporter commented 9 years ago
The replace method takes the text from the web element, replaces characters 
according to the provided pattern and returns the result.
In your case, if you want to change the web element text :
set ele = driver.findElementByID("accTempForm_RODays")
newtext = ele.replace("90", "180")
ele.clear()
ele.sendKeys newtext

Original comment by florentbr on 21 Feb 2014 at 10:14

GoogleCodeExporter commented 9 years ago

Original comment by florentbr on 8 Sep 2014 at 5:40