Page 1 of 1

Test is not working on virtual machine

Posted: Thu Jan 14, 2016 6:46 pm
by Zhiqiu
Hi,

We have a test suite, it's running fine on the local computer. But when it's running on the virtual machine, the click is not working. It looks like the mouse is moved to the right link and clicked. But for some reason the page is not responding.It happens to a lot of the clicks. We've tried to set Mouse.DefaultClickTime = 300, and other different values, but the clicking problem still exists.

Re: Test is not working on virtual machine

Posted: Fri Jan 15, 2016 2:13 pm
by Support Team
Hello Zhiqiu,

Unfortunately, it is very difficult to figure out why the click action is not performed successfully.
Often timing issues, e.g., page is not fully loaded or something similar can cause that the browser didn’t recognize click events even if they were successfully executed.

I’d suggest trying one of the following workarounds to solve the issue.

Execute Invoke Action PerformClick
You could use the PerformClick() action to invoke the click event directly on the button without using the mouse. Drag and drop the corresponding item from the repository to the action table and choose Invoke Action -> PerformClick().
perform_click.png
Divide Move and Click action
In order to make sure that the button is focused correctly, please try to execute the mouse actions separately. First, perform the Move to the corresponding element. After that, please execute the Click action.
mouse_move_click.png
Please let me know if one of those workarounds solved the issue.

Sincerely,
Johannes