I'm unable to locate element inside #document and frameset tag.

18 views
Skip to first unread message

skaramjb

unread,
Oct 25, 2017, 5:07:31 PM10/25/17
to QAPlanet
Hi,


I'm unable to locate element inside frameset and #document tag.  Can you please help me

The code is :

<iframe id="parentframe">

   #document
     
      <html>
        <frameset>

           <frameset>

                 <frameset>
 
                       <frame>

                             #document
                                  
                                   <html>

                                       <body>

                                            <div>
                                           
                                                <div>
                 
                                                    <div>
                                   
                                                       <span>Domain Utils</span>



            I need to access this Domain Utils, how can I do that.  I never worked with #document.  Do I have to reference it also in xpaths?  Do I have to moveToelement to frameset also, just like what we do for frames, to locate elements under them?

Your help will be greatly appreciated.


Thanks,
Skaram

Siva Prasad

unread,
Oct 25, 2017, 11:09:04 PM10/25/17
to qapl...@googlegroups.com
Have you used switch to frames


--
You received this message because you are subscribed to the Google Groups "QAPlanet" group.
To unsubscribe from this group and stop receiving emails from it, send an email to qaplanet+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

S Karam

unread,
Oct 26, 2017, 4:23:57 AM10/26/17
to qapl...@googlegroups.com
HI,

I'm able to switch to the parentframe, but unable to switch to child frames.  There are framesets and #document in the middle.  I don't know how to work with #document tag, if I have to ignore or include in xpaths?  And I'm unable to switchTo frameset[1].  Please help.



Regards,
Swapna

krishnadhar

unread,
Oct 26, 2017, 4:28:18 AM10/26/17
to qapl...@googlegroups.com
can you provide the page link.

S Karam

unread,
Oct 26, 2017, 8:25:55 AM10/26/17
to qapl...@googlegroups.com
It's a company's intranet site

krishnadhar

unread,
Oct 26, 2017, 8:28:10 AM10/26/17
to qapl...@googlegroups.com
can you get the back end html code? from firefox's firebug. The reason being without the actual backend code, you can only get some vague answers which might or might not work, hence the back-end code.

Nataraj M

unread,
Oct 27, 2017, 3:25:04 AM10/27/17
to qapl...@googlegroups.com
driver.switchTo().frame(driver.findElement(By.id("frameId")));
//do your stuff
driver.switchTo().defaultContent();

--

S Karam

unread,
Oct 27, 2017, 12:47:54 PM10/27/17
to qapl...@googlegroups.com

 Thanks all for your reply.


I just did the regular method, It worked fine.  Moved to parentframe and then to childframe.  Initially I was confused with the frameset and #document tag.  But no need to reference them.   


Regards,
skaram

Nataraj M

unread,
Oct 28, 2017, 4:42:51 AM10/28/17
to qapl...@googlegroups.com
k
Reply all
Reply to author
Forward
0 new messages