fbpx

How to get text which is not fully visible?

How to get text which is not fully visible?

Home Forums ZAPTEST Old Posts How to get text which is not fully visible?

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #30824
    Barbara Jackson
    Participant

      Hello ZAP,

      We use ZAPTEST for some time already.
      Normally GetText method returns the visible text in the object.
      However we also got a text longer than the actual text field (For example in Search text-fields).
      Is there a solution to get the entire text in such text-fields?

      Thanks in advance.

      #30825
      Sasha ZAP
      Moderator

        Hello BarbJack,

        Thank you for your question.

        In such case when the text is not fully revealed in teh text-field please do the following:
        1. Click on the URL field
        2. Send keys to browser: CTRL + C
        3. Pause for 0.1 seconds, using the Wait statement.
        4. In ZAPTEST use the following method to retrieve the text:
        myurl = GetClipboard

        P.S. To send the CTRL+C in ZAPTEST use the following code:
        Application(“test”).View(“View_1”).Object(“Text-Field”).Click
        Application(“test”).KeyDown 17
        Application(“test”).KeyPress 67
        Application(“test”).KeyUp 17

        Please contact ZAP for further help.

        Thanks,
        Sasha

        #30826
        Barbara Jackson
        Participant

          Thank you Sasha for the quick response.

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

        Virtual Expert

        ZAPTEST

        ZAPTEST Logo