0

I use "wait until element is visible" keyword before every "click element" keyword. But now our web application is working slower and basically all of my tests fail. I keep getting error messages like the followings, all because the page is still loading, the navigation has not been finished, and robot does not wait:

"StaleElementReferenceException: Message: stale element reference: element is not attached to the page document (Session info: headless chrome=102.0.5005.61)"

"ElementClickInterceptedException: Message: element click intercepted: Element is not clickable at point (1385, 376). Other element would receive the click: ..."

(Unfortunately, robot documentation does not mention here that "visible" does not mean that the element really is visible and clickable....)

I can not put in sleep times before every "click element" keyword. I can not handle random loading times with explicit waits. It is such an obvious problem and I'm surprised I could not find a simple solution for it yet....

So how can I make sure that before running "click element" keyword, robot framework waits until the element is actually clickable?

buksi
  • 1
  • If your page is loaded - are all components loaded also, so user (or robot framework, does not matter) could click it? If so, then it is enough to make sure, that complete page was loaded. Don't need to do it for every element, that does not make sense – kosist Aug 31 '22 at 06:16
  • How can I make sure then, that the page was loaded? – buksi Aug 31 '22 at 06:38
  • https://stackoverflow.com/questions/36568653/wait-until-the-page-is-loaded – kosist Aug 31 '22 at 06:41
  • as to the link - thanks. we use Angular - so shell I use extended selenium library? After a quick look, I still can not see, which keyword would solve this (very basic) problem? – buksi Aug 31 '22 at 06:55
  • this might be a solution: – buksi Aug 31 '22 at 06:58
  • wait until page contains element //myxpath – buksi Aug 31 '22 at 06:58
  • wait until keyword succeeds 3x 5s click element //myxpath – buksi Aug 31 '22 at 06:58

0 Answers0