The HTML code of the element I want to select:
<a href="../s-reminderNotice.asp?fname=b%2D3c%2DpLessonBooking%2Easp%3Flimit%3Dpl" class="sidelinkbold"
target="mainFrame"
onmouseover=" window.status='Practical Training Booking';
return true" onmouseout="window.status=' ';
return true">Booking without Fixed Instructor</a>
I would like to select the element of this "Booking without Fixed Instructor" ; however there isn't an ID/link_text/name for this element. How can I direct the site to the HREF. Is there a way to use xpath to locate it , the element is in the column on the left of the website so there are many other elements of the same class. (see pic.)
I tried this and it returned:
AttributeError: 'WebDriver' object has no attribute 'findElement'
Code:
driver.findElement(By.xpath("//a[@href='THE LINK']")).click();
SOLVED; ELEMENT WAS IN AN IFRAME ; HAD TO SWITCH FRAME TO ACCESS ELEMENT