Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

some mouse click on xvfb-run does not work #453

Closed
xwmbww opened this issue Jan 29, 2019 · 5 comments
Closed

some mouse click on xvfb-run does not work #453

xwmbww opened this issue Jan 29, 2019 · 5 comments

Comments

@xwmbww
Copy link

xwmbww commented Jan 29, 2019

when running robotjs in xvfb-run (Linux virtual frame buffer) environment, some of the mouse clicks are not registered.

Expected Behavior

the same sequence worked in DISPLAY=:0 (GUI console), however when working in xvfb-run environment it should produce the same result

Current Behavior

some of the clicks are not registered

Possible Solution

Steps to Reproduce (for bugs)

In this example we use selenium-server as the test application. We try to use images to drive to the point where it shows the drop down list of browsers.
All steps passed when we run our test in DISPLAY=:0.
The last step failed when we run our test in xvfb-run where DISPLAY=:99, and the reason of failure is due to the step before where clicking the "Selenium_SelectBrowsers_dropDownClosed" image is not registered by the webpage therefore it does not open the drop down list.
Interestingly, the 3rd step and the 5th step have the same action, and the only difference is the target image is different. and the 3rd step worked on DISPLAY=:99.

Scenario: Check Webdriver Hub page images - Create Session
When I visit "http://localhost:4444/wd/hub"
Then I should see the "Selenium_CreateSession_button" image on the screen
When I click the "Selenium_CreateSession_button" image on the screen
Then I should see the "Selenium_CreateNewSession_modal" image on the screen
When I click the "Selenium_SelectBrowsers_dropDownClosed" image on the screen
Then I should see the "Selenium_SelectBrowsers_dropDownOpened" image on the screen

Context

We try to use robotjs and image actions to conduct GUI testing. We try to put our test to xvfb-run in order to run in the CI environment With this bug we can not run this test in the CI..

Your Environment

  • RobotJS version: 0.5.1
  • Node.js version: v8.11.4, v8.15.0
  • npm version: 5.6.0
  • Operating System: ubuntu 18.04
@xwmbww
Copy link
Author

xwmbww commented Feb 5, 2019

Update: I have also confirmed it failed on a different dropdown list clicking.
Here is the new test scenario:

Scenario: Check demo page images - Drop-Down List
Given I open the url "/"
When I scroll to element "footer"
When I click the "First_option" image on the screen
Then I should see the "First_option_Opened" image on the screen

where the demo-page has a generic dropdown list that is independent from the selenium-standalone server dropdown list.
Again, the same test passed with DISPLAY=:0;
and failed with xvfb-run --server-num=99 --server-args="-screen 0 1920x1200x16"

dropdown list HTML example:
First option Second option

@xwmbww
Copy link
Author

xwmbww commented Feb 5, 2019

MP4 for passed on DISPLAY=:0
https://ufile.io/4ddoo

MP4 for failed on xvfb-run --server-num=99
https://ufile.io/24ny1

MP4 files can be played by chrome browser directly.

@xwmbww
Copy link
Author

xwmbww commented Feb 28, 2019

Correction:
This issue does not exist at first when we run xvfb-run in single run. It occurs when we tried to execute xvfb-run command in background and in parallel (multiple xvfb-run). After that, the issue persist regardless single or parallel xvfb-run.

@oktapodia
Copy link
Collaborator

This issue has been closed because it has been inactive for > 180 days.
You may reopen this issue if it has been closed in error.

@AkiraWang89
Copy link

AkiraWang89 commented Mar 15, 2024

Hi, did you manage to make it work at the end? If yes, how? Something like
DISPLAY=${display} xdotool mousemove ${x} ${y} click 1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants