18 January 2026:
Sahi Pro is an enterprise grade test automation platform which can automate web, mobile, API, windows and java based applications and SAP.
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.
Command execution time limit reached
Hi there!
OS Name: MacOSX
Browser: Firefox 9.0.1
Sahi Build: 2011-07-19
I have some troubles with testing a login procedure: There is a login form which sends the login data to the server via ajax. After the response is received, a page refresh is triggered via javascript:
window.location.reload();
Sahi is able to post the login form via ajax, and the reload is executed too, but after the refresh occurs, nothing happens. What actually should happen, is a click on a link.
After about 15 seconds I get following error outputted in the console:
(had to replace the at character with [at], the forum thinks I am posting email addresses here...)
Command execution time limit reached: `_sahi.setServerVarPlain('___lastValue___4f201264a425e', (function(){
var count = 0;
while (_sahi._byXPath("(//html/.//a[./[at]href][(((./[at]id = 'Kontakte' or contains(normalize-space(string(.)), 'Kontakte')) or contains(./[at]title, 'Kontakte')) or .//img[contains(./[at]alt, 'Kontakte')])] | .//*[./[at]role = 'link'][((./[at]id = 'Kontakte' or contains(./[at]value, 'Kontakte')) or contains(./[at]title, 'Kontakte') or contains(normalize-space(string(.)), 'Kontakte'))])["+(count+1)+"]")) count++;
return count;
})())`
I am using Behat/Mink, that's why I can't post you the whole sahi script here.
THis is the PHP code, which is converted to sahi commands internally:
$this->clickLink('Login');
$this->fillField('username',$user->getUsername());
$this->fillField('password','12341234');
$this->pressButton('_submit');
$this->clickLink('Kontakte');
$this->thenIShouldSee('no contacts imported yet');
Can you help me?
OS Name: MacOSX
Browser: Firefox 9.0.1
Sahi Build: 2011-07-19
I have some troubles with testing a login procedure: There is a login form which sends the login data to the server via ajax. After the response is received, a page refresh is triggered via javascript:
window.location.reload();
Sahi is able to post the login form via ajax, and the reload is executed too, but after the refresh occurs, nothing happens. What actually should happen, is a click on a link.
After about 15 seconds I get following error outputted in the console:
(had to replace the at character with [at], the forum thinks I am posting email addresses here...)
Command execution time limit reached: `_sahi.setServerVarPlain('___lastValue___4f201264a425e', (function(){
var count = 0;
while (_sahi._byXPath("(//html/.//a[./[at]href][(((./[at]id = 'Kontakte' or contains(normalize-space(string(.)), 'Kontakte')) or contains(./[at]title, 'Kontakte')) or .//img[contains(./[at]alt, 'Kontakte')])] | .//*[./[at]role = 'link'][((./[at]id = 'Kontakte' or contains(./[at]value, 'Kontakte')) or contains(./[at]title, 'Kontakte') or contains(normalize-space(string(.)), 'Kontakte'))])["+(count+1)+"]")) count++;
return count;
})())`
I am using Behat/Mink, that's why I can't post you the whole sahi script here.
THis is the PHP code, which is converted to sahi commands internally:
$this->clickLink('Login');
$this->fillField('username',$user->getUsername());
$this->fillField('password','12341234');
$this->pressButton('_submit');
$this->clickLink('Kontakte');
$this->thenIShouldSee('no contacts imported yet');
Can you help me?
Comments
Can you try recording and playing with plain Sahi and see if it works? That will let us isolate whether the problem is in Sahi's side or on Behat's side.
Regards,
Narayan
Command execution time limit reached: `_sahi.setServerVarPlain('___lastValue___50ff005853da7', _sahi._getText(_sahi._byXPath("//html")))`
My suite runs fine for normal browser automations but fails using phantom. I wonder if it has something to do with that the code is hosted at localhost?
Would be interesting in hearing about the issue more.
Jason: PhantomJS does not use Sahi's proxy for localhost. You need to use your machine name to access your website. (Like http://mymachine/myapp/)
Hope this helps,
Regards,
Narayan