Last active
April 9, 2024 06:50
-
-
Save kinuasa/e7099f6c551e7713f787a3bc8176a0b5 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SET WindowsApplicationDriverPath TO $'''\"C:\\Program Files (x86)\\Windows Application Driver\\WinAppDriver.exe\"''' | |
SET AppId TO $'''Microsoft.WindowsCalculator_8wekyb3d8bbwe!App''' | |
SET WindowsApplicationDriverUrl TO $'''http://127.0.0.1:4723''' | |
System.RunApplication.RunApplication ApplicationPath: $'''cmd''' CommandLineArguments: $'''/k %WindowsApplicationDriverPath%''' WorkingDirectory: $'''C:\\''' WindowStyle: System.ProcessWindowStyle.Normal ProcessId=> AppProcessId | |
Web.InvokeWebService.InvokeWebService Url: $'''%WindowsApplicationDriverUrl%/session''' Method: Web.Method.Post Accept: $'''application/json''' ContentType: $'''application/json''' RequestBody: $'''{\"desiredCapabilities\":{\"app\":\"%AppId%\",\"deviceName\":\"WindowsPC\",\"platformName\":\"Windows\"}}''' ConnectionTimeout: 30 FollowRedirection: True ClearCookies: False FailOnErrorStatus: False EncodeRequestBody: False UserAgent: $'''Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.21) Gecko/20100312 Firefox/3.6''' Encoding: Web.Encoding.AutoDetect AcceptUntrustedCertificates: False ResponseHeaders=> WebServiceResponseHeaders Response=> WebServiceResponse StatusCode=> StatusCode | |
Variables.ConvertJsonToCustomObject Json: WebServiceResponse CustomObject=> JsonAsCustomObject | |
Web.InvokeWebService.InvokeWebService Url: $'''%WindowsApplicationDriverUrl%/session/%JsonAsCustomObject['sessionId']%/element''' Method: Web.Method.Post Accept: $'''application/json''' ContentType: $'''application/json''' RequestBody: $'''{\"using\":\"xpath\",\"value\":\"/Window[@ClassName=\\\"ApplicationFrameWindow\\\"][@Name=\\\"電卓\\\"]/Window[@ClassName=\\\"Windows.UI.Core.CoreWindow\\\"]/Custom[@AutomationId=\\\"NavView\\\"]/Group[@ClassName=\\\"LandmarkTarget\\\"]/Group[@AutomationId=\\\"NumberPad\\\"]/Button[@AutomationId=\\\"num5Button\\\"]\"}''' ConnectionTimeout: 30 FollowRedirection: True ClearCookies: False FailOnErrorStatus: False EncodeRequestBody: False UserAgent: $'''Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.21) Gecko/20100312 Firefox/3.6''' Encoding: Web.Encoding.AutoDetect AcceptUntrustedCertificates: False ResponseHeaders=> WebServiceResponseHeaders Response=> WebServiceResponse StatusCode=> StatusCode | |
Variables.ConvertJsonToCustomObject Json: WebServiceResponse CustomObject=> JsonAsCustomObject | |
Web.InvokeWebService.InvokeWebService Url: $'''%WindowsApplicationDriverUrl%/session/%JsonAsCustomObject['sessionId']%/element/%JsonAsCustomObject['value']['ELEMENT']%/click''' Method: Web.Method.Post Accept: $'''application/json''' ContentType: $'''application/json''' RequestBody: $'''{}''' ConnectionTimeout: 30 FollowRedirection: True ClearCookies: False FailOnErrorStatus: False EncodeRequestBody: False UserAgent: $'''Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.21) Gecko/20100312 Firefox/3.6''' Encoding: Web.Encoding.AutoDetect AcceptUntrustedCertificates: False ResponseHeaders=> WebServiceResponseHeaders Response=> WebServiceResponse StatusCode=> StatusCode |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment