Hi Yori,

Accessing elements inside of iframes from modules should, as you are
correctly expecting, work the same way as doing so from pages.

Can you please explain what do you mean by "I get a timeout"? I don't see
any waitFor() calls in the code you provided so I'm baffled at why you
would get any kind of timeout. Providing a stacktrace you get when you are
seeing that timeout would probably also help to understand what is going on
here.

One thing that comes to mind that might be causing different behaviour in
modules from the one in pages is that modules are scope, i.e. they have a
base element (http://www.gebish.org/manual/current/#base-and-context) which
is used as the context for any lookups done within the module. Can you
please confirm that the frame you are accessing is located within the base
element of your module?

Marcin

On Tue, Nov 22, 2016 at 11:10 AM, Yori Kurita <[email protected]> wrote:

> Hi,
> I ran into a strange problem and wonder if its my fault or if it is a bug.
> Following scenario:
> - Page A contains several text fields , whose content i want to verify. 1
> of these text fields is within an iframe.
> - When i want to verify if the text is correct by using :
>
> def checkText(text){
>        withFrame(frame){messageText.contains(text}
> }
>
> as a method in PageObejct for PageA , it works.
>
> But since i have several other Pages, where i want to do the same check, i
> moved it into a module.
> When i now run:
>
>  - module(VerifyMessage).checkText(text)
>
> I get a timeout. All other elements, I check in the module are found (divs
> with Text information).
> So i moved just the check for the text back into the PageObejct for Page
> A, then it works again.
>
> Do I do something wrong here? Do you need more Information?
>
>
> Regards
>
> --
> 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/ba795fd4-dcdb-4cb2-9cb3-a8e55bb3444b%40googlegroups.com
> <https://groups.google.com/d/msgid/geb-user/ba795fd4-dcdb-4cb2-9cb3-a8e55bb3444b%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%2B52dQT2nZa-%3DQuSse721tWKKmEKkz1E%3DhRoHgj1GVyJxnTTRA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to