Rollover and scrolling

Rollover and scrolling

Home Forums Ask Expert Rollover and scrolling

  • This topic has 3 replies, 2 voices, and was last updated 6 years ago by Sasha ZAP.
Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #32201
    Virgil Carroll
    Participant

      Have an interesting challenge. While setting up a test, I am trying to scroll down to a case study on our work page, verify the name of the case study appears (it is a javascript rollover) and then click the link to go to the case study page.

      I accomplish this I used a combination of the ScrollWheel method (to get to the correct location on the page) and MouseMove to get the cursor to activate the roll over to show the title.

      Where it took me quite a while to get the scroll and mouse to move where I wanted it to, in testing this in multiple browsers (I did the original in IE and then tried Firefox and Chrome), the scrolling did not go the same place.

      With a javascript rollover needing to activate, what would be the smartest way for me to navigate to an item, activate the rollover then check to see if the title exists to go to the page? I am hoping there is a better way than what I did.

      If needed, you can look at the page here: https://www.highmonkey.com/work and I am trying to get to the Keil Cheese Plant case study, which is the 5th image down on the right side.

      Here is the code I am using:
      Application(“Highmonkey.com”).View(“Work Page”).ScrollWheel(-1272, 1272, 119, 1500, false);
      Application(“Highmonkey.com”).View(“Work Page”).MouseMove(1272,300,1500,false);

      #32203
      Sasha ZAP
      Moderator

        Hello virgil,

        First you need to add a new object (no matter where), and during runtime using the method “SetProperty” the test will change its “Text” property’s value into the expected title to find.

        Regarding the ScrollWheel issue, basically you can also use the KeyPress method, for example in JavaScript:
        Application(“Application”).KeyPress(34);//34 = The keyboard key “Page Down”

        Then you can check and verify in each of the page’s scrolled sections if the object you’ve specified exists.

        Hope this help.

        Thanks,
        ZAPTEST Team

        #32205
        Virgil Carroll
        Participant

          Thanks. That was better.

          When I get to the right location I want to move the mouse over the Object so the rollover function will be activated. I tried getting the
          Object.GetRuntimeX() and Object.GetRuntimeY(), but they always return the value 0. But I can get the width and height

          Is RuntimeX and Y only an enterprise feature?

          The object I am using is an image object

          #32206
          Sasha ZAP
          Moderator

            Hello virgil,

            Basically the RuntimeX and Y methods are also available in the Free Edition as well:
            If ZAPTEST cannot find the object during runtime the RuntimeX and Y methods’ values will return 0.

            The problem in your site (https://www.highmonkey.com/work) is that the titles are hidden behind the images and only by placing the mouse on an image the title will reveal itself:
            In such case the only possible solution is to run the mouse through all images until the required title will appear (It is very difficult to locate an object only by its image).

            Thanks,
            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