SendKeys is creating a double entry in autoNumeric.js form field

71 views
Skip to first unread message

Paul Lazaga

unread,
May 26, 2014, 12:15:12 AM5/26/14
to seleniu...@googlegroups.com, pla...@slvtechnology.com
I'm working on a project with Rails using Rspec, Capybara, Spinach along with Selenium WebDriver.

In one of my scenarios I started Selenium WebDriver and am seeing some strangeness.

If I use:
    page.driver.browser.find_element(:xpath, "//input[@id='property_location_purchase_price']").clear
    page.driver.browser.find_element(:xpath, "//input[@id='property_location_purchase_price']").send_keys "356999"

What I get in the input field is:
    "335566999999"

I get similar behaviour sending a single number, for example "3" becomes "33".

I don't get this when replicating the commands with Selenium IDE, however I do get the same problem with the WebDriver if I use Capybara fill_in or find.set.

As mentioned in the subject, this field uses autoNumeric.js. If I remove the autoNumeric function from the field it works fine, but of course won't test as I need it formatted.

Any ideas?

Reply all
Reply to author
Forward
0 new messages