Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
736 views
in Technique[技术] by (71.8m points)

robotframework - New browser not working in Robot Framework on server with Docker

enter image description here

I cannot open the browser when using the browser library in the robot framework on the server. But it is working on local with same docker.

NOT : I use browser library, I don't use selenium.

Thank you in advance for your help

Error log

{"level":30,"time":"2021-01-12T08:43:15.541Z","pid":1042,"hostname":"9e6377fbd66f","msg":"Changed active context"}
{"level":30,"time":"2021-01-12T08:43:15.684Z","pid":1042,"hostname":"9e6377fbd66f","msg":"Video path: undefined"}
{"level":30,"time":"2021-01-12T08:43:15.684Z","pid":1042,"hostname":"9e6377fbd66f","msg":"Changed active page"}
================= Original suppressed error =================
page.goto: Timeout 10000ms exceeded.
=========================== logs ===========================
navigating to "https://google.com.tr", waiting until "load"
============================================================
Note: use DEBUG=pw:api environment variable and rerun to capture Playwright logs.
    at Connection.sendMessageToServer (/usr/local/lib/python3.9/site-packages/Browser/wrapper/node_modules/playwright/lib/client/connection.js:69:15)
    at Proxy.<anonymous> (/usr/local/lib/python3.9/site-packages/Browser/wrapper/node_modules/playwright/lib/client/channelOwner.js:44:61)
    at /usr/local/lib/python3.9/site-packages/Browser/wrapper/node_modules/playwright/lib/client/frame.js:80:71
    at Frame._wrapApiCall (/usr/local/lib/python3.9/site-packages/Browser/wrapper/node_modules/playwright/lib/client/channelOwner.js:72:34)
    at Frame.goto (/usr/local/lib/python3.9/site-packages/Browser/wrapper/node_modules/playwright/lib/client/frame.js:78:21)
    at /usr/local/lib/python3.9/site-packages/Browser/wrapper/node_modules/playwright/lib/client/page.js:267:60
    at Page._attributeToPage (/usr/local/lib/python3.9/site-packages/Browser/wrapper/node_modules/playwright/lib/client/page.js:202:20)
    at Page.goto (/usr/local/lib/python3.9/site-packages/Browser/wrapper/node_modules/playwright/lib/client/page.js:267:21)
    at Object.<anonymous> (/usr/local/lib/python3.9/site-packages/Browser/wrapper/index.js:70868:49)
    at step (/usr/local/lib/python3.9/site-packages/Browser/wrapper/index.js:70323:23) {
  name: 'TimeoutError'
}
=============================================================
================= Original suppressed error =================
Error: Tried to take screenshot, but no page was open.
    at Object.exists (/usr/local/lib/python3.9/site-packages/Browser/wrapper/index.js:70233:15)
    at Object.<anonymous> (/usr/local/lib/python3.9/site-packages/Browser/wrapper/index.js:66456:41)
    at step (/usr/local/lib/python3.9/site-packages/Browser/wrapper/index.js:66384:23)
    at Object.next (/usr/local/lib/python3.9/site-packages/Browser/wrapper/index.js:66365:53)
    at /usr/local/lib/python3.9/site-packages/Browser/wrapper/index.js:66359:71
    at new Promise (<anonymous>)
    at __webpack_modules__../node/playwright-wrapper/browser-control.ts.__awaiter (/usr/local/lib/python3.9/site-packages/Browser/wrapper/index.js:66355:12)
    at Object.takeScreenshot (/usr/local/lib/python3.9/site-packages/Browser/wrapper/index.js:66437:12)
    at PlaywrightServer.<anonymous> (/usr/local/lib/python3.9/site-packages/Browser/wrapper/index.js:67972:61)
    at step (/usr/local/lib/python3.9/site-packages/Browser/wrapper/index.js:67457:23)
=============================================================
{"level":30,"time":"2021-01-12T08:43:25.750Z","pid":1042,"hostname":"9e6377fbd66f","msg":"Changed active context"}
{"level":30,"time":"2021-01-12T08:43:25.777Z","pid":1042,"hostname":"9e6377fbd66f","msg":"Changed active context"}

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

Problem solved. Because it is a foreign server, the url has been closed for security purposes. I solved the problem by applying a proxy.

Thanks to everyone who helped


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...