brownla
3 years agoNew Contributor
Web test: Checking for disclaimer
I have a web test for a site that keeps failing because of a disclaimer that needs to be accepted on the page. It is a policy statement that pops up on the bottom and the user must click "Accept"...
- 3 years ago
Hi brownla!
You can accomplish this by using the 'If Object' operation in your tests to check for the existence of an object, then perform other operations depending on the condition.
For instance, in the screenshot provided, I am checking for the existence of a banner on our Community page, if it exists then we click to remove it, if not then move on.
An important note here is that you will need to 'Else' operation as well to handle the logic.
Checking Whether an Object Exists
https://support.smartbear.com/testcomplete/docs/app-objects/common-tasks/checking-existence.htmlElse Operation
https://support.smartbear.com/testcomplete/docs/keyword-testing/reference/statements/else.htmlI hope this helps!