How to purge test sessions in Botium - testing

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.

Related

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

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.

what are the valid values for 'runner' in wdio.conf.js file?

for Webdriver.io what other values can runner take in wdio.conf.js besides runner: 'local'? Any examples?
Thanks
OK, found out from the official WDIO chat that only local is supported for now.
Perhaps such an example will help you?from my work example
exports.config = {
hostname: "some-test",
port: 4444,
path: "/wd/hub",
specs: ["./tests/*.ts"],
sync: true,
services: ["selenium-standalone"],
capabilities: [
{
browserName: "chrome"
}
],
baseUrl: "http://my-url",
framework: "mocha",
mochaOpts: {
ui: "bdd",
timeout: 10000
}
};

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"
}
}
}
},

Chimp test stopped working, throwing error: missing or invalid 'entry.level'

I'm trying to run tests (Chimp/), there were working yesterday and today they are not. Here is chimp configuration:
module.exports = {
// - - - - CHIMP - - - -
watch: false,
watchWithPolling: false,
sync: true,
// - - - - WEBDRIVER-IO - - - -
webdriverio: {
coloredLogs: true,
logLevel: 'silent',
screenshotPath: './tests/logs/screenshots',
waitforTimeout: 20000,
waitforInterval: 250
},
// - - - - MOCHA - - - -
mocha: true,
mochaConfig: {
timeout: 20000,
},
chai: true,
// path: './tests/spec',
path: './tests/spec/shop/configurator/products',
format: 'dot',
// - - - - SELENIUM - - - -
browser: 'chrome',
platform: 'ANY',
name: '',
user: '',
key: '',
port: null,
host: null,
// - - - - METEOR - - - -
ddp: 'http://localhost:3000',
serverExecuteTimeout: 20000,
// - - - - PHANTOM - - - -
phantom_w: 1920,
phantom_h: 1280
};
Here is the report output, before first test even starts it fails.
[chimp] Running...
Configurator #watch
1) "before all" hook
0 passing (10s)
1 failing
1) Configurator #watch "before all" hook:
Uncaught unknown error: cannot determine loading status
from unknown error: missing or invalid 'entry.level'
When running in browserstack, it works. Here is browserstack configuration:
var browserstack = require('browserstack-local');
var bs_local = new browserstack.Local();
var bs_local_args = {/* ... */};
// starts the Local instance with the required arguments
bs_local.start(bs_local_args, function () {
console.log("Started BrowserStackLocal");
});
module.exports = {
// - - - - CHIMP - - - -
watch: false,
watchWithPolling: false,
sync: true,
// - - - - WEBDRIVER-IO - - - -
webdriverio: {
baseUrl: 'http://localhost:3000',
coloredLogs: true,
desiredCapabilities: {
os: 'OS X',
os_version: 'El Capitan',
browser: 'Chrome',
browser_version: '58.0',
resolution: '1280x1024',
project: 'project',
build: 'build',
'browserstack.local': true
},
logLevel: 'silent',
screenshotPath: './tests/logs/screenshots',
waitforTimeout: 50000,
waitforInterval: 250
},
// - - - - MOCHA - - - -
mocha: true,
mochaConfig: {
timeout: 60001,
},
chai: true,
path: './tests/spec',
format: 'dots',
// - - - - Screenshots - - - -
screenshotsOnError: true,
screenshotPath: './tests/logs/screenshots',
captureAllStepScreenshots: false,
saveScreenshotsToDisk: true,
saveScreenshotsToReport: false,
// - - - - SELENIUM - - - -
name: 'project',
browser: 'Chrome',
user: '...',
key: '...',
host: 'hub.browserstack.com',
port: 80,
// - - - - METEOR - - - -
ddp: 'http://localhost:3000',
serverExecuteTimeout: 30000,
// - - - - PHANTOM - - - -
phantom_w: 1280,
phantom_h: 1024
};
What I tried to fix it was to update chimp (0.50.2), reinstall node_modules, run it with firefox, nothing helps. I tried that in different environments (OS / Ubuntu 16.04) and result is the same.
Chimp hides a lot of the Selenium configurations from you. For example it downloads the driver binaries for you on install. However, your local environment is usually a bit more complex than just that. First thing that you should check is - do your browsers updated their versions without you noticing it. This actually tend to happen if you haven't lock your browser-driver-chimp versions. As far I can see you use for the cloud run:
browser: 'Chrome',
browser_version: '58.0',
and this seems to work. So it is a good practice to lock their versions explicitly (this includes disabling the browser updates). I also don't see significant changes in chimp itself at 0.50.2.
One way to check the compatible driver-browser versions is to go through the current release notes of ChromeDriver. In case this still doesn't help - downgrade either driver or browser pairs till it works.
It looks like you need ChromeDriver v2.31 (2017-07-21) with that Chrome version, while chimp one is pinned to 2.28.
Couple of times I had to play the guessing game myself till make it work again.

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