Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Side Script with a self signed certificate web application is not running inside a docker container with selenium side runner ver 4.0.8 #1831

Open
NikhilHedau opened this issue May 16, 2024 · 3 comments

Comments

@NikhilHedau
Copy link

馃悰 Bug Report

I am not able to run a side script containing a self signed web application inside a docker container with selenium side runner ver 4.0.8 but the same is running successfully with ver 3.17.0.
The side script is running successfully outside the docker container using selenium side runner ver 4.0.8 and electron application.

Below are the failure logs. Seems like the session is not getting created.
Configuration: {
baseUrl: 'http://host:port',
capabilities: {
browserName: 'chrome',
acceptInsecureCerts: false,
'goog:chromeOptions': {
args: [Array],
excludeSwitches: [Array],
extensions: [],
prefs: [Object]
}
},
debug: true,
debugConnectionMode: true,
debugStartup: true,
filter: '.*',
force: undefined,
maxWorkers: 4,
screenshotFailureDirectory: undefined,
projects: [
'/.defaultSuite.side'
],
proxyOptions: {},
proxyType: undefined,
retries: 0,
runId: '1a4bad57c0d7ffd1f74cbf5d3c11ba5a',
path: '/usr/lib/node_modules/',
server: '',
jestTimeout: 60000,
timeout: 30000
}
Jest command: node /usr/lib/node_modules/selenium-side-runner/node_modules/jest/bin/jest.js [
'--config=/usr/lib/node_modules/selenium-side-runner/runner.jest.config.js',
'--maxConcurrency=4',
'--json',
'--outputFile=/synthetic/runtime/ocid1.apmsyntheticmonitor.oc1.phx.aaaaaaaa5hyejuskx2gz63nr2l5pnexptvdksfcdn4ampbdpwfyvz3t2fabq/execution/1715768880000/results-2024-05-15T10-31-50.692Z.json',
'--runTestsByPath',
'/usr/lib/node_modules/selenium-side-runner/dist/main.test.js'
] {
DISPLAY: ':0',
XAUTHORITY: '/tmp/xvfb-run.vFoqd6/Xauthority.2BDqpV',
HOSTNAME: '1ab7a3770d76',
TERM: 'xterm',
PATH: '/synthetic/chrome:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin',
PWD: '/etc/service/chainsaw',
SELENIUM_NODE_PATH: '/lib/node_modules/selenium-side-runner/node_modules',
NODE_PATH: '/lib/node_modules',
SHLVL: '2',
LOG_LEVEL: 'INFO',
NODE_RPM: 'nodejs-16.20.2-1.0.1.el7.x86_64.rpm',
NODE_TMP_PATH: '/tmp/nodejs-16.20.2-1.0.1.el7.x86_64.rpm',
_: '/usr/bin/selenium-side-runner',
SE_CONFIGURATION: '{"baseUrl":"http://host:port","capabilities":{"browserName":"chrome","acceptInsecureCerts":false,"goog:chromeOptions":{"args":["--auto-open-devtools-for-tabs","--disable-dev-shm-usage","--no-sandbox"],"excludeSwitches":["enable-automation"],"extensions":[],"prefs":{"download":{"default_directory":"/download"},"devtools":{"preferences":{"currentDockState":"\\"bottom\\"","network_log.preserve-log":true,"InspectorView.splitViewState":"{\\"horizontal\\":{\\"size\\":0.1}}"}},"profile":{"default_content_setting_values":{"automatic_downloads":1}}}}},"debug":true,"debugConnectionMode":true,"debugStartup":true,"filter":".*","maxWorkers":4,"projects":["defaultSuite.side"],"proxyOptions":{},"retries":0,"runId":"1a4bad57c0d7ffd1f74cbf5d3c11ba5a","path":"/usr/lib/node_modules/","server":"","jestTimeout":60000,"timeout":30000}'
}
console.log
Beginning test session

  at Object.<anonymous>.exports.default (src/connect.ts:9:11)

console.info
Building driver for chrome

  at WebDriverExecutor.getDriverSync (node_modules/@seleniumhq/side-runtime/src/webdriver.ts:172:14)

