I need to find the button inside of this table. The ideal would be to find it by the 'Course Home' text because that's how users find it, but at this point, since that's not what I'm testing, I'm willing use any method as long as it can find and click on the button.
I have tried:
- By.cssSelector("div.buttons:nth-child(1) > button:nth-child(1)") //least favorite method
- By.partialLinkText("Course Home");//the ideal
- By.cssSelector("div.two>div.buttons>button")// and other such attempts, just grasping at straws
but none of these work. My test just hangs, looking for the button until it hits the timeout. What am I doing wrong?
PS I'm using Java.
<td valign="middle">
<div class="two">
<div class="buttons">
<button onclick="document.location.href='file/path/redacted/'">
<img src="/images/button_icons/house.png">
Course Home
</button>
</div>
</div>
</td>