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.

Sahi does not click on a div using script but clicks using the controller

ZeroZero Members
edited November 2013 in Sahi - Open Source
Hi,

I'm having problems while I try to click on a div through my test script. It always report the following error:

Logging exception:
Step >_sahi._popup(/mypopup.*/)_sahi._click(_sahi._div("conteudoTabelaAtribuicao[2]"));< did not complete in 150 seconds. at 19/11/2013 10:42:02

I tried all accessor alternatives to do it, but I always get the same error. But, if I try to click on this div using the controller, everything goes fine.

My script:
function clickDiv($i){
	var $div = $rs[$i]["arg1"];
	
	_popup(/mypopup.*/)_click(_div($div));
}

I get my test data using an Excel sheet.
Am I doing something wrong? What could I do to continue my test?

Thanks!

Answers

  • ZeroZero Members
    edited November 2013
    Just another info :)

    I added the following in my function:
    _popup(/mypopup.*/)._assertExists(_div($div));
    _popup(/mypopup.*/)._assert(_isVisible(_div($div)));
    _popup(/mypopup.*/)._assertEqual($div, _getText(_div($div)));
    _popup(/mypopup.*/)._assertContainsText($div, _div($div));
    

    All assertions were successfull, but right after them was the "_click(_div($div))", which made the script fail again.
Sign In or Register to comment.