Skip to main content
edited title
Link
Ivan Gerasimenko
  • 2.3k
  • 4
  • 27
  • 47

I am a little stuck and do not know how How to do it selenium ideloop through table in Selenium IDE?

deleted 485 characters in body
Source Link
store30loopstore20iwhile${i}<${loop}openhttp://stgadmin.lottobaba.com/clicklink=SalesclickAndWaitlink=Sales PanelreadCSVfile:\C:\Users\Numg\Desktop\webusers\web-users_1.csvstoreCellValueid${i},1echo${id}clickid=web_user_user_idtypeid=web_user_user_id${id}pause5000clickAndWaitlink=OkwaitForPageToLoad100000clickid=4pause5000selectid=aggrupations_639_shareslabel=3clickAndWaitcss=#bet-group > #send > i.fa.fa-arrow-rightstoreElementPresentid=codeeditvalueecho${editvalue}gotoIf${editvalue}==trueStepsWithEditgotoIf${editvalue}==falseStepsWithoutEditlabelStepsWithEdittypeid=code123QAclickAndWaitcss=#new_reduction > input[name="commit"]labelEndlabelStepsWithoutEditclickAndWaitlink=CancellabelEndtypeid=code123QAclickAndWaitcss=#new_reduction > input[name="commit"]clickAndWaitlink=Clearpause5000storeEval${i} + 1iendWhileclickAndWaitcss=input.buttonclickAndWait//input[@value='Delete']clickAndWait//input[@value='Delete']
<td>store</td>
<td>30</td>
<td>loop</td>

<td>store</td>
<td>20</td>
<td>i</td>

<td>while</td>
<td>${i}&lt;${loop}</td>
<td></td>

<td>click</td>
<td>link=Sales</td>
<td></td>

<td>clickAndWait</td>
<td>link=Sales Panel</td>
<td></td>

<td>readCSV</td>
<td>file:\C:\Users\Numg\Desktop\webusers\web-users_1.csv</td>
<td></td>


<td>storeCellValue</td>
<td>id</td>
<td>${i},1</td>

<td>echo</td>
<td>${id}</td>
<td></td>

<td>click</td>
<td>id=web_user_user_id</td>
<td></td>

<td>type</td>
<td>id=web_user_user_id</td>
<td>${id}</td>

<td>pause</td>
<td>5000</td>
<td></td>

<td>clickAndWait</td>
<td>link=Ok</td>
<td></td>

<td>waitForPageToLoad</td>
<td>100000</td>
<td></td>

<td>click</td>
<td>id=4</td>
<td></td>

<td>pause</td>
<td>5000</td>
<td></td>

<td>select</td>
<td>id=aggrupations_639_shares</td>
<td>label=3</td>

<td>clickAndWait</td>
<td>css=#bet-group &gt; #send &gt; i.fa.fa-arrow-right</td>
<td></td>

<td>storeElementPresent</td>
<td>id=code</td>
<td>editvalue</td>

<td>echo</td>
<td>${editvalue}</td>
<td></td>

<td>gotoIf</td>
<td>${editvalue}==true</td>
<td>StepsWithEdit</td>

<td>gotoIf</td>
<td>${editvalue}==false</td>
<td>StepsWithoutEdit</td>

<td>label</td>
<td>StepsWithEdit</td>
<td></td>

<td>type</td>
<td>id=code</td>
<td>123QA</td>

<td>clickAndWait</td>
<td>css=#new_reduction &gt; input[name=&quot;commit&quot;]</td>
<td></td>

<td>label</td>
<td>End</td>
<td></td>

<td>label</td>
<td>StepsWithoutEdit</td>
<td></td>

<td>clickAndWait</td>
<td>link=Cancel</td>
<td></td>

<td>label</td>
<td>End</td>
<td></td>

<td>type</td>
<td>id=code</td>
<td>123QA</td>

<td>clickAndWait</td>
<td>css=#new_reduction &gt; input[name=&quot;commit&quot;]</td>
<td></td>

<td>clickAndWait</td>
<td>link=Clear</td>
<td></td>

<td>pause</td>
<td>5000</td>
<td></td>

<td>storeEval</td>
<td>${i} + 1</td>
<td>i</td>

<td>endWhile</td>
<td></td>
<td></td>

This is deleted code:

<td>clickAndWait</td>
<td>css=input.button</td>
<td></td>

<td>clickAndWait</td>
<td>//input[@value='Delete']</td>
<td></td>

