M
M
Maxim Uglov2014-05-03 09:23:01
userscript
Maxim Uglov, 2014-05-03 09:23:01

Simulating clicking on JS page elements

I usually use the el.trigger('click') function. But here I came across a situation where the action does not work. The elements are not assigned in the code by any action, they are apparently assigned by reference to the page element. The element is not a link.
Tried to do the same action through Selenium IDE. It turns out. I looked at the debug of actions on this element, compared through FireBug the action generated through .trigger () and through Selenuim turned out to be identical, the boobleCancel parameters (I write from memory, maybe not exactly) and the rest are the same.
The element under study is the form for adding a post to a group
. What could be the catch? What are the subtleties when working with triggers?
Thanks in advance for advice.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
Artur Panteleev, 2014-05-03
@arturpanteleev

jsfiddle.net/Wq3Nu
Try it like this and the trigger should work

M
Maxim Uglov, 2014-05-03
@Vencendor

I don't really understand why, but I did it. Did not help.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question