I'm new to python. I tried to extract data on https://live-cosmos.finq.com/trading-platform/?path=details&symbol=SILVER#login by giving user name and password. It works. But when try to hit on another button it doesn't work. ('Deposite' or the 'X' to close)
HTML of the Deposit element:
<button class="btn btn-primary">Deposit</button>
Snapshot of the Deposit element:
My code is
from selenium import webdriver
import time
driver = webdriver.Chrome(executable_path="C:\\Chromedriver\\Chromedriver.exe")
driver.maximize_window();
driver.get('https://live-cosmos.finq.com/trading-platform/?path=details&symbol=SILVER#login')
time.sleep(5)
driver.find_element_by_xpath("/html/body/div[2]/div[4]/div[2]/div/div/div/div/div/div/form/div/div[3]/div[1]/input").send_keys("username@gmail.com")
driver.find_element_by_xpath("/html/body/div[2]/div[4]/div[2]/div/div/div/div/div/div/form/div/div[3]/div[2]/input").send_keys("password_here")
driver.find_element_by_xpath("/html/body/div[2]/div[4]/div[2]/div/div/div/div/div/div/form/div/div[3]/button").click()
time.sleep(20) # wait for loading
driver.find_element_by_xpath("/html/body/div[8]/div/div/div/div/div[3]/div[1]/div[4]/button").click()
output is
<bound method WebElement.click of <selenium.webdriver.remote.webelement.WebElement (session="28205c2be15699403ddfcc3f3ce2fa33", element="03ae577c-b3d4-423c-b7ed-1d9c5ea3ea1a")>>
Can you please help me to solve this (or a different approach) and go forward to scrape some text from the website. Thank you in advance.