Quality Testing

Quality is delighting customers

How to find an element in search drop down list after that how to get data from excel file using selenium web driver

I'm new to Selenium web driver using Java. I am trying to select drop down value by reading an Excel file. I tried the following code, but it is not selecting value as per data mentioned in the Excel sheet. For me the 'Employee Type' drop down list opened but the data is not fetched from Excel file. It is showing an error.

Can anyone help me find an element of search drop down list and how to fetch data from Excel file? Here I have attached screen images, HTML Code, and the error screenshot.

Views: 62

Attachments:

Reply to This

Replies to This Discussion

i have added 2 more images for your reference

Attachments:

Hi Geetha,

After seeing the error, it looks like it is not related to test data fetching from excel sheet. This error signifies that session not found. Either there is mistake in how you are fetching data from Excel sheet or there is a compatibility issue with IE browser you are using. If you could share screenshot of your code, then it would be helpful to resolve your issue.

However here I am providing the xpath to locate the element of dropdown you require in your code:

//select(@name='new_EmployeeType_COMMOM')/child::option(@value='L')

Try to print on console what data you are reading from excel sheet. Maybe there is problem with row/column id when you are reading data from excel. Also make sure apache POI library you are using is compatible with IE and Selenium version you are using.

For more details you can refer software testing company

Thanks

::

RSS

TTWT Magazine


Advertisement

Advertisement

Advertisement

Advertisement

© 2020   Created by Quality Testing.   Powered by

Badges  |  Report an Issue  |  Terms of Service