Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to verify in protractor navigation to 3rd party page such login with your Google account?

We have options to log in with 3rd party providers using your Google or Microsoft accounts. I just need to verify that when you click on the link you get taken to the right provider page. After the page is loaded, I get:

Error: Error while waiting for Protractor to sync with the page

Seems the WebDriver instance is disconnected. What's the proper way to verify you've landed in a 3rd party site using protractor?

like image 970
markkra323 Avatar asked Jan 23 '26 01:01

markkra323


1 Answers

Protractor waits until angular is done loading to proceed with your test. It will show you that error because you are going to a non-angular URL. To test non-angular pages you should use the webdriver api directly.

You can access webdriver through browser.driver

Here is an example: https://github.com/angular/protractor/blob/master/spec/withLoginConf.js

You can find some documentation here: https://github.com/angular/protractor/blob/master/docs/getting-started.md#setting-up-the-system-under-test

like image 126
Andres D Avatar answered Jan 25 '26 21:01

Andres D



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!