I am new to this GUI Scripting.... My requirement is I want to click on the drop down arrow, & inside there are some elemets with tree structure to select the particular node/alarm..
So Intially I need to crack the XPATH for the drop down arrow of "COUNTERS" enter image description here
enter image description here Tired Xpath by using absolute Xpath as below :
WebDriverWait(self.driver, 70).until(
EC.element_to_be_clickable((By.XPATH,
"/html/body/div/pm-application/epic-layout/div/div/div/div[5]/div[4]/epic-layout-panel/div/div/div/pm-reporting/epic-layout/div/div/div/div[3]/div[4]/epic-layout-panel/div/pm-tree-wrapper/div/div/div[1]/div[2]/div[1]/div[2]/div/div[2]/div/div[1]/div/div/div[3]/span/i")))
Also with Relative paths as well :
-
WebDriverWait(self.driver, 70).until( EC.element_to_be_clickable((By.XPATH, "//div[@id='1483f603-ed09-6586-16e8-fc074ea8f908']//span//i[@class='icon tree-node-arrow collapsed']"))) -
WebDriverWait(self.driver, 70).until( EC.element_to_be_clickable((By.XPATH, "//*[@class='virtual-tree']//*[@class='icon tree-node-arrow collapsed']"))) WebDriverWait(self.driver, 70).until( EC.element_to_be_clickable((By.XPATH, "//i[@class='icon tree-node-arrow expanded']")))
But still I am facing below issue , Please help me to resolve this issues
AttributeError: 'str' object has no attribute 'find_element'
find_elementfrom string object. Show code line withfind_element. Also show what isECin your code - JaSON