fbpx

Validation Problem

Validation Problem

Home Forums Ask Expert Validation Problem

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #31491
    Asif Qureshi
    Participant

      Hi ZAPTEST TEAM,

      I facing one problem. i wrote the scripts when successful message is not found then else case should be run but in that it did not go to else part. See Below Code:
      ‘Case 1: Invalid Username is provided (Both field are empty)
      Application(“Log_on”).View(“View”).Object(“Log On”).Click
      If Application(“Invalid_UserName”).View(“View”).Object(“Invalid username is provided.”).Exist then
      Application(“Invalid_UserName”).View(“View”).CustomReport True,”Invalid username is provided.”,”Message is appeared Successfully”, True
      Application(“Invalid_UserName”).View(“View”).Object(“OK”).Click
      Application(“Log_on”).View(“View”).Object(“User Name”).Type Datatable.Value(“UserName”)
      Application(“Log_on”).View(“View”).Object(“Log On”).Click
      Else
      Application(“Invalid_UserName”).CustomReport Error,”Invalid username is provided”,”Wrong Message”,True
      Application(“Invalid_UserName”).View(“View”).Object(“OK”).Click
      Application(“Log_on”).View(“View”).Object(“User Name”).Type Datatable.Value(“UserName”)
      Application(“Log_on”).View(“View”).Object(“Log On”).Click

      End If
      Regards,
      AQU

      #31492
      Kirill Bulatnikov
      Participant

        Hello Aqu
        I believe this line is incorrect
        Application(“Invalid_UserName”).CustomReport Error,”Invalid username is provided”,”Wrong Message”,True

        Use “False” instead of “Error”.

        Thanks,
        ZAPTEST team

        #31493
        Asif Qureshi
        Participant

          Hi ZAPTEST TEAM,

          Problem is still exist.

          See Attached Image.
          Regards,
          AQU
          1-2-3.png

          #31494
          Kirill Bulatnikov
          Participant

            The problem is that the object not exist.
            Looks like it is relative object and you need to update code with parent object name.

            Hope that helps,
            ZAPTEST Team

          Viewing 4 posts - 1 through 4 (of 4 total)
          • You must be logged in to reply to this topic.

          Virtual Expert

          ZAPTEST

          ZAPTEST Logo