How do I test Expo application without building apk with appium? - react-native

I try to make some tests on my Expo application but I can't launch it with appium,
Here is my capabilities:
const capabilities = {
platformName: 'android',
deviceName: 'Emulator1',
automationName: 'UiAutomator2',
pkg: 'host.exp.exponent',
intentAction: 'android.intent.action.VIEW',
activity: 'host.exp.exponent.experience.HomeActivity',
appWaitForLaunch: true,
path: '/wd/',
port: 4723,
};
I got this :
ERROR webdriver: Request failed with status 404 due to unknown command: The requested resource could not be found, or a request was received using an HTTP method that is not supported by the mapped resource
[0-0] 2021-02-18T12:34:11.688Z ERROR webdriver: unknown command: The requested resource could not be found, or a request was received using an HTTP method that is not supported by the mapped resource
at Object.getErrorFromResponseBody (/Users/kanka/Desktop/projects/expo-tests/node_modules/webdriver/build/utils.js:189:12)
at WebDriverRequest._request (/Users/kanka/Desktop/projects/expo-tests/node_modules/webdriver/build/request.js:168:31)
at process._tickCallback (internal/process/next_tick.js:68:7)
[0-0] 2021-02-18T12:34:11.690Z ERROR #wdio/runner: Error: Failed to create session.
The requested resource could not be found, or a request was received using an HTTP method that is not supported by the mapped resource
at Object.startWebDriverSession (/Users/kanka/Desktop/projects/expo-tests/node_modules/webdriver/build/utils.js:68:15)
at process._tickCallback (internal/process/next_tick.js:68:7)
2021-02-18T12:34:11.810Z DEBUG #wdio/local-runner: Runner 0-0 finished with exit code 1
[0-0] FAILED in undefined - /tests/App.test.js
2021-02-18T12:34:11.811Z INFO #wdio/cli:launcher: Run onComplete hook
Spec Files: 0 passed, 1 failed, 1 total (100% completed) in 00:00:01

If you are using "webdriverio": "^7.0.7" package: try updating your configuration file like this :
wdio.conf.js
exports.config = {
services: ['appium'],
port: 4723,
path: '/wd/hub/',
hostname: 'localhost',
protocol: 'http',
specs: [
'./test/specs/**/*.js',
],
maxInstances: 1,
capabilities: [{
platformName: 'android',
deviceName: 'test', // Change to the name of the AVD you're using
automationName: 'UiAutomator2',
appPackage: 'host.exp.exponent',
appActivity: 'host.exp.exponent.experience.HomeActivity',
appWaitActivity: 'host.exp.exponent.experience.HomeActivity',
intentAction: 'android.intent.action.MAIN',
appWaitForLaunch: true,
newCommandTimeout: 180,
uiautomator2ServerInstallTimeout: 100000,
adbExecTimeout: 1000000,
skipLogcatCapture: true,
}],
logLevel: 'trace',
bail: 0,
waitforTimeout: 10000,
connectionRetryTimeout: 1200000,
connectionRetryCount: 3,
framework: 'mocha',
reporters: ['spec'],
mochaOpts: {
ui: 'bdd',
timeout: 180000,
},
};
path port are not in capabilities array.

Related

Webdriver.io - videos from video-reporter are not generated properly (cannot be opened)

