Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » SWTBot » How access checkboxes that are into a field?
How access checkboxes that are into a field? [message #1062244] Thu, 06 June 2013 12:37 Go to next message
e r is currently offline e r
Messages: 4
Registered: March 2013
Junior Member
Hello,

How to click on checkboxes that are stored into a field?
For instance, into the Eclipse's startup and shutdown preference page, how to click on the checkboxes that are into the field under the text "Plug-ins activated on startup" (see the screen catch that is attached)?

I have already tried "bot.checkBox("name of a checkbox").click();" but it does not work.

Thanks in advance for any help.
Re: How access checkboxes that are into a field? [message #1062247 is a reply to message #1062244] Thu, 06 June 2013 12:42 Go to previous messageGo to next message
manali pattem is currently offline manali pattem
Messages: 5
Registered: January 2013
Junior Member
Try this it should work.
public static void selectCheckBox(int row)
{
SWTBotTable table = bot.table();
table.getTableItem(row).check();
}
Re: How access checkboxes that are into a field? [message #1062324 is a reply to message #1062247] Fri, 07 June 2013 04:29 Go to previous message
e r is currently offline e r
Messages: 4
Registered: March 2013
Junior Member
Hello,

Thanks for your answer. Unfortunately, it does not seem to have any effect. Below is my code, may be I did a mistake?

SWTWorkbenchBot bot = new SWTWorkbenchBot();
bot.menu("Window").menu("Preferences").click();
bot.tree().getTreeItem("General").select();
bot.tree().getTreeItem("General").expand();
bot.tree().getTreeItem("General").getNode("Startup and Shutdown").select();
bot.table().getTableItem(1).check();

Thanks for any help.
Previous Topic:how to integrate cobertura coverage test into headless eclipse test framework?
Next Topic:How to Enter Text in Textfield Present in Tool Bar of a View
Goto Forum:
  


Current Time: Fri Jul 25 15:59:26 EDT 2014

Powered by FUDForum. Page generated in 0.02266 seconds