Forum Discussion

MarcusBengtsson's avatar
MarcusBengtsson
Frequent Contributor
2 years ago

IF .. then else issue

Hello! So I am having this problem with If .. Then and else   I am trying to make it so that IF this Testtemplatedetails exists it will run the steps below. But if it doesnt exist it should run els...
  • MW_Didata's avatar
    2 years ago

    I'm not sure but it looks like in your If statement the 2nd condition is a string value.

     

    Also sould it not be "IF : 'Aliases.etc.etc.Exists EQAULS True'" ?

     

  • rraghvani's avatar
    2 years ago

    You have the following alias defined as Aliases.browser.TestTemplateDetails

     

    If you want to check if the object exists, then use the keyword "If Object" followed by as Aliases.browser.TestTemplateDetails = Exists.

     

    If you want to check a property of the object that exists, then use the keyword "If...Then" followed by Aliases.browser.TestTemplateDetails.Exists = True.

     

    Note, the Value