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.

help on "recursive_access"

globalwormingglobalworming Moderators
edited November -1 in Sahi - Open Source
Hi folks

could someone pls help me with this piece of code:
var $keyword=["category", "dropdown"];
_set($helpText,_div("workbody").children(5).textContent);
for(var $j=0; $j<$keyword.length; $j++){
    _assertNotNull($helpText.match($keyword[$j]));
}
I want to make sure a text has some specific keywords, but the logs say
_assertNotNull(["recursive_access"]);
Whats the probleme here?

Regards
Wormi

Comments

  • SumitraSumitra Members
    Hi globalworming,

    Change $keyword to contain your Regular Expression by using:
    var $keyword=[/category/,/dropdown/];
    

    Also,use :
    _assertTrue($keyword[$j].test($helptext));
    

    Regards
    Sumitra
  • Thanks a lot Sumitra

    this is working fine :)
Sign In or Register to comment.