File tree 1 file changed +7
-3
lines changed
1 file changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -34,6 +34,12 @@ module.exports.GoogleSocialLogin = async function GoogleSocialLogin(options = {}
34
34
let page = await browser . newPage ( )
35
35
let originalPageIndex = 1
36
36
await page . setViewport ( { width : 1280 , height : 800 } )
37
+ await page . setExtraHTTPHeaders ( {
38
+ 'Accept-Language' : 'en-US;q=0.9,en;q=0.8'
39
+ } )
40
+ await page . setUserAgent (
41
+ 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/66.0.3359.181 Safari/537.36'
42
+ )
37
43
38
44
await page . goto ( options . loginUrl )
39
45
await login ( { page, options} )
@@ -107,11 +113,9 @@ async function login({page, options} = {}) {
107
113
}
108
114
109
115
async function typeUsername ( { page, options} = { } ) {
110
- let buttonSelector = options . headless ? '#next' : '#identifierNext'
111
-
112
116
await page . waitForSelector ( 'input[type="email"]' )
113
117
await page . type ( 'input[type="email"]' , options . username )
114
- await page . click ( buttonSelector )
118
+ await page . click ( '#identifierNext' )
115
119
}
116
120
117
121
async function typePassword ( { page, options} = { } ) {
You can’t perform that action at this time.
0 commit comments