Ok, so it looks like the navigator you passed to the withFrame() call in DocumentPage on line 77 does not match any elements. I can see from the stacktrace that you are already within a withFrame() call there. I would probably try to confirm that your selectors are right as the first step.
On Thu, Mar 15, 2018 at 7:33 PM, Jeff <[email protected]> wrote: > Aaagh, can't believe I forget to include the error! The exception I'm > getting is shown below. > > But thanks Marcin for confirming that my code syntax looks good. The > rendered page I'm working with actually has 21 iframes, so I'll dig more > into the hierarchy of the nested frames to make sure I've got that part > correct. > > The exception is: > > org.openqa.selenium.NoSuchFrameException: No elements for given content: > [] > Build info: version: '3.11.0', revision: 'e59cfb3', time: > '2018-03-11T20:26:55.152Z' > System info: host: 'MacBook-Pro-2.local', ip: > '2601:602:9701:1a30:4d40:10a1:f9ec:5ada', os.name: 'Mac OS X', os.arch: > 'x86_64', os.version: '10.13.3', java.version: '1.8.0_131' > Driver info: driver.version: unknown > > at geb.frame.DefaultFrameSupport.executeWithFrame( > DefaultFrameSupport.groovy:79) > at geb.frame.DefaultFrameSupport.withFrame(DefaultFrameSupport.groovy:44) > at geb.Page.withFrame(Page.groovy:120) > at pages.googleDocs.DocumentPage.loginToRefWorks_closure8( > DocumentPage.groovy:77) > at pages.googleDocs.DocumentPage.loginToRefWorks_closure8( > DocumentPage.groovy) > at geb.frame.DefaultFrameSupport.executeWithFrame( > DefaultFrameSupport.groovy:69) > at geb.frame.DefaultFrameSupport.executeWithFrame( > DefaultFrameSupport.groovy:81) > at geb.frame.DefaultFrameSupport.withFrame(DefaultFrameSupport.groovy:44) > at geb.Page.withFrame(Page.groovy:120) > at pages.googleDocs.DocumentPage.loginToRefWorks(DocumentPage.groovy:76) > at geb.Browser.methodMissing(Browser.groovy:209) > at geb.spock.GebSpec.methodMissing(GebSpec.groovy:56) > at specs.references.CanSearchReferencesSpec.User can select RefWorks > add-on(CanSearchReferencesSpec.groovy:18) > > > > > > > > On Thursday, March 15, 2018 at 11:18:18 AM UTC-7, Marcin Erdmann wrote: >> >> Hi Jeff, >> >> You will need to be more specific than "that's not working". Can you >> please share the error you're getting? The code that you pasted looks to me >> like it should work. >> >> Marcin >> >> On Thu, Mar 15, 2018 at 3:56 PM, Jeff <[email protected]> wrote: >> >>> I'm new to Geb, and trying to use it to automate interactions on a site >>> that makes heavy use of nested iframes. >>> >>> This is an example of the basic structure (leaving out some of the basic >>> markup not relevant to my question): >>> >>> <iframe id="firstFrame"> >>> <iframe id="secondFrame"> >>> <iframe id="thirdFrame"> >>> <form id="login_form"> >>> <input id="email" type="text"> >>> <input id="password" type="password"> >>> <input class="action" value="Log in" id="login_button" >>> type="submit"> >>> </form> >>> </iframe> >>> </iframe> >>> </iframe> >>> >>> >>> My goal is to interact with elements in the "login_form" within the >>> thirdFrame. >>> >>> I've tried a couple of different approaches using "withFrame()", along >>> these lines: >>> >>> withFrame($("#firstFrame")) { >>> withFrame($("#secondFrame")) >>> { >>> withFrame($("#thirdFrame")) { >>> assert { $("#email").displayed } >>> } >>> } >>> } >>> >>> >>> ...but that's not working. Since I'm also new to Groovy, this may just >>> be a lack of understanding of basic code syntax. >>> >>> Can anyone suggest the correct syntax for interacting with nested >>> iframes in Geb? >>> >>> >>> >>> >>> -- >>> You received this message because you are subscribed to the Google >>> Groups "Geb User Mailing List" group. >>> To unsubscribe from this group and stop receiving emails from it, send >>> an email to [email protected]. >>> To post to this group, send email to [email protected]. >>> To view this discussion on the web visit https://groups.google.com/d/ms >>> gid/geb-user/88a389b1-b6c9-4d72-8140-4efc00e7e5c2%40googlegroups.com >>> <https://groups.google.com/d/msgid/geb-user/88a389b1-b6c9-4d72-8140-4efc00e7e5c2%40googlegroups.com?utm_medium=email&utm_source=footer> >>> . >>> For more options, visit https://groups.google.com/d/optout. >>> >> >> -- > You received this message because you are subscribed to the Google Groups > "Geb User Mailing List" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > To post to this group, send email to [email protected]. > To view this discussion on the web visit https://groups.google.com/d/ > msgid/geb-user/20a49c28-c4e2-4931-a1d0-29d3ad304c54%40googlegroups.com > <https://groups.google.com/d/msgid/geb-user/20a49c28-c4e2-4931-a1d0-29d3ad304c54%40googlegroups.com?utm_medium=email&utm_source=footer> > . > > For more options, visit https://groups.google.com/d/optout. > -- You received this message because you are subscribed to the Google Groups "Geb User Mailing List" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/geb-user/CA%2B52dQQ0Oa%2BcPc%2BVKO8GMgBruAOtk8VwfogqqLQR%3Dwh_a476qw%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.
