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)
Viewing 4 posts - 1 through 4 (of 4 total)
- You must be logged in to reply to this topic.
Home › Forums › Ask Expert › Rollover and scrolling
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);
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
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
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
Already have an account? Login
Check you SPAM folder if you do not see the email.
Cookie | Duration | Description |
---|---|---|
cookielawinfo-checkbox-analytics | 11 months | This cookie is set by GDPR Cookie Consent plugin. The cookie is used to store the user consent for the cookies in the category "Analytics". |
cookielawinfo-checkbox-functional | 11 months | The cookie is set by GDPR cookie consent to record the user consent for the cookies in the category "Functional". |
cookielawinfo-checkbox-necessary | 11 months | This cookie is set by GDPR Cookie Consent plugin. The cookies is used to store the user consent for the cookies in the category "Necessary". |
cookielawinfo-checkbox-others | 11 months | This cookie is set by GDPR Cookie Consent plugin. The cookie is used to store the user consent for the cookies in the category "Other. |
cookielawinfo-checkbox-performance | 11 months | This cookie is set by GDPR Cookie Consent plugin. The cookie is used to store the user consent for the cookies in the category "Performance". |
viewed_cookie_policy | 11 months | The cookie is set by the GDPR Cookie Consent plugin and is used to store whether or not user has consented to the use of cookies. It does not store any personal data. |