<td>clickAndWait</td>
<td>//input[@value='Delete']</td>
<td></td>
store30loopstore20iwhile${i}<${loop}openhttp://stgadmin.lottobaba.com/clicklink=SalesclickAndWaitlink=Sales PanelreadCSVfile:\C:\Users\Numg\Desktop\webusers\web-users_1.csvstoreCellValueid${i},1echo${id}clickid=web_user_user_idtypeid=web_user_user_id${id}pause5000clickAndWaitlink=OkwaitForPageToLoad100000clickid=4pause5000selectid=aggrupations_639_shareslabel=3clickAndWaitcss=#bet-group > #send > i.fa.fa-arrow-rightstoreElementPresentid=codeeditvalueecho${editvalue}gotoIf${editvalue}==trueStepsWithEditgotoIf${editvalue}==falseStepsWithoutEditlabelStepsWithEdittypeid=code123QAclickAndWaitcss=#new_reduction > input[name="commit"]labelEndlabelStepsWithoutEditclickAndWaitlink=CancellabelEndtypeid=code123QAclickAndWaitcss=#new_reduction > input[name="commit"]clickAndWaitlink=Clearpause5000storeEval${i} + 1iendWhileclickAndWaitcss=input.buttonclickAndWait//input[@value='Delete']clickAndWait//input[@value='Delete']
<td>store</td>
<td>30</td>
<td>loop</td>

<td>store</td>
<td>20</td>
<td>i</td>

<td>while</td>
<td>${i}&lt;${loop}</td>
<td></td>

<td>click</td>
<td>link=Sales</td>
<td></td>

<td>clickAndWait</td>
<td>link=Sales Panel</td>
<td></td>

<td>readCSV</td>
<td>file:\C:\Users\Numg\Desktop\webusers\web-users_1.csv</td>
<td></td>


<td>storeCellValue</td>
<td>id</td>
<td>${i},1</td>

<td>echo</td>
<td>${id}</td>
<td></td>

<td>click</td>
<td>id=web_user_user_id</td>
<td></td>

<td>type</td>
<td>id=web_user_user_id</td>
<td>${id}</td>

<td>pause</td>
<td>5000</td>
<td></td>

<td>clickAndWait</td>
<td>link=Ok</td>
<td></td>

<td>waitForPageToLoad</td>
<td>100000</td>
<td></td>

<td>click</td>
<td>id=4</td>
<td></td>

<td>pause</td>
<td>5000</td>
<td></td>

<td>select</td>
<td>id=aggrupations_639_shares</td>
<td>label=3</td>

<td>clickAndWait</td>
<td>css=#bet-group &gt; #send &gt; i.fa.fa-arrow-right</td>
<td></td>

<td>storeElementPresent</td>
<td>id=code</td>
<td>editvalue</td>

<td>echo</td>
<td>${editvalue}</td>
<td></td>

<td>gotoIf</td>
<td>${editvalue}==true</td>
<td>StepsWithEdit</td>

<td>gotoIf</td>
<td>${editvalue}==false</td>
<td>StepsWithoutEdit</td>

<td>label</td>
<td>StepsWithEdit</td>
<td></td>

<td>type</td>
<td>id=code</td>
<td>123QA</td>

<td>clickAndWait</td>
<td>css=#new_reduction &gt; input[name=&quot;commit&quot;]</td>
<td></td>

<td>label</td>
<td>End</td>
<td></td>

<td>label</td>
<td>StepsWithoutEdit</td>
<td></td>

<td>clickAndWait</td>
<td>link=Cancel</td>
<td></td>

<td>label</td>
<td>End</td>
<td></td>

<td>type</td>
<td>id=code</td>
<td>123QA</td>

<td>clickAndWait</td>
<td>css=#new_reduction &gt; input[name=&quot;commit&quot;]</td>
<td></td>

<td>clickAndWait</td>
<td>link=Clear</td>
<td></td>

<td>pause</td>
<td>5000</td>
<td></td>

<td>storeEval</td>
<td>${i} + 1</td>
<td>i</td>

<td>endWhile</td>
<td></td>
<td></td>

This is deleted code:

<td>clickAndWait</td>
<td>css=input.button</td>
<td></td>

<td>clickAndWait</td>
<td>//input[@value='Delete']</td>
<td></td>

<td>clickAndWait</td>
<td>//input[@value='Delete']</td>
<td></td>
Source Link

I am a little stuck and do not know how to do it selenium ide

I have the following code which I add CART item with a coupon code, but I want to put a loop when I have for example items in the cart and it will delete my old items and insert the new items and how do I know how many items the user has

store 30 loop store 20 i while ${i}<${loop} open http://stgadmin.lottobaba.com/ click link=Sales clickAndWait link=Sales Panel readCSV file:\C:\Users\Numg\Desktop\webusers\web-users_1.csv storeCellValue id ${i},1 echo ${id} click id=web_user_user_id type id=web_user_user_id ${id} pause 5000 clickAndWait link=Ok waitForPageToLoad 100000 click id=4 pause 5000 select id=aggrupations_639_shares label=3 clickAndWait css=#bet-group > #send > i.fa.fa-arrow-right storeElementPresent id=code editvalue echo ${editvalue} gotoIf ${editvalue}==true StepsWithEdit gotoIf ${editvalue}==false StepsWithoutEdit label StepsWithEdit type id=code 123QA clickAndWait css=#new_reduction > input[name="commit"] label End label StepsWithoutEdit clickAndWait link=Cancel label End type id=code 123QA clickAndWait css=#new_reduction > input[name="commit"] clickAndWait link=Clear pause 5000 storeEval ${i} + 1 i endWhile clickAndWait css=input.button clickAndWait //input[@value='Delete'] clickAndWait //input[@value='Delete']