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.

Dynamic array for combo box value selection

Debakanta sahuDebakanta sahu Members
edited November -1 in Sahi - Open Source
Hi,

I have a combo box and the values present in it are 1,........,20 .
When i click on combo box the list appear with values 1,.......,20.
But after some days the list values changes 1,.,..........,21 and so on.

So the list values changes dynamically.
Can we define an array with "for" loop for above condition.

Regards,
Debakanta

Comments

  • narayannarayan Administrators
    Hi Debakanta,

    What is the "above condition"? Could you state how you want to handle the new value?

    Regards,
    Narayan
  • Hi,

    I am able to select value using below code .

    function selectvalue()
    {

    var $list=[ "1","2","3"];

    for(var $i=0;$i<$list.length;$i++)
    {

    _click(_f("abc").combobox("cmbResultsPerPage"));
    _setSelected(_f("abc").combobox("cmbResultsPerPage"), $list[$i]);


    }

    }

    Where
    1
    2
    3
    are combo box values, i want to select.
    But after some time it become

    1
    2
    3
    4
    and so on.
    so how i declare an array to select value dynamically.

    Regards,
    Debakanta
Sign In or Register to comment.