Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 312994 - browser.getHorizontalBar() and getVerticalBar() return null even when scrollbars are present
Summary: browser.getHorizontalBar() and getVerticalBar() return null even when scrollb...
Status: RESOLVED WONTFIX
Alias: None
Product: Platform
Classification: Eclipse Project
Component: SWT (show other bugs)
Version: 3.5.2   Edit
Hardware: PC Linux
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Platform-SWT-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-05-14 19:47 EDT by Misha Koshelev CLA
Modified: 2010-05-17 13:55 EDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Misha Koshelev CLA 2010-05-14 19:47:35 EDT
Thank you!

Misha

p.s. Tested on Windows as well :(
Comment 1 Grant Gayed CLA 2010-05-17 10:30:23 EDT
These scrollbars are part of the embedded native Browser, they're not available to us the way they are on other controls like Table, List, etc.  What do you want to do with them?  You may be able to achieve what you want via javascript.
Comment 2 Misha Koshelev CLA 2010-05-17 10:37:11 EDT
Ah I see. I would like to be notified when the user scrolls the browser. Is this possible?

Thank you
Misha
Comment 3 Grant Gayed CLA 2010-05-17 11:49:46 EDT
It looks like Javascript's window object offers an onscroll event, so you should be able to add a listener for this on every page load (detect this by ProgressListener.completed()) via Browser.execute(...).

If you want this notification to get out to your java code then you can define a BrowserFunction when your Browser is first instantiated, and have your javascript scroll listener invoke this function.  For a BrowserFunction example see http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet307.java?view=co .
Comment 4 Misha Koshelev CLA 2010-05-17 13:55:21 EDT
Thank you. That is very helpful.

I have completely re-written my EPL-licensed Web Automation Framework so that we actually get a Java DOM representation of the page.

I hope that it will be useful, and I hope to release in next few days.

Thank you so much for all your help.

Misha