AutoGeneral / IridiumApplicationTesting

A&G Web Application Testing Suite
https://www.gitbook.com/book/autogeneral/iridiumapplicationtesting-gettingstartedguide/details
MIT License
20 stars 13 forks source link

Enhancement - Add steps to simulate actions to sliders #76

Closed dehanw closed 7 years ago

dehanw commented 7 years ago

Tried several website which are in jQuery, AngularJS, ReactJS, KnockoutJS or html range type input and found that clicking on the certain position of the slider besides "drag and drop" slider handle can move slider handle commonly also. Hope this information is useful.

mcasperson commented 7 years ago

See the new steps added with version 0.0.77 (https://autogeneral.gitbooks.io/iridiumapplicationtesting-gettingstartedguide/content/releases.html)

In investigating how to interact with these advanced UI elements, it became clear that it was going to be impossible to create generic steps that could replicate the events and actions that these elements required. In addition, drivers like Marionette don't support performing actions like this:

builder.moveToElement(element, xOffset, yOffset).click().build().perform();

So the solution is to introduce custom JavaScript into the tests. This is not an ideal solution, as it means tests no longer replicate users actions, and there are security considerations, but is the only generic solution I can see that will allow tests to interact with custom widgets across browsers.

dehanw commented 7 years ago

Thanks a lot. I tried the steps to run JavaScripts which support me to set the specific value now. So, close this enhancement issue.