Wednesday, 15 June 2011

Selenium Webdriver: Java: Code to verify that imported data is correct -



Selenium Webdriver: Java: Code to verify that imported data is correct -

i new selenium , java, in project have import info in table of 30 rows , 10 column on web application through file (xls or xml).

now issue have verify info imported correctly in each row , each column. web page have pagination , in 1 go show 10 rows ..remaining info in next page.

my verification points are: 1) no info available in table before import. 2) info populated in table against each row , column. 3) when delete info 2,3 rows, info should remove table.

thanks in advance amit

without code specifics difficult...

i approach writing function compare app table table in memory.

1) read external file memory. (add 1 bool flag column next each false) 2) navigate section , upload file via selenium code in app. 3) grab elements app table object on page. 4) loop through elements , compare against memory table (toggle flag true each one) 5) save non-matching info separate object. 6) add together still false on in memory table non-matching object in step 5 7) output diff object in whatever format want can see didn't match up.

other tweaks need done to, depends on specifics of application. avoid actual datatable memory object , utilize list object utilize linq efficiency...linq doesn't work java though...

java selenium

No comments:

Post a Comment