sarmisen / selenium-vba

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

how to copy multiple cell values from excel and put as input in a input box in browser #102

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
Operating system :Windows 7
.Net Framework version :
Office Version :2010
SeleniumWrapper version :SeleniumWrapperSetup-1.0.20.0

What is your issue ?
Suppose i want to select multiple cell values from an excel sheet and want it 
to paste in the browser input box.
this will execute in a loop.
suppose there are 10 values in the sheet, so we will take 2 vales each time and 
paste in the browser.
then loop continues
is there any function or trick to do that.

please mention

thanks

Original issue reported on code.google.com by coolguy2...@gmail.com on 7 Oct 2014 at 10:36

GoogleCodeExporter commented 9 years ago
Sure, this example will copy the first two cells for the first 10 rows to the 
specified textbox:

For i = 1 To 10
    Set textbox = driver.FindElementById("textbox-id")
    textbox.Clear
    textbox.SendKeys Cell(i, 1).Text & Cell(i, 2).Text
Next

Original comment by florentbr on 7 Oct 2014 at 12:24