Closed marco-paciucci closed 2 years ago
debuggin a wdi5
test is pretty easy as it adheres to Node.js debugger/--inspect
setting.
E.g. in VS Code, start a "JavaScript Debug Terminal"...
...and run wdi5
from there, e.g. via npm run wdi5
(or whatever npm script you've chosen).
Then add breakpoints in the test source...
...and wdi5
will halt execution at that point.
(Reminds me: we'll still need a recipe for debugging, will put it in the issues list.)
Then you can look at checkedItems
in the debugger and examine why it's not iterable.
Hello, thank you very much for giving the recipe to debug. I don't know why but it seems that the list of items is empty even though in the last image you can see that it's not. What could the issue be?
i guess you're missing interaction: "root"
on the selector - see #319
selector: {
controlType: "...",
// other props here
interaction: "root"
}
Thank you very much, that did the trick. One more question. If I need to add some text to sap.m.input and fire the change event, how can this be done? Do I need to raise a separate issue?
The statement I've added doesn't raise the change event. How can this be done in wdi5?
Hello,
I've managed to find a solution:
await oControl.enterText("Restart the server");
I think that you should enhance the "Recipe" sections with more examples.
Thanks .
I've managed to find a solution:
await oControl.enterText("Restart the server");
I think that you should enhance the "Recipe" sections with more examples.
given how easy it is to contribute to the documentation, would you mind giving this a shot? as you stated, many would benefit from that. thanks in advance!
hey 👋 - silence for 30 days 🤐 ... anybody? 😀
closed 📴 because silencio 🤫 since an additional 14 days after staleness 📠
Hello, I've coded this test here:
But I'm getting:
checkedItems is not iterable
The list is displayed on the screen and I don't know why I am getting that error. I have addedawait browser.debug();
which stops the execution but in the console I cannot type await browser.asControl(listSelector).getItems(); because the console is not attached to the current flow of execution and I don't know if it's ever possible to debug and to what extent (I don't want to debug the original javascript file but the spec js).