简体   繁体   中英

How to assign values from an array to Text boxes in Webpage using selenium java

I have an Excel sheet with as 5 rows and 3 columns containing values. What I need is :- -To read the values row wise each time and input into corresponding 3 textboxes in a webpag e and click submit button - Then page refreshes and then fetch the next row values in excel ,assign the values to the textfields perform the submit action

In a nutshell, how can we assign the values row wise enter image description here from an excel sheet to multiple textboxes in a page one after the other?

For read excel sheet and storing it into the variables in java probably the best way is to use Apache POI library .This library lets you manipulate excel documents and more. I found some example how to use Apache POI to read data from excel. After that you can you can store the cells inside the variables and use variables to insert the data into the website. Hope this gets you on the right track.

http://www.codejava.net/coding/how-to-read-excel-files-in-java-using-apache-poi

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM