Hi all i have this part from my test, that i need a second counter and i need to increment it when i have a 'fail' on the status from a keyword..
i try a lot kind of things to icrement but not success:
1 - I try to make another keyword just to increment.. didn't work because i try to set up the variable as a global variable but it won't change the value of the variable..
2 - I try to use different kind of keywords to increment, like evaluate ${x+1} or ${x}+1 nothing worked..
3 - I try to use on this code (down) like this: ${AUX+1} but get this error:
Resolving variable '${AUX+1}' failed: TypeError: coercing to Unicode: need string or buffer, int found
So i'm getting a little confuse with robotframework, because it's just a simple increment of variable (i++) that have in other programming languages..
How do i do???
thanks..
${tam}= Get Matching Xpath Count //*[@id='grid1']/tbody/tr[@class='odd' or @class='even']
${AUX}= Set Variable 1
:FOR ${i} IN RANGE 1 ${tam}+1
\ Wait Until Page Contains Element //*[@id='grid1']/tbody/tr[@class='odd' or @class='even'] 20s
\ ${elemento}= Get Text //*[@id='grid1']/tbody/tr[${AUX}]/td[1]
\ ${status} ${error} Run Keyword And Ignore Error Should Contain ${LISTA ATIVOS} ${elemento}
\ Run Keyword If '${status}' == 'PASS' Click Element //*[@id='grid1']/tbody/tr[${AUX}]/td[4]/a[2]
\ Run Keyword If '${status}' == 'PASS' Sleep 1s
\ Run Keyword If '${status}' == 'PASS' Wait Until Page Contains Element //*[@class="bootbox modal fade in"]/div[@class="modal-footer"]/a[contains(., "Sim")] 20s
\ Run Keyword If '${status}' == 'PASS' Click Element //*[@class="bootbox modal fade in"]/div[@class="modal-footer"]/a[contains(., "Sim")]
\ Run Keyword If '${status}' == 'PASS' Wait Until Page Contains Operação realizada com sucesso.
\ Run Keyword If '${status}' == 'FAIL' Convert To Integer ${AUX}
\ ${AUX}= Set Variable If '${status}' == 'FAIL' ${AUX}+1 ${AUX}
#\ Run Keyword If '${status}' == 'FAIL' Incrementar variavel
#\ Exit For Loop If '${status}' == 'FAIL'
\ Sleep 2s
Log To Console aux: ${AUX}
The log out is giving 1+1 , and should return 2 .