0
votes

I traversed till a[@data-subjectid='446'], I want to traverse after that to td/label/div(Slider round)- In the screenshot below. I wrote xpath below and not recognizing the element ("//table[@id='subjects_grid']/tbody//tr[@class='subject-status-off']/td//a[@data-subjectid='446']/td//label[@class='switch']/div")

enter image description here

Please help writing me xpath until slider round.

1
/following::td should fix it for you. There's no child element td for that element. - Arundeep Chohan

1 Answers

0
votes

Try using xpath axes.

("//table[@id='subjects_grid']/tbody//tr[@class='subject-status-off']/td//a[@data-subjectid='446']/parent::td/following-sibling::td/label[@class='switch']/div")