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 - Problem creating while statment

davidloughlindavidloughlin Members
edited June 2014 in Sahi Pro
Hi All,

First time post here so sorry if it's been added to the wrong area!

I was hoping someone could help me with the below statement:

var $ClickNext = "_click(_link(">"))"

function SelectAccount("123456")
{
while (_condition(_exists(_cell("123456) != false)))
$ClickNext

if (_condition(_exists(_cell("123456") != true)))
{
_click(_link(/Select/))
}

}

The code is intended to search for the account number "123456" in a list and if it is not present then click the next button and repeat. However when I run the above code it appears to get stuck in an infinite loop without actually executing any commands.

Hope you can help,

Thanks,

David

Answers

  • globalwormingglobalworming Moderators
    edited July 2014
    while (_condition(_exists(_cell("123456) != false))) should be
    while (_condition(_exists(_cell("123456)) != false))
    better:
    while (_condition(!_exists(_cell("123456))))
Sign In or Register to comment.