You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
With the usage of groovy.lang.Interceptor to intercept all calls to "value", "click", "sendKeys", "at" on TemplateDerivedPageContent, NonEmptyNavigator, Browser we generate an action log which looks like this:
Before the geb 13 release TemplateDerivedPageContent did have more information and we could generate the full structural path, e.g., [HomePage.sidebar.searchbutton].click(). And if you define a Module with $(...).module(..) it wil be reported as unknown, because the information is lost.
So the feature request is to add this information to both TemplateDerivedPageContent and Module.
For example add a getParent() and getTemplatePath() to both classes and maybe getFullTemplatePath() as well which would return the full path up to the containing page.
We currently use this function to deduce the display name:
If you find the current implementation too verbose with the arrows, types and argument values we could always make the conversion from owner, template name and arguments customisable using a strategy object which would be provided via the configuration mechanism.
If you still believe that adding the following methods:
List<String> PageContentContainer.getPath() (both Page and Module implement PageContentContainer)
List<String> TemplateDerivedPageContent.getPath()
which would return what you're proposing as getFullTemplatePath() and then you building up the string yourself to have full control is the way to go I'm happy to do it but I just wanted to double check with you first.
FYI, @leonard84, I ended up adding PageContentContainer getRootContainer() and List<String> getContentPath() to PageContentContainer and TemplateDerivedPageContent
@leonard84 that action log looks great. I'm trying to built exactly that for our project. Can you share the code/or a blog which talks about how you went about building it? Thanks.
With the usage of
groovy.lang.Interceptor
to intercept all calls to"value", "click", "sendKeys", "at"
onTemplateDerivedPageContent, NonEmptyNavigator, Browser
we generate an action log which looks like this:Before the geb 13 release
TemplateDerivedPageContent
did have more information and we could generate the full structural path, e.g.,[HomePage.sidebar.searchbutton].click()
. And if you define a Module with$(...).module(..)
it wil be reported as unknown, because the information is lost.So the feature request is to add this information to both
TemplateDerivedPageContent
andModule
.For example add a
getParent()
andgetTemplatePath()
to both classes and maybegetFullTemplatePath()
as well which would return the full path up to the containing page.We currently use this function to deduce the display name:
The text was updated successfully, but these errors were encountered: