Script working locally not working in ASM using verifyText with xpath
search cancel

Script working locally not working in ASM using verifyText with xpath

book

Article ID: 231988

calendar_today

Updated On:

Products

CA App Synthetic Monitor

Issue/Introduction

We are having problems running this script (ASM Portal OneDrive - EXT)

We realized that the id containing the text to validate was changing frequently, so we decided to use xpath to avoid specify a fixed id.

So we used this code

<selenese>
 <command>waitForElementPresent</command>
 <target><![CDATA[xpath=//*[contains(text(),'Upload')]]]></target>
 <value><![CDATA[Upload]]></value>
</selenese>
<selenese>
 <command>pause</command>
 <target><![CDATA[]]></target>
 <value><![CDATA[9000]]></value>
</selenese>
<selenese>
 <command>verifyText</command>
 <target><![CDATA[xpath=//*[contains(text(),'Upload')]]]></target>
 <value><![CDATA[Upload]]></value>
</selenese>

The script is working locally in Katalon. Once we upload to ASM, the waitForElementPresent is working with no problem, using the xpath as target, but it's not working using the same xpath in the verifyText command.

 

 

Environment

Release :

Component :

Resolution

Used verifyTextPresent instead of verifyText and now the monitor works

<selenese>
 <command>verifyTextPresent</command>
 <target><![CDATA[]]></target>
 <value><![CDATA[Upload]]></value>
</selenese>