Closed Hdddd25 closed 11 months ago
I keep getting server issues on that
Perhaps: https://github.com/appium/appium-windows-driver?tab=readme-ov-file#windows-clickanddrag https://github.com/appium/appium-windows-driver/blob/4da8b11eb058ef8ab97ec2ef0571df71e66116b2/test/e2e/commands/winapi-e2e-specs.js#L141 ?
If you'd like to see windows:
syntax command itself, https://appium.io/docs/en/2.1/guides/execute-methods/ may help
RemoteWebElement destination = (RemoteWebElement) windowsDriver.get().findElement(By.name("QCOE-Hakan")); RemoteWebElement source = (RemoteWebElement) windowsDriver.get().findElement(By.name("RDP Server")); String startElementId=source.getId(); String endElementId=destination.getId(); Point sourceLocation = source.getLocation(); int endX = sourceLocation.getX(); int endY = sourceLocation.getY(); Point sourcem = destination.getLocation(); int endXx = sourcem.getX(); int endYy = sourcem.getY(); Map<String, Object> params = new HashMap<>(); params.put("startX", endX); params.put("startY", endY); params.put("endX", endXx); params.put("endY", endYy); params.put("startElementId",startElementId); params.put("endElementId",endElementId); windowsDriver.get().executeScript("windows: clickAndDrag", params);
here is the code and issue I see is org.openqa.selenium.WebDriverException: An unknown server-side error occurred while processing the command. Original error: Cannot read properties of null (reading 'match') can I please get some help on that
I probably can check that if you provide a proper server log
Thanks . Here are the logs I am trying on one of my desktop apps to make a poc on it . Thanks . Here are the logs "C:\Program Files\Java\jdk-19\bin\java.exe" -ea -Didea.test.cyclic.buffer.size=1048576 "-javaagent:C:\Program Files\JetBrains\IntelliJ IDEA Community Edition 2022.2.3\lib\idea_rt.jar=58931:C:\Program Files\JetBrains\IntelliJ IDEA Community Edition 2022.2.3\bin" -Dfile.encoding=UTF-8 -Dsun.stdout.encoding=UTF-8 -Dsun.stderr.encoding=UTF-8 -classpath "C:\Program Files\JetBrains\IntelliJ IDEA Community Edition 2022.2.3\lib\idea_rt.jar;C:\Program Files\JetBrains\IntelliJ IDEA Community Edition 2022.2.3\plugins\testng\lib\testng-rt.jar;C:\Users\Jamie.Pont\OneDrive - insightsoftware\Desktop\QCOE FRAMEWORKS\Java\isw_testautomation_java\target\test-classes;C:\Users\Jamie.Pont\OneDrive - insightsoftware\Desktop\QCOE FRAMEWORKS\Java\isw_testautomation_java\target\classes;C:\Users\Jamie.Pont.m2\repository\ch\qos\logback\logback-classic\1.4.11\logback-classic-1.4.11.jar;C:\Users\Jamie.Pont.m2\repository\ch\qos\logback\logback-core\1.4.11\logback-core-1.4.11.jar;C:\Users\Jamie.Pont.m2\repository\org\slf4j\slf4j-api\2.0.7\slf4j-api-2.0.7.jar;C:\Users\Jamie.Pont.m2\repository\org\seleniumhq\selenium\selenium-java\4.11.0\selenium-java-4.11.0.jar;C:\Users\Jamie.Pont.m2\repository\org\seleniumhq\selenium\selenium-api\4.11.0\selenium-api-4.11.0.jar;C:\Users\Jamie.Pont.m2\repository\org\seleniumhq\selenium\selenium-chrome-driver\4.11.0\selenium-chrome-driver-4.11.0.jar;C:\Users\Jamie.Pont.m2\repository\com\google\auto\service\auto-service-annotations\1.0.1\auto-service-annotations-1.0.1.jar;C:\Users\Jamie.Pont.m2\repository\org\seleniumhq\selenium\selenium-chromium-driver\4.11.0\selenium-chromium-driver-4.11.0.jar;C:\Users\Jamie.Pont.m2\repository\org\seleniumhq\selenium\selenium-json\4.11.0\selenium-json-4.11.0.jar;C:\Users\Jamie.Pont.m2\repository\org\seleniumhq\selenium\selenium-manager\4.11.0\selenium-manager-4.11.0.jar;C:\Users\Jamie.Pont.m2\repository\org\seleniumhq\selenium\selenium-devtools-v113\4.11.0\selenium-devtools-v113-4.11.0.jar;C:\Users\Jamie.Pont.m2\repository\org\seleniumhq\selenium\selenium-devtools-v114\4.11.0\selenium-devtools-v114-4.11.0.jar;C:\Users\Jamie.Pont.m2\repository\org\seleniumhq\selenium\selenium-devtools-v115\4.11.0\selenium-devtools-v115-4.11.0.jar;C:\Users\Jamie.Pont.m2\repository\org\seleniumhq\selenium\selenium-devtools-v85\4.11.0\selenium-devtools-v85-4.11.0.jar;C:\Users\Jamie.Pont.m2\repository\org\seleniumhq\selenium\selenium-edge-driver\4.11.0\selenium-edge-driver-4.11.0.jar;C:\Users\Jamie.Pont.m2\repository\org\seleniumhq\selenium\selenium-firefox-driver\4.11.0\selenium-firefox-driver-4.11.0.jar;C:\Users\Jamie.Pont.m2\repository\org\seleniumhq\selenium\selenium-http\4.11.0\selenium-http-4.11.0.jar;C:\Users\Jamie.Pont.m2\repository\dev\failsafe\failsafe\3.3.1\failsafe-3.3.1.jar;C:\Users\Jamie.Pont.m2\repository\org\seleniumhq\selenium\selenium-ie-driver\4.11.0\selenium-ie-driver-4.11.0.jar;C:\Users\Jamie.Pont.m2\repository\org\seleniumhq\selenium\selenium-remote-driver\4.11.0\selenium-remote-driver-4.11.0.jar;C:\Users\Jamie.Pont.m2\repository\io\netty\netty-buffer\4.1.92.Final\netty-buffer-4.1.92.Final.jar;C:\Users\Jamie.Pont.m2\repository\io\netty\netty-codec-http\4.1.92.Final\netty-codec-http-4.1.92.Final.jar;C:\Users\Jamie.Pont.m2\repository\io\netty\netty-codec\4.1.92.Final\netty-codec-4.1.92.Final.jar;C:\Users\Jamie.Pont.m2\repository\io\netty\netty-handler\4.1.92.Final\netty-handler-4.1.92.Final.jar;C:\Users\Jamie.Pont.m2\repository\io\netty\netty-common\4.1.92.Final\netty-common-4.1.92.Final.jar;C:\Users\Jamie.Pont.m2\repository\io\netty\netty-transport-classes-epoll\4.1.92.Final\netty-transport-classes-epoll-4.1.92.Final.jar;C:\Users\Jamie.Pont.m2\repository\io\netty\netty-transport-classes-kqueue\4.1.92.Final\netty-transport-classes-kqueue-4.1.92.Final.jar;C:\Users\Jamie.Pont.m2\repository\io\netty\netty-transport-native-epoll\4.1.92.Final\netty-transport-native-epoll-4.1.92.Final.jar;C:\Users\Jamie.Pont.m2\repository\io\netty\netty-transport-native-kqueue\4.1.92.Final\netty-transport-native-kqueue-4.1.92.Final.jar;C:\Users\Jamie.Pont.m2\repository\io\netty\netty-transport-native-unix-common\4.1.92.Final\netty-transport-native-unix-common-4.1.92.Final.jar;C:\Users\Jamie.Pont.m2\repository\io\netty\netty-transport\4.1.92.Final\netty-transport-4.1.92.Final.jar;C:\Users\Jamie.Pont.m2\repository\io\netty\netty-resolver\4.1.92.Final\netty-resolver-4.1.92.Final.jar;C:\Users\Jamie.Pont.m2\repository\io\opentelemetry\opentelemetry-api\1.26.0\opentelemetry-api-1.26.0.jar;C:\Users\Jamie.Pont.m2\repository\io\opentelemetry\opentelemetry-context\1.26.0\opentelemetry-context-1.26.0.jar;C:\Users\Jamie.Pont.m2\repository\io\opentelemetry\opentelemetry-exporter-logging\1.26.0\opentelemetry-exporter-logging-1.26.0.jar;C:\Users\Jamie.Pont.m2\repository\io\opentelemetry\opentelemetry-sdk-metrics\1.26.0\opentelemetry-sdk-metrics-1.26.0.jar;C:\Users\Jamie.Pont.m2\repository\io\opentelemetry\opentelemetry-extension-incubator\1.26.0-alpha\opentelemetry-extension-incubator-1.26.0-alpha.jar;C:\Users\Jamie.Pont.m2\repository\io\opentelemetry\opentelemetry-sdk-logs\1.26.0-alpha\opentelemetry-sdk-logs-1.26.0-alpha.jar;C:\Users\Jamie.Pont.m2\repository\io\opentelemetry\opentelemetry-api-logs\1.26.0-alpha\opentelemetry-api-logs-1.26.0-alpha.jar;C:\Users\Jamie.Pont.m2\repository\io\opentelemetry\opentelemetry-api-events\1.26.0-alpha\opentelemetry-api-events-1.26.0-alpha.jar;C:\Users\Jamie.Pont.m2\repository\io\opentelemetry\opentelemetry-sdk-common\1.26.0\opentelemetry-sdk-common-1.26.0.jar;C:\Users\Jamie.Pont.m2\repository\io\opentelemetry\opentelemetry-sdk-extension-autoconfigure-spi\1.26.0\opentelemetry-sdk-extension-autoconfigure-spi-1.26.0.jar;C:\Users\Jamie.Pont.m2\repository\io\opentelemetry\opentelemetry-sdk-extension-autoconfigure\1.26.0-alpha\opentelemetry-sdk-extension-autoconfigure-1.26.0-alpha.jar;C:\Users\Jamie.Pont.m2\repository\io\opentelemetry\opentelemetry-sdk-trace\1.26.0\opentelemetry-sdk-trace-1.26.0.jar;C:\Users\Jamie.Pont.m2\repository\io\opentelemetry\opentelemetry-sdk\1.26.0\opentelemetry-sdk-1.26.0.jar;C:\Users\Jamie.Pont.m2\repository\io\opentelemetry\opentelemetry-semconv\1.26.0-alpha\opentelemetry-semconv-1.26.0-alpha.jar;C:\Users\Jamie.Pont.m2\repository\net\bytebuddy\byte-buddy\1.14.4\byte-buddy-1.14.4.jar;C:\Users\Jamie.Pont.m2\repository\org\asynchttpclient\async-http-client\2.12.3\async-http-client-2.12.3.jar;C:\Users\Jamie.Pont.m2\repository\org\asynchttpclient\async-http-client-netty-utils\2.12.3\async-http-client-netty-utils-2.12.3.jar;C:\Users\Jamie.Pont.m2\repository\io\netty\netty-codec-socks\4.1.60.Final\netty-codec-socks-4.1.60.Final.jar;C:\Users\Jamie.Pont.m2\repository\io\netty\netty-handler-proxy\4.1.60.Final\netty-handler-proxy-4.1.60.Final.jar;C:\Users\Jamie.Pont.m2\repository\io\netty\netty-transport-native-epoll\4.1.60.Final\netty-transport-native-epoll-4.1.60.Final-linux-x86_64.jar;C:\Users\Jamie.Pont.m2\repository\io\netty\netty-transport-native-kqueue\4.1.60.Final\netty-transport-native-kqueue-4.1.60.Final-osx-x86_64.jar;C:\Users\Jamie.Pont.m2\repository\com\typesafe\netty\netty-reactive-streams\2.0.4\netty-reactive-streams-2.0.4.jar;C:\Users\Jamie.Pont.m2\repository\com\sun\activation\jakarta.activation\1.2.2\jakarta.activation-1.2.2.jar;C:\Users\Jamie.Pont.m2\repository\org\seleniumhq\selenium\selenium-safari-driver\4.11.0\selenium-safari-driver-4.11.0.jar;C:\Users\Jamie.Pont.m2\repository\org\seleniumhq\selenium\selenium-support\4.11.0\selenium-support-4.11.0.jar;C:\Users\Jamie.Pont.m2\repository\io\github\bonigarcia\webdrivermanager\5.5.3\webdrivermanager-5.5.3.jar;C:\Users\Jamie.Pont.m2\repository\com\google\code\gson\gson\2.10.1\gson-2.10.1.jar;C:\Users\Jamie.Pont.m2\repository\com\github\docker-java\docker-java\3.3.3\docker-java-3.3.3.jar;C:\Users\Jamie.Pont.m2\repository\com\github\docker-java\docker-java-core\3.3.3\docker-java-core-3.3.3.jar;C:\Users\Jamie.Pont.m2\repository\com\github\docker-java\docker-java-api\3.3.3\docker-java-api-3.3.3.jar;C:\Users\Jamie.Pont.m2\repository\com\fasterxml\jackson\core\jackson-annotations\2.10.3\jackson-annotations-2.10.3.jar;C:\Users\Jamie.Pont.m2\repository\org\apache\commons\commons-compress\1.21\commons-compress-1.21.jar;C:\Users\Jamie.Pont.m2\repository\com\fasterxml\jackson\core\jackson-databind\2.10.3\jackson-databind-2.10.3.jar;C:\Users\Jamie.Pont.m2\repository\com\fasterxml\jackson\core\jackson-core\2.10.3\jackson-core-2.10.3.jar;C:\Users\Jamie.Pont.m2\repository\org\bouncycastle\bcpkix-jdk18on\1.75\bcpkix-jdk18on-1.75.jar;C:\Users\Jamie.Pont.m2\repository\org\bouncycastle\bcprov-jdk18on\1.75\bcprov-jdk18on-1.75.jar;C:\Users\Jamie.Pont.m2\repository\org\bouncycastle\bcutil-jdk18on\1.75\bcutil-jdk18on-1.75.jar;C:\Users\Jamie.Pont.m2\repository\org\slf4j\jcl-over-slf4j\1.7.30\jcl-over-slf4j-1.7.30.jar;C:\Users\Jamie.Pont.m2\repository\com\github\docker-java\docker-java-transport-httpclient5\3.3.3\docker-java-transport-httpclient5-3.3.3.jar;C:\Users\Jamie.Pont.m2\repository\com\github\docker-java\docker-java-transport\3.3.3\docker-java-transport-3.3.3.jar;C:\Users\Jamie.Pont.m2\repository\org\brotli\dec\0.1.2\dec-0.1.2.jar;C:\Users\Jamie.Pont.m2\repository\org\apache\httpcomponents\client5\httpclient5\5.2.1\httpclient5-5.2.1.jar;C:\Users\Jamie.Pont.m2\repository\org\apache\httpcomponents\core5\httpcore5\5.2\httpcore5-5.2.jar;C:\Users\Jamie.Pont.m2\repository\org\apache\httpcomponents\core5\httpcore5-h2\5.2\httpcore5-h2-5.2.jar;C:\Users\Jamie.Pont.m2\repository\io\appium\java-client\8.5.1\java-client-8.5.1.jar;C:\Users\Jamie.Pont.m2\repository\commons-validator\commons-validator\1.7\commons-validator-1.7.jar;C:\Users\Jamie.Pont.m2\repository\commons-beanutils\commons-beanutils\1.9.4\commons-beanutils-1.9.4.jar;C:\Users\Jamie.Pont.m2\repository\commons-digester\commons-digester\2.1\commons-digester-2.1.jar;C:\Users\Jamie.Pont.m2\repository\commons-logging\commons-logging\1.2\commons-logging-1.2.jar;C:\Users\Jamie.Pont.m2\repository\commons-collections\commons-collections\3.2.2\commons-collections-3.2.2.jar;C:\Users\Jamie.Pont.m2\repository\commons-io\commons-io\2.12.0\commons-io-2.12.0.jar;C:\Users\Jamie.Pont.m2\repository\com\typesafe\config\1.4.2\config-1.4.2.jar;C:\Users\Jamie.Pont.m2\repository\com\google\guava\guava\31.1-jre\guava-31.1-jre.jar;C:\Users\Jamie.Pont.m2\repository\com\google\guava\failureaccess\1.0.1\failureaccess-1.0.1.jar;C:\Users\Jamie.Pont.m2\repository\com\google\guava\listenablefuture\9999.0-empty-to-avoid-conflict-with-guava\listenablefuture-9999.0-empty-to-avoid-conflict-with-guava.jar;C:\Users\Jamie.Pont.m2\repository\com\google\code\findbugs\jsr305\3.0.2\jsr305-3.0.2.jar;C:\Users\Jamie.Pont.m2\repository\org\checkerframework\checker-qual\3.12.0\checker-qual-3.12.0.jar;C:\Users\Jamie.Pont.m2\repository\com\google\errorprone\error_prone_annotations\2.11.0\error_prone_annotations-2.11.0.jar;C:\Users\Jamie.Pont.m2\repository\com\google\j2objc\j2objc-annotations\1.3\j2objc-annotations-1.3.jar;C:\Users\Jamie.Pont.m2\repository\io\rest-assured\rest-assured\5.3.0\rest-assured-5.3.0.jar;C:\Users\Jamie.Pont.m2\repository\org\apache\groovy\groovy\4.0.6\groovy-4.0.6.jar;C:\Users\Jamie.Pont.m2\repository\org\apache\groovy\groovy-xml\4.0.6\groovy-xml-4.0.6.jar;C:\Users\Jamie.Pont.m2\repository\org\apache\httpcomponents\httpclient\4.5.13\httpclient-4.5.13.jar;C:\Users\Jamie.Pont.m2\repository\org\apache\httpcomponents\httpcore\4.4.13\httpcore-4.4.13.jar;C:\Users\Jamie.Pont.m2\repository\org\apache\httpcomponents\httpmime\4.5.13\httpmime-4.5.13.jar;C:\Users\Jamie.Pont.m2\repository\org\hamcrest\hamcrest\2.1\hamcrest-2.1.jar;C:\Users\Jamie.Pont.m2\repository\org\ccil\cowan\tagsoup\tagsoup\1.2.1\tagsoup-1.2.1.jar;C:\Users\Jamie.Pont.m2\repository\io\rest-assured\json-path\5.3.0\json-path-5.3.0.jar;C:\Users\Jamie.Pont.m2\repository\org\apache\groovy\groovy-json\4.0.6\groovy-json-4.0.6.jar;C:\Users\Jamie.Pont.m2\repository\io\rest-assured\rest-assured-common\5.3.0\rest-assured-common-5.3.0.jar;C:\Users\Jamie.Pont.m2\repository\io\rest-assured\xml-path\5.3.0\xml-path-5.3.0.jar;C:\Users\Jamie.Pont.m2\repository\org\testng\testng\7.7.1\testng-7.7.1.jar;C:\Users\Jamie.Pont.m2\repository\com\beust\jcommander\1.82\jcommander-1.82.jar;C:\Users\Jamie.Pont.m2\repository\org\webjars\jquery\3.6.1\jquery-3.6.1.jar;C:\Users\Jamie.Pont.m2\repository\org\apache\commons\commons-lang3\3.12.0\commons-lang3-3.12.0.jar;C:\Users\Jamie.Pont.m2\repository\com\aventstack\extentreports\5.0.9\extentreports-5.0.9.jar;C:\Users\Jamie.Pont.m2\repository\io\reactivex\rxjava3\rxjava\3.0.4\rxjava-3.0.4.jar;C:\Users\Jamie.Pont.m2\repository\org\reactivestreams\reactive-streams\1.0.3\reactive-streams-1.0.3.jar;C:\Users\Jamie.Pont.m2\repository\org\freemarker\freemarker\2.3.30\freemarker-2.3.30.jar;C:\Users\Jamie.Pont.m2\repository\org\projectlombok\lombok\1.18.12\lombok-1.18.12.jar;C:\Users\Jamie.Pont.m2\repository\org\apache\poi\poi\5.2.3\poi-5.2.3.jar;C:\Users\Jamie.Pont.m2\repository\commons-codec\commons-codec\1.15\commons-codec-1.15.jar;C:\Users\Jamie.Pont.m2\repository\org\apache\commons\commons-collections4\4.4\commons-collections4-4.4.jar;C:\Users\Jamie.Pont.m2\repository\org\apache\commons\commons-math3\3.6.1\commons-math3-3.6.1.jar;C:\Users\Jamie.Pont.m2\repository\com\zaxxer\SparseBitSet\1.2\SparseBitSet-1.2.jar;C:\Users\Jamie.Pont.m2\repository\org\apache\logging\log4j\log4j-api\2.18.0\log4j-api-2.18.0.jar;C:\Users\Jamie.Pont.m2\repository\org\glassfish\jakarta.json\2.0.1\jakarta.json-2.0.1.jar;C:\Users\Jamie.Pont.m2\repository\app\getxray\xray-testng-extensions\0.2.0-beta\xray-testng-extensions-0.2.0-beta.jar;C:\Users\Jamie.Pont.m2\repository\com\googlecode\json-simple\json-simple\1.1.1\json-simple-1.1.1.jar;C:\Users\Jamie.Pont.m2\repository\junit\junit\4.10\junit-4.10.jar;C:\Users\Jamie.Pont.m2\repository\org\hamcrest\hamcrest-core\1.1\hamcrest-core-1.1.jar;C:\Users\Jamie.Pont.m2\repository\net\java\dev\jna\jna\5.13.0\jna-5.13.0.jar;C:\Users\Jamie.Pont.m2\repository\net\java\dev\jna\jna-platform\5.13.0\jna-platform-5.13.0.jar;C:\Users\Jamie.Pont.m2\repository\com\sikulix\sikulixapi\2.0.4\sikulixapi-2.0.4.jar;C:\Users\Jamie.Pont.m2\repository\com\sikulix\sikulix2tigervnc\1.1.4\sikulix2tigervnc-1.1.4.jar;C:\Users\Jamie.Pont.m2\repository\commons-cli\commons-cli\1.4\commons-cli-1.4.jar;C:\Users\Jamie.Pont.m2\repository\org\apache\commons\commons-exec\1.3\commons-exec-1.3.jar;C:\Users\Jamie.Pont.m2\repository\net\oneandone\reflections8\reflections8\0.11.6\reflections8-0.11.6.jar;C:\Users\Jamie.Pont.m2\repository\org\javassist\javassist\3.22.0-GA\javassist-3.22.0-GA.jar;C:\Users\Jamie.Pont.m2\repository\net\sourceforge\tess4j\tess4j\4.4.1\tess4j-4.4.1.jar;C:\Users\Jamie.Pont.m2\repository\com\github\jai-imageio\jai-imageio-core\1.4.0\jai-imageio-core-1.4.0.jar;C:\Users\Jamie.Pont.m2\repository\org\ghost4j\ghost4j\1.0.1\ghost4j-1.0.1.jar;C:\Users\Jamie.Pont.m2\repository\log4j\log4j\1.2.17\log4j-1.2.17.jar;C:\Users\Jamie.Pont.m2\repository\org\apache\xmlgraphics\xmlgraphics-commons\1.4\xmlgraphics-commons-1.4.jar;C:\Users\Jamie.Pont.m2\repository\com\lowagie\itext\2.1.7\itext-2.1.7.jar;C:\Users\Jamie.Pont.m2\repository\org\apache\pdfbox\pdfbox\2.0.17\pdfbox-2.0.17.jar;C:\Users\Jamie.Pont.m2\repository\org\apache\pdfbox\fontbox\2.0.17\fontbox-2.0.17.jar;C:\Users\Jamie.Pont.m2\repository\org\apache\pdfbox\pdfbox-tools\2.0.17\pdfbox-tools-2.0.17.jar;C:\Users\Jamie.Pont.m2\repository\org\apache\pdfbox\pdfbox-debugger\2.0.17\pdfbox-debugger-2.0.17.jar;C:\Users\Jamie.Pont.m2\repository\org\apache\pdfbox\jbig2-imageio\3.0.2\jbig2-imageio-3.0.2.jar;C:\Users\Jamie.Pont.m2\repository\net\sourceforge\lept4j\lept4j\1.12.3\lept4j-1.12.3.jar;C:\Users\Jamie.Pont.m2\repository\org\jboss\jboss-vfs\3.2.14.Final\jboss-vfs-3.2.14.Final.jar;C:\Users\Jamie.Pont.m2\repository\org\jboss\logging\jboss-logging\3.1.4.GA\jboss-logging-3.1.4.GA.jar;C:\Users\Jamie.Pont.m2\repository\org\slf4j\jul-to-slf4j\1.7.28\jul-to-slf4j-1.7.28.jar;C:\Users\Jamie.Pont.m2\repository\org\slf4j\log4j-over-slf4j\1.7.28\log4j-over-slf4j-1.7.28.jar;C:\Users\Jamie.Pont.m2\repository\org\slf4j\slf4j-nop\1.7.28\slf4j-nop-1.7.28.jar" com.intellij.rt.testng.RemoteTestNGStarter -usedefaultlisteners false -socket58930 @w@C:\Users\Jamie.Pont\AppData\Local\Temp\idea_working_dirs_testng.tmp -temp C:\Users\Jamie.Pont\AppData\Local\Temp\idea_testng.tmp 11:46:20.180 [main] DEBUG org.testng.TestNG -- suiteXmlPath: "C:\Users\Jamie.Pont\AppData\Local\JetBrains\IdeaIC2022.2\temp-testng-customsuite.xml" 11:46:20.491 [main] INFO org.testng.internal.Utils -- [TestNG] Running: C:\Users\Jamie.Pont\AppData\Local\JetBrains\IdeaIC2022.2\temp-testng-customsuite.xml
11:46:21.032 [main] INFO io.github.bonigarcia.wdm.WebDriverManager -- Using chromedriver 117.0.5938.149 (resolved driver for Chrome 117) 11:46:21.243 [main] INFO io.github.bonigarcia.wdm.WebDriverManager -- Exporting webdriver.chrome.driver as C:\TestAutomation\Logs\chromedriver\win64\117.0.5938.149\chromedriver.exe 11:46:21.520 [main] INFO org.isw.myapp.WinTest_3 -- Code to be executed before each class 11:46:22.531 [main] INFO org.isw.myapp.WinTest_3 -- Cleanup [Appium] Welcome to Appium v2.0.1 (REV 314ca96f87ce848416f83b08afa68a744805de5b) [Appium] Non-default server args: [Appium] { loglevel: 'info' } [Appium] Attempting to load driver windows... [Appium] Appium REST http interface listener started on http://0.0.0.0:4723 [Appium] You can provide the following URLS in your client code to connect to this server: [Appium] http://10.0.0.219:4723/ [Appium] http://127.0.0.1:4723/ (only accessible from the same host) [Appium] Available drivers: [Appium] - windows@2.7.3 (automationName 'Windows') [Appium] No plugins have been installed. Use the "appium plugin" command to install the one(s) you want to use. [HTTP] --> GET /status [HTTP] {} [HTTP] <-- GET /status 200 4 ms - 128 [HTTP] [HTTP] --> POST /session [HTTP] {"capabilities":{"firstMatch":[{}],"alwaysMatch":{"appium:app":"C:\Users\Jamie.Pont\OneDrive - insightsoftware\Desktop\mRemoteNG-Portable-1.76.20.24669\mRemoteNG.exe","appium:automationName":"windows","appium:createSessionTimeout":45000,"appium:newCommandTimeout":120,"appium:platformVersion":"10","ms:experimental-webdriver":true,"ms:waitForAppLaunch":10,"platformName":"windows"}}} [Appium] Attempting to find matching driver for automationName 'windows' and platformName 'windows' [Appium] The 'windows' driver was installed and matched caps. [Appium] Will require it at C:\Users\Jamie.Pont.appium\node_modules\appium-windows-driver [AppiumDriver@6a9c] Appium v2.0.1 creating new WindowsDriver (v2.7.3) session [AppiumDriver@6a9c] Checking BaseDriver versions for Appium and WindowsDriver [AppiumDriver@6a9c] Appium's BaseDriver version is 9.3.20 [AppiumDriver@6a9c] WindowsDriver's BaseDriver version is 9.3.20 [WindowsDriver@e5e6 (385b9195)] Session created with session id: 385b9195-d394-4338-b78e-a6d3945106e4 [WindowsDriver@e5e6 (385b9195)] Spawning 'C:\Program Files (x86)\Windows Application Driver\WinAppDriver.exe' with args: ["4724/wd/hub"] [WindowsDriver@e5e6 (385b9195)] connect ECONNREFUSED 127.0.0.1:4724 [WindowsDriver@e5e6 (385b9195)] Determined the downstream protocol as 'MJSONWP' [AppiumDriver@6a9c] New WindowsDriver session created successfully, session 385b9195-d394-4338-b78e-a6d3945106e4 added to master session list [HTTP] <-- POST /session 200 11543 ms - 382 [HTTP] 11:46:43.302 [main] INFO org.isw.myapp.WinTest_3 -- Initializing Driver [HTTP] --> POST /session/385b9195-d394-4338-b78e-a6d3945106e4/element [HTTP] {"using":"name","value":"QCOE-Jamie.Pont"} [HTTP] <-- POST /session/385b9195-d394-4338-b78e-a6d3945106e4/element 200 778 ms - 95 [HTTP] [HTTP] --> POST /session/385b9195-d394-4338-b78e-a6d3945106e4/element [HTTP] {"using":"name","value":"RDP Server"} [HTTP] <-- POST /session/385b9195-d394-4338-b78e-a6d3945106e4/element 200 736 ms - 95 [HTTP] [HTTP] --> GET /session/385b9195-d394-4338-b78e-a6d3945106e4/element/42.22286056.4.4/rect [HTTP] {} [HTTP] <-- GET /session/385b9195-d394-4338-b78e-a6d3945106e4/element/42.22286056.4.4/rect 200 33 ms - 49 [HTTP] [HTTP] --> GET /session/385b9195-d394-4338-b78e-a6d3945106e4/element/42.22286056.4.2/rect [HTTP] {} [HTTP] <-- GET /session/385b9195-d394-4338-b78e-a6d3945106e4/element/42.22286056.4.2/rect 200 21 ms - 49 [HTTP] [HTTP] --> POST /session/385b9195-d394-4338-b78e-a6d3945106e4/execute/sync [HTTP] {"script":"windows: clickAndDrag","args":[{"endY":236,"endX":1,"modifierKeys":"[ctrl]","endElementId":"42.22286056.4.2","startY":287,"startX":1,"startElementId":"42.22286056.4.4"}]} [WindowsDriver@e5e6 (385b9195)] Executing extension command 'windows: clickAndDrag' [HTTP] <-- POST /session/385b9195-d394-4338-b78e-a6d3945106e4/execute/sync 400 32 ms - 2469 [HTTP]
org.openqa.selenium.InvalidArgumentException: Modifier key name '[ctrl]' is unknown. Supported key names are: shift,ctrl,alt,win Build info: version: '4.11.0', revision: '040bc5406b' System info: os.name: 'Windows 11', os.arch: 'amd64', os.version: '10.0', java.version: '19' Driver info: io.appium.java_client.windows.WindowsDriver Command: [385b9195-d394-4338-b78e-a6d3945106e4, executeScript {script=windows: clickAndDrag, args=[{endY=236, endX=1, modifierKeys=[ctrl], endElementId=42.22286056.4.2, startY=287, startX=1, startElementId=42.22286056.4.4}]}] Capabilities {appium:app: C:\Users\Jamie.Pont\OneDri..., appium:automationName: windows, appium:createSessionTimeout: 45000, appium:newCommandTimeout: 120, appium:platformVersion: 10, ms:experimental-webdriver: true, ms:waitForAppLaunch: 10, platformName: windows} Session ID: 385b9195-d394-4338-b78e-a6d3945106e4
at java.base/jdk.internal.reflect.DirectConstructorHandleAccessor.newInstance(DirectConstructorHandleAccessor.java:67)
at java.base/java.lang.reflect.Constructor.newInstanceWithCaller(Constructor.java:500)
at java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:484)
at org.openqa.selenium.remote.codec.w3c.W3CHttpResponseCodec.createException(W3CHttpResponseCodec.java:200)
at org.openqa.selenium.remote.codec.w3c.W3CHttpResponseCodec.decode(W3CHttpResponseCodec.java:133)
at org.openqa.selenium.remote.codec.w3c.W3CHttpResponseCodec.decode(W3CHttpResponseCodec.java:52)
at org.openqa.selenium.remote.HttpCommandExecutor.execute(HttpCommandExecutor.java:191)
at io.appium.java_client.remote.AppiumCommandExecutor.execute(AppiumCommandExecutor.java:250)
at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:518)
at org.openqa.selenium.remote.RemoteWebDriver.executeScript(RemoteWebDriver.java:463)
at org.isw.myapp.DragandDrop.teys(DragandDrop.java:82)
at org.isw.myapp.WinTest_3.Drag(WinTest_3.java:20)
at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:104)
at java.base/java.lang.reflect.Method.invoke(Method.java:578)
at org.testng.internal.invokers.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:139)
at org.testng.internal.invokers.TestInvoker.invokeMethod(TestInvoker.java:677)
at org.testng.internal.invokers.TestInvoker.invokeTestMethod(TestInvoker.java:221)
at org.testng.internal.invokers.MethodRunner.runInSequence(MethodRunner.java:50)
at org.testng.internal.invokers.TestInvoker$MethodInvocationAgent.invoke(TestInvoker.java:969)
at org.testng.internal.invokers.TestInvoker.invokeTestMethods(TestInvoker.java:194)
at org.testng.internal.invokers.TestMethodWorker.invokeTestMethods(TestMethodWorker.java:148)
at org.testng.internal.invokers.TestMethodWorker.run(TestMethodWorker.java:128)
at java.base/java.util.ArrayList.forEach(ArrayList.java:1511)
at org.testng.TestRunner.privateRun(TestRunner.java:829)
at org.testng.TestRunner.run(TestRunner.java:602)
at org.testng.SuiteRunner.runTest(SuiteRunner.java:437)
at org.testng.SuiteRunner.runSequentially(SuiteRunner.java:431)
at org.testng.SuiteRunner.privateRun(SuiteRunner.java:391)
at org.testng.SuiteRunner.run(SuiteRunner.java:330)
at org.testng.SuiteRunnerWorker.runSuite(SuiteRunnerWorker.java:52)
at org.testng.SuiteRunnerWorker.run(SuiteRunnerWorker.java:95)
at org.testng.TestNG.runSuitesSequentially(TestNG.java:1256)
at org.testng.TestNG.runSuitesLocally(TestNG.java:1176)
at org.testng.TestNG.runSuites(TestNG.java:1099)
at org.testng.TestNG.run(TestNG.java:1067)
at com.intellij.rt.testng.IDEARemoteTestNG.run(IDEARemoteTestNG.java:66)
at com.intellij.rt.testng.RemoteTestNGStarter.main(RemoteTestNGStarter.java:109)
[HTTP] --> DELETE /session/385b9195-d394-4338-b78e-a6d3945106e4/window [HTTP] {} [WindowsDriver@e5e6 (385b9195)] Driver proxy active, passing request on via HTTP proxy [WindowsDriver@e5e6 (385b9195)] Replacing sessionId 075885D5-3728-4B07-A822-77DA354F34A2 with 385b9195-d394-4338-b78e-a6d3945106e4 [HTTP] <-- DELETE /session/385b9195-d394-4338-b78e-a6d3945106e4/window 200 144 ms - 65 [HTTP] 11:46:45.109 [main] INFO org.isw.myapp.WinTest_3 -- java.lang.NullPointerException: Cannot invoke "java.util.List.isEmpty()" because "windowHandles" is null at org.openqa.selenium.remote.RemoteWebDriver.close(RemoteWebDriver.java:409) at org.isw.core.Generic.closeWindowsDriver(Generic.java:199) at org.isw.core.Generic.quitWindowsDriver(Generic.java:190) at org.isw.myapp.WinTest_3.afterMethod(WinTest_3.java:15) at org.isw.core.BaseTest.tearDownMethod(BaseTest.java:246) at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:104) at java.base/java.lang.reflect.Method.invoke(Method.java:578) at org.testng.internal.invokers.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:139) at org.testng.internal.invokers.MethodInvocationHelper.invokeMethodConsideringTimeout(MethodInvocationHelper.java:69) at org.testng.internal.invokers.ConfigInvoker.invokeConfigurationMethod(ConfigInvoker.java:361) at org.testng.internal.invokers.ConfigInvoker.invokeConfigurations(ConfigInvoker.java:296) at org.testng.internal.invokers.TestInvoker.runConfigMethods(TestInvoker.java:823) at org.testng.internal.invokers.TestInvoker.runAfterConfigurations(TestInvoker.java:792) at org.testng.internal.invokers.TestInvoker.invokeMethod(TestInvoker.java:768) at org.testng.internal.invokers.TestInvoker.invokeTestMethod(TestInvoker.java:221) at org.testng.internal.invokers.MethodRunner.runInSequence(MethodRunner.java:50) at org.testng.internal.invokers.TestInvoker$MethodInvocationAgent.invoke(TestInvoker.java:969) at org.testng.internal.invokers.TestInvoker.invokeTestMethods(TestInvoker.java:194) at org.testng.internal.invokers.TestMethodWorker.invokeTestMethods(TestMethodWorker.java:148) at org.testng.internal.invokers.TestMethodWorker.run(TestMethodWorker.java:128) at java.base/java.util.ArrayList.forEach(ArrayList.java:1511) at org.testng.TestRunner.privateRun(TestRunner.java:829) at org.testng.TestRunner.run(TestRunner.java:602) at org.testng.SuiteRunner.runTest(SuiteRunner.java:437) at org.testng.SuiteRunner.runSequentially(SuiteRunner.java:431) at org.testng.SuiteRunner.privateRun(SuiteRunner.java:391) at org.testng.SuiteRunner.run(SuiteRunner.java:330) at org.testng.SuiteRunnerWorker.runSuite(SuiteRunnerWorker.java:52) at org.testng.SuiteRunnerWorker.run(SuiteRunnerWorker.java:95) at org.testng.TestNG.runSuitesSequentially(TestNG.java:1256) at org.testng.TestNG.runSuitesLocally(TestNG.java:1176) at org.testng.TestNG.runSuites(TestNG.java:1099) at org.testng.TestNG.run(TestNG.java:1067) at com.intellij.rt.testng.IDEARemoteTestNG.run(IDEARemoteTestNG.java:66) at com.intellij.rt.testng.RemoteTestNGStarter.main(RemoteTestNGStarter.java:109)
[HTTP] --> DELETE /session/385b9195-d394-4338-b78e-a6d3945106e4 [HTTP] {} [AppiumDriver@6a9c] Removing session 385b9195-d394-4338-b78e-a6d3945106e4 from our master session list [WindowsDriver@e5e6 (385b9195)] WinAppDriver exited with code null, signal SIGTERM [HTTP] <-- DELETE /session/385b9195-d394-4338-b78e-a6d3945106e4 200 20 ms - 14 [HTTP] 11:46:45.134 [main] INFO org.isw.myapp.WinTest_3 -- Test org.isw.myapp.WinTest_3.Drag Status : FAILED 11:46:45.140 [main] WARN org.isw.myapp.WinTest_3 -- steps to be performed when a test case fails. 11:46:45.140 [main] INFO org.isw.myapp.WinTest_3 -- java.lang.NullPointerException: Cannot invoke "app.getxray.xray.testng.annotations.XrayTest.key()" because "info" is null at org.isw.core.BaseTest.getTestCaseIds(BaseTest.java:155) at org.isw.core.BaseTest.AddAllTaggedTestCase(BaseTest.java:224) at org.isw.core.BaseTest.tearDownMethod(BaseTest.java:266) at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:104) at java.base/java.lang.reflect.Method.invoke(Method.java:578) at org.testng.internal.invokers.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:139) at org.testng.internal.invokers.MethodInvocationHelper.invokeMethodConsideringTimeout(MethodInvocationHelper.java:69) at org.testng.internal.invokers.ConfigInvoker.invokeConfigurationMethod(ConfigInvoker.java:361) at org.testng.internal.invokers.ConfigInvoker.invokeConfigurations(ConfigInvoker.java:296) at org.testng.internal.invokers.TestInvoker.runConfigMethods(TestInvoker.java:823) at org.testng.internal.invokers.TestInvoker.runAfterConfigurations(TestInvoker.java:792) at org.testng.internal.invokers.TestInvoker.invokeMethod(TestInvoker.java:768) at org.testng.internal.invokers.TestInvoker.invokeTestMethod(TestInvoker.java:221) at org.testng.internal.invokers.MethodRunner.runInSequence(MethodRunner.java:50) at org.testng.internal.invokers.TestInvoker$MethodInvocationAgent.invoke(TestInvoker.java:969) at org.testng.internal.invokers.TestInvoker.invokeTestMethods(TestInvoker.java:194) at org.testng.internal.invokers.TestMethodWorker.invokeTestMethods(TestMethodWorker.java:148) at org.testng.internal.invokers.TestMethodWorker.run(TestMethodWorker.java:128) at java.base/java.util.ArrayList.forEach(ArrayList.java:1511) at org.testng.TestRunner.privateRun(TestRunner.java:829) at org.testng.TestRunner.run(TestRunner.java:602) at org.testng.SuiteRunner.runTest(SuiteRunner.java:437) at org.testng.SuiteRunner.runSequentially(SuiteRunner.java:431) at org.testng.SuiteRunner.privateRun(SuiteRunner.java:391) at org.testng.SuiteRunner.run(SuiteRunner.java:330) at org.testng.SuiteRunnerWorker.runSuite(SuiteRunnerWorker.java:52) at org.testng.SuiteRunnerWorker.run(SuiteRunnerWorker.java:95) at org.testng.TestNG.runSuitesSequentially(TestNG.java:1256) at org.testng.TestNG.runSuitesLocally(TestNG.java:1176) at org.testng.TestNG.runSuites(TestNG.java:1099) at org.testng.TestNG.run(TestNG.java:1067) at com.intellij.rt.testng.IDEARemoteTestNG.run(IDEARemoteTestNG.java:66) at com.intellij.rt.testng.RemoteTestNGStarter.main(RemoteTestNGStarter.java:109)
11:46:45.141 [main] INFO org.isw.myapp.WinTest_3 -- Code to be executed after each class 11:46:45.224 [main] INFO org.isw.myapp.WinTest_3 -- com.google.gson.JsonIOException: Failed making field 'java.lang.Throwable#detailMessage' accessible; either increase its visibility or write a custom TypeAdapter for its declaring type. at com.google.gson.internal.reflect.ReflectionHelper.makeAccessible(ReflectionHelper.java:38) at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory.getBoundFields(ReflectiveTypeAdapterFactory.java:286) at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory.create(ReflectiveTypeAdapterFactory.java:130) at com.google.gson.Gson.getAdapter(Gson.java:556) at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory.createBoundField(ReflectiveTypeAdapterFactory.java:160) at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory.getBoundFields(ReflectiveTypeAdapterFactory.java:294) at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory.create(ReflectiveTypeAdapterFactory.java:130) at com.google.gson.Gson.getAdapter(Gson.java:556) at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory.createBoundField(ReflectiveTypeAdapterFactory.java:160) at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory.getBoundFields(ReflectiveTypeAdapterFactory.java:294) at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory.create(ReflectiveTypeAdapterFactory.java:130) at com.google.gson.Gson.getAdapter(Gson.java:556) at com.google.gson.internal.bind.CollectionTypeAdapterFactory.create(CollectionTypeAdapterFactory.java:53) at com.google.gson.Gson.getAdapter(Gson.java:556) at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory.createBoundField(ReflectiveTypeAdapterFactory.java:160) at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory.getBoundFields(ReflectiveTypeAdapterFactory.java:294) at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory.create(ReflectiveTypeAdapterFactory.java:130) at com.google.gson.Gson.getAdapter(Gson.java:556) at com.google.gson.internal.bind.TypeAdapterRuntimeTypeWrapper.write(TypeAdapterRuntimeTypeWrapper.java:55) at com.google.gson.internal.bind.CollectionTypeAdapterFactory$Adapter.write(CollectionTypeAdapterFactory.java:97) at com.google.gson.internal.bind.CollectionTypeAdapterFactory$Adapter.write(CollectionTypeAdapterFactory.java:61) at com.google.gson.Gson.toJson(Gson.java:842) at com.google.gson.Gson.toJson(Gson.java:812) at com.google.gson.Gson.toJson(Gson.java:783) at com.aventstack.extentreports.reporter.JsonFormatter.flush(JsonFormatter.java:57) at com.aventstack.extentreports.reporter.JsonFormatter.access$000(JsonFormatter.java:17) at com.aventstack.extentreports.reporter.JsonFormatter$1.onNext(JsonFormatter.java:37) at com.aventstack.extentreports.reporter.JsonFormatter$1.onNext(JsonFormatter.java:30) at io.reactivex.rxjava3.subjects.PublishSubject$PublishDisposable.onNext(PublishSubject.java:310) at io.reactivex.rxjava3.subjects.PublishSubject.onNext(PublishSubject.java:226) at com.aventstack.extentreports.ReactiveSubject.onFlush(ReactiveSubject.java:83) at com.aventstack.extentreports.AbstractProcessor.onFlush(AbstractProcessor.java:85) at com.aventstack.extentreports.ExtentReports.flush(ExtentReports.java:279) at org.isw.core.BaseTest.postRunTimeInfo(BaseTest.java:323) at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:104) at java.base/java.lang.reflect.Method.invoke(Method.java:578) at org.testng.internal.invokers.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:139) at org.testng.internal.invokers.MethodInvocationHelper.invokeMethodConsideringTimeout(MethodInvocationHelper.java:69) at org.testng.internal.invokers.ConfigInvoker.invokeConfigurationMethod(ConfigInvoker.java:361) at org.testng.internal.invokers.ConfigInvoker.invokeConfigurations(ConfigInvoker.java:296) at org.testng.SuiteRunner.privateRun(SuiteRunner.java:404) at org.testng.SuiteRunner.run(SuiteRunner.java:330) at org.testng.SuiteRunnerWorker.runSuite(SuiteRunnerWorker.java:52) at org.testng.SuiteRunnerWorker.run(SuiteRunnerWorker.java:95) at org.testng.TestNG.runSuitesSequentially(TestNG.java:1256) at org.testng.TestNG.runSuitesLocally(TestNG.java:1176) at org.testng.TestNG.runSuites(TestNG.java:1099) at org.testng.TestNG.run(TestNG.java:1067) at com.intellij.rt.testng.IDEARemoteTestNG.run(IDEARemoteTestNG.java:66) at com.intellij.rt.testng.RemoteTestNGStarter.main(RemoteTestNGStarter.java:109) Caused by: java.lang.reflect.InaccessibleObjectException: Unable to make field private java.lang.String java.lang.Throwable.detailMessage accessible: module java.base does not "opens java.lang" to unnamed module @51e2adc7 at java.base/java.lang.reflect.AccessibleObject.throwInaccessibleObjectException(AccessibleObject.java:387) at java.base/java.lang.reflect.AccessibleObject.checkCanSetAccessible(AccessibleObject.java:363) at java.base/java.lang.reflect.AccessibleObject.checkCanSetAccessible(AccessibleObject.java:311) at java.base/java.lang.reflect.Field.checkCanSetAccessible(Field.java:180) at java.base/java.lang.reflect.Field.setAccessible(Field.java:174) at com.google.gson.internal.reflect.ReflectionHelper.makeAccessible(ReflectionHelper.java:35) ... 49 more
Process finished with exit code 0
is there any other ways or apiendpoints to make drag and drop happen in Winapppsdriver with appium?
The exception above is expected. The modifierKeys
value in {"script":"windows: clickAndDrag","args":[{"endY":236,"endX":1,"modifierKeys":"[ctrl]","endElementId":"42.22286056.4.2","startY":287,"startX":1,"startElementId":"42.22286056.4.4"}]}
must be an array or a single string. An array converted to a string has been provided instead.
Also the exception there does not match to the one which has been stated above (Cannot read properties of null (reading 'match')
)
I have removed the modifiers key and tried without it I am still getting the same issue . here is the updated code I am not sure what is the issue on the code RemoteWebElement destination = (RemoteWebElement) windowsDriver.get().findElement(By.name("QCOE-Jamie.Pont")); RemoteWebElement source = (RemoteWebElement) windowsDriver.get().findElement(By.name("RDP Server")); String startElementId=source.getId(); String endElementId=destination.getId(); Point sourceLocation = source.getLocation(); int endX = sourceLocation.getX(); int endY = sourceLocation.getY(); Point sourcem = destination.getLocation(); int endXx = sourcem.getX(); int endYy = sourcem.getY(); Map<String, Object> params = new HashMap<>(); params.put("startX", endX); params.put("startY", endY); params.put("endX", endXx); params.put("endY", endYy); params.put("startElementId",startElementId); params.put("endElementId",endElementId); params.put("modifierKeys", new String[]{"ctrl"});
windowsDriver.get().executeScript("windows:clickAndDrag", params);
}
Here are the new logs rg.openqa.selenium.WebDriverException: An unknown server-side error occurred while processing the command. Original error: Cannot read properties of null (reading 'match') Build info: version: '4.11.0', revision: '040bc5406b' System info: os.name: 'Windows 11', os.arch: 'amd64', os.version: '10.0', java.version: '19' Driver info: io.appium.java_client.windows.WindowsDriver Command: [47ab9a6f-d168-4715-8def-4e1dd41838a8, executeScript {script=windows:clickAndDrag, args=[{endElementId=42.9312862.4.2, endY=236, endX=1, startY=287, startX=1, startElementId=42.9312862.4.4}]}] Capabilities {appium:app: C:\Users\Jamie.Pont\OneDri..., appium:automationName: windows, appium:createSessionTimeout: 45000, appium:newCommandTimeout: 120, appium:platformVersion: 10, ms:experimental-webdriver: true, ms:waitForAppLaunch: 10, platformName: windows} Session ID: 47ab9a6f-d168-4715-8def-4e1dd41838a8
at java.base/jdk.internal.reflect.DirectConstructorHandleAccessor.newInstance(DirectConstructorHandleAccessor.java:67)
at java.base/java.lang.reflect.Constructor.newInstanceWithCaller(Constructor.java:500)
at java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:484)
at org.openqa.selenium.remote.codec.w3c.W3CHttpResponseCodec.createException(W3CHttpResponseCodec.java:200)
at org.openqa.selenium.remote.codec.w3c.W3CHttpResponseCodec.decode(W3CHttpResponseCodec.java:133)
at org.openqa.selenium.remote.codec.w3c.W3CHttpResponseCodec.decode(W3CHttpResponseCodec.java:52)
at org.openqa.selenium.remote.HttpCommandExecutor.execute(HttpCommandExecutor.java:191)
at io.appium.java_client.remote.AppiumCommandExecutor.execute(AppiumCommandExecutor.java:250)
at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:518)
at org.openqa.selenium.remote.RemoteWebDriver.executeScript(RemoteWebDriver.java:463)
at org.isw.myapp.DragandDrop.teys(DragandDrop.java:82)
at org.isw.myapp.WinTest_3.Drag(WinTest_3.java:20)
at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:104)
at java.base/java.lang.reflect.Method.invoke(Method.java:578)
at org.testng.internal.invokers.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:139)
at org.testng.internal.invokers.TestInvoker.invokeMethod(TestInvoker.java:677)
at org.testng.internal.invokers.TestInvoker.invokeTestMethod(TestInvoker.java:221)
at org.testng.internal.invokers.MethodRunner.runInSequence(MethodRunner.java:50)
at org.testng.internal.invokers.TestInvoker$MethodInvocationAgent.invoke(TestInvoker.java:969)
at org.testng.internal.invokers.TestInvoker.invokeTestMethods(TestInvoker.java:194)
at org.testng.internal.invokers.TestMethodWorker.invokeTestMethods(TestMethodWorker.java:148)
at org.testng.internal.invokers.TestMethodWorker.run(TestMethodWorker.java:128)
at java.base/java.util.ArrayList.forEach(ArrayList.java:1511)
at org.testng.TestRunner.privateRun(TestRunner.java:829)
at org.testng.TestRunner.run(TestRunner.java:602)
at org.testng.SuiteRunner.runTest(SuiteRunner.java:437)
at org.testng.SuiteRunner.runSequentially(SuiteRunner.java:431)
at org.testng.SuiteRunner.privateRun(SuiteRunner.java:391)
at org.testng.SuiteRunner.run(SuiteRunner.java:330)
at org.testng.SuiteRunnerWorker.runSuite(SuiteRunnerWorker.java:52)
at org.testng.SuiteRunnerWorker.run(SuiteRunnerWorker.java:95)
at org.testng.TestNG.runSuitesSequentially(TestNG.java:1256)
at org.testng.TestNG.runSuitesLocally(TestNG.java:1176)
at org.testng.TestNG.runSuites(TestNG.java:1099)
at org.testng.TestNG.run(TestNG.java:1067)
at com.intellij.rt.testng.IDEARemoteTestNG.run(IDEARemoteTestNG.java:66)
at com.intellij.rt.testng.RemoteTestNGStarter.main(RemoteTestNGStarter.java:109)
new String[]{"ctrl"}
this must be a list, not array (List.of("ctrl")
or "ctrl"
)
Thanks for your help, I did it both but still same issue , I checked the documantation it says everythig is an optional parameter but I could not find a solution yet , I just I wanted to do simple drag and drop , Would it be possible to give me an example code so I could take that as a reference please .
java stacktraces are of no use. I need server logs
I know you are being so helpful but I do not have the server logs because it is one of the desktop apps which I use for Rdp but we do not own that app which I was trying to do a poc for drag and drop on it . If there is an example code shows how to do drag and drop I will take it from here . is there any otherways we could perform drag and drop other than windows :drag
I don't think I can help much without having server logs. Maybe there is a bug, but it impossible to figure out where without them. You could also try to perform drag and drop using obsolete touch actions. AFAIK there are only examples in C#: https://github.com/microsoft/WinAppDriver/blob/9c561a52ace7b57bb375bc752389731a68dbcc53/Tests/WebDriverAPI/TouchDownMoveUp.cs#L48
Thank you I have seen that , Is there any api endpoints I could do drag and drop based on api call to Server?
Hi Again , I just wanted to let you know, studently I started not seeing Server issues, but this feature which we use for drag and drop windowsDriver.get().executeScript("windows:clickAndDrag", params); is not doing drag and drop it only clicks the start element without holding it then it moves the destinition element as a drag and drop it is supposed to ho;ld the source element and drag to destinition element right? Please advice , Thank you . Here are the logs . logfile (2).log
here are the logs for C# C# winapps logs.txt
Have you tried to increase the durationMs value?
Yes i have tried with msduration in java it did not work until now i just increased duration to 10 seconds then it works now .thank you . But still gives server issue on C# side and thoughts on that ?
If you think this is a bug then report it to https://github.com/appium/dotnet-client
I could also change the default value of durationMs for the above API if you could confirm the minimum working duration. Is, for example, 5000ms enough or 10000 is the necessary minimum?
Hi i had some custom waits I removed them and looks like 5000ms is good for default duration time
Warning: Hi I been trying to use windows: clickAndDrag but I dont see any examples or how to use it , Would be possible to provide some examples please , I have spent 2 days on it I could not come up with a solution for it in Java . Thanks These issues are not tracked. Please create new issues in the main Appium repository: https://github.com/appium/appium/issues/new