Navigation

    OpenIAP

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups

    Check if window element exists?

    General Discussion
    element window openrpa
    3
    3
    77
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • B
      b last edited by

      Hello!

      First, really nice to see a good forum - it is way easier to search info compared to rocket chat! 👍

      I need to automate parts of windows application, Visma. I was wondering what the best approach is to find out if sub-window is present in the main window?

      Regards

      Benny Mildh 1 Reply Last reply Reply Quote 0
      • Benny Mildh
        Benny Mildh @b last edited by

        @b I solved this by using GetElement. I create a UiElement variable, an array, and set that to the property "Elements" of the GetElement activity. Property "MinResult" = 0, "MaxResult" = 1.

        I can than check the length of the Elements variable. If it is equal to 1, I know I found the window. Since this is a native windows application, I also set the timeout of GetElement to 1000ms. Default value is 3000. If this had been a web application I would probably increase the value due to possible lag time by using internet.

        Anyway, I'm not sure if this the way to do it? Any other way? Best practice? This seems pretty fast.

        Allan Zimmermann 1 Reply Last reply Reply Quote 0
        • Allan Zimmermann
          Allan Zimmermann @Benny Mildh last edited by

          As @benny-mildh perfectly explained, you can use Get Element for that, just remember to set Min Results to 0, so it does not throw and error if it does not find the window/element

          1 Reply Last reply Reply Quote 0
          • First post
            Last post