Describe the bug
When attempting to automate the user authentication process on Twitter, specifically when dealing with the authentication popup window, Taiko encounters the error message "Not attached to an active page."
To Reproduce
Steps (or script) to reproduce the behavior:
Go to 'galxe.com'
Click on 'Explore'
Search 'galxeDAO' in the search bar
Click a campaign which name contains 'GalxeDAO Tweet Like & Retweet'
Click the expand button with xpath '//*[@id='ga-data-campaign-model-2']/div[2]/div[1]/div/div[4]/div[2]/div/div[1]/div/div/div[2]/div[1]/div/button/div[1]/div[1]'
Click 'Detail >>' button
Click the Twitter url below the ''Call-to-Action" text
Browser opened
✔ Navigated to URL http://galxe.com
✔ Clicked element matching text "Explore" 1 times
✔ Wrote galxeDAO into the textBox with label Search
✔ Clicked element matching text "GalxeDAO Tweet Like & Retweet" 1 times
" ✔ Clicked customSelector with query //*[@id='ga-data-campaign-model-2']/div[2]/div[1]/div/div[4]/div[2]/div/div[1]/div/div/div[2]/div[1]/div/button/div[1]/div[1] 1 times"
✔ Clicked element matching text "Detail >>" 1 times
✔ Clicked element matching text "twitter.com" 1 times
ProtocolError: Not attached to an active page
at /usr/local/lib/node_modules/taiko/node_modules/chrome-remote-interface/lib/chrome.js:94:35
at Chrome._handleMessage (/usr/local/lib/node_modules/taiko/node_modules/chrome-remote-interface/lib/chrome.js:257:17)
at WebSocket.<anonymous> (/usr/local/lib/node_modules/taiko/node_modules/chrome-remote-interface/lib/chrome.js:235:22)
at WebSocket.emit (node:events:517:28)
at Receiver.receiverOnMessage (/usr/local/lib/node_modules/taiko/node_modules/ws/lib/websocket.js:1068:20)
at Receiver.emit (node:events:517:28)
at Receiver.dataMessage (/usr/local/lib/node_modules/taiko/node_modules/ws/lib/receiver.js:517:14)
at /usr/local/lib/node_modules/taiko/node_modules/ws/lib/receiver.js:468:23
at /usr/local/lib/node_modules/taiko/node_modules/ws/lib/permessage-deflate.js:308:9
at /usr/local/lib/node_modules/taiko/node_modules/ws/lib/permessage-deflate.js:391:7 {
request: {
method: 'Page.bringToFront',
params: undefined,
sessionId: undefined
},
response: { code: -32000, message: 'Not attached to an active page' }
}
✔ Switched to tab matching /twitter/
✔ Browser closed
Expected behavior
Taiko should be able to interact with and manipulate elements within the Twitter authentication popup window seamlessly.
Screenshots
If applicable, add screenshots to help explain your problem.
The code works in a local interactive mode (i.e. type 'taiko' in command line), still getting the warning message says "Uncaught Not attached to an active page", but I was able to run the following codes manually line by line;
Tried remove the 'switchTo' and 'reload' lines after the 'await click("twitter.com", below("Call-to-Action"));' line, not working.
Tried remove the 'setConfig' at the beginning, not working.
Ran the code for a dozen times and for only once, the code worked perfectly with a 'reload' line after the 'click' action.
Describe the bug When attempting to automate the user authentication process on Twitter, specifically when dealing with the authentication popup window, Taiko encounters the error message "Not attached to an active page."
To Reproduce Steps (or script) to reproduce the behavior:
Logs
Expected behavior Taiko should be able to interact with and manipulate elements within the Twitter authentication popup window seamlessly.
Screenshots If applicable, add screenshots to help explain your problem.
Versions:
Additional context