I am an accountant and very novice coder. I am trying to use Selenium with Python and Firefox browser to click through a series of webpages. I am just trying to select and click a hyperlink on the page, but I can't seem to locate it with Selenium. Please can someone show me the simplest way to select the hyperlink I want?
Imports:
from selenium import webdriver
from selenium.webdriver.common.by import By
import time
I then have code which successfully nagivates to a webpage, inputs my username and password and submits the form. Then when I want to click a link on the next page:
time.sleep(5) # to make sure webpage loads before trying to find link
Link1 = browser.find_element(By.partialLinkText ("/maf/app/auth")); # or any easier selector method?
Link1.click()
The error message is "AttributeError: type object 'By' has no attribute 'partialLinkText'"
When I inspect the link element it looks like this - not sure what the easiest element is to locate and subsequently click it?
<a target="_blank" title="Go to Orbitax" href="/maf/app/authentication/sso/ping/redirect?target=orbitax_chre">
Go to Orbitax
<img src="/cpw/images/rightBlueArrow.png" alt=">"
width="5" height="8"></a>
Thanks in advance!