Forum Discussion

PetGin's avatar
PetGin
Occasional Contributor
2 months ago

Unexpected behavior executing if, elif, else statement in Python

I wrote an if, elif, and else routine to checkpoint a header name and write the appropriate password into a required password field. When I ran the script routine it resulted in unexpected behavior. ...
  • rraghvani's avatar
    2 months ago

    headerDeviceName can only contain "SR-506-0801" OR "SR506-0701" text, is that correct?

    Since you are calling check property for both text, on lines 1 and 2. If the verification succeeds, the method posts a success message to the test log; otherwise it posts a failure message. Hence, check property is failing on "SR506-0701", line 28.