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.

Getting Error in Concat.Js in function ' Sahi.prototype.contains '

edited September 2010 in Sahi - Open Source
Hi Narayan,

In my application thr is a login page. The login page has a combo box which has multiple options.
I am trying to get all options , but its throwing a javascript error under Concat.js in this function

Sahi.prototype.contains = function (orig, substr) {
substr = this.checkRegex(substr);
if (substr instanceof RegExp)
return orig.match(substr) != null;
return orig.indexOf(substr) != -1;
}

Here Orig is coming as " Id" , substr is coming as " A, B,C,D"
But " return orig.indexOf(substr) " is not returning text , its throwing error as " Object does not support this property or method ".

please suggest me somthing



Regards
Sudhir

Comments

  • Hi,

    Does anyone have any update over this issue?
    I am facing this problem and need to solve out soon.

    Sudhir
Sign In or Register to comment.