|Unable to create run configuration with SWTBot [message #1802277]
||Tue, 05 February 2019 18:24
| N M
Registered: September 2018
I want to create a run configuration as part of an SWTBot testcase. In order to do so, I navigate via the context menu of a sample project to the run configurations dialog and create the new configuration with a specified name, like this:
bot.tree().getTreeItem("Minimum_Project").contextMenu("Run As").menu("Run Configurations...").click();
bot.toolbarButtonWithTooltip("New launch configuration").click();
No problem so far. Now have a look at this image, pls:
I need to set some text in the highlighted text fields, but SWTBot is not able to find/access them. It seems like it would be only possible to use "structures" that are not within these tabs ("Architecture Model(s)", "Simulation", etc.). The next problem is, that I have to switch to the "Simulation"-tab, to fill out another form.
Is it somehow possible to access the "structures" (buttons, text fields, ...) inside these tabs as part of a SWTBot test? If so, please tell me how. (I assume that if you can give me an example that works on the run configuration of a "normal" eclipse project, the same strategy should work in my case as well).
Note that using keyboard shortcuts is not possible, because if you "click" on an UI element and, as a result, focus it, and then let SWTBot perform some shortcuts, the focus seems to be somehow reset before the shortcuts are pressed. Therefore pressing the indent key as many times as needed to navigate to the appropriate buttons is not possible.
I am using Eclipse Version: 4.8.0.v20180611-0656 Build id: I20180611-0500 together with SWTBot 2.6.201706141832.
If you have any questions, don't hesitate to ask. I'll do my best to give you as much information as you need.
Thank you in advance.
Powered by FUDForum
. Page generated in 0.02470 seconds