fixed error caused by editing twice
This commit is contained in:
@@ -146,13 +146,14 @@ public class XpathManager implements Runnable{
|
|||||||
if (!parentClassStr.isEmpty())
|
if (!parentClassStr.isEmpty())
|
||||||
{
|
{
|
||||||
if (!txtStr.isEmpty()&&useFullTextMatching) {
|
if (!txtStr.isEmpty()&&useFullTextMatching) {
|
||||||
if (txtStr.length() > maxTextLength) {// if the text is too long only test the first maxTextLength characters
|
String copyOfTxtStr = txtStr;
|
||||||
txtStr = WindowsEnumeratedXml.escapeXmlAttributeValue(txtStr.substring(0, maxTextLength));
|
if (copyOfTxtStr.length() > maxTextLength) {// if the text is too long only test the first maxTextLength characters
|
||||||
txtStr = " and starts-with(@text,'" + txtStr + "')";
|
copyOfTxtStr = WindowsEnumeratedXml.escapeXmlAttributeValue(copyOfTxtStr.substring(0, maxTextLength));
|
||||||
|
copyOfTxtStr = " and starts-with(@text,'" + copyOfTxtStr + "')";
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
txtStr = " and @text='" + txtStr + "'";
|
copyOfTxtStr = " and @text='" + copyOfTxtStr + "'";
|
||||||
builtXpath = "//win[@class='" + parentClassStr + "'" + parentTxtStr + "]/win[@class='" + classStr + "'" + txtStr + "]";
|
builtXpath = "//win[@class='" + parentClassStr + "'" + parentTxtStr + "]/win[@class='" + classStr + "'" + copyOfTxtStr + "]";
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user