microsoft / WinAppDriver

Windows Application Driver
MIT License
3.67k stars 1.4k forks source link

I can't run Winappdriver remotely #1050

Open snowman562 opened 4 years ago

snowman562 commented 4 years ago

https://github.com/microsoft/WinAppDriver/blob/master/Docs/RunningOnRemoteMachine.md Trying winappdriver remotely on my local PC, I followed the above instruction. And tried many attempt to resolve it. Here are logs I got. python .\calculatortest.py ERROR

====================================================================== ERROR: setUpClass (main.SimpleCalculatorTests)

Traceback (most recent call last): File "C:\Users\Snowman\AppData\Local\Programs\Python\Python36-32\lib\site-packages\urllib3\connection.py", line 157, in _new_conn (self._dns_host, self.port), self.timeout, **extra_kw File "C:\Users\Snowman\AppData\Local\Programs\Python\Python36-32\lib\site-packages\urllib3\util\connection.py", line 84, in create_connection raise err File "C:\Users\Snowman\AppData\Local\Programs\Python\Python36-32\lib\site-packages\urllib3\util\connection.py", line 74, in create_connection sock.connect(sa) TimeoutError: [WinError 10060] A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "C:\Users\Snowman\AppData\Local\Programs\Python\Python36-32\lib\site-packages\urllib3\connectionpool.py", line 672, in urlopen chunked=chunked, File "C:\Users\Snowman\AppData\Local\Programs\Python\Python36-32\lib\site-packages\urllib3\connectionpool.py", line 387, in _make_request conn.request(method, url, **httplib_request_kw) File "C:\Users\Snowman\AppData\Local\Programs\Python\Python36-32\lib\http\client.py", line 1239, in request self._send_request(method, url, body, headers, encode_chunked) File "C:\Users\Snowman\AppData\Local\Programs\Python\Python36-32\lib\http\client.py", line 1285, in _send_request self.endheaders(body, encode_chunked=encode_chunked) File "C:\Users\Snowman\AppData\Local\Programs\Python\Python36-32\lib\http\client.py", line 1234, in endheaders self._send_output(message_body, encode_chunked=encode_chunked) File "C:\Users\Snowman\AppData\Local\Programs\Python\Python36-32\lib\http\client.py", line 1026, in _send_output self.send(msg) File "C:\Users\Snowman\AppData\Local\Programs\Python\Python36-32\lib\http\client.py", line 964, in send self.connect() File "C:\Users\Snowman\AppData\Local\Programs\Python\Python36-32\lib\site-packages\urllib3\connection.py", line 184, in connect conn = self._new_conn() File "C:\Users\Snowman\AppData\Local\Programs\Python\Python36-32\lib\site-packages\urllib3\connection.py", line 169, in _new_conn self, "Failed to establish a new connection: %s" % e urllib3.exceptions.NewConnectionError: <urllib3.connection.HTTPConnection object at 0x03417750>: Failed to establish a new connection: [WinError 10060] A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File ".\calculatortest.py", line 31, in setUpClass desired_capabilities= desired_caps) File "C:\Users\Snowman\AppData\Local\Programs\Python\Python36-32\lib\site-packages\appium\webdriver\webdriver.py", line 151, in init proxy File "C:\Users\Snowman\AppData\Local\Programs\Python\Python36-32\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 157, in init self.start_session(capabilities, browser_profile) File "C:\Users\Snowman\AppData\Local\Programs\Python\Python36-32\lib\site-packages\appium\webdriver\webdriver.py", line 227, in start_session response = self.execute(RemoteCommand.NEW_SESSION, parameters) File "C:\Users\Snowman\AppData\Local\Programs\Python\Python36-32\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 319, in execute response = self.command_executor.execute(driver_command, params) File "C:\Users\Snowman\AppData\Local\Programs\Python\Python36-32\lib\site-packages\selenium\webdriver\remote\remote_connection.py", line 374, in execute return self._request(command_info[0], url, body=data) File "C:\Users\Snowman\AppData\Local\Programs\Python\Python36-32\lib\site-packages\selenium\webdriver\remote\remote_connection.py", line 397, in _request resp = self._conn.request(method, url, body=body, headers=headers) File "C:\Users\Snowman\AppData\Local\Programs\Python\Python36-32\lib\site-packages\urllib3\request.py", line 80, in request method, url, fields=fields, headers=headers, urlopen_kw File "C:\Users\Snowman\AppData\Local\Programs\Python\Python36-32\lib\site-packages\urllib3\request.py", line 171, in request_encode_body return self.urlopen(method, url, extra_kw) File "C:\Users\Snowman\AppData\Local\Programs\Python\Python36-32\lib\site-packages\urllib3\poolmanager.py", line 330, in urlopen response = conn.urlopen(method, u.request_uri, kw) File "C:\Users\Snowman\AppData\Local\Programs\Python\Python36-32\lib\site-packages\urllib3\connectionpool.py", line 760, in urlopen response_kw File "C:\Users\Snowman\AppData\Local\Programs\Python\Python36-32\lib\site-packages\urllib3\connectionpool.py", line 760, in urlopen response_kw File "C:\Users\Snowman\AppData\Local\Programs\Python\Python36-32\lib\site-packages\urllib3\connectionpool.py", line 760, in urlopen response_kw File "C:\Users\Snowman\AppData\Local\Programs\Python\Python36-32\lib\site-packages\urllib3\connectionpool.py", line 720, in urlopen method, url, error=e, _pool=self, _stacktrace=sys.exc_info()[2] File "C:\Users\Snowman\AppData\Local\Programs\Python\Python36-32\lib\site-packages\urllib3\util\retry.py", line 436, in increment raise MaxRetryError(_pool, url, error or ResponseError(cause)) urllib3.exceptions.MaxRetryError: HTTPConnectionPool(host='52.37.149.233', port=4723): Max retries exceeded with url: /wd/hub/session (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x03417750>: Failed to establish a new connection: [WinError 10060] A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond',))


Ran 0 tests in 85.031s

FAILED (errors=1)

anunay1 commented 4 years ago

Are both the machines connected to the same AP.

snowman562 commented 4 years ago

I don't understand your question. I run winappdriver and desktop app on remote server(Amazon), and run automation script on my local machine

anunay1 commented 4 years ago

sorry I have not tried this scenario.

snowman562 commented 4 years ago

https://github.com/microsoft/WinAppDriver/blob/master/Docs/RunningOnRemoteMachine.md Have you ever run winappdriver remotely?

anunay1 commented 4 years ago

Yes i have run and with the same steps, but I had two laptops connected to the same router, and it worked perfectly.

snowman562 commented 4 years ago

Is it remote environment?

anunay1 commented 4 years ago

Yes.

snowman562 commented 4 years ago

Could you tell me how to set IP address on test machine and test runner?

anunay1 commented 4 years ago

can you share the code. just the desired capabilities part.

snowman562 commented 4 years ago

import unittest from appium import webdriver

class SimpleCalculatorTests(unittest.TestCase):

@classmethod

def setUpClass(self):
    #set up appium
    desired_caps = {}
    desired_caps["app"] = r'C:\Users\ricktran\AppData\Local\Apps\2.0\Q746MAKD.XCA\KBNW0CDP.AMA\pvsc..tion_9d87c283e10a1e36_0013.0004_7eaddd26be1974a7\VelociDoc'
    self.driver = webdriver.Remote(
        command_executor='http://52.37.149.233:4723/wd/hub',
        desired_capabilities= desired_caps)

@classmethod
def tearDownClass(self):
    self.driver.quit()

def test_initialize(self):
    self.driver.find_element_by_accessibility_id("User Name").find_element_by_xpath(".//Edit[@AutomationId='PART_Editor']").send_keys("advinow@ucats")
    self.driver.find_element_by_accessibility_id("Password").find_element_by_xpath(".//Edit[@AutomationId='PART_Editor']").send_keys("FastHCA2020!!")       

if name == 'main': suite = unittest.TestLoader().loadTestsFromTestCase(SimpleCalculatorTests) unittest.TextTestRunner(verbosity=2).run(suite)

anunay1 commented 4 years ago

code is OK, I did not do anything to set the IP address on the test machine and in the test runner. The exception says that its is not allowing inbound connection, is the firewall off.

snowman562 commented 4 years ago

I followed the docs instruction for inbound setting. But Firewall is on. Is it issue?

anunay1 commented 4 years ago

Yes, switch off the firewall.

snowman562 commented 4 years ago

for private or public?

anunay1 commented 4 years ago

both

snowman562 commented 4 years ago

Screenshot_4

snowman562 commented 4 years ago

I set firewall off for both, and run winappdriver as above. But no response yet

anunay1 commented 4 years ago

can you remove the /wd/hub part from command line where u start winappdriver

aimalkhan commented 4 years ago

@snowman562 were you able to resolve the issue?

trashbat commented 4 years ago

If I've understood correctly, you're running your script locally and the server is in the cloud. Wouldn't you therefore need to be listening on the public IP? Or set up port forwarding from public to private?

EDIT: Sorry for necro-posting, didn't notice it was an old thread.

krishna494 commented 3 years ago

Yes i have run and with the same steps, but I had two laptops connected to the same router, and it worked perfectly.

@anunay1 I am having around 150 test case, Individually every testcase is getting pass, But if am triggering from testNG.xml only 4 to 5 are getting pass, All other testcases getting failed.

anunay1 commented 3 years ago

What's the error message when it gets failed.

krishna494 commented 3 years ago

What's the error message when it gets failed.

Getting this below error and whenever this occurs, all the rest testcases are getting skipped and Failed. Please help me out to get resolve this issue. MicrosoftTeams-image

While lunching the winappdriver programmatically we are getting the below error screenshot MicrosoftTeams-image (1)

Below snippet is not working ending up with above error, Is there any other way to start the WAD.

public static void start_Driver() throws Exception {

String filelocation = System.getProperty("user.dir") + File.separator + "WinAppDriver" + File.separator
        + "WinAppDriver.exe";
System.out.println("file ---->  " + filelocation);
ProcessBuilder pBuilder = new ProcessBuilder(filelocation).inheritIO(); 
// pBuilder.inheritIO(); p =
pBuilder.start();

}

anunay1 commented 3 years ago

"Failed to open the application" comes in two scenarios:

  1. If your application has a splash screen if it has then you need to create a root session and switch to the opened window
  2. if the application does not launch all

I am not a java guy, I mostly work in C# and python. Check the path if it is correct to launch the winappdriver.

or else please schedule a zoom call anunayathakur1@gmail.com

anunay1 commented 3 years ago

try this: Desktop desktop = Desktop.getDesktop(); desktop.open("C:\Program Files (x86)\Windows Application Driver\WinAppDriver.exe");

krishna494 commented 3 years ago

Desktop desktop = Desktop.getDesktop(); desktop.open("C:\Program Files (x86)\Windows Application Driver\WinAppDriver.exe");

Hi @anunay1 Application have flash screen and we have used Root function also, While running single or 5 test case at a time it is working but running more than that it throws above error.

Thanks..!! for quick response. This code is working fine to open the WAD, But still my application is throwing the same above error.

anunay1 commented 3 years ago

The issue seems bo with your application it stops launching after the 5th test case try changing the test cases sequences in which they run.

Surekha-tfs commented 6 months ago

I am also facing the same issue but i am using python can you help me here I written code like this for my application

import unittest from appium import webdriver

class AttuneTests(unittest.TestCase):

@classmethod

def setUpClass(self):

    desired_cap = dict(
         platformName= 'Windows', 
         platformVersion = '10',
         deviceName='WindowsPC',
        app= 'C:\\Program Files\\LifeTechnologies\\AttuneNxT\\Attune.exe'

    )
    self.driver = webdriver.Remote(
        command_executor='http://127.0.0.1:4723',
        desired_capabilities = desired_cap)
    self.driver.implicitly_wait(30)
    self.driver.maximize_window()
    self.driver.find_element_by_name("Attune™ Acoustic Focusing Cytometer")

@classmethod
def tearDownClass(self):
    self.driver.quit()

def test_attunelogin(self):        
    self.driver.find_element_by_accessibility_id("1962").send_keys("admin")
    self.driver.find_element_by_accessibility_id("1963").send_keys("admin1")
    self.driver.find_element_by_accessibility_id("1964").click()

if name == 'main': suite = unittest.TestLoader().loadTestsFromTestCase(AttuneTests) unittest.TextTestRunner(verbosity=2).run(suite)

Getting below error
ERROR

====================================================================== ERROR: setUpClass (main.AttuneTests)

Traceback (most recent call last): File "c:\Users\Surekha.p\Downloads\Surekha study\Attune-Winapp_Ex\tasks.py", line 36, in setUpClass self.driver = webdriver.Remote( File "C:\ProgramData\robocorp\ht\8211519_b1f3c24_9ba66f27\lib\site-packages\appium\webdriver\webdriver.py", line 267, in init super().init( File "C:\ProgramData\robocorp\ht\8211519_b1f3c24_9ba66f27\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 157, in init self.start_session(capabilities, browser_profile) File "C:\ProgramData\robocorp\ht\8211519_b1f3c24_9ba66f27\lib\site-packages\appium\webdriver\webdriver.py", line 357, in start_session response = self.execute(RemoteCommand.NEW_SESSION, parameters) File "C:\ProgramData\robocorp\ht\8211519_b1f3c24_9ba66f27\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 321, in execute self.error_handler.check_response(response) File "C:\ProgramData\robocorp\ht\8211519_b1f3c24_9ba66f27\lib\site-packages\selenium\webdriver\remote\errorhandler.py", line 242, in check_response
raise exception_class(message, screen, stacktrace) selenium.common.exceptions.WebDriverException: Message: Failed to locate opened application window with appId: C:\Program Files\LifeTechnologies\AttuneNxT\Attune.exe, and processId: 32220


Ran 0 tests in 7.275s

FAILED (errors=1) Can you guys help me to resolve this?

anunay1 commented 6 months ago

Does your application have a splash screen? Which version of appium and selenium are you using?

Surekha-tfs commented 6 months ago

HI , i am using Name: Appium-Python-Client Version: 1.3.0 Name: selenium Version: 3.141.0 What is splash screen?

anunay1 commented 6 months ago

The screen that comes before the application is launched like outlook.

Surekha-tfs commented 6 months ago

No we wont have like that It directly opens login page for username and password

anunay1 commented 6 months ago

No we wont have like that It directly opens login page for username and password

Is that Microsoft login page? If possible share video recording of the application?

Surekha-tfs commented 6 months ago

Here is the video

https://github.com/microsoft/WinAppDriver/assets/90319657/c0695c07-bd46-481c-9332-73dd04293a6f

anunay1 commented 6 months ago

Can you share the console output of winappdriver.exe?

Surekha-tfs commented 6 months ago

Windows Application Driver listening for requests at: http://127.0.0.1:4723/ Press ENTER to exit.

========================================== POST /session HTTP/1.1 Accept: application/json Accept-Encoding: identity Connection: keep-alive Content-Length: 378 Content-Type: application/json;charset=UTF-8 Host: 127.0.0.1:4723 User-Agent: appium/python 1.3.0 (selenium/3.141.0 (python windows)) X-Idempotency-Key: 9d4a6872-6671-4353-a118-8cbdd1b4a247

{"capabilities": {"firstMatch": [{"platformName": "Windows", "appium:platformVersion": "10", "appium:deviceName": "WindowsPC", "appium:app": "C:\Program Files\LifeTechnologies\AttuneNxT\Attune.exe"}]}, "desiredCapabilities": {"platformName": "Windows", "platformVersion": "10", "deviceName": "WindowsPC", "app": "C:\Program Files\LifeTechnologies\AttuneNxT\Attune.exe"}} HTTP/1.1 500 Internal Error Content-Length: 195 Content-Type: application/json

{"status":13,"value":{"error":"unknown error","message":"Failed to locate opened application window with appId: C:\Program Files\LifeTechnologies\AttuneNxT\Attune.exe, and processId: 14492"}}

anunay1 commented 6 months ago

your code is correct, its weird that it' not working as a work around create a root session on and then switch to the opened window where you get the exception. Preferably in def setUpClass(self):

Surekha-tfs commented 6 months ago

@anunay1 i am new to this how to add root session in python

anunay1 commented 6 months ago

https://github.com/anunay1/SampleWADPython/tree/master

Surekha-tfs commented 6 months ago

Hey i impoted this from appium.webdriver.common.appiumby import AppiumBy but facing this issue $ c:/ProgramData/robocorp/ht/8211519_b1f3c24_9ba66f27/python.exe "c:/Users/Surekha.p/Downloads/Surekha study/Root/tasks.py" Traceback (most recent call last): File "c:\Users\Surekha.p\Downloads\Surekha study\Root\tasks.py", line 4, in from appium.webdriver.common.appiumby import AppiumBy ModuleNotFoundError: No module named 'appium.webdriver.common.appiumby'

Surekha-tfs commented 6 months ago

Hi, i added like this import unittest from time import sleep from appium import webdriver

class AttuneTests(unittest.TestCase):

@classmethod

def setUpClass(self):

    desired_cap = dict(
         platformName= 'Windows', 
         platformVersion = '10',
         deviceName='WindowsPC',
        #app= 'C:\\Program Files\\LifeTechnologies\\AttuneNxT\\Attune.exe'
        app = "root"

    )
    self.driver = webdriver.Remote(
        command_executor='http://127.0.0.1:4723',
        desired_capabilities = desired_cap)
    self.driver.implicitly_wait(50)
    self.driver.minimize_window()
    self.driver.find_element_by_name("Attune™ Acoustic Focusing Cytometer")

@classmethod
def tearDownClass(self):
    self.driver.quit()

def test_attunelogin(self):        
    self.driver.find_element_by_accessibility_id("1962").send_keys("admin")
    self.driver.find_element_by_accessibility_id("1963").send_keys("admin1")
    self.driver.find_element_by_accessibility_id("1964").click()

if name == 'main': suite = unittest.TestLoader().loadTestsFromTestCase(AttuneTests) unittest.TextTestRunner(verbosity=2).run(suite)

Getting this error

ERROR: setUpClass (main.AttuneTests)

Traceback (most recent call last): File "c:\Users\Surekha.p\Downloads\Surekha study\Attune-Winapp_Ex\tasks.py", line 36, in setUpClass self.driver = webdriver.Remote( File "C:\ProgramData\robocorp\ht\8211519_b1f3c24_9ba66f27\lib\site-packages\appium\webdriver\webdriver.py", line 267, in init super().init( File "C:\ProgramData\robocorp\ht\8211519_b1f3c24_9ba66f27\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 157, in init self.start_session(capabilities, browser_profile) File "C:\ProgramData\robocorp\ht\8211519_b1f3c24_9ba66f27\lib\site-packages\appium\webdriver\webdriver.py", line 357, in start_session response = self.execute(RemoteCommand.NEW_SESSION, parameters) File "C:\ProgramData\robocorp\ht\8211519_b1f3c24_9ba66f27\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 321, in execute self.error_handler.check_response(response) File "C:\ProgramData\robocorp\ht\8211519_b1f3c24_9ba66f27\lib\site-packages\selenium\webdriver\remote\errorhandler.py", line 242, in check_response
raise exception_class(message, screen, stacktrace) selenium.common.exceptions.WebDriverException: Message: The system cannot find the file specified.


Ran 0 tests in 0.382s

FAILED (errors=1) Winapp driver output

POST /session HTTP/1.1 Accept: application/json Accept-Encoding: identity Connection: keep-alive Content-Length: 270 Content-Type: application/json;charset=UTF-8 Host: 127.0.0.1:4723 User-Agent: appium/python 1.3.0 (selenium/3.141.0 (python windows)) X-Idempotency-Key: c7cc789c-09d5-4b29-a44a-ccdc6e27ae74

{"capabilities": {"firstMatch": [{"platformName": "Windows", "appium:platformVersion": "10", "appium:deviceName": "WindowsPC", "appium:app": "root"}]}, "desiredCapabilities": {"platformName": "Windows", "platformVersion": "10", "deviceName": "WindowsPC", "app": "root"}} HTTP/1.1 500 Internal Error Content-Length: 102 Content-Type: application/json

{"status":13,"value":{"error":"unknown error","message":"The system cannot find the file specified."}}

========================================== POST /session HTTP/1.1 Accept: application/json Accept-Encoding: identity Connection: keep-alive Content-Length: 270 Content-Type: application/json;charset=UTF-8 Host: 127.0.0.1:4723 User-Agent: appium/python 1.3.0 (selenium/3.141.0 (python windows)) X-Idempotency-Key: a9ee0c59-b42a-4c87-aa8d-a57cfe8c107c

{"capabilities": {"firstMatch": [{"platformName": "Windows", "appium:platformVersion": "10", "appium:deviceName": "WindowsPC", "appium:app": "root"}]}, "desiredCapabilities": {"platformName": "Windows", "platformVersion": "10", "deviceName": "WindowsPC", "app": "root"}} HTTP/1.1 500 Internal Error Content-Length: 102 Content-Type: application/json

{"status":13,"value":{"error":"unknown error","message":"The system cannot find the file specified."}}

anunay1 commented 6 months ago

You need to upscale on python language. Understand the code which I have given. You need to just incorporate the code in an except block to create a session on the opened window.

Surekha-tfs commented 6 months ago

Ok .will try anunay

Surekha-tfs commented 6 months ago

HI anunay1 i writen code using try except please let know if any modifications required import unittest from time import sleep from appium import webdriver

import unittest from time import sleep from appium import webdriver

import unittest from time import sleep from appium import webdriver

class AttuneTests(unittest.TestCase):

@classmethod

def setUpClass(self):

    desired_cap = dict(
         platformName= 'Windows', 
         platformVersion = '10',
         deviceName='WindowsPC',
        app= 'C:\\Program Files\\LifeTechnologies\\AttuneNxT\\Attune.exe'

    )
    self.desktopSession = webdriver.Remote(
        command_executor='http://127.0.0.1:4723',
        desired_capabilities = desired_cap)

def test_attunelogin(self):   
    try: 
        handles = self.desktopSession.find_element("Attune™ Acoustic Focusing Cytometer")
        handles.find_element_by_accessibility_id("1962").send_keys("admin")
        handles.find_element_by_accessibility_id("1963").send_keys("admin1")
        handles.find_element_by_accessibility_id("1964").click()

    except Exception as e:
        print("Error:", e)

@classmethod
def tearDownClass(self):
    self.deshktopSession.quit()

if name == 'main': suite = unittest.TestLoader().loadTestsFromTestCase(AttuneTests) unittest.TextTestRunner(verbosity=2).run(suite)

Its going to except block after this steps handles = self.desktopSession.find_element("Attune™ Acoustic Focusing Cytometer")

Error: $ cd c:\Users\Surekha.p\Downloads\Surekha\ study\winapp\Attune-Winapp_Ex ; /usr/bin/env c:\ProgramData\robocorp\ht\8211519_b1f3c24_9ba66f27\python.exe c:\Users\Surekha.p\.vscode\extensions\ms-python.debugpy-2024.2.0-win32-x64\bundled\libs\debugpy\adapter/../..\debugpy\launcher 2390 -- c:\Users\Surekha.p\Downloads\Surekha\ study\winapp\Attune-Winapp_Ex\tasks.py ERROR

====================================================================== ERROR: setUpClass (main.AttuneTests)

Traceback (most recent call last): File "c:\Users\Surekha.p\Downloads\Surekha study\winapp\Attune-Winapp_Ex\tasks.py", line 36, in setUpClass self.desktopSession = webdriver.Remote( File "c:\ProgramData\robocorp\ht\8211519_b1f3c24_9ba66f27\lib\site-packages\appium\webdriver\webdriver.py", line 267, in init super().init( File "c:\ProgramData\robocorp\ht\8211519_b1f3c24_9ba66f27\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 157, in init self.start_session(capabilities, browser_profile) File "c:\ProgramData\robocorp\ht\8211519_b1f3c24_9ba66f27\lib\site-packages\appium\webdriver\webdriver.py", line 357, in start_session response = self.execute(RemoteCommand.NEW_SESSION, parameters) File "c:\ProgramData\robocorp\ht\8211519_b1f3c24_9ba66f27\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 321, in execute self.error_handler.check_response(response) File "c:\ProgramData\robocorp\ht\8211519_b1f3c24_9ba66f27\lib\site-packages\selenium\webdriver\remote\errorhandler.py", line 242, in check_response
raise exception_class(message, screen, stacktrace) selenium.common.exceptions.WebDriverException: Message: Failed to locate opened application window with appId: C:\Program Files\LifeTechnologies\AttuneNxT\Attune.exe, and processId: 12224


Ran 0 tests in 11.814s

FAILED (errors=1)

winappdriver error:

POST /session HTTP/1.1 Accept: application/json Accept-Encoding: identity Connection: keep-alive Content-Length: 378 Content-Type: application/json;charset=UTF-8 Host: 127.0.0.1:4723 User-Agent: appium/python 1.3.0 (selenium/3.141.0 (python windows)) X-Idempotency-Key: 092d1ecf-8fec-47df-abb7-7034d308fc73

{"capabilities": {"firstMatch": [{"platformName": "Windows", "appium:platformVersion": "10", "appium:deviceName": "WindowsPC", "appium:app": "C:\Program Files\LifeTechnologies\AttuneNxT\Attune.exe"}]}, "desiredCapabilities": {"platformName": "Windows", "platformVersion": "10", "deviceName": "WindowsPC", "app": "C:\Program Files\LifeTechnologies\AttuneNxT\Attune.exe"}} HTTP/1.1 500 Internal Error Content-Length: 195 Content-Type: application/json

{"status":13,"value":{"error":"unknown error","message":"Failed to locate opened application window with appId: C:\Program Files\LifeTechnologies\AttuneNxT\Attune.exe, and processId: 25380"}}

anunay1 commented 6 months ago

It's still will not work and you will get the same except.

anunay1 commented 6 months ago

Check in closed issue with my id, you will get the code.

anunay1 commented 6 months ago

Read the FAQ first before you start.

Surekha-tfs commented 6 months ago

Hey i checked with your id i did not get