I am new to werbdiver.io and I was looking for best reporter. Allure reports are working fine for me after some configuration, but video reporter doesn't.
Everytime a test fails, something like a video trace is created, but I cannot play the video itself (it has just 150kb). The video is available also in allure report, naturally I cannot play it.
I am sending my config:
reporters: [
[video, {
saveAllVideos: false,
videoSlowdownMultiplier: 3,
videoRenderTimeout: 5,
outputDir: './allure-results'
}],
['allure', {
outputDir: './allure-results',
disableWebdriverStepsReporting: true,
disableWebdriverScreenshotsReporting: true,
}],
],
This is what I see as error (I guess the first line is important, I don't understand it as folder is existing):
[0-0] 2021-12-02T13:49:43.848Z ERROR #wdio/local-runner: Failed launching test session: Error: ENOENT: no such file or directory, stat 'C:\Data\Workspaces\webdriver\davinci-web-test\allure-results\My-Login-application--should-login-with-valid-credentials--CHROME--2021-12-02--14-49-22-485.mp4'
[0-0] at Object.statSync (fs.js:1131:3)
[0-0] at Object.statSync (C:\Data\Workspaces\webdriver\davinci-web-test\node_modules\graceful-fs\polyfills.js:312:16)
[0-0] at C:\Data\Workspaces\webdriver\davinci-web-test\node_modules\wdio-video-reporter\src\helpers.js:120:70
[0-0] at Array.map ()
[0-0] at Object.waitForVideosToBeWritten
(C:\Data\Workspaces\webdriver\davinci-web-test\node_modules\wdio-video-reporter\src\helpers.js:120:33)
[0-0] at Video.onExit (C:\Data\Workspaces\webdriver\davinci-web-test\node_modules\wdio-video-reporter\src\index.js:217:13)
[0-0] at process. (C:\Data\Workspaces\webdriver\davinci-web-test\node_modules\wdio-video-reporter\src\index.js:83:44)
[0-0] at process.emit (events.js:412:35)
[0-0] at process.emit (domain.js:475:12)
[0-0] at process.emit (C:\Data\Workspaces\webdriver\davinci-web-test\node_modules#cspotcode\source-map-support\source-map-support.js:527:35)
[0-0] FAILED in chrome - C:\Data\Workspaces\webdriver\davinci-web-test\test\specs\example.ts
2021-12-02T13:49:43.878Z INFO #wdio/cli:launcher: Run onComplete hook
Spec Files: 0 passed, 1 failed, 1 total (100% completed) in 00:00:25
try removing the output directory from the video reporter option :
reporters: [
['video', {
saveAllVideos: false, // If true, also saves videos for successful test cases
videoSlowdownMultiplier: 3, // Higher to get slower videos, lower for faster videos [Value 1-100]
}],
['allure', {
outputDir: './_results_/allure-raw',
disableWebdriverStepsReporting: true,
disableWebdriverScreenshotsReporting: true,
}],
],
and generate allure report as :
allure generate ./_results_/allure-raw

webdriverIO and saucelab integration not working

When I tried connecting webdriverIO with sauce labs, I'm getting error as
I'm using sauce service
$ ./node_modules/.bin/wdio ./config/int.wdio.conf.js
Execution of 1 spec files started at 2020-08-30T20:11:14.720Z
2020-08-30T20:11:14.768Z INFO #wdio/cli:launcher: Run onPrepare hook
2020-08-30T20:11:14.770Z INFO #wdio/cli:launcher: Run onWorkerStart hook
2020-08-30T20:11:14.772Z INFO #wdio/local-runner: Start worker 0-0 with arg: ./config/int.wdio.conf.js
[0-0] 2020-08-30T20:11:15.414Z INFO #wdio/local-runner: Run worker command: run
[0-0] 2020-08-30T20:11:15.422Z INFO webdriverio: Initiate new session using the ./protocol-stub protocol
[0-0] RUNNING in chrome - /e2e/test/login.int.spec.js
[0-0] 2020-08-30T20:11:15.704Z INFO webdriverio: Initiate new session using the webdriver protocol
[0-0] 2020-08-30T20:11:15.706Z INFO webdriver: [POST] https://ondemand.saucelabs.com/wd/hub/session
[0-0] 2020-08-30T20:11:15.706Z INFO webdriver: DATA {
capabilities: {
alwaysMatch: { browserName: 'chrome', acceptInsecureCerts: true },
firstMatch: [ {} ]
},
desiredCapabilities: { browserName: 'chrome', acceptInsecureCerts: true }
}
[0-0] 2020-08-30T20:11:15.733Z ERROR webdriver: RequestError: connect ECONNREFUSED 127.0.0.1:443
at ClientRequest.<anonymous> (/node_modules/got/dist/source/core/index.js:891:25)
at Object.onceWrapper (events.js:418:26)
at ClientRequest.emit (events.js:323:22)
at ClientRequest.EventEmitter.emit (domain.js:482:12)
at ClientRequest.origin.emit (/test/node_modules/#szmarczak/http-timer/dist/source/index.js:39:20)
at TLSSocket.socketErrorListener (_http_client.js:426:9)
at TLSSocket.emit (events.js:311:20)
at TLSSocket.EventEmitter.emit (domain.js:482:12)
at emitErrorNT (internal/streams/destroy.js:92:8)
at emitErrorAndCloseNT (internal/streams/destroy.js:60:3)
at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1137:16)
[0-0] 2020-08-30T20:11:15.733Z ERROR #wdio/runner: Error: Failed to create session.
Unable to connect to "https://ondemand.saucelabs.com:443/wd/hub", make sure browser driver is running on that address.
If you use services like chromedriver see initialiseServices logs above or in wdio.log file as the service might had problems to start the driver.
at startWebDriverSession (/test/node_modules/webdriver/build/utils.js:45:11)
at processTicksAndRejections (internal/process/task_queues.js:97:5)
[0-0] Error: Failed to create session.
Unable to connect to "https://ondemand.saucelabs.com:443/wd/hub", make sure browser driver is running on that address.
If you use services like chromedriver see initialiseServices logs above or in wdio.log file as the service might had problems to start the driver.
[0-0] FAILED in chrome - /e2e/test/login.int.spec.js
2020-08-30T20:11:15.848Z INFO #wdio/cli:launcher: Run onComplete hook
Spec Files: 0 passed, 1 failed, 1 total (100% completed) in 00:00:01
2020-08-30T20:11:15.849Z INFO #wdio/local-runner: Shutting down spawned worker
2020-08-30T20:11:16.102Z INFO #wdio/local-runner: Waiting for 0 to shut down gracefully
2020-08-30T20:11:16.102Z INFO #wdio/local-runner: shutting down
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
my wdio.config.js looks like
exports.config = {
runner: 'local',
user: 'test123',
key: '65434d10-276f-4305-adb4-93a39848d445',
region: 'us',
specs: [
'./e2e/test/*.int.spec.js'
],
exclude: [
'./e2e/test/*.prod.spec.js',
'./e2e/test/*.ie.int.spec.js'
],
maxInstances: 1,
capabilities: [
{
maxInstances: 1,
browserName: 'chrome',
acceptInsecureCerts: true
}
],
logLevel: 'info',
bail: 0,
baseUrl: 'https://www.google.com',
waitforTimeout: 10000,
connectionRetryTimeout: 120000,
connectionRetryCount: 3,
services: ['sauce'],
framework: 'mocha',
reporters: ['mochawesome'],
mochaOpts: {
ui: 'bdd',
timeout: 60000
}
}
any idea how to fix this...

How to purge test sessions in Botium

I'm trying to run Test Set but it looks like it is stucked. All 5 agents are in use and I cannot delete them. Tests fail on ESOCKETTIMEDOUT. I could run same test without problems before.
I tried to click on "Send cancellation request" to Test Session in danger zone to kill it, but I still can't delete agents (Delete Botium Agent (only possible if not already used)).
Botium agents pic
Log from Botium:
2019-05-31T08:31:13.892Z: Job queued for execution
2019-05-31T08:31:13.886Z: 2019-05-31T08:31:13.378Z botium-box-worker-runtestcases Started processing, JobId #952.
2019-05-31T08:31:14.077Z: 2019-05-31T08:31:13.382Z botium-BotDriver Loaded Botium configuration file ./botium.json
2019-05-31T08:31:14.143Z: 2019-05-31T08:31:13.388Z botium-BotDriver BuildCompiler: Capabilites: { PROJECTNAME: 'TM new - Test Session',
TEMPDIR: 'botiumwork',
CLEANUPTEMPDIR: true,
WAITFORBOTTIMEOUT: 10000,
SIMULATE_WRITING_SPEED: false,
DOCKERCOMPOSEPATH: 'docker-compose',
DOCKERMACHINEPATH: 'docker-machine',
DOCKERMACHINE: false,
DOCKERIMAGE: 'node:boron',
DOCKERUNIQUECONTAINERNAMES: false,
DOCKERSYSLOGPORT_RANGE: '47100-47299',
BOT_HEALTH_STATUS: 200,
SLACK_PUBLISHPORT_RANGE: '46100-46299',
FACEBOOK_PUBLISHPORT_RANGE: '46300-46499',
FACEBOOK_SEND_DELIVERY_CONFIRMATION: true,
BOTFRAMEWORK_PUBLISHPORT_RANGE: '46500-46699',
BOTFRAMEWORK_WEBHOOK_PORT: 3978,
BOTFRAMEWORK_WEBHOOK_PATH: 'api/messages',
BOTFRAMEWORK_CHANNEL_ID: 'facebook',
SIMPLEREST_PING_RETRIES: 6,
SIMPLEREST_PING_TIMEOUT: 10000,
SIMPLEREST_PING_VERB: 'GET',
SIMPLEREST_METHOD: 'GET',
WEBSPEECH_SERVER_PORT: 46050,
WEBSPEECH_LANGUAGE: 'en-US',
WEBSPEECH_CLOSEBROWSER: true,
SCRIPTING_TXT_EOL: '\n',
SCRIPTING_XLSX_EOL_SPLIT: '\r',
SCRIPTING_XLSX_EOL_WRITE: '\r\n',
SCRIPTING_XLSX_STARTROW: 2,
SCRIPTING_XLSX_STARTCOL: 1,
SCRIPTING_NORMALIZE_TEXT: false,
SCRIPTING_ENABLE_MEMORY: false,
SCRIPTING_MATCHING_MODE: 'includeLowerCase',
SCRIPTING_UTTEXPANSION_MODE: 'all',
SCRIPTING_UTTEXPANSION_RANDOM_COUNT: 1,
SCRIPTING_MEMORYEXPANSION_KEEP_ORIG: false,
RETRY_USERSAYS_ONERROR_REGEXP: [],
RETRY_USERSAYS_NUMRETRIES: 1,
RETRY_USERSAYS_FACTOR: 1,
RETRY_USERSAYS_MINTIMEOUT: 1000,
ASSERTERS:
[ { ref: 'HASLINK',
src: 'botium-asserter-basiclink',
global: false,
args: null } ],
LOGIC_HOOKS: [],
USER_INPUTS: [],
CONTAINERMODE: 'webdriverio',
WEBDRIVERIO_URL: 'https://chat.t-mobile.cz/chat/',
WEBDRIVERIO_PROFILE: '',
WEBDRIVERIO_INPUT_ELEMENT: '<input />',
WEBDRIVERIO_INPUT_ELEMENT_VISIBLE_TIMEOUT: 10000,
WEBDRIVERIO_OUTPUT_ELEMENT:
"//div[#class='gaid-text-message gaid-text-message--isBot'][position()=last()-1]//p",
WEBDRIVERIO_IGNOREUPFRONTMESSAGES: false,
WEBDRIVERIO_USERNAME: '',
WEBDRIVERIO_PASSWORD: '',
WEBDRIVERIO_SCREENSHOTS: 'onstop',
FBPAGERECEIVER_REDISURL: { port: '6379', host: 'redis', db: 0, options: {} },
WEBDRIVERIO_OPTIONS:
{ desiredCapabilities: { browserName: 'chrome', name: 'TM new - Test Session' },
protocol: 'http',
host: '192.168.99.100',
port: '4444',
path: '/wd/hub' } }
2019-05-31T08:31:14.169Z: 2019-05-31T08:31:13.393Z botium-ScriptingProvider Using matching mode: includeLowerCase
2019-05-31T08:31:14.214Z: 2019-05-31T08:31:13.396Z botium-asserterUtils Loaded Default asserter - [ 'BUTTONS',
'MEDIA',
'PAUSE_ASSERTER',
'ENTITIES',
'ENTITY_VALUES',
'INTENT',
'INTENT_CONFIDENCE' ]
2019-05-31T08:31:14.251Z: 2019-05-31T08:31:13.402Z botium-asserterUtils Loaded Default logic hook - [ 'PAUSE',
'WAITFORBOT',
'SET_SCRIPTING_MEMORY',
'CLEAR_SCRIPTING_MEMORY',
'INCLUDE' ]
2019-05-31T08:31:14.339Z: 2019-05-31T08:31:13.403Z botium-asserterUtils Loaded Default user input - [ 'BUTTON', 'MEDIA', 'FORM' ]
2019-05-31T08:31:14.396Z: 2019-05-31T08:31:13.407Z botium-asserterUtils Trying to load HASLINK asserter from botium-asserter-basiclink
2019-05-31T08:31:14.433Z: 2019-05-31T08:31:13.410Z botium-asserterUtils Loaded HASLINK SUCCESSFULLY
2019-05-31T08:31:14.470Z: 2019-05-31T08:31:13.504Z botium-box-worker-runtestcases found 1 convos ...
2019-05-31T08:31:14.512Z: 2019-05-31T08:31:13.504Z botium-box-worker-runtestcases batchNum: 1 batchCount: 1 convosPerBatch: 1 batchStart: 0 batchEnd: 0 batchLength: 1
2019-05-31T08:31:14.548Z: 2019-05-31T08:31:13.507Z botium-BotDriver Build - Botium Core Version: 1.4.14
2019-05-31T08:31:14.586Z: 2019-05-31T08:31:13.510Z botium-BotDriver Build - Capabilites: { PROJECTNAME: 'TM new - Test Session',
TEMPDIR: 'botiumwork',
CLEANUPTEMPDIR: true,
WAITFORBOTTIMEOUT: 10000,
SIMULATE_WRITING_SPEED: false,
DOCKERCOMPOSEPATH: 'docker-compose',
DOCKERMACHINEPATH: 'docker-machine',
DOCKERMACHINE: false,
DOCKERIMAGE: 'node:boron',
DOCKERUNIQUECONTAINERNAMES: false,
DOCKERSYSLOGPORT_RANGE: '47100-47299',
BOT_HEALTH_STATUS: 200,
SLACK_PUBLISHPORT_RANGE: '46100-46299',
FACEBOOK_PUBLISHPORT_RANGE: '46300-46499',
FACEBOOK_SEND_DELIVERY_CONFIRMATION: true,
BOTFRAMEWORK_PUBLISHPORT_RANGE: '46500-46699',
BOTFRAMEWORK_WEBHOOK_PORT: 3978,
BOTFRAMEWORK_WEBHOOK_PATH: 'api/messages',
BOTFRAMEWORK_CHANNEL_ID: 'facebook',
SIMPLEREST_PING_RETRIES: 6,
SIMPLEREST_PING_TIMEOUT: 10000,
SIMPLEREST_PING_VERB: 'GET',
SIMPLEREST_METHOD: 'GET',
WEBSPEECH_SERVER_PORT: 46050,
WEBSPEECH_LANGUAGE: 'en-US',
WEBSPEECH_CLOSEBROWSER: true,
SCRIPTING_TXT_EOL: '\n',
SCRIPTING_XLSX_EOL_SPLIT: '\r',
SCRIPTING_XLSX_EOL_WRITE: '\r\n',
SCRIPTING_XLSX_STARTROW: 2,
SCRIPTING_XLSX_STARTCOL: 1,
SCRIPTING_NORMALIZE_TEXT: false,
SCRIPTING_ENABLE_MEMORY: false,
SCRIPTING_MATCHING_MODE: 'includeLowerCase',
SCRIPTING_UTTEXPANSION_MODE: 'all',
SCRIPTING_UTTEXPANSION_RANDOM_COUNT: 1,
SCRIPTING_MEMORYEXPANSION_KEEP_ORIG: false,
RETRY_USERSAYS_ONERROR_REGEXP: [],
RETRY_USERSAYS_NUMRETRIES: 1,
RETRY_USERSAYS_FACTOR: 1,
RETRY_USERSAYS_MINTIMEOUT: 1000,
ASSERTERS:
[ { ref: 'HASLINK',
src: 'botium-asserter-basiclink',
global: false,
args: null } ],
LOGIC_HOOKS: [],
USER_INPUTS: [],
CONTAINERMODE: 'webdriverio',
WEBDRIVERIO_URL: 'https://chat.t-mobile.cz/chat/',
WEBDRIVERIO_PROFILE: '',
WEBDRIVERIO_INPUT_ELEMENT: '<input />',
WEBDRIVERIO_INPUT_ELEMENT_VISIBLE_TIMEOUT: 10000,
WEBDRIVERIO_OUTPUT_ELEMENT:
"//div[#class='gaid-text-message gaid-text-message--isBot'][position()=last()-1]//p",
WEBDRIVERIO_IGNOREUPFRONTMESSAGES: false,
WEBDRIVERIO_USERNAME: '',
WEBDRIVERIO_PASSWORD: '',
WEBDRIVERIO_SCREENSHOTS: 'onstop',
FBPAGERECEIVER_REDISURL: { port: '6379', host: 'redis', db: 0, options: {} },
WEBDRIVERIO_OPTIONS:
{ desiredCapabilities: { browserName: 'chrome', name: 'TM new - Test Session' },
protocol: 'http',
host: '192.168.99.100',
port: '4444',
path: '/wd/hub' } }
2019-05-31T08:31:14.636Z: 2019-05-31T08:31:13.519Z botium-BotDriver Build - Sources : { LOCALPATH: '.',
GITPATH: 'git',
GITBRANCH: 'master',
GITDIR: '.' }
2019-05-31T08:31:14.671Z: 2019-05-31T08:31:13.524Z botium-BotDriver Build - Envs : { IS_BOTIUM_CONTAINER: true }
2019-05-31T08:31:14.704Z: 2019-05-31T08:31:13.592Z botium-PluginConnectorContainer Invalid Botium plugin loaded from webdriverio, expected PluginVersion, PluginClass fields
2019-05-31T08:31:14.732Z: 2019-05-31T08:31:13.595Z botium-PluginConnectorContainer Botium plugin botium-connector-webdriverio loaded
2019-05-31T08:31:14.769Z: 2019-05-31T08:31:13.597Z botium-connector-webdriverio Validate called
2019-05-31T08:31:14.801Z: 2019-05-31T08:31:13.600Z botium-connector-webdriverio Build called
2019-05-31T08:31:14.837Z: 2019-05-31T08:31:13.603Z botium-connector-webdriverio Start called
2019-05-31T08:31:24.389Z: 2019-05-31T08:31:24.371Z botium-box-worker sending heartbeat ...
2019-05-31T08:36:24.471Z: 2019-05-31T08:36:24.420Z botium-box-worker sending heartbeat ...
2019-05-31T08:37:15.925Z: 2019-05-31T08:37:15.880Z botium-box-worker-runtestcases Test Session Run failed (Error: ESOCKETTIMEDOUT), doing additional BotDriver Clean.
2019-05-31T08:37:15.961Z: 2019-05-31T08:37:15.881Z botium-connector-webdriverio Clean called
2019-05-31T08:40:02.054Z: 2019-05-31T08:40:02.006Z botium-BaseContainer Cleanup rimrafing temp dir /app/agent/botiumwork/TM-new-Test-Session-20190531-083113-vI4Bx
2019-05-31T08:40:02.357Z: Job failed: Error: ESOCKETTIMEDOUT
Selenium hub log:
08:06:36.629 INFO [GridLauncherV3.parse] - Selenium server version: 3.141.59, revision: e82be7d358
08:06:36.849 INFO [GridLauncherV3.lambda$buildLaunchers$5] - Launching Selenium Grid hub on port 4444
2019-05-31 08:06:37.333:INFO::main: Logging initialized #1175ms to org.seleniumhq.jetty9.util.log.StdErrLog
08:06:38.033 INFO [Hub.start] - Selenium Grid hub is up and running
08:06:38.040 INFO [Hub.start] - Nodes should register to http://172.19.0.4:4444/grid/register/
08:06:38.040 INFO [Hub.start] - Clients should connect to http://172.19.0.4:4444/wd/hub
08:06:40.894 INFO [DefaultGridRegistry.add] - Registered a node http://172.19.0.3:5555
08:06:40.907 INFO [DefaultGridRegistry.add] - Registered a node http://172.19.0.2:5555
08:07:47.391 INFO [RequestHandler.process] - Got a request to create a new session: Capabilities {browserName: firefox, handlesAlerts: true, javascriptEnabled: true, locationContextEnabled: true, loggingPrefs: org.openqa.selenium.logging..., name: TM new - Test Session, requestOrigins: {name: webdriverio, url: http://webdriver.io, version: 4.14.4}, rotatable: true}
08:07:47.409 INFO [TestSlot.getNewSession] - Trying to create a new session on test slot {server:CONFIG_UUID=ad8a2987-e350-456e-b9cf-25ac008d5255, seleniumProtocol=WebDriver, browserName=firefox, maxInstances=1, moz:firefoxOptions={log={level=info}}, platformName=LINUX, version=67.0, applicationName=, platform=LINUX}
08:13:58.927 INFO [RequestHandler.process] - Got a request to create a new session: Capabilities {browserName: chrome, handlesAlerts: true, javascriptEnabled: true, locationContextEnabled: true, loggingPrefs: org.openqa.selenium.logging..., name: TM new - Test Session, requestOrigins: {name: webdriverio, url: http://webdriver.io, version: 4.14.4}, rotatable: true}
08:13:58.935 INFO [TestSlot.getNewSession] - Trying to create a new session on test slot {server:CONFIG_UUID=3f83f707-e0ad-406f-9081-bc7185515bdf, seleniumProtocol=WebDriver, browserName=chrome, maxInstances=1, platformName=LINUX, version=74.0.3729.169, applicationName=, platform=LINUX}
08:31:13.686 INFO [RequestHandler.process] - Got a request to create a new session: Capabilities {browserName: chrome, handlesAlerts: true, javascriptEnabled: true, locationContextEnabled: true, loggingPrefs: org.openqa.selenium.logging..., name: TM new - Test Session, requestOrigins: {name: webdriverio, url: http://webdriver.io, version: 4.14.4}, rotatable: true}
08:31:13.697 INFO [TestSlot.getNewSession] - Trying to create a new session on test slot {server:CONFIG_UUID=3f83f707-e0ad-406f-9081-bc7185515bdf, seleniumProtocol=WebDriver, browserName=chrome, maxInstances=1, platformName=LINUX, version=74.0.3729.169, applicationName=, platform=LINUX}
08:39:59.952 WARN [RequestHandler.process] - The client is gone for session ext. key b54b779b8d4cb90133cf3386ca7ef664, terminating
08:40:02.245 INFO [RequestHandler.process] - Got a request to create a new session: Capabilities {browserName: firefox, handlesAlerts: true, javascriptEnabled: true, locationContextEnabled: true, loggingPrefs: org.openqa.selenium.logging..., name: TM new - Test Session, requestOrigins: {name: webdriverio, url: http://webdriver.io, version: 4.14.4}, rotatable: true}
08:40:02.251 INFO [TestSlot.getNewSession] - Trying to create a new session on test slot {server:CONFIG_UUID=ad8a2987-e350-456e-b9cf-25ac008d5255, seleniumProtocol=WebDriver, browserName=firefox, maxInstances=1, moz:firefoxOptions={log={level=info}}, platformName=LINUX, version=67.0, applicationName=, platform=LINUX}
IP & PORTS
You can access this container using the following IP address and port:
DOCKER PORT ACCESS URL
Deleting the agent records in Botium Box doesn't help - this is just how Botium Box keeps tracks of the connected agents, it has no influence on the actual processes.
The logs you attached are not looking bad, it's just that obviously there is a problem when connecting to the Selenium hub. In case the agent processes are really stuck or crashed, you can just restart the docker containers to bring them up again.

CodeceptJS not accepting proxy settings

I want to pass CodeceptJS requests through an external proxy. I followed the instructions in the docs.
In the logging I see indications the proxy is being passed on, but its not being used by selenium-standalone to proxy requests.
10:56:25.020 INFO - Found handler: org.openqa.selenium.remote.server.commandhandler.BeginSession#7d95346a
10:56:25.020 INFO - /session: Executing POST on /session (handler: BeginSession)
10:56:25.024 INFO - Capabilities are: Capabilities {browserName: chrome, handlesAlerts: true, javascriptEnabled: true, locationContextEnabled: true, loggingPrefs: org.openqa.selenium.logging..., proxy: {httpProxy: http://<myproxy>..., proxyType: manual, socksPassword: <my password>..., socksUsername: <my username>}, requestOrigins: {name: webdriverio, url: http://webdriver.io, version: 4.10.2}, rotatable: true}
10:56:25.024 INFO - Capabilities {browserName: chrome, handlesAlerts: true, javascriptEnabled: true, locationContextEnabled: true, loggingPrefs: org.openqa.selenium.logging..., proxy: {httpProxy: http://<myproxy>..., proxyType: manual, socksPassword: <my password>..., socksUsername: <my username>}, requestOrigins: {name: webdriverio, url: http://webdriver.io, version: 4.10.2}, rotatable: true} matched class org.openqa.selenium.remote.server.ServicedSession$Factory (provider: org.openqa.selenium.chrome.ChromeDriverService)
CodeceptJS version: 1.1.5
NodeJS Version: 8.0
Operating System: mac
Protractor || WebDriverIO || Nightmare version (if related)
selenium-server-standalone-3.9.1
Configuration file:
"helpers": {
"WebDriverIO": {
"url": "https://caworkcompcoverage.com",
"browser": "chrome",
"desiredCapabilities": {
"proxy": {
"proxyType": "manual",
"httpProxy": "http://proxy:8010",
"socksUsername": "my username",
"socksPassword": "my password"
}
}
}
},

Selenium standalone only works with chrome

I'm using my protractor tests run with a selenium standalone server.
Now i want to support all browsers.
I created a folder with the standalone (3.0.1) and a subfolder driver with IEDriver, geckodriver, chromedriver.
I added the path to the driver folder to the system PATH.
The standalone is running with no args (i do not know what to add).
My Config is:
var TIMEOUT = 20000;
exports.config = {
seleniumAddress: 'http://localhost:4448/wd/hub',
baseUrl: 'https://intmachine.project.com/',
/*
list the Suites to run locally here
*/
specs: [
'./UseCases/protractorTestcaseNightly.js',
],
capabilities: [
{
'browserName': 'firefox',
'firefox_binary':'C:\\Program Files (x86)\\Mozilla Firefox\\firefox.exe'
// shardTestFiles: false,
// maxInstances: 1,
// maxSessions: -1,
// restartBrowserBetweenTests: true,
},
],
getPageTimeout: TIMEOUT,
allScriptsTimeout: TIMEOUT,
jasmineNodeOpts: {
defaultTimeoutInterval: TIMEOUT,
isVerbose: true,
includeStackTrace: true
},
framework: "jasmine2",
//rootElement: 'html',
onPrepare: function () {
browser.driver.manage().window().maximize();
browser.driver.manage().deleteAllCookies();
}
};
Update:
i changed "Capa..." to capabilities and now get:
[launcher] Running 1 instances of WebDriver
[launcher] Error: TypeError: Target browser must be a string, but is <undefined>; did you forget to call forBrowser()?
at TypeError (native)
at Builder.build (C:\dev\dcps-angular\node_modules\selenium-webdriver\builder.js:417:13)
at DriverProvider.getNewDriver (C:\dev\dcps-angular\node_modules\protractor\built\driverProviders\driverProvider.js:42:27)
at Runner.createBrowser (C:\dev\dcps-angular\node_modules\protractor\built\runner.js:203:37)
at C:\dev\dcps-angular\node_modules\protractor\built\runner.js:293:21
at _fulfilled (C:\dev\dcps-angular\node_modules\q\q.js:834:54)
at self.promiseDispatch.done (C:\dev\dcps-angular\node_modules\q\q.js:863:30)
at Promise.promise.promiseDispatch (C:\dev\dcps-angular\node_modules\q\q.js:796:13)
at C:\dev\dcps-angular\node_modules\q\q.js:556:49
at runSingle (C:\dev\dcps-angular\node_modules\q\q.js:137:13)
[launcher] Process exited with error code 100