I am trying SWTBot in our own application. I am trying to use SWTBot Recorder to create my test cases first. But I am facing few issues.
I have two questions. Please check on the comments I mentioned in each one below.
I have a table view. It contains data which I imported from a csv file. The following is the code which SWTBot gave me.
bot.menu("File").menu("New...").click(); bot.tree().getTreeItem("AppName").select(); bot.tree().getTreeItem("AppName ").select(); bot.textWithLabel("IP Version:").setText("Sample"); bot.text(1).setText("App"); bot.text(2).setText("1"); bot.textWithLabel("*").setText("Hello"); bot.button("Finish").click(); bot.tree().getTreeItem("Sample").expand(); bot.tree().getTreeItem("Sample").getNode("App(1)").expand();
bot.tree().getTreeItem("Sample").getNode("App(1)").getNode("Hello").select();
bot.contextMenu("Open Application Metadata File").click(); // I choose the location of my .csv file – which is also not recorded in this. bot.text().setText("3.35"); //Edited data from the table – No mention of which row and which column. bot.text().setText("3.3"); bot.text().setText("Synthesiss");
Is there a way to mention which row and which column of the table I am dealing with now?
I have a
SashForm
with two Composite. Each Composite contain a grid of almost the same data and same button names. When I try to runSWTBot
Recorder and try to click on the Grids, it is not saying which Grid which I am dealing with now. The following is the code which produced.bot.menu("AppName").menu("Open Config").click(); bot.button("Load").click(); //clicked from Composite 1 bot.button("Load").click(); //clicked from Composite 2 bot.tree().getTreeItem("").select(); //clicked from Grid of Composite 1 – Text not detected bot.tree().getTreeItem("").select();//clicked from Grid of Composite 1 – Text not detected bot.menu("QConnect+").menu("Close Config").click();
Is it possible with SWTBot
to find which Composite I am dealing with?
This SashForm
exist inside a tab, just like “Package Explorer”
, for example. How does SWTBot
identify which tab is it now dealing with.
Are the Test produced by SWTBot
absolute? Please let me know if there are any solution for these and where can I find it.