#374 - follow-up PR to PRs for #365 #361 #368 #370 #372 #375
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Creating and sending a PR to address issues that can arise out of the PRs on #365 - enabling (x,y) coordinates locator, #361 - helper functions for retrieving x & y coordinates, and #372 - update of translation engine to reflect the new steps (#368 mouse and #370 keyboard) and functions.
change 1
As TagUI is built on CasperJS, it has by default the use of convenience function x (more details here), which is used to form XPath selectors to be used within CasperJS. However, with introduction of (x,y) coordinates selectors, it is not hard to see that many users will start using x as a variable and overwriting x variable with the integer value of the x coordinates (be it for calculation of offset or other purpose).
When that happens, the default x function would no longer work and that will basically break the automation operation of TagUI. In this PR, the function x is renamed as xps666 instead (X Path Selector 666), a acronym with a random number, so that when user uses variable x, it will not affect TagUI operations.
change 2
In tagui_header.js, the live mode translation engine use of 'mouse_xy()', 'mouse_x()' and 'mouse_y()' strings is broken up into 'mouse_' + 'xy()', 'mouse_' + 'x()' and 'mouse_' + 'y()'. This prevents tagui_parse.php from mistakenly thinking that these functions are used by users and invoking Sikuli visual automation when users do not use these functions in their TagUI scripts.