Hi All,
This is part of my code where I've to pass for loop to a run keywords and I get an an error for is not an keyword, but anything until AND is considered as one set and thus for loop should work I believe.
My below approach is hack for lack of switch case in robot - if condition is A i will need to a set of operations and if condition is B another set of operations I do.
Now here in a certain condition, my code has a for loop which isn't recognised by Run Keywords. Any help would get me to fix this up - thanks in advance.
My Code:
\ Run keyword If '${server}' == '${session1_ip}' cli ${session1} cd /tmp
\ ${output} Run keyword If '${server}' == '${session1_ip}' cli ${session1} cat ${filename} | grep ${filter} timeout_exception=20
\ @{all_lines} Run keyword If '${server}' == '${session1_ip}' split string ${output} \n
\ ${first_line} Run keyword If '${server}' == '${session1_ip}' remove from list ${all_lines} 0
\ ${line_count} Run keyword If '${server}' == '${session1_ip}' get line count ${output}
\ ${new_lc} Run keyword If '${server}' == '${session1_ip}' evaluate ${line_count} - 1
\ Run keyword If '${server}' == '${session1_ip}' run keywords :FOR ${i} IN RANGE 0 ${new_lc} AND ${line} Run keyword If '${server}' == '${session1_ip}' get from list ${all_lines} ${i} AND ${log_level} Run keyword If '${server}' == '${session1_ip}' get from list ${line} 0 AND Run keyword If '${server}' == '${session1_ip}' run keyword AND run keyword if '${log_lvl}' < '${log_lvl_code}' run keyword log Log level generated in box is less than configured log levels
Thanks,
KMR21