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

Unable to Initiate Session with WinAppDriver #1592

Closed
s-chathuranga-j opened this issue Nov 16, 2021 · 12 comments
Closed

Unable to Initiate Session with WinAppDriver #1592

s-chathuranga-j opened this issue Nov 16, 2021 · 12 comments
Labels

Comments

@s-chathuranga-j
Copy link

Description

I'm using WinAppDriver with a Java Framework. When I run the test the following log is displayed:

org.openqa.selenium.SessionNotCreatedException: Could not start a new session. Response code 400. Message: Bad capabilities. Specify either app or appTopLevelWindow to create a session
Build info: version: '4.0.0', revision: '3a21814679'
System info: host: 'CHATHURANGA', ip: '192.168.8.148', os.name: 'Windows 10', os.arch: 'amd64', os.version: '10.0', java.version: '11.0.12'
Driver info: io.appium.java_client.windows.WindowsDriver
Command: [null, newSession {capabilities=[{appium:app=C:\Windows\System32\notepad.exe, appium:automationName=Windows, appium:deviceName=WindowsPC, platformName=WINDOWS}], desiredCapabilities=Capabilities {app: C:\Windows\System32\notepad..., appium:automationName: Windows, deviceName: WindowsPC, platformName: WINDOWS}}]

Environment

  • Java version: 11
  • Appium Java Client version: 8.0.0-beta
  • Desktop OS/version: Windows 11
  • Selenium version: 4.0.0

Details

Following is the code used to initiate the session:

DesiredCapabilities capabilities = new DesiredCapabilities();
capabilities.setCapability("platformName","Windows");
capabilities.setCapability("deviceName", "WindowsPC");
capabilities.setCapability("app", "Microsoft.WindowsCalculator_8wekyb3d8bbwe!App");
calculatorSession= new WindowsDriver(new URL("http://127.0.0.1:4723"), capabilities);
calculatorSession.manage().timeouts().implicitlyWait(Duration.ofSeconds(2));

But if I run the same code with the above capabilities using Appium Java Client v7.3.0 and Selenium 3.141 it works fine!

@mykola-mokhnach
Copy link
Contributor

Please provide the full server log

@mykola-mokhnach
Copy link
Contributor

Also:

https://github.com/appium/java-client/blob/master/docs/v7-to-v8-migration-guide.md#strict-w3c-specification-compatibility

The recommended way to provide capabilities for driver creation is to use specific option builders inherited from BaseOptions class. For example XCUITestOptions to create a XCUITest driver instance or UiAutomator2Options to create an UiAutomator2 driver instance. If there is no driver-specific options class for your driver then either use BaseOptions builder as the base class to define your capabilities or request driver developers to add one. Do not use DesiredCapabilities class for this purpose in W3C context.

@s-chathuranga-j
Copy link
Author

@mykola-mokhnach it would be great if you could provide a sample code with appium 8.0.0-beta

@s-chathuranga-j
Copy link
Author

Code I have written:

import io.appium.java_client.AppiumBy;
import io.appium.java_client.windows.WindowsDriver;
import io.appium.java_client.windows.options.WindowsOptions;
import org.junit.*;
import org.openqa.selenium.WebElement;

import java.net.URL;
import java.time.Duration;

public class CalculatorTest {

    private static WindowsDriver CalculatorSession = null;
    private static WebElement CalculatorResult = null;

    @BeforeClass
    public static void setup() {
        try {
            WindowsOptions options = new WindowsOptions();
            options.setApp("C:\\Windows\\System32\\notepad.exe");
            options.setNewCommandTimeout(Duration.ofSeconds(25));
            CalculatorSession = new WindowsDriver(new URL("http://127.0.0.1:4723"), options);
            CalculatorResult = CalculatorSession.findElement(AppiumBy.accessibilityId("CalculatorResults"));
            Assert.assertNotNull(CalculatorResult);

        }catch(Exception e){
            e.printStackTrace();
        } finally {
        }
    }

    @Before
    public void Clear()
    {
        CalculatorSession.findElement(AppiumBy.name("Clear")).click();
        Assert.assertEquals("0", _GetCalculatorResultText());
    }

    @AfterClass
    public static void TearDown()
    {
        CalculatorResult = null;
        if (CalculatorSession != null) {
            CalculatorSession.quit();
        }
        CalculatorSession = null;
    }

