Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [swtbot-dev] access content of cTabItem of terminal

Hi Yunus,

A CTabItem does not contain the text, but it contains a Control which could be a Text, a StyledText, or a Composite containing one of those. The parent of this Control is the CTabFolder. So you probably need to get the text from that Control (which one it is depends on your application).

A CTabItem also does not contain a menu. The context menu is set on the CTabFolder. But there is no SWTBotCTabFolder... Maybe we need to override contextMenu() in SWTBotCTabItem to get the menu from the parent. That's a bug or missing feature in SWTBot I think...

Patrick


On Tue, Jan 15, 2019 at 3:48 AM Yunus Atmaca <yunus.atmaca@xxxxxxxxx> wrote:
Hello,

SWTBotShell shell=bot.shell("Launch Terminal");
shell.active();
bot.combobox(0).setSelection("Telnet Terminal");
bot.text(0).setText(hostIP);
bot.combobox(2).setText(Integer.toString(port));
bot.button(0).click() ; //OK Button
bot.waitUntil(shellCloses(shell));

I saw Terminal view host connected 

How can we read text output in cTabItem(0) as in console ?


We execute this line :

view.cTabItem(0).contextMenu.menu("Select All").click(); or  view.cTabItem(0).contextMenu("Select All").click();


But we get this error :

error: Could not find context menu for widget: CTabItem {*Wrong  Thread*} message 

 
Regards

--
Yunus Atmaca
_______________________________________________
swtbot-dev mailing list
swtbot-dev@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://www.eclipse.org/mailman/listinfo/swtbot-dev

Back to the top