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.
keyboard = Controller()
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("gold")
self.driver.find_element(By.CSS_SELECTOR, "css=.active > .link-to-profile > .a-btn").click() #*tried doing CSS_Selector and the Xpaths ,xpath=//input ,xpath=//header[@id='region-header']/div/div/div[3]/input each giving different errors
keyboard.press(Keys.ENTER)
keyboard.release(Keys.ENTER)
Each giving different errors such as:
illegalselector was specified or could not find xpath
I'm just confused as the SeleniumIDE version works happily with no problems.
Iv tried doing both the CSS selector way, Xpath way and mimicking key pressing.Nothing seems to be working.
Also on a side note The entire code visually shows the process. Is it more demanding and slower this way than if the code just ran in the back with no visuals ..and if so please could you recommend a tool that could do this
selenium download command to run in cmd is
pip install selenium