Code Monkey home page Code Monkey logo

Comments (3)

cmin764 avatar cmin764 commented on June 12, 2024

That's correct and thank you for the report!

Tech details

While the @with_timeout decorator correctly sets the timeout temporarily using auto.SetGlobalSearchTimeout(timeout), that's not affecting the children traversal given the path: strategy.

Potential solution: Improve the RPA.core.windows.locators.LocatorMethods._get_control_from_path() so it listens for the set timeout when it looks for a non-existing child and it waits until it either appears or either the timeout ticks away for the total wait duration. (assuming that the structure stays stable, otherwise we have to retry the entire path traversal every time it fails until the timeout passes or the final leaf is found)

from rpaframework.

kkotenko avatar kkotenko commented on June 12, 2024

I seem to have a similar, if not same, issue with Control Window, with this code:

Unit test Control window with Timeout
    Control window    name:willneverbefound     timeout=2.1

image

Here, after 2.1 seconds (plus maybe some small grace period), I would expect the ControlWindow to produce either a WindowControlError or some kind of time out error. Instead, the test waits the whole defined Timeout time (which is my case is 1 minute).

from rpaframework.

cmin764 avatar cmin764 commented on June 12, 2024

I seem to have a similar, if not same, issue with Control Window, with this code:

Unit test Control window with Timeout
    Control window    name:willneverbefound     timeout=2.1

image

Here, after 2.1 seconds (plus maybe some small grace period), I would expect the ControlWindow to produce either a WindowControlError or some kind of time out error. Instead, the test waits the whole defined Timeout time (which is my case is 1 minute).

There's a small caveat in this keyword as it tries with two different types of controls, where the same provided timeout is waited twice (for every type of control tried). So from the logs, it looks like a global of ~30s is set and two such waits produces the total of 1 minute.

Still, this not explains why the temporarily provided 2.1s timeout isn't respected. Maybe @mikahanninen can throw a detailed look into it.

from rpaframework.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.