driver.find_element_by_xpath("very long xpath").click()
I have a number of these "find an element and interact with it" actions as I am trying to automate a task on a browser, what are some ways to store the long XPath locators in a variable to keep track of where the code is in terms of the task and just for aesthetics of the code?
paths:
/html/body/main/div[2]/div[6]/div[3]/div[4]/div/div[2]/table/tbody/tr[1]/td[2]
/html/body/main/div[2]/div[6]/div[3]/div[4]/div/div[2]/table/tbody/tr/td/ul/li[1]/h3/a[3]
Thank you!