[Python] Selenium send_keys does not send comma

Discussão em 'Python' iniciado por Stack, Setembro 11, 2025.

  1. Stack

    Stack Membro Participativo

    I try to use send keys like this

    price = driver.find_element(By.XPATH,'//*[@id="contentproform-ppv_cost"]')
    price.clear()
    price.send_keys("12,99")


    Which only results in sending 1299. I tried to paste it from the keyboard with the same result. What am I doing wrong?

    EDIT: This is the input tag:

    <input type="number" id="contentproform-ppv_cost" class="form-control" name="ContentProForm[ppv_cost]" value="5.55" placeholder="Price for end-users" step="0.1" min="1.5" max="50" data-trigger="Input">


    My workaround so far:

    price.send_keys("12")
    for i in range (9):
    price.send_keys(Keys.ARROW_UP)
    price.send_keys("9")


    EDIT2: Using 12.99 also results in 1299

    Continue reading...

Compartilhe esta Página