Community
Participate
Working Groups
Build Identifier: M20100909-0800 The operation SWTBotLink.click() seizes my mouse pointer and moves it around and appears to be a much lower-level operation than most of SWTBot. Very little else in SWTBot seems to do this. Also, it doesn't work with KDE at all (running RHEL5 Linux). When I call it there, it seems to click outside the window, causing it to lose focus and no further actions there to work. I have tested though and it does work under Gnome or Xvfb on Linux. It also works on Windows. Reproducible: Always Steps to Reproduce: 1. Run KDE on a linux machine 2. Try to call SWTBotLink.click() on any link at all 3.
After the rapid fix and release of bug 337527 (for which many thanks btw, really got me out of a hole) could I suggest the way to go with this one is to rewrite the method to find the hyperlink text and call SWTBot.click(hyperlinkText) which now works and isn't so low-level as to depend on window managers and their quirks?
New Gerrit change created: https://git.eclipse.org/r/84907
SWTBotLink.click() posts a mouse click event at the display location that corresponds to the center of the Link widget's bounds. It is possible, if the widget is in a parent composite or a shell that is too small, that this mouse location is over another control in the shell, or even over another shell, or no shell at all. The proposed patch makes the click() method reliably click on the widget without posting mouse events, and select the first hyperlink, if there is any in the widget's text. A new method click(int) is added to click and select the hyperlink at a specified index.
Gerrit change https://git.eclipse.org/r/84907 was merged to [master]. Commit: http://git.eclipse.org/c/swtbot/org.eclipse.swtbot.git/commit/?id=181984bbdb9a35c69abbd352107dfff179260859
Merged to master branch.