Hello Marcin, I just came across this issue just now, while having a similar problem with nested frames. It seemed to me like the browser would always end up in the top level document after a withFrame call, at least adding driver.switchTo().frame() after every call to withFrame (inside a nested frame (!!!)) is solving the issue for me right now. Looking at the code of DefaultFrameSupport, there is indeed a call to driver.switchTo().defaultContent(), in the finally block of executeWithFrame ...
I am assuming that driver.switchTo().defaultContent() would indeed switch to the top level document in the browser, as opposed to the next higher up frame, do you know if that is actually true? Here is the code of my method inside a page loaded inside a frame (inputs for cardNumber and CVV are inside nested frames), and it worked after adding the lines below the comments: void inputCreditCardDetails( String cardNumber, String expiryDate, String holderName, String cvv) { withFrame(cardNumberIframe) { cardNumberInput << cardNumber } // Not sure why we need this extra frame switching here... driver.switchTo().frame($('.checkout-modal-iframe').firstElement()) expiryDateInput << expiryDate holderNameInput << holderName withFrame(cvvInputIframe) { cvvInput << cvv } // Not sure why we need this extra frame switching here... driver.switchTo().frame($('.checkout-modal-iframe').firstElement()) } -- 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 geb-user+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/geb-user/665a6164-5146-47d8-8ce0-59dd3aa22891%40googlegroups.com.