After clicking on button a list of checkbox appears. I want to select a checkbox with input taken from excel sheet.
1.This the button, on click list of checkboxes appears.
2.The list of checkboxes.
DOM image:
Software Quality Assurance & Testing Stack Exchange is a question and answer site for software quality control experts, automation engineers, and software testers. It only takes a minute to sign up.
Sign up to join this communityI would provide the process to solve the problem:
<a>
tag).My personal suggestion is to use xpath: //a[contains(text(),'<your text from excel>')]
input
tag with type='checkbox'
(either by using following-sibling or preceding-sibling
on that <a>
tag.//a[contains(text(),'<your text from excel>')]/following-sibling::input[@type='checkbox']
or
//a[contains(text(),'<your text from excel>')]/preceding-sibling::input[@type='checkbox']