[
https://issues.apache.org/jira/browse/WICKET-1830?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12631633#action_12631633
]
Timo Rantalaiho commented on WICKET-1830:
-----------------------------------------
Hey Igor, did you try if this can really be used with Selenium?
My colleague seemed to remember that colon (:) would cause problems in values
and attribute names when used in Selenium xpath expressions. So it might be
good to make their format pluggable.
Maybe something like
if (getApplication().getDebugSettings().isOutputComponentPath())
{
IWicketPathPrinter printer =
getApplication().getDebugSettings().getWicketPathPrinter();
tag.put(printer.getPathAttributeName(), printer.getWicketPathOf(this);
}
public class DefaultWicketPathPrinter implements IWicketPathPrinter
{
public String getPathAttributeName() {
return "wicket:path";
}
public String getWicketPathOf(Component component)
{
return component.getPageRelativePath();
}
}
> Include Component Path in Generated Markup
> ------------------------------------------
>
> Key: WICKET-1830
> URL: https://issues.apache.org/jira/browse/WICKET-1830
> Project: Wicket
> Issue Type: Improvement
> Components: wicket
> Reporter: James Carman
> Assignee: Igor Vaynberg
> Priority: Minor
> Fix For: 1.3.5, 1.4-M4
>
>
> For unit testing purposes, it would be nice to know the exact ids of the
> components on your wicket pages. Perhaps the generated markup could contain
> a wicket:path attribute?
> <div wicket:path="some:path:to:this:div">
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.