Question
Tata Consulting Services
US
Last activity: 9 Feb 2020 0:57 EST
Automating Mouse Movement
Hey all,
I am stuck with how to automate user mouse actions. I need to click a button "One Time" but it requires the user to mouse over controls for it to become visible. I have tried using the focus method but it still requires a manual mouse over each control to work.
I'm hoping there way to automate this process? Especially if there is a way to click it directly or redirect the mouse position in a script.
Thanks
-
Like (0)
-
Share this page Facebook Twitter LinkedIn Email Copying... Copied!
Accepted Solution
Updated: 7 Feb 2020 13:08 EST
Tata Consulting Services
US
Hey all,
I wasn't able to update my progress yesterday with the Collaboration Center being down. I have solved this issue though! An associate of mine suggested the arrow keys which I am using in a C# script component to great success.
The script is as simple as:
SendKeys.SendWait("{DOWN}");
SendKeys.SendWait("{RIGHT}");
Thanks to everyone who responded!
Pegasystems Inc.
US
You would likely need to do that with some C# as there isn't really a way within the product to control the mouse. Is this a web application? If so, there may be ways of triggering the click depending on how the menu is generated. If it is a Windows application, then you might look into creating a component to position the cursor or perhaps using UI.Automation to click the control.
-
Trevor Smith
Tata Consulting Services
US
Unfortunately, it is a Web Application and my solution requires Internet Explorer. I have been looking around at the possibility of using C# to position the mouse. Is it possible, by chance, to pass an interrogated control as an argument to a C# script component?
Pegasystems Inc.
US
It is possible. When you click on the "Configure type" button in the Object Explorer window (where you go to add Properties, Methods, and Events), the type of the control will be show at the top. Many years ago, I remember doing something similar but it required a component as cursor positioning wasn't possible in a script (I think because of the references). You may be able to do it now though as this was many years ago.
Since it is a web app, you may be able to reverse engineer the control to determine what events to raise. I have found good success using the Chrome debugger (and then of course taking what you've learned to IE). The IE debugger works too, but is just a little more challenging.
Updated: 6 Feb 2020 2:36 EST
Boubyan Bank
KW
Hello,
specific to replicating the behaviour of mouse over , you can use the raiseEvent method , with event = " mouseOver "
As per the shared image, i pointed the place where u can try with mouseover to mimic the exact process.
Here is a snap of how you select it , (select the button )
, you can also try out the other raise-event options from the drop down as below
-Bhabani
Accepted Solution
Updated: 7 Feb 2020 13:08 EST
Tata Consulting Services
US
Hey all,
I wasn't able to update my progress yesterday with the Collaboration Center being down. I have solved this issue though! An associate of mine suggested the arrow keys which I am using in a C# script component to great success.
The script is as simple as:
SendKeys.SendWait("{DOWN}");
SendKeys.SendWait("{RIGHT}");
Thanks to everyone who responded!
-
Bhabani Shankar Jena
Boubyan Bank
KW
Hello Trevor,
good to hear that the work around is good with sendKeys ,
however , Please use sendKeys as a last resort , since many times the browser / application behaves differently while in system locked mode.