<div class = "Repo List">
<div class = "Repo">
<div class = "Text">
<span class = "Display Text">Repo1</span>
</div>
<div class = "Button">
<div class = "Click Button">Delete</div>
</div>
</div>
<div class = "Repo">
<div class = "Text">
<span class = "Display Text">Repo2</span>
</div>
<div class = "Button">
<div class = "Click Button">Delete</div>
</div>
</div>
<div class = "Repo">
<div class = "Text">
<span class = "Display Text">Repo3</span>
</div>
<div class = "Button">
<div class = "Click Button">Delete</div>
</div>
</div>
</div>
In the above code I want to click the Delete button, the problem is that every time a Repo is added, the class name of the repo, the class name of the display text, and the class name of the delete button is all the same for all the repos except for the repo display name.
All I want to do is click the delete button next to a specific repo name.
I tried .//span[text() = "RepoName"] but this only detects the repo name and not the button next to it.
I am pretty new to selenium and I am confused on how to go about it.