I'd recommend turning on logging and seeing what the widget hierarchy  
looks like, and what matchers match your UI components.

-- Ketan

On 05-Aug-08, at 12:37 AM, Mohamed Amine LIMAME wrote:

>
> Hi ketan,
> This my code, Can you tell me what is the problem.
>
>               myComposite = new Composite(bar, SWT.NONE);
>               layout = new FormLayout();
>               layout.marginLeft = layout.marginTop = layout.marginRight =
> layout.marginBottom = 10;
>               myComposite.setLayout(layout);
>
>               addWidgetsPhase(myComposite);  // To add the composite to the 
> form
>               
>               MyCombo = new Combo(myComposite, SWT.READ_ONLY);
>               final FormData fd_combo = new FormData();
>               fd_combo.top = new FormAttachment(0, 54);
>               fd_combo.bottom = new FormAttachment(0, 75);
>               fd_combo.right = new FormAttachment(0, 320);
>               fd_combo.left = new FormAttachment(0, 145);
>               MyCombo.setLayoutData(fd_combo);
>               MyCombo.setItems("item1", "item2", "item3");
>               
>               Label MyLabel;
>               MyLabel = new Label(myComposite, SWT.NONE);
>               final FormData fd_Label = new FormData();
>               fd_Label.right = new FormAttachment(0, 125);
>               fd_Label.top = new FormAttachment(0, 55);
>               MyLabel.setLayoutData(fd_Label);
>               MyLabel.setText("Label");
>
> This what it looks  http://www.nabble.com/file/p18817614/MyCombo.bmp
> MyCombo.bmp
>
> Thanks,
>
>
>
> Ketan Padegaonkar-2 wrote:
>>
>> On 31-Jul-08, at 12:01 AM, Mohamed Amine LIMAME wrote:
>>> Hi Ketan,
>>> I am using the following code to reach the combo
>>>
>>> SWTEclipseBot bot = new SWTEclipseBot();
>>> bot.comboBoxWithLabel("Class:").setSelection(2);
>>>
>>> For the dialog's code I must have permission from my manager because
>>> the
>>> internal law of our company doesn't allow any employee to provide a
>>> code for
>>> persons outside the compagnie.
>>>
>>> Can you just explain to me what is the strategy used by SWTbot
>>> Finder to
>>> locate the widget. It will take a long time if I will try to
>>> understand it
>>> by myself.
>>
>> SWTBot walks over the UI tree passing each widget to a matcher.
>>
>> I'd recommend turning on logging as described here:
>> http://www.nabble.com/Re%3A-How-to-turn-on-%28or-configure%29-logging-for-SWT-Bot--p18069832.html
>>  That way swtbot will log information as it finds widgets and matches
>> them against the matcher.
>>
>> You'll also need to put log4j.xml in your test plugin sources  
>> directory.
>>
>> -- Ketan
>>
>>
>> -------------------------------------------------------------------------
>> This SF.Net email is sponsored by the Moblin Your Move Developer's
>> challenge
>> Build the coolest Linux based applications with Moblin SDK & win  
>> great
>> prizes
>> Grand prize is a trip for two to an Open Source event anywhere in the
>> world
>> http://moblin-contest.org/redirect.php?banner_id=100&url=/
>> _______________________________________________
>> SWTBot-users mailing list
>> SWTBot-users@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/swtbot-users
>> http://swtbot.org/ - a functional testing tool for SWT/Eclipse
>>
>>
>>
>
> -- 
> View this message in context: 
> http://www.nabble.com/Problem-with-the-widget-finder-tp18734094p18817614.html
> Sent from the SWTBot Users List mailing list archive at Nabble.com.
>
>
> -------------------------------------------------------------------------
> This SF.Net email is sponsored by the Moblin Your Move Developer's  
> challenge
> Build the coolest Linux based applications with Moblin SDK & win  
> great prizes
> Grand prize is a trip for two to an Open Source event anywhere in  
> the world
> http://moblin-contest.org/redirect.php?banner_id=100&url=/
> _______________________________________________
> SWTBot-users mailing list
> SWTBot-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/swtbot-users
> http://swtbot.org/ - a functional testing tool for SWT/Eclipse
>



-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
SWTBot-users mailing list
SWTBot-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/swtbot-users
http://swtbot.org/ - a functional testing tool for SWT/Eclipse

Reply via email to