sikuli-driver team mailing list archive
-
sikuli-driver team
-
Mailing list archive
-
Message #59566
Re: [Question #819694]: Robot famework Sikuli library for power builder automation
Question #819694 on SikuliX changed:
https://answers.launchpad.net/sikuli/+question/819694
scarley jeo posted a new comment:
The issue you're encountering is likely due to Sikuli's reliance on
visual recognition, which requires the screen content to remain static
and visible in order to successfully identify and interact with the UI
elements. When you switch to another tab or browser, Sikuli cannot "see"
the elements on the screen, leading to test failures. Here are a few
potential solutions:
Use App.focus() Method: In Robot Framework with Sikuli, you can use the App.focus() method to bring the PowerBuilder application window back into focus before performing actions. This ensures Sikuli can locate and interact with the UI elements without issues.
Regards https://ejhrc.com/
Example:
robot
Copy code
App.focus("PowerBuilderAppName")
Ensure the Application Window is Active: Before performing any interaction with PowerBuilder, ensure that the application window is active. You can use a command like bring_to_front() or focus() in Sikuli to make sure the window is in focus and visible on the screen.
Disable or Minimize Other Windows: You can programmatically disable or
minimize other windows that might be obstructing the PowerBuilder
application during test execution. This will help Sikuli to focus solely
on the desired screen.
Avoid Switching Tabs During Test Execution: Since Sikuli depends on the
screen's current state for image recognition, avoid switching tabs or
using other applications during the test. If you must, ensure that the
application window you’re interacting with is not minimized or covered.
Use wait() or sleep() to Ensure UI Elements are Ready: If there's any
delay in UI rendering or a transition between tabs, use wait() or
sleep() to give time for the screen to stabilize before Sikuli tries to
interact with it.
Example:
robot
Copy code
wait("image_of_element.png", 10) # Wait for the element to appear
Consider Using a More Robust Framework for GUI Testing: If Sikuli's dependency on screen focus is too limiting for your automation, you might want to consider a more robust framework or tool designed for PowerBuilder automation, such as a tool that supports application-level APIs or automation with a more direct approach (e.g., using Pywinauto, AutoIt, or PowerBuilder's own scripting capabilities).
--
You received this question notification because your team Sikuli Drivers
is an answer contact for SikuliX.