18 January 2026:


This forum is now archived and is in read-only mode. Please continue discussions on our improved new Sahi Pro Community forum.



Sahi Pro is an enterprise grade test automation platform which can automate web, mobile, API, windows and java based applications and SAP.

How to test the existance of a Text in my example.

dashboarddashboard Members
edited November 2013 in Sahi - Open Source
Hi

Please let me know how to check the existance of the Text in www.idera.com

1. Click on About Us tab in www.idera.com.
2. Click on Company Culture Link.
3. Verify the existance of "Work Hard. Play Hard. It’s a hard life but somebody’s gotta live it".

I dont know whether I should check for Heading 1 or Heading 2 or Heading 3 or some other way.

Any help would be appreciated.

Regards
Uday




Answers

  • Take your controller, _navigateTo and _click to the right site, press CTRL and hover over the headline, press assert in the controller:
    _assertExists(_heading3("Work Hard. Play Hard. It’s a hard life (but somebody’s gotta live it)."));
    _assert(_isVisible(_heading3("Work Hard. Play Hard. It’s a hard life (but somebody’s gotta live it).")));
    _assertEqual("Work Hard. Play Hard. It’s a hard life (but somebody’s gotta live it).", _getText(_heading3("Work Hard. Play Hard. It’s a hard life (but somebody’s gotta live it).")));
    _assertContainsText("Work Hard. Play Hard. It’s a hard life (but somebody’s gotta live it).", _heading3("Work Hard. Play Hard. It’s a hard life (but somebody’s gotta live it)."));
    
Sign In or Register to comment.