diff options
author | Kevin Jin <kjin@google.com> | 2014-04-17 18:01:04 -0700 |
---|---|---|
committer | Kevin Jin <kjin@google.com> | 2014-04-17 18:01:04 -0700 |
commit | 476f54bb2b1219b2a83960663860c76f172ba670 (patch) | |
tree | 9f2793dc663f40d38c7f90bfa5f586c64f94fc56 | |
parent | 207c9f5d9468a87e741307c1fd19b62282797c63 (diff) | |
download | droiddriver-476f54bb2b1219b2a83960663860c76f172ba670.tar.gz |
fix to-uiautomator.xsl for selection-start attribute
Change-Id: I8e2e0f68c8cee71a7db06c3d3bd32c5719c87c29
-rw-r--r-- | to-uiautomator.xsl | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/to-uiautomator.xsl b/to-uiautomator.xsl index b4b0af3..f7d46af 100644 --- a/to-uiautomator.xsl +++ b/to-uiautomator.xsl @@ -1,5 +1,6 @@ <?xml version="1.0"?> -<!-- To convert DroidDriver dump (say dd.xml) to UiAutomatorViewer format (say ua.uix), run: xsltproc -o ua.uix to-uiautomator.xsl dd.xml --> +<!-- To convert DroidDriver dump (say dd.xml) to UiAutomatorViewer format (say ua.uix), run: --> +<!-- xsltproc -o ua.uix to-uiautomator.xsl dd.xml --> <xsl:transform version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> <xsl:strip-space elements="*" /> <xsl:template match="/"> @@ -24,9 +25,13 @@ <xsl:attribute name="scrollable"><xsl:value-of select="boolean(@scrollable)" /></xsl:attribute> <xsl:attribute name="long-clickable"><xsl:value-of select="boolean(@long-clickable)" /></xsl:attribute> <xsl:attribute name="password"><xsl:value-of select="boolean(@password)" /></xsl:attribute> - <xsl:attribute name="selection-start"><xsl:value-of select="@selection-start" /></xsl:attribute> - <xsl:attribute name="selection-end"><xsl:value-of select="@selection-end" /></xsl:attribute> <xsl:attribute name="selected"><xsl:value-of select="boolean(@selected)" /></xsl:attribute> + <xsl:if test="@selection-start"> + <xsl:attribute name="selection-start"><xsl:value-of select="@selection-start" /></xsl:attribute> + </xsl:if> + <xsl:if test="@selection-end"> + <xsl:attribute name="selection-end"><xsl:value-of select="@selection-end" /></xsl:attribute> + </xsl:if> <xsl:attribute name="bounds"><xsl:value-of select="@bounds" /></xsl:attribute> <!-- These two attributes are added by DroidDriver to help diagnosis --> <!-- They are intentionally named in a different style --> |