Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 337527

Summary: SWTBotLink.click(hyperlinkText) clicks on it twice
Product: [Technology] SWTBot Reporter: Geoff Bache <geoff.bache>
Component: SWTBotAssignee: Project Inbox <swtbot-inbox>
Status: CLOSED FIXED QA Contact:
Severity: normal    
Priority: P3    
Version: 2.0.2   
Target Milestone: 2.0.3   
Hardware: All   
OS: All   
Whiteboard:
Attachments:
Description Flags
mylyn/context/zip none

Description Geoff Bache CLA 2011-02-18 03:46:54 EST
Build Identifier: M20100909-0800

The method to click on particular hyperlink text does two things:

- it generates a Select event for the relevant hyperlink
- it clicks on the middle of the widget in the same way as the click() method with no arguments does.

I don't really understand the need for the second part, but if the hyperlink happens to be in the middle of the widget the effect is that two select events are generated. And I guess even worse is if some other hyperlink happens to be there then something entirely different will get clicked on.

My fix would be to simply delete the second click, but I guess it's there for some reason...

Reproducible: Always

Steps to Reproduce:
1. Call SWTBotLink.click(hyperlinkText) on any Link widget with a centrally placed hyperlink.
2.
3.
Comment 1 Ketan Padegaonkar CLA 2011-02-19 00:03:30 EST
Marking as fixed in revision 188bfc88(https://github.com/ketan/SWTBot/commit/188bfc88)
Comment 2 Ketan Padegaonkar CLA 2011-02-19 00:03:51 EST
Created attachment 189337 [details]
mylyn/context/zip
Comment 3 Geoff Bache CLA 2011-02-22 13:28:03 EST
Working beautifully now. Many thanks.