Is it possible to mix the code generated by the Windows Recorder with your own code?
As soon as I try to mix something winappdriver does not find the elements anymore
Example (the same action twice. but is to be interwoven):
WiniumDriver driver = null
String appPath = ‘C:/Windows/System32/notepad.exe’
DesktopOptions option = new DesktopOptions()
option.setApplicationPath(appPath)
option.setDebugConnectToRunningApp(false)
option.setLaunchDelay(2)
driver = new WiniumDriver(new URL(‘http://127.0.0.1:4723’), option)
WebElement textEditor = driver.findElement(By.name(“Text-Editor”)).sendKeys(“Test”)
driver.findElement(By.name(“Schließen”)).click()
driver.findElement(By.name(“Nicht speichern”)).click()
Windows.startApplicationWithTitle(‘C:\Windows\notepad.exe’, ‘’)
Windows.setText(findWindowsObject(‘Object Repository/Edit’), ‘Test’)
Windows.click(findWindowsObject(‘Object Repository/Button’))
Windows.click(findWindowsObject(‘Object Repository/Button(1)’))
but this one does not run
WiniumDriver driver = null
String appPath = ‘C:/Windows/System32/notepad.exe’
DesktopOptions option = new DesktopOptions()
option.setApplicationPath(appPath)
option.setDebugConnectToRunningApp(false)
option.setLaunchDelay(2)
driver = new WiniumDriver(new URL(‘http://127.0.0.1:4723’), option)
Windows.setText(findWindowsObject(‘Object Repository/Edit’), ‘Test’)
Windows.click(findWindowsObject(‘Object Repository/Button’))
Windows.click(findWindowsObject(‘Object Repository/Button(1)’))
Is there a way to parse the Windows objects into the driver?