    @Test
    public void Addition()
    {
        CalculatorSession.findElement(AppiumBy.name("One")).click();
        CalculatorSession.findElement(AppiumBy.name("Plus")).click();
        CalculatorSession.findElement(AppiumBy.name("Seven")).click();
        CalculatorSession.findElement(AppiumBy.name("Equals")).click();
        Assert.assertEquals("8", _GetCalculatorResultText());
    }

    protected String _GetCalculatorResultText()
    {
        // trim extra text and whitespace off of the display value
        return CalculatorResult.getText().replace("Display is", "").trim();
    }
}

Error log:

org.openqa.selenium.SessionNotCreatedException: Could not start a new session. Response code 400. Message: Bad capabilities. Specify either app or appTopLevelWindow to create a session
Build info: version: '4.0.0', revision: '3a21814679'
System info: host: 'CHATHURANGA', ip: '192.168.8.148', os.name: 'Windows 10', os.arch: 'amd64', os.version: '10.0', java.version: '11.0.12'
Driver info: io.appium.java_client.windows.WindowsDriver
Command: [null, newSession {capabilities=[{appium:newCommandTimeout=25, platformName=Windows, appium:automationName=Windows, appium:app=C:\Windows\System32\notepad.exe}], desiredCapabilities=Capabilities {appium:app: C:\Windows\System32\notepad..., appium:automationName: Windows, appium:newCommandTimeout: 25, platformName: Windows}}]
Capabilities {}
	at org.openqa.selenium.remote.ProtocolHandshake.createSession(ProtocolHandshake.java:126)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.base/java.lang.reflect.Method.invoke(Method.java:566)
	at io.appium.java_client.remote.AppiumProtocolHandshake.createSession(AppiumProtocolHandshake.java:126)
	at io.appium.java_client.remote.AppiumProtocolHandshake.createSession(AppiumProtocolHandshake.java:102)
	at io.appium.java_client.remote.AppiumCommandExecutor.createSession(AppiumCommandExecutor.java:146)
	at io.appium.java_client.remote.AppiumCommandExecutor.execute(AppiumCommandExecutor.java:180)
	at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:559)
	at io.appium.java_client.AppiumDriver.startSession(AppiumDriver.java:225)
	at org.openqa.selenium.remote.RemoteWebDriver.<init>(RemoteWebDriver.java:168)
	at io.appium.java_client.AppiumDriver.<init>(AppiumDriver.java:79)
	at io.appium.java_client.AppiumDriver.<init>(AppiumDriver.java:87)
	at io.appium.java_client.windows.WindowsDriver.<init>(WindowsDriver.java:48)
	at CalculatorTest.setup(CalculatorTest.java:47)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.base/java.lang.reflect.Method.invoke(Method.java:566)
	at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:47)
	at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
	at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:44)
	at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:24)
	at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:27)
	at org.junit.runners.ParentRunner.run(ParentRunner.java:309)
	at org.junit.runner.JUnitCore.run(JUnitCore.java:160)
	at com.intellij.junit4.JUnit4IdeaTestRunner.startRunnerWithArgs(JUnit4IdeaTestRunner.java:69)
	at com.intellij.rt.junit.IdeaTestRunner$Repeater.startRunnerWithArgs(IdeaTestRunner.java:33)
	at com.intellij.rt.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:235)
	at com.intellij.rt.junit.JUnitStarter.main(JUnitStarter.java:54)

java.lang.NullPointerException
	at CalculatorTest.Clear(CalculatorTest.java:62)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.base/java.lang.reflect.Method.invoke(Method.java:566)
	at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:47)
	at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
	at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:44)
	at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:24)
	at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:271)
	at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:70)
	at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:50)
	at org.junit.runners.ParentRunner$3.run(ParentRunner.java:238)
	at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:63)
	at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:236)
	at org.junit.runners.ParentRunner.access$000(ParentRunner.java:53)
	at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:229)
	at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:26)
	at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:27)
	at org.junit.runners.ParentRunner.run(ParentRunner.java:309)
	at org.junit.runner.JUnitCore.run(JUnitCore.java:160)
	at com.intellij.junit4.JUnit4IdeaTestRunner.startRunnerWithArgs(JUnit4IdeaTestRunner.java:69)
	at com.intellij.rt.junit.IdeaTestRunner$Repeater.startRunnerWithArgs(IdeaTestRunner.java:33)
	at com.intellij.rt.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:235)
	at com.intellij.rt.junit.JUnitStarter.main(JUnitStarter.java:54)

WinAppDriver server log:

