SWTBot and WebStart how to add test plugin to application [message #1798768] |
Fri, 23 November 2018 18:17  |
|
Hello
Could you please help me to resolve problem?
We have a test suite that works against Eclipse 3 application. Before current time we execute the following steps
- Download application from developer site and install it
- Add our SWTBot based plugin with test to installed application
- start our test suite via command line. We use special swtbotapplication for start testing
The next version of application is distributed via WebStart. Our testsuite and application under testinare located in different repositories and they are built independency. Is there way to put our plugin to application that is installed via WebStart technology.
By the way I understand that the best way is join our codebase in one repositories and try to download test suite and application in the same time, the try to start test suite. But to my regret this is long way in our conditions.
Thank you for cooperation
Alex
[Updated on: Fri, 23 November 2018 18:19] Report message to a moderator
|
|
|
|
Re: SWTBot and WebStart how to add test plugin to application [message #1801319 is a reply to message #1798819] |
Wed, 16 January 2019 16:26  |
|
May be will be help for other memebers of this community
final Matcher<Label> matcherLabel = allOf(widgetOfType(Label.class), anyOf(withRegex(labelRegExp)));
final Label label = bot.widget(matcherLabel);
final String labelText = this.getLabelText(label);
@SuppressWarnings("unchecked")
final Matcher<Combo> matcherCombo = allOf(widgetOfType(Combo.class), anyOf(withLabel(labelText)));
final Combo combo = bot.widget(matcherCombo);
final SWTBotCombo botCombo = new SWTBotCombo(combo);
where getLabelText (dur to strong UI thread protection) is
private String getLabelText(final Label label) {
Display.getDefault().syncExec(new Runnable() {
public void run() {
labelText = label.getText();
LOG.debug("Found labelText");
}
});
return labelText;
}
labelText is global
So shortly
I found corresponded label by regexp, get full label text then get corresponded combo.
This difficult, but in my case label text in German and contains some special German symbols that cannot be saved in UTF-8 source code
|
|
|
Powered by
FUDForum. Page generated in 0.01586 seconds