console.info
Driver attributes:{
capabilities: {
acceptInsecureCerts: false,
'goog:chromeOptions': {
args: [Array],
excludeSwitches: [Array],
extensions: [],
prefs: [Object]
}
},
server: '',
browserName: 'chrome'
}

  at WebDriverExecutor.getDriverSync (node_modules/@seleniumhq/side-runtime/src/webdriver.ts:173:14) 

To Reproduce

selenium-side-runner defaultSuite.side --config-file config.yaml --base-url http://host:port --output-directory ./output/ --debug --debug-startup --debug-connection-mode --timeout 30000

Expected behavior

Test should pass

Project file reproducing this issue (highly encouraged)

{
"id": "392b6804-4f5f-43c6-87ba-c4be665fb8d7",
"version": "2.0",
"name": "Test",
"url": "http://host:port",
"tests": [{
"id": "707d7e25-3686-48c6-a593-4511ae858242",
"name": "test1",
"commands": [{
"id": "7582a8cb-0473-4829-9ffd-e4fba5b52b91",
"comment": "",
"command": "open",
"target": "/link/",
"targets": [],
"value": ""
}, {
"id": "157ec09a-ebfb-4d28-a069-a3b4b0cbb49f",
"comment": "",
"command": "setWindowSize",
"target": "1920x970",
"targets": [],
"value": ""
}, {
"id": "16a88cae-bf98-4fe4-82a1-53c161709c46",
"comment": "",
"command": "click",
"target": "css=.book-info:nth-child(1) .btn",
"targets": [
["css=.book-info:nth-child(1) .btn", "css:finder"],
["xpath=//input[@value='Order']", "xpath:attributes"],
[
"xpath=//input[2]",
"xpath:position"
]
],
"value": ""
}, {
"id": "d166f872-f893-4c36-964b-d96dbfba832d",
"comment": "",
"command": "click",
"target": "css=.book-info:nth-child(1) .btn",
"targets": [
["css=.book-info:nth-child(1) .btn", "css:finder"],
["xpath=//input[@value='Add to Cart']", "xpath:attributes"],
[
"xpath=//input[2]",
"xpath:position"
]
],
"value": ""
}, {
"id": "22907197-2ccf-47a3-8d4f-61be32bcf4d3",
"comment": "",
"command": "click",
"target": "css=.book-info:nth-child(2) .btn",
"targets": [
["css=.book-info:nth-child(2) .btn", "css:finder"],
["xpath=(//input[@value='Add to Cart'])[2]", "xpath:attributes"],
[
"xpath=//div[2]/div/div/input[2]",
"xpath:position"
]
],
"value": ""
}, {
"id": "b28eb8d9-c6a8-4a64-8acb-3ae52af6936d",
"comment": "",
"command": "click",
"target": "id=cart",
"targets": [
["id=cart", "id"],
["linkText=Shopping Cart 2", "linkText"],
["css=#cart", "css:finder"],
["xpath=//a[@id='cart']", "xpath:attributes"],
["xpath=//a[contains(@href, './cart.jsp')]", "xpath:href"],
["xpath=//li[3]/a", "xpath:position"],
[
"xpath=//a[contains(.,'Shopping Cart 2')]",
"xpath:innerText"
]
],
"value": ""
}, {
"id": "1eed41-0440-4338-938a-fdc47a9b3612",
"comment": "",
"command": "waitForElementPresent",
"target": "css=.btn:nth-child(2)",
"targets": [
["css=.btn:nth-child(2)", "css:finder"],
["xpath=//input[@value='Check Out Async(Rest)']", "xpath:attributes"],
["xpath=//div[@id='container']/form/div/div[2]/input[2]", "xpath:idRelative"],
[
"xpath=//input[2]",
"xpath:position"
]
],
"value": "60000"
}, {
"id": "1eed41-0440-4338-938a-fdc47a9b3612",
"comment": "",
"command": "waitForElementVisible",
"target": "css=.btn:nth-child(2)",
"targets": [
["css=.btn:nth-child(2)", "css:finder"],
["xpath=//input[@value='Check Out Async(Rest)']", "xpath:attributes"],
["xpath=//div[@id='container']/form/div/div[2]/input[2]", "xpath:idRelative"],
[
"xpath=//input[2]",
"xpath:position"
]
],
"value": "60000"
}, {
"id": "80a16b72-1410-40c6-84dd-c3c3bcee9d46",
"comment": "",
"command": "pause",
"target": "3000",
"targets": [],
"value": ""
}, {
"id": "daca84e7-1c85-4cec-9a10-6f960284fffb",
"comment": "",
"command": "click",
"target": "css=.btn:nth-child(2)",
"targets": [
["css=.btn:nth-child(2)", "css:finder"],
["xpath=//input[@value='Check Out Async(Rest)']", "xpath:attributes"],
["xpath=//div[@id='container']/form/div/div[2]/input[2]", "xpath:idRelative"],
[
"xpath=//input[2]",
"xpath:position"
]
],
"value": ""
}, {
"id": "32db82a6-2ac2-4cc2-be09-d284356f729a",
"comment": "",
"command": "click",
"target": "linkText=Your order",
"targets": [
["linkText=Your order", "linkText"],
["css=a:nth-child(3)", "css:finder"],
["xpath=//a[contains(text(),'Your order')]", "xpath:link"],
["xpath=//div[@id='cartNumberError']/a", "xpath:idRelative"],
["xpath=//a[contains(@href, 'order.jsp?orderId=33322')]", "xpath:href"],
["xpath=//div[2]/div/a", "xpath:position"],
[
"xpath=//a[contains(.,'Your order')]",
"xpath:innerText"
]
],
"value": ""
}, {
"id": "3d867a6b-ad4b-42c7-8ac4-faf84c2af8e3",
"comment": "",
"command": "click",
"target": "linkText=Product Lines",
"targets": [
["linkText=Product Lines", "linkText"],
["css=.navbar-brand", "css:finder"],
["xpath=//a[contains(text(),'Product Lines')]", "xpath:link"],
["xpath=//a[contains(@href, './')]", "xpath:href"],
["xpath=//a", "xpath:position"],
[
"xpath=//a[contains(.,'Product Lines')]",
"xpath:innerText"
]
],
"value": ""
}, {
"id": "7a240559-dc46-414c-9b8b-4341476a2351",
"comment": "",
"command": "close",
"target": "",
"targets": [],
"value": ""
}]
}],
"suites": [{
"id": "d701a05a-c317-4a87-a25e-45fd268e8035",
"name": "Default Suite",
"persistSession": false,
"parallel": false,
"timeout": 300,
"tests": ["707d7e25-3686-48c6-a593-4511ae858242"]
}],
"urls": ["http://host:port/"],
"plugins": []
}

Config.yaml

capabilities:
browserName: chrome
acceptInsecureCerts: false
goog:chromeOptions:
args: [--auto-open-devtools-for-tabs,--disable-dev-shm-usage,--no-sandbox]
excludeSwitches: [enable-automation]
extensions: []
prefs:
download:
default_directory: /download
devtools:
preferences:
currentDockState: '"bottom"'
network_log.preserve-log: true
InspectorView.splitViewState: '{"horizontal":{"size":0.1}}'
profile:
default_content_setting_values:
automatic_downloads: 1

Environment

OS: Oracle Linux Docker container
Selenium IDE Version: Not Applicable
Selenium SIDE Runner Version: 4.0.8
Node version: 16.20.2
Browser: Google Chrome
Browser Version: 116.0.5845.110
Chromedriver Version: 116.0.5845.96

PS: Please let me know in case you need any more information from my side.

@NikhilHedau
Copy link
Author

Hi @toddtarsi , Did you get some time to look into this?

@toddtarsi
Copy link
Contributor

No, I'll give it a look a bit later this week. Sorry for the delays, work has been a bit hectic lately.

@NikhilHedau
Copy link
Author

Sure, Thanks for the update.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants