Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 337527 - SWTBotLink.click(hyperlinkText) clicks on it twice
Summary: SWTBotLink.click(hyperlinkText) clicks on it twice
Status: CLOSED FIXED
Alias: None
Product: SWTBot
Classification: Technology
Component: SWTBot (show other bugs)
Version: 2.0.2   Edit
Hardware: All All
: P3 normal (vote)
Target Milestone: 2.0.3   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-02-18 03:46 EST by Geoff Bache CLA
Modified: 2011-02-22 13:28 EST (History)
0 users

See Also:


Attachments
mylyn/context/zip (1.57 KB, application/octet-stream)
2011-02-19 00:03 EST, Ketan Padegaonkar CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
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.