質問

I have attached a image describing my problem, i need to access General under GCC Assembler, i tried to focus on the tabItem with index 0, it came properly to Tool Settings tab but GCC Assembler -> General is not found ! enter image description here

Here is the code:

bot.tree().getTreeItem("test").select();
bot.menu("File").menu("Properties").click();

bot.tree().getTreeItem("C/C++ Build").select();
bot.tree().getTreeItem("C/C++ Build").expand();

bot.tree().getTreeItem("C/C++ Build").getNode("Settings").select();

bot.tabItem(0).activate();
bot.tree().getTreeItem("GCC Assembler").select();
bot.tree().getTreeItem("GCC Assembler").getNode("General").select();
bot.text().getText(); //for getting the assembler flags in General
役に立ちましたか?

解決

The tree for GCC Assembler is of index 1! So it has to be

bot.tree(1).getTreeItem("GCC Assembler").select();
bot.tree(1).getTreeItem("GCC Assembler").getNode("General").select();

The first tree is the Resource, C/C++build on the left side, this is the second tree in the page.

ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top