How to set the default search rectangle to SUT full screen not phone full screen

Is it possible to set the Global search rectangle Defaults to SUT than the phone or machine to avoid reading status bar or task bar.
image

Post script execution reset to phone full screen.

Or any other method to avoid reading from status bar or taskbar

Hey @Nirmala,

welcome to the eggplant world.
Here are the options:

  1. define the search rectangle for each command via the option: searchrectangle:[100,100,1800,1000]
  2. Screenpart which is a handler/feature that can be used together with option one.
    Click text:"State",searchrectangle:screenpart("LeftHalf")
    make sure to have copied the function screenpart into your script.
  3. using the global property the searchrectangle. It will change the searchrectangle for ALL consecutive text searches. [top left x , top left y, bottom right x, bottom right y]

set the searchrectangle to remotescreenrectangle() +[0,100,0,-200] # the search rectangle starts at 100 pixels from the top and ends 200 pixel before the screen ends at the bottom.

  1. you can also use 2 screenshots within the searchrectangle
    click text:" My Name" , searchrectangle: ["Imag1","Folder/Image2"]

Let me know in case you have further questions.

Cheers,
Karsten

Hello,
Yes, you can set the Global search rectangle defaults to SUT to avoid reading the status bar or taskbar. This can be achieved by configuring the search area to focus only on the relevant portions of the screen.

After script execution, you can use a command or script to reset the phone to full screen, ensuring it doesn’t read from the status bar or taskbar.

Alternatively, using image masking or adjusting the coordinates for your search area can help exclude unwanted regions like the status bar or taskbar.

Best Regards,
Thomas Brown