Unhandled error "Cannot find context with specified id" using Robot framework Unhandled error "Cannot find context with specified id" using Robot framework selenium selenium

Unhandled error "Cannot find context with specified id" using Robot framework


This issue seems to be reemerging in chromedriver, latest one being: https://bugs.chromium.org/p/chromedriver/issues/detail?id=2198

According to this ticket can be fixed in two ways:

  • switch to chromedriver version which does not have this issue
  • add wait after switching to frame


So I had to change the code like this to work in other frame:

Log comment ${comment}   wait until element is visible    ${RICH TEXT AREA}    40   sleep   1   click element    ${RICH TEXT AREA}   Wait Until Element Is Visible    ${FRAME}    40   Select Frame    ${FRAME}   wait until element is visible    ${IFRAME BODY}   20   input text   ${IFRAME BODY}   ${comment}   Unselect Frame

${IFRAME BODY} is still //body in Iframe and surprisingly it inputs the text all the time now...And unfortunately it does not work without sleep :( But with sleep it works..