Closed emilorol closed 5 years ago
I figure it out and here it is in case someone needs it.
For Microsoft Edge
Start your docker container
docker run -it -d --rm --privileged -p 4442:4444 -p 5902:5900 windows/edge:18
Start browser session
curl -X POST http://127.0.0.1:4442/session -d '{"capabilities": {"browserName": "MicrosoftEdge", "platform": "win10"}}'
You should get something like this
{
"value":{
"sessionId":"DA0AC1A2-4725-492C-9E1A-1F586DF4C499", <= // YOUR-SESSION-ID-FROM-THE-WEBDRIVER
"capabilities":{
"acceptInsecureCerts":false,
"browserName":"MicrosoftEdge",
"browserVersion":"44.18362.1.0",
"pageLoadStrategy":"normal",
"platformName":"windows",
"setWindowRect":false,
"timeouts":{
"implicit":0,
"pageLoad":300000,
"script":30000
},
"proxy":{
}
}
}
}
Visit page
curl -X POST 'http://127.0.0.1:4442/session/YOUR-SESSION-ID-FROM-THE-WEBDRIVER/url' -d '{"url":"https://www.google.com"}'
Close browser
curl -X DELETE 'http://127.0.0.1:4442/session/YOUR-SESSION-ID-FROM-THE-WEBDRIVER/window'
Is there a way to finish building the windows image and locally spin up docker and run a simple test against it?