POST /session HTTP/1.1 Accept: */* Content-Length: 267 Content-Type: application/json; charset=utf-8 Host: 127.0.0.1:4723 User-Agent: selenium/4.0.0 (java windows) X-Idempotency-Key: 6442ea2f-05fa-4614-a956-3fef89d8e821 { "capabilities": { "firstMatch": [ { } ], "alwaysMatch": { "appium:app": "C:\\Windows\\System32\\notepad.exe", "appium:automationName": "Windows", "appium:newCommandTimeout": 25, "platformName": "windows" } } } HTTP/1.1 400 Bad Request Content-Length: 141 Content-Type: application/json {"status":100,"value":{"error":"invalid argument","message":"Bad capabilities. Specify either app or appTopLevelWindow to create a session"}}

@mykola-mokhnach
Copy link
Contributor

Could you please provide the full Appium server log?

The code to build capabilities seems to look fine. The issue is rather WinAppDriver itself, that does not understand capabilities in W3C format. We'd probably need to do some fixes there in order to understand these capabilities properly

@mykola-mokhnach
Copy link
Contributor

So I double checked that and it looks like you are trying to use java client without Appium (e.g. appium-windows-driver), but rather just directly connect to WinAppDriver. Unfortunately it won't work with version 8.0.0 because WinAppDriver does not support W3C protocol. You could follow microsoft/WinAppDriver#1610 for more updates on that

@MalpaBajpai
Copy link

Hello Team , I am trying to automated notepad using WinAppDriver however I am getting an error ,
Please have a look and let me know what wrong I am doing here
Test :-
DesiredCapabilities cap = new DesiredCapabilities();
cap.setCapability("ms:experimental-webdriver", true);
cap.setCapability("app","C:\Windows\System32\notepad.exe");
cap.setCapability("plateformName", "Windows");
cap.setCapability("deviceName", "WindowsPC");

	try {
	
		driver = new WindowsDriver(new URL("http://127.0.0.1:4723/"), cap);
	} catch (MalformedURLException e) {
		e.printStackTrace();

My WinAppDriver Error logs :-
POST /session HTTP/1.1
Accept: /
Content-Length: 351
Content-Type: application/json; charset=utf-8
Host: 127.0.0.1:4723
User-Agent: selenium/4.1.3 (java windows)
X-Idempotency-Key: 6907c17f-abdf-49d1-a562-5ebc10c15343

{
"capabilities": {
"firstMatch": [
{
}
],
"alwaysMatch": {
"appium:app": "C:\Windows\System32\notepad.exe",
"appium:automationName": "Windows",
"appium:deviceName": "WindowsPC",
"appium:plateformName": "Windows",
"ms:experimental-webdriver": true,
"platformName": "windows"
}
}
}
HTTP/1.1 400 Bad Request
Content-Length: 141
Content-Type: application/json

{"status":100,"value":{"error":"invalid argument","message":"Bad capabilities. Specify either app or appTopLevelWindow to create a session"}}

And my Junit Error log:-
org.openqa.selenium.SessionNotCreatedException: Could not start a new session. Response code 400. Message: Bad capabilities. Specify either app or appTopLevelWindow to create a session
Build info: version: '4.1.3', revision: '7b1ebf28ef'
System info: host: 'DESKTOP-G44BB0D', ip: '192.168.0.133', os.name: 'Windows 10', os.arch: 'amd64', os.version: '10.0', java.version: '14'
Driver info: io.appium.java_client.windows.WindowsDriver
Command: [null, newSession {capabilities=[{appium:app=C:\Windows\System32\notepad.exe, appium:automationName=Windows, appium:deviceName=WindowsPC, ms:experimental-webdriver=true, appium:plateformName=Windows, platformName=WINDOWS}], desiredCapabilities=Capabilities {app: C:\Windows\System32\notepad..., appium:automationName: Windows, deviceName: WindowsPC, ms:experimental-webdriver: true, plateformName: Windows, platformName: WINDOWS}}]
Capabilities {}
at org.openqa.selenium.remote.ProtocolHandshake.createSession(ProtocolHandshake.java:126)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:564)
at io.appium.java_client.remote.AppiumProtocolHandshake.createSession(AppiumProtocolHandshake.java:126)
at io.appium.java_client.remote.AppiumProtocolHandshake.createSession(AppiumProtocolHandshake.java:102)
at io.appium.java_client.remote.AppiumCommandExecutor.createSession(AppiumCommandExecutor.java:146)
at io.appium.java_client.remote.AppiumCommandExecutor.execute(AppiumCommandExecutor.java:180)
at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:567)
at io.appium.java_client.AppiumDriver.startSession(AppiumDriver.java:225)
at org.openqa.selenium.remote.RemoteWebDriver.(RemoteWebDriver.java:164)
at io.appium.java_client.AppiumDriver.(AppiumDriver.java:79)
at io.appium.java_client.AppiumDriver.(AppiumDriver.java:87)
at io.appium.java_client.windows.WindowsDriver.(WindowsDriver.java:48)
at StepDefinitions.NotepadDemo.setup(NotepadDemo.java:30)
at ✽.Launch window application(file:///C:/Users/aksha/git/CucumberSelenium/CucumberSelenium/src/test/resources/Features/NotePadDemo.feature:4)

@KazuCocoa
Copy link
Member

{
"capabilities": {
"firstMatch": [
{
}
],
"alwaysMatch": {
"appium:app": "C:\Windows\System32\notepad.exe",
"appium:automationName": "Windows",
"appium:deviceName": "WindowsPC",
"appium:plateformName": "Windows",
"ms:experimental-webdriver": true,
"platformName": "windows"
}
}
}

this format is W3C format as #1592 (comment) . Selenium v4 based client like appium client v8 sends only the W3C one, but WinAppDriver does not handle it until they support the format. One workaround is you need to use appium java client v7 for them.

@MalpaBajpai
Copy link

Thank You @KazuCocoa for your reply .
As you mentioned I with appium Java Client v7 but nothing is happening.

POM.xml:-

4.0.0
CucumberSelenium
CucumberSelenium
0.0.1-SNAPSHOT

<dependencies>
	<!-- https://mvnrepository.com/artifact/io.cucumber/cucumber-java -->
	<dependency>
		<groupId>io.cucumber</groupId>
		<artifactId>cucumber-java</artifactId>
		<version>7.2.3</version>
	</dependency>

	<!-- https://mvnrepository.com/artifact/junit/junit -->
	<dependency>
		<groupId>junit</groupId>
		<artifactId>junit</artifactId>
		<version>4.13.2</version>
		<scope>test</scope>
	</dependency>


	<!-- https://mvnrepository.com/artifact/io.cucumber/cucumber-junit -->
	<dependency>
		<groupId>io.cucumber</groupId>
		<artifactId>cucumber-junit</artifactId>
		<version>7.2.3</version>
		<scope>test</scope>
	</dependency>


	<!-- https://mvnrepository.com/artifact/org.seleniumhq.selenium/selenium-java -->
	<dependency>
		<groupId>org.seleniumhq.selenium</groupId>
		<artifactId>selenium-java</artifactId>
		<version>4.1.3</version>
	</dependency>


	<!-- https://mvnrepository.com/artifact/io.appium/java-client -->
	<dependency>
		<groupId>io.appium</groupId>
		<artifactId>java-client</artifactId>
		<version>7.6.0</version>
	</dependency>


</dependencies>

Eclipse Error :-
Scenario: Notepad Automation # src/test/resources/Features/NotePadDemo.feature:3
Given Launch window application # StepDefinitions.NotepadDemo.setup()
java.lang.NoClassDefFoundError: org/openqa/selenium/remote/internal/JsonToWebElementConverter
at StepDefinitions.NotepadDemo.setup(NotepadDemo.java:33)
at ✽.Launch window application(file:///C:/Users/aksha/git/CucumberSelenium/CucumberSelenium/src/test/resources/Features/NotePadDemo.feature:4)
Caused by: java.lang.ClassNotFoundException: org.openqa.selenium.remote.internal.JsonToWebElementConverter
at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:602)
at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:178)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:522)
at StepDefinitions.NotepadDemo.setup(NotepadDemo.java:33)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:564)
at io.cucumber.java.Invoker.doInvoke(Invoker.java:66)
at io.cucumber.java.Invoker.invoke(Invoker.java:24)
at io.cucumber.java.AbstractGlueDefinition.invokeMethod(AbstractGlueDefinition.java:47)
at io.cucumber.java.JavaStepDefinition.execute(JavaStepDefinition.java:29)
at io.cucumber.core.runner.CoreStepDefinition.execute(CoreStepDefinition.java:66)
at io.cucumber.core.runner.PickleStepDefinitionMatch.runStep(PickleStepDefinitionMatch.java:63)
at io.cucumber.core.runner.ExecutionMode$1.execute(ExecutionMode.java:10)
at io.cucumber.core.runner.TestStep.executeStep(TestStep.java:86)
at io.cucumber.core.runner.TestStep.run(TestStep.java:57)
at io.cucumber.core.runner.PickleStepTestStep.run(PickleStepTestStep.java:51)
at io.cucumber.core.runner.TestCase.run(TestCase.java:95)
at io.cucumber.core.runner.Runner.runPickle(Runner.java:75)
at io.cucumber.junit.PickleRunners$NoStepDescriptions.lambda$run$0(PickleRunners.java:151)
at io.cucumber.core.runtime.CucumberExecutionContext.lambda$runTestCase$3(CucumberExecutionContext.java:151)
at io.cucumber.core.runtime.RethrowingThrowableCollector.executeAndThrow(RethrowingThrowableCollector.java:23)
at io.cucumber.core.runtime.CucumberExecutionContext.runTestCase(CucumberExecutionContext.java:151)
at io.cucumber.junit.PickleRunners$NoStepDescriptions.run(PickleRunners.java:148)
at io.cucumber.junit.FeatureRunner.runChild(FeatureRunner.java:144)
at io.cucumber.junit.FeatureRunner.runChild(FeatureRunner.java:28)
at org.junit.runners.ParentRunner$4.run(ParentRunner.java:331)
at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:79)
at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:329)
at org.junit.runners.ParentRunner.access$100(ParentRunner.java:66)
at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:293)
at org.junit.runners.ParentRunner$3.evaluate(ParentRunner.java:306)
at org.junit.runners.ParentRunner.run(ParentRunner.java:413)
at io.cucumber.junit.FeatureRunner.run(FeatureRunner.java:137)
at io.cucumber.junit.Cucumber.runChild(Cucumber.java:196)
at io.cucumber.junit.Cucumber.runChild(Cucumber.java:89)
at org.junit.runners.ParentRunner$4.run(ParentRunner.java:331)
at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:79)
at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:329)
at org.junit.runners.ParentRunner.access$100(ParentRunner.java:66)
at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:293)
at io.cucumber.junit.Cucumber$RunBeforeAllHooks.evaluate(Cucumber.java:266)
at io.cucumber.junit.Cucumber$RunAfterAllHooks.evaluate(Cucumber.java:281)
at io.cucumber.junit.Cucumber$StartTestRun.evaluate(Cucumber.java:233)
at io.cucumber.junit.Cucumber$FinishTestRun.evaluate(Cucumber.java:248)
at org.junit.runners.ParentRunner$3.evaluate(ParentRunner.java:306)
at org.junit.runners.ParentRunner.run(ParentRunner.java:413)
at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:93)
at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:40)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:529)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:756)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:452)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:210)

And user is on WinApp # StepDefinitions.NotepadDemo.launchApplication()
When Enter time and date into notepad # StepDefinitions.NotepadDemo.enterText()
Then user closes the application
?????????????????????????????????????????????????????????????????????????????????????
? Share your Cucumber Report with your team at https://reports.cucumber.io ?
? Activate publishing with one of the following: ?
? ?
? src/test/resources/cucumber.properties: cucumber.publish.enabled=true ?
? src/test/resources/junit-platform.properties: cucumber.publish.enabled=true ?
? Environment variable: CUCUMBER_PUBLISH_ENABLED=true ?
? JUnit: @CucumberOptions(publish = true) ?
? ?
? More information at https://cucumber.io/docs/cucumber/environment-variables/ ?
? ?
? Disable this message with one of the following: ?
? ?
? src/test/resources/cucumber.properties: cucumber.publish.quiet=true ?
? src/test/resources/junit-platform.properties: cucumber.publish.quiet=true ?
?????????????????????????????????????????????????????????????????????????????????????
WinAppDriver is not showing any log :-
Windows Application Driver listening for requests at: http://127.0.0.1:4723/
Press ENTER to exit.

Could you please check once and let me know what wrong am I doing

@MalpaBajpai
Copy link

@mykola-mokhnach it would be great if you could provide a sample code with appium 8.0.0-beta

@mykola-mokhnach My code is running fine with Selenium version 3 and Appium java client V7 could you please provide sample code for appium v8 and selenium v4 ?

@KazuCocoa
Copy link
Member

The WinAppDriver requires selenium v3 based client for now since Selenium v4 requires W3C spec protocol that is not supported by WinAppDriver yet.

@MalpaBajpai
Copy link

@KazuCocoa Thank You for your response
Much appreciated 😊

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

No branches or pull requests

4 participants