Mouseover and Click actions as utils

38 views
Skip to first unread message

Pooja Kurbetti

unread,
Aug 30, 2017, 10:37:31 AM8/30/17
to Geb Development Mailing List
Hello,
Just a suggestion could we have some utils for Mouseover, click and displayed :

Example:
/**
* Mouse over an element.
* @param elt the element
*/
public void mouseOver(Navigator elt) {
interact {
moveToElement(elt)
}
}

/**
* Perform click action
* @param elt the element
*/
public void clickAction(TemplateDerivedPageContent elt) {
elt.click()
}

Regards,
Pooja

Marcin Erdmann

unread,
Sep 3, 2017, 3:36:14 PM9/3/17
to geb...@googlegroups.com
Pooja,

I do not think that your suggestions are generic enough to warrant adding them to the API as it might get bloated. 

You can add these methods to a class that extends geb.Module instead. Then you should make the navigators that you want to call these methods on bases of that module instances. You can learn more about how to achieve it from the chapter on modules in the Book of Geb: http://www.gebish.org/manual/current/#modules.

Marcin

--
You received this message because you are subscribed to the Google Groups "Geb Development Mailing List" group.
To unsubscribe from this group and stop receiving emails from it, send an email to geb-dev+unsubscribe@googlegroups.com.
To post to this group, send email to geb...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/geb-dev/7e6137f2-dab0-47b8-8bf2-2a4f06135a88%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages