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.

TypeError: Cannot call method 'indexOf' of undefined

bagsmodebagsmode Members
edited September 2012 in Sahi - Open Source
When I do just the _getText(_span("status")), I get what I'm looking for, "Waiting".

However, when I put this into the _assertContainsText() function as below, I get errors:

_assertContainsText( "Waiting", _getText(_span("status")));
TypeError: Cannot call method 'indexOf' of undefined
TypeError: Cannot call method 'indexOf' of undefined
at Sahi.contains (http://mysite.com/_s_/spr/concat.js:1679:17)
at Sahi._containsText (http://mysite.com/_s_/spr/concat.js:1673:17)
at Sahi._assertContainsText (http://mysite.com/_s_/spr/concat.js:1438:15)
at eval (eval at (http://mysite.com/_s_/spr/concat.js:3016:14))
at Sahi.ex (http://mysite.com/_s_/spr/concat.js:3016:9)
at unknown source
Sign In or Register to comment.