[Python] How to call a keyword recursively in Robot Framework?

Discussão em 'Python' iniciado por Stack, Fevereiro 1, 2025.

  1. Stack

    Stack Membro Participativo

    I have a test case to traverse all the links in a website. To achieve this, I'm following the below steps:

    1. Load the home page
    2. Get all links using href tag
    3. Load each link from step 2 in a loop.
    4. Get all links from the page identified in step 3.
    5. For each link from 04, continue step 02....

    The sudo code of the recursive keyword is as follows:

    Visit All Links
    [Arguments] $https://stackoverflow.com/questions/68259859/how-to-call-a-keyword-recursively-in-robot-framework
    Check Link ->It's keyword to load the page and ensure it's not giving 404.
    get links
    for each links
    Visit All Links



    Current behaviour: It's giving maximum limit of started keywords exceeded error. To fix this, I have changed the _started_keywords_threshold value in context.py in robots/running. Then it's working fine.

    Is there any other way to do this without changing the context.py?

    Or is there any simplest way to traverse all pages in Robot Framework?

    Continue reading...

Compartilhe esta Página