I'm coming from a Java+Selenium environment, so maybe this is a mismatch of understanding that I'm having with Javascript/Angular/Protractor. I used to use IntelliJ's IDEA IDE for automation testing. I could actively do live search and on the fly testing of ideas using IDEA's Evaluate Expression functionality. I could actively look for elements on a page (searching using CSS selectors for instance) and do a click (or see what the text is), and if my test was in debug mode it would do the click on the page.
I was really hoping for a similar experience with WebStorm since it's IntelliJ's answer for Javascript development. I'm in the middle of debugging a Protractor UI test and I can't look at the result of a getText() without doing a .then()
clause and a console.log in the .then()
clause. I feel like if I do element.getText()
in the Evaluate Expression tool I should be able to see what that Promise will evaluate to without having to do a then clause that resolves the Promise. I understand there's stuff having to do with the asynchronous nature of Javascript that requires the resolution of the Promise, but I would think this super smart IDE would have resolution stuff built in. Is there a way to setup WebStorm to say 'hey, resolve this for me and let me see what happens!"? I would hope for getting the same behavior when I evaluate element.click()
.