Change jquery event that does not fire when cucumber starts from capybara

I tested some jquery code in my browser with cucumber and capybara, and in the text box, when the change event occurs, it calls a certain function, when I manually do this action, everything works, but when I start the cucumber, I fill the text box with a new value, but the function is not executed.

Meanwhile, there is another text field associated with the jQuery keyup event, which launches another function and works manually in the browser or cucumber works

what could be the reason that the change event callback function does not start when the cucumber starts?

+3
source share
3 answers

, . (http://pullmonkey.com/2011/03/03/capybara-does-not-trigger-js-change-event-with-celertiy-driver/) , , .

+4

, , - / , , . , .

0

... Capybara "12345", , 1234 123.

, "enter".

:

find('css').set(value)

find('css').set("\n") if enter.present?

Essentially, by doing this, it “confirms” the input, as you will do it as a user. I think it is cleaner than clicking on other inputs or switching things on the page to make it capture what is on your input, as it is relative to the same input.

0
source

All Articles