How to generate random string only on certain time through excel file?

Viewed 84

#I need to generate random test strings for pass case and for fail case I need to give manual vale through excel file

#I have tried:

#Give input to new bill cycle

[Arguments]    ${CYCLE_NAME}

${ret}=    Generate Random String    12        
 
input text    ${XPATH_TO_CYCLE_NAME_TEXTBOX}    ${CYCLE_NAME}

#and when I give ${ret} on my excel file it says variable not found error.

1 Answers

#thank all for you support i got the answer

*** Settings ***
Suite Setup Initialize Random Variables

*** Keywords ***

Initialize Random Variables

     ${RANDOM_STRING}=   Generate random string        15
     Set global variable     ${RANDOM_CYCLE_NAME}

#Then i was able to call ${RANDOM_STRING} through my excel when ever i want random string

Related