fbpx

Field Clear and how we check values

Field Clear and how we check values

Home Forums Ask Expert Field Clear and how we check values

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

      Hi ZAPTEST Team,

      Your are doing very very well job. I hope you will continue this practice.

      I have now two questions:-

      Question-1:-
      How we can clear the field like i have a login screen in which i have two fields like username and password. I am testing along with different scenarios. i need to clear both two fields otherwise when test case is run, it is not cleared the old field data. See Below Code:
      Application(“Application”).View(“View 4”).Object(“User Name”).ClickRow Datable.Value(“UserName”)
      Application(“Application”).View(“View 4”).CaptureBitmap
      Wait 6
      Application(“Application”).View(“View 4”).Object(“Image Object 6”).Click
      Application(“Application”).View(“View 4”).Object(“Image Object 6”).Type (“August2017”)

      Question-2:-
      I am using IF condition what is the way to check the value in the field and ‘null’ check.
      and how to erase a field. See Below Code:

      If Application(“Login “).View(“View”).Object(“user Name”).Exist then
      Application(“Login “).View(“View”).Object(“user Name”).TypeDatatable.Value(“UserName”)

      #31369
      Sasha ZAP
      Moderator

        Hello aqu,

        1. To clear out text-box you can just type nothing in it, for example:
        Application(“Application”).View(“View 4”).Object(“Image Object 6”).Type “”

        2. To check a value of an object you can use the “GetText” nethod, for example:
        strText = Application(“App”).View(“View”).Object(“Object”)GetText()

        If the above does not gets the text use the “True” method’s attribute, for example:
        strText = Application(“Demo”).View(“DemoView”).Object(“DemoTextObject”)GetText(true)

        For more help check out our tutorial at:

        Tutorial

        Thanks,
        ZAPTEST Team

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

      Virtual Expert

      ZAPTEST

      ZAPTEST Logo