google.com isn't an Angular app, but Protractor should still be able to test it, right? I've been trying to do a simple test of a search, but keep running to errors.
the spec:
browser.ignoreSynchronization = true;
describe('Google Demo', function() {
it('Should Search', function() {
browser.get('http://google.com/');
browser.wait(element(By.id('q')).isPresent);
element(By.id('q')).sendKeys('please work');
});
});
the error is:
Failures:
1) Google Demo Should Search
Message: TypeError: Cannot read property 'count' of undefined
What am I doing wrong? I'd appreciate any help!
Since it's a non-Angular app, you need to use browser.driver
instead of just browser
. GitHub Link for non-angular app
browser.ignoreSynchronization = true;
describe('Google Demo', function() {
it('Should Search', function() {
browser.driver.get('http://google.com/');
browser.driver.findElement(by.name('q')).sendKeys('please work');
});
});
This is working on my system!
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With