| Summary: | SWTBot seems not to find a combo box in the toolbar. | ||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| Product: | [Technology] SWTBot | Reporter: | Madhu G <madhurg81> | ||||||||
| Component: | EclipseBot | Assignee: | Project Inbox <swtbot-inbox> | ||||||||
| Status: | RESOLVED FIXED | QA Contact: | |||||||||
| Severity: | normal | ||||||||||
| Priority: | P3 | CC: | geoff.bache, jweir66, marcel.hoetter, mistria | ||||||||
| Version: | unspecified | ||||||||||
| Target Milestone: | 2.2.0 | ||||||||||
| Hardware: | PC | ||||||||||
| OS: | Windows Vista | ||||||||||
| Whiteboard: | |||||||||||
| Attachments: |
|
||||||||||
|
Description
Madhu G
Created attachment 206902 [details]
Dropdown in view
I've looked at this issue and I'm able to click on a drop down button inside the toolbar using the following api.
bot.viewByTitle('Task List').toolbarDropDownButton('New Task').click()
See the screenshot of which drop down I'm referring to.
Do you have a screenshot of how your dropdown looks like and the output of the spy view when spying on your dropdown (http://wiki.eclipse.org/SWTBot/FAQ#Can_I_get_more_details_on_a_particular_widget.3F)
HI , I am attaching the combo box snapshot. Please have a look on this. Thanks & regards, Madhu Created attachment 207001 [details]
ZoomControlOntheToolBar
Zoom Control Combo box on the tool bar.
(In reply to comment #4) > Created attachment 207001 [details] > ZoomControlOntheToolBar > > Zoom Control Combo box on the tool bar. Adding captured details by Spy view: To toggle, or freeze info on a particular control, press CTRL+SHIFT: Location: //Shell/-1//CBanner/0//Composite/0//CoolBar/0//ToolBar/11//Combo/0 Layout Information: Combo {150%} Style: DROP_DOWN | READ_ONLY | HORIZONTAL | LEFT_TO_RIGHT Layout Data: null Bounds: Rectangle {46, 0, 75, 23} Children: 0 Siblings: 1 [*]Combo {150%}: Layout Data: null Parent Tree: ToolBar {}[11]@ Layout: null LayoutData: null CoolBar {}[0]@ Layout: null LayoutData: null Composite {}[0]@ Layout: CacheWrapper$WrapperLayout LayoutData: CLayoutData CBanner {}[0]@ Layout: CBannerLayout LayoutData: WindowTrimProxy Shell {Business Blueprint -...}[-1]@ Layout: TrimLayout LayoutData: null Just got bitten by this too. Note that Ketan's example above is using a drop-down button, which is not at all the same thing as a combo box attached to a separator. Looking in ToolbarResolver, I'm guessing getChildren might need to do getControl on each of the items and add any controls it finds to the list. I'm trying to access it by using the ControlFinder, which doesn't find it. Hello, i had a similar problem: SWTBot did not find a Text control contribution added via the org.eclipse.ui.menus extension point to the main toolbar of an RCP application. After some debugging, i found that SWTBot is missing a suitable Resolver for ToolItems. I implemented the Resolver and modified the SWTBot finder to include it in it's search. I will attach a patch with the changes. Created attachment 236370 [details]
Added ToolItemResolver
Added ToolItemResolver and modified finders so SWTBot finds control contributions added to the a RCP main or view toolbar via the org.eclipse.ui.main.toolbar extension point.
Thanks for this patch Marcel. Can you please ocntribute it using Gerrit as explained on http://wiki.eclipse.org/SWTBot/Contributing . It will make review easier. Thanks @Marcel for contrib https://git.eclipse.org/r/#/c/17313/ |