Trying to build a small bot to help with trading but for some reason the code gets an array of slightly different errors when trying to search for a instrument.
All i want it to do is click on the first instrument that comes up when you type something into the search bar ...the problem i think is the fact that there are multiple different search returns with no way to tell the difference between them so it is difficult to find the correct one
self.driver = webdriver.Chrome()
self.driver.get("https://app.libertex.com/")
self.driver.find_element(By.XPATH, "//input[@value=\'\']").click()
self.driver.find_element(By.CSS_SELECTOR, ".active > input:nth-child(2)").send_keys("Bitcoin")
self.driver.find_element(By.PARTIAL_LINK_TEXT, ".search-match")[1].click()
Tried mimicking key pressing and all x paths and css paths
What I have tried:
Tried mimicking key pressing and all x paths and css paths Nothing seems to be working ... it just either cant find the first search return to click on or is just unable to click on it
I get errors such as
illegalselector was specified or could not find xpath
no such element: Unable to locate element: {"method":"partial link text","selector":".search-match"}
and sometimes the webdriver just closes instantly after running ..even if i put breakpoints in the code.
Its weird because the Selenium IDE version works absolutely fine but when i bring it into python it decides it doesnt want to.
install command for selenium is
pip install selenium (cmd)