Hi … it takes 34 seconds to read text of 20 attributes on one page, and 5 seconds to read the same data on another page. What could be the reason? Is there a faster way to read data on the first page ?
${get_text} Get Text //div[@class=‘abc’][1]//div[@class=‘def’]//div[@class=‘some-value’]
I doubt anyone will be able to help you unless you give some detail, here are some questions that might lead you to an answer or at least help someone else help you:
are both pages accessable online so we can see the difference?
how are you reading the values on the fist page, what are you doing differently on the second page?
what is the differences in the html / js / css between the 2 pages?
which library (libraries?) are you using to read the pages?
I use the standard Get Text Robot Framework library
I tried to use a more detail xpath by adding extra node but it doesn’t improve searching time //123//456//div[@class=‘abc’][1]//div[@class='def ']// div[@class=‘some value’]
as my last step, i copied full xpath into code, but it doesn’t help
Get Text is not a standard keyword for Robot Framework, so it belongs to a library, since you are talking about web pages and xpath’s I will guess you are using SeleniumLibrary? Can you confirm this? while on this topic can you confirm which browser you are using and if it’s the same browser for both pages?
This is likely a clue to your issue, can you give some detail about the depth of the nesting of the elements in each page, basically to find a solution we probably will need to find a way to reproduce the issue first. Ideally if you can provide the html of the two pages and which elements you are trying to query then we could try and reproduce the issue.
Note also, that the issue may not be with robot framework or even SeleniumLibrary, it may be higher up like selenium itself or even the browser
i found that next keyword execution takes delay in the execution to 15-18 sec '${check_element} Run Keyword And Return Status Element Should Be Visible locator ’
next combination gave even longer execution time - 18 sec
‘${check_element}= Run Keyword and Return Status Wait Until Page Contains Element locator 3s’
next keyword crush execution when locator wasn’t found
‘${timer1WayPage} Wait Until Keyword Succeeds 3 sec 1 sec Element Should Be Visible locator’