0

I am trying to count the number of rows in an HTML table using Selenium webdriver (Java.). The functionality is as below:

Text is iteratively entered into a search box from CSV file. Once, first text is entered and search results are displayed in HTML table, I have to count the rows in that HTML table.

The issue I am facing is that for every search text, the count of number of rows in HTML table displays same. I suspect that the rows are counted before the HTML table is refreshed for every search text and hence the count remains the same as the first text every time.

I guess the HTML table should be refreshed every time new text is entered in search box and then rows in table should be counted.

Can anyone suggest the possible solution to this issue? Can I temporarily disable the HTML element of webpage till the new text from CSV file is entered?

Ketan Deopujari
  • 113
  • 3
  • 3
  • 16
  • Can you post your [java code](http://stackoverflow.com/help/mcve) – Madhan Jun 26 '15 at 20:14
  • This question is very close the **your** earlier question: http://stackoverflow.com/q/31059635/3124333 but you still failed to provide the **bare minimum** for us to be able to help you! Please, please, please have a careful read through [ask] and update your question. – SiKing Jun 26 '15 at 20:26
  • Unfortunately I will not be able to share the code right now. – Ketan Deopujari Jun 26 '15 at 21:09

1 Answers1

0

As you cannot post your code

There is was a way but i am not how feasible it is for your problem

this can be achieved using java script

you can disable any element Using java script

Refer this for disabling http://www.w3schools.com/jsref/tryit.asp?filename=tryjsref_select_disabled2

1) using javascript executor you can execute it in selenium. If First method is failing to do so

try

2)Execute your javascript first then run your selenium code means make your selenium method depends on the javascript method.

Let me know if this works out.

Chaitanya Pujari
  • 367
  • 4
  • 16