7

I am receiving following error while executing the line(selenium chrome driver):

driver.findElements(By.className("myClass")); 

unknown error: unhandled inspector error: {"code":-32000,"message":"Cannot find execution context with given id"}

What is the reason for this error? How can i solve it?

1
  • seems like there is an issue with identification of inspector, can you share the relevant HTML? Commented Feb 4, 2016 at 11:34

4 Answers 4

6

I had this issue today exclusively with ChromeDriver on a project that has been working fine. I found that upgrading to the following version of ChromeDriver fixed the issue for me:

ChromeDriver v2.21 Download Page

Sign up to request clarification or add additional context in comments.

Comments

4

Apparently it is due to a bug. See:

https://bugs.chromium.org/p/chromedriver/issues/detail?id=1238

for more information.

I had the same problem. It disappeared after upgrading to version 2.21:

http://chromedriver.storage.googleapis.com/index.html?path=2.21/

Comments

4

The problem also affected me when I was trying to click on an element which was in the default content and I was on an iFrame.

Adding the following code solved it for me:

driver.switchTo().defaultContent(); 

Comments

2

Had this issue it's due to being on the wrong frame. Switch back to the root frame (Default Frame) and you'll be fine

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.