appium / appium/java-client

java.awt.Robot object crashes Java while using WinAppDriver

Open
#1,189 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Java
Stars
1.3k
Forks
752
Avg merge
6d 21h
Merged PRs (30d)
8

Description

Description

When initializing a java.awt.Robot object during a test, java crashes. This works fine on its own in a clean project, but when using WinAppDriver/Appium, it crashes.

image

Environment

  • java client build version: 7.0.0
  • Appium server version: WinAppDriver v1.1.1
  • Desktop OS/version used to run Appium if necessary: Windows 10
  • Mobile platform/version under test: Win32 app, but happens on others

Details

Console output:

Jul 22, 2019 3:09:43 PM io.appium.java_client.remote.AppiumCommandExecutor$1 lambda$0
INFO: Detected dialect: OSS

Process finished with exit code -1073740791 (0xC0000409)

The last line appears after clicking "Close the program" on the popup shown in the screenshot above.

Code To Reproduce Issue [ Good To Have ]

I made a simple reproduction using WinAppDriver's java CalculatorTest, just added a new test and import statement and ran the specific test on its own.

import java.awt.*;

...

@Test
public void robotTest() throws AWTException {
    Robot r = new Robot(); // crashes on this line
    r.mouseMove(500, 600);
}

Link to Appium logs

Appium Log

(Also posted to microsoft/WinAppDriver#769 but was unsure if it would be better posted here or not.)

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with WinAppDriver's Java CalculatorTest sample and reproduce the failure in the added robotTest method at new Robot(). Review the linked Appium log and the reported environment details to determine where the crash occurs. Done means identifying whether the interaction belongs in java-client or WinAppDriver and documenting a verified resolution or limitation.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
desktop, testing-qa
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.