Selenium Kantu & JQuery Validation problem

Hi there, im using Selenium Kantu 3.1.8 on Chrome Version 69.0.3497.100 (Official Build) (64-bit) on Ubuntu

Im trying to automate the filling of a web form which uses JQuery .validate() method to perform field validation.

Though the fields are correctly populated with the type command, the JQuery validation behaves as if the fields are left empty.

I tried also with sendKeys, and storeEval, but the result is always the same.

My guess is that JQuery performs the validation on some kind of data model underlying the page, and not on the actual input value. But i dont know if this is the standard JQuery behavior or it is a particular implementation on the page whose form im trying to fill.

Is there a particular set of commands to be issued in order to correctly fill a JQuery handled form ?

Thank you

This sounds like a good use case for our new XType command. Don’t forget to first use XClick to set the focus on the input field.

Alternatively, it could actually be enough to use the normal selenium-ide style Type command to fill the field (as you do now), and then do a real mouse click with XClick to trigger the right JQuery events. => Can you please test if this solves the issue?


  • the Type + XClick solution is not working
  • the XClick + XType solution it does work. but a) i dont know how to make it works with a select field. that is, i set the focus with the XClick on the select field and then i send the label string with XType, but it is not selecting the right item. I guess a specific Xxxx command should be implemented.
    b) Another concerns is that if the Xxxx system is focus-based, could a unexpected focus event break the script execution ?
    c) So with the Xxxx methods, the scripts will become just a string of XClick/XType commands … the 5 Xxxx instructions usage limits on the future stable version licensing will be kind of limiting …

Great :slight_smile:

So we learned that Type itself does not set the focus. Now that I think about it again, this is to be expected. It just sets a value inside the web page (DOM object).

You can use 2 XClick or XClick plus XType. I made a short screencast for it:

Automating a Select Box with JQuery:

The first option uses

  • XClick | (image) to set the focus on the select box (this also opens the box)

  • Another XClick | (image) to select the entry we need

The second option uses

  • XClick | (image) to set the focus on the select box (this also opens the box)

  • XType | ${KEY_DOWN}${KEY_DOWN}${KEY_ENTER} to select the entry

And the other questions:

Yes - this is the (only) drawback: If a macro with RealUser simulation runs, you should not click around your machine. The good news is that without actively disturbing the macro, a macro with XClick and XType runs very stable.

On the positive side RealUser commands are immune to all kind of tricky frame or iframe issues, or elements appearing/disappearing from a page via some Javascript wizardry of the website.

A good solution is to run macros with X… commands inside a virtual machine. Since Kantu works with Linux, free Virtual Machines with e. g. Ubuntu can be used. We use VBox and Ubuntu 18.04. You can just install Chrome and Kantu and the XModules inside the virtual machine and will have a very robust automation platform that can run the background as well.

Agree. We will make sure that the free version of the RealUser Simualtion XModule is usable. So actually, the limit will be more around 25 commands :slight_smile: . We updated the PRO page already to reflect that.