0

I am trying to create a unique string by embedding epoch time stamp after a static string as:

*** Keywords ***
Unique Title
    [Return]  ${title}   
    ${secs}=  Get Time  epoch   
    ${time}=  Convert To String     ${secs}
    {title}=  Catenate  SEPRATOR=-  Title   ${time}

*** Test Cases ***
Test_Enter_Unique_Text
    Open Browser    @{urlUnderTest}
    Input Text  name=alertTitle   Unique Title

Its not working I am not able to get the return value of Unique Title keyword, in the input box text is getting entered as "Unique Title". Any suggestions will be really helpful.

Bryan Oakley
  • 370,779
  • 53
  • 539
  • 685
Umair
  • 5
  • 4

1 Answers1

0

You have to call the keyword and save what it returns, then use the saved value in the test case:

*** Test Cases ***
Test_Enter_Unique_Test
    ${title}=  Unique Title
    ...
    Input Text    name=alertTitle    ${title}
Bryan Oakley
  • 370,779
  • 53
  • 539
  • 685