Вопрос

My application has the web page, which is longer than the browser size. This needs the application shld be scrolled down to view the complete Web page. I need to know how do I find the end of the Web Page unsing Java in RFT code?

Это было полезно?

Решение

Is there some special object in your page footer? Like an image or a particular link? You can continue to scroll down until it becomes visible.

This is some sample code using LowLevelEvents, scrolling down with the mousewheel instead of dragging the scrollbar:

while(!your_object.isVisible()) {
    LowLevelEvent llEvents[] = new LowLevelEvent[1];
    llEvents[0] = MouseWheel(-25)
    getRootTestObject().emitLowLevelEvent(llEvents);
}

Some docs: PlayingBackLowLevelMouseandKeyboardActions

Другие советы

If your_object.isVisible() always returns true, you can click on an object at the end of the page; this will browse the page to its and.

If there is no object clickable, you can press "END" to scroll to the end. Use browserObject.inputKeys method for this.

Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top