protractor
protractor copied to clipboard
How to click a ng-Submit button in protractor
Hello, I am new to protractor and help will me very much appreciated. How do I click ng-Submit button in protractor?
Here is the piece of jsp code I am trying to test by submitting the form by clicking :
Youre calling click on By.id("StartJobButton"), not the WebElement.
I think you need to do something like:
var elem = ptor.findElement(protractor.By.id('StartJobButton'));
elem.click().then( //stuff ).
ps instead of the verbose findElement you can use $('#StartJobButton'). Its a convenience method described here: https://github.com/angular/protractor/blob/master/docs/getting-started.md
Thank you, that worked.