ericmckean / chromedriver

Automatically exported from code.google.com/p/chromedriver
0 stars 0 forks source link

The frame element is identified but not able to switch to the frame as it throws "element is not a frame" exception #1046

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago

What steps will reproduce the problem?
1. Install GC 41 beta.
2. Install a toolbar (extension) in GC which will be embedded as a separate 
iframe in the browser.
3. Try to switch the webdriver's control to the iframe

What is the expected output? What do you see instead?

Though i am able to fetch the frame element, i am not able to switch to the 
frame as it throws "element is not a frame" exception

Selenium version: 2.44.0 
Chrome Driver version : 2.14.313457
OS: Win 7 (x64)
Browser: Google Chrome 
Browser version: GC 41b

=========================================================================
=========================================================================

I am working on automating a toolbar(extension) in Google Chrome.

The toolbar(extension) is embedded as an iframe in the browser page with the 
following structure ::

<html>
   <head>...</head>
   <body>...</body>
   <iframe>...</iframe>
</html>

I want to perform some operations on the extension (iframe). Hence, im using 
the below code to switch to the desired iframe.

//code
wDriver.SwitchTo().DefaultContent();
IWebElement frame = wDriver.FindElement(By.id("someframeid");
wDriver.SwitchTo().Frame(frame);

I am able to get the "frame" web element with the above code.
But, while switching to the frame, I am facing the following exception ::

[OpenQA.Selenium.NoSuchFrameException] = {"no such frame: element is not a 
frame  (Session info: chrome=41.0.2272.53)  (Driver info: 
chromedriver=2.14.313457)"}

"no such frame: element is not a frame"

I am able to switch to the same frame SOMETIMES when i use GC 40 (i am trying 
to justify here that the same code works fine sometimes in GC 40 & there is no 
error in the code i used). But with GC 41b, i never succeeded in switching to 
the frame.

I did NOT find any relavant information or help notes in web on the exception i 
faced ::  "no such frame: element is not a frame"

Why is the webdriver NOT considering the element as a frame in GC41b when it 
works fine with GC40 sometimes?

What fix should i try with?

Any help would be really appreciated. 

Original issue reported on code.google.com by victory....@gmail.com on 18 Feb 2015 at 10:37

GoogleCodeExporter commented 9 years ago
Even am facing the similar issue "element is not a frame" while switching to an 
extension in GC.

Original comment by dian....@gmail.com on 19 Feb 2015 at 5:12

GoogleCodeExporter commented 9 years ago
Would you please provide a test page and the corresponding test code for us to 
reproduce the problem? Otherwise, we might not be able to investigate.

Original comment by gmanikp...@chromium.org on 17 Mar 2015 at 7:16