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.
For loop doesn't working if textbox is clicked inside it!!
Hi,
Am accessing a textbox present in browser and clicking on it in a function which needs to be present in <browser> tag.
This textbox needs to be clicked for each iteration of for loop. But when I run the below code and write the value of 'i' in a file, I get the output as 0 0 1 2. But if this textbox is not present inside for loop, the for loop works fine. Pls check the below code and help ASAP.
<browser>
function calculate()
{
for(var $i=0; $i<3; $i++)
{
_debugToFile("i: "+ $i, "C:/Work/debug.txt");
_click(_textbox("x-auto-0-input"));
}
}
</browser>
Am accessing a textbox present in browser and clicking on it in a function which needs to be present in <browser> tag.
This textbox needs to be clicked for each iteration of for loop. But when I run the below code and write the value of 'i' in a file, I get the output as 0 0 1 2. But if this textbox is not present inside for loop, the for loop works fine. Pls check the below code and help ASAP.
<browser>
function calculate()
{
for(var $i=0; $i<3; $i++)
{
_debugToFile("i: "+ $i, "C:/Work/debug.txt");
_click(_textbox("x-auto-0-input"));
}
}
</browser>
Comments