문제

I'm trying to write a SWTBot test that opens the welcome page view in eclipse and then reads/maps the content into some object (don't care if only string) so I could compare it with the expected text, I thought this is a very trivial issue and that i will find example on the internet, but I couldn't! Any help please?

@Test
public void testExpandText() throws Exception {
    bot.menu(Constants.HELP_MENU).menu(Constants.WELCOME).click();
    welcomePageView = bot.viewByTitle(Constants.WELCOME);
    //expandText();
    //assertText();
    welcomePageView.close();
}

올바른 솔루션이 없습니다

다른 팁

Seems the content of welcome page is a website page... Maybe it is not supported by SWTBot now.

And, if you want to see some sample test codes, you can try to open the Perspective menu using the following codes.

bot.menu("Window").menu("Open Perspective").menu("Other...").click();
bot.shell("Open Perspective").activate();
bot.table().select("Debug");
//bot.table().getTableItem(2).getText(); //Get the 2nd line text of the list. 
bot.button("OK").click();

Hope the code is useful for you.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top