0

I would like to change a value of a input tag that haves the value 20 to 110 in the website https://www.tradingview.com/chart/. How can I actually do that?(all of that using selenium python) enter image description here The value i would like to change it's MA Length inside Vol, you can acess that by clicking at Vol(20) right below Apple Inc - D - Cboe BZX at the top left part of the website.

1
  • Clicking Vol(20) doesn't brings up the popup. Any further steps involved? Possibly you need a set of valid credentials. Do you have a demo set? Commented Jul 23, 2019 at 6:23

1 Answer 1

4
  1. Locate the element you would like to interact with using your favourite browser developer tools

    enter image description here

  2. Choose an appropriate Locator Strategy which will allow to uniquely match the element at the page
  3. Locate the element
  4. Wrap the locating code into an Explicit Wait this way your test will be more robust and reliable
  5. Use WebElement APIs to interact with elements

Example code:

driver.get("https://www.tradingview.com/chart/")

WebDriverWait(driver, 10).until(EC.element_to_be_clickable((By.XPATH, "//a[contains(@class,'format')]"))).click()
input = WebDriverWait(driver, 10).until(
    EC.element_to_be_clickable((By.XPATH, "//input[contains(@class,'innerInput')]")))
driver.execute_script("arguments[0].value=30", input)
Sign up to request clarification or add additional context in comments.

3 Comments

I believe it's better to raise a new one
yeah, i was doing at that moment, i'll send u the link here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.