ALERT: Some images may not load properly within the Knowledge Base Article. If you see a broken image, please right-click and select 'Open image in a new tab'. We apologize for this inconvenience.

How-to examples for WebDriver cmds.

book

Article ID: 240818

calendar_today

Updated On:

Products

CA App Synthetic Monitor

Issue/Introduction

Since your version of webdriver does not allow for IF/THEN to handle things like popups, etc... I have been trying to use the runScript and Eval commands.  I thought I had created an affective runScript scenario.  But, the more I tried to enhance the logic, the more I think it is not working as expected.  So, I started trying to use the Eval commands without any luck.  Rather than looking at my use cases, could you just send me some real examples of how the commands work in your environment.  Because, everything I have read and tried from online has not worked.

The commands below are the ones I would like examples for:

runScript

assertEval

storeEval

verifyEval

Please make sure to include how to use the variable stored by storeEval.  Especially, in the Value field of assert or verifyEval.

Environment

Release : SAAS

Component : CA APP SYNTHETIC MONITOR (WATCHMOUSE)

Resolution

Step Command Target Value
1 open https://asm.saas.broadcom.com/  
2 click link=Login  
3 click id=vemail  
4 type id=vemail abcd
5 storeValue id=vemail valB
6 echo The value is ${valB} value is ${valB}
7 assertEval return "${valB}".trim() abcd

Use storeValue rather than storeEval.