I just try to write correct path to click exactly this button what I want on my page. I will give you an example page for testing. You just have to download the HTML file and open it in your browser.Code of HTML page What we now want to do? If you run this HTML file you will see all page. And now we want to make a Click on exactly this button on screen : After when you click on this button you will see click counter below: like this :
Have anyone idea how to click it? I tried few ways and can't find solution still. Please help. I try at least :
drive.FindElement(By.XPath("//tr[class='ng-scope']/td[text()='Wylaczenie nadan RDF'] and button[@title='Skip']")).Click();
and
drive.FindElement(By.XPath("//tr[text()='Wylaczenie nadan RDF']/button[@title='Skip']")).Click();
+ more and more and can't just write fine this Path to click exacly this button.
And unique value is <td class="ng-binding">Wylaczenie nadan RDF</td>
- i prefer to get path by this.
You need to use below XPATH for the same
//tr[td='Wylaczenie nadan RDF']
will take you to the row which contains that text and then you use//button[@title='Skip']
to find that button