cnishina on selenium4
chore(release): bumpb version t… (compare)
return browser.controlFlow().execute(() => {
return aws.downloadSomething(downloadedData => {
doSomethingWithMyData(downloadedData);
}
})
import TestData from '$e2e/test-data/E2eTestdata.json';
import dataProvider = require('jasmine-data-provider');
describe('Name of the group', () => {
dataProvider(TestData, (data) => {
it('should behave...', () => {
expect((data.KeyValue)).toBe(true);
element(by.id('id')).sendKeys(data.KeyValue1);
});
});
});
I'm having an odd issue running protractor that only occurs in circleci. I was wondering if anyone had any pointers to resolve it.
The suite seems to die after browser is launched and before a test is run.
This is what I see when the browser is firefox:
[22:14:29] I/launcher - Running 1 instances of WebDriver
[22:14:29] I/direct - Using FirefoxDriver directly...
[22:14:52] E/launcher - Error while running testForAngular: JavaScriptError: Document was unloaded
[22:14:52] E/launcher - Error: Error while running testForAngular: JavaScriptError: Document was unloaded
at executeAsyncScript_.then (/app/node_modules/protractor/built/browser.js:727:23)
at ManagedPromise.invokeCallback_ (/app/node_modules/selenium-webdriver/lib/promise.js:1376:14)
at TaskQueue.execute_ (/app/node_modules/selenium-webdriver/lib/promise.js:3084:14)
at TaskQueue.executeNext_ (/app/node_modules/selenium-webdriver/lib/promise.js:3067:27)
at asyncRun (/app/node_modules/selenium-webdriver/lib/promise.js:2927:27)
at /app/node_modules/selenium-webdriver/lib/promise.js:668:7
at processTicksAndRejections (internal/process/task_queues.js:86:5)
[22:14:52] E/launcher - Process exited with error code 199
The error is similar when using chrome instead.
[19:55:16] I/launcher - Running 1 instances of WebDriver
[19:55:16] I/direct - Using ChromeDriver directly...
[19:55:45] E/launcher - Error while running testForAngular: script timeout
(Session info: headless chrome=78.0.3904.108)
(Driver info: chromedriver=78.0.3904.70 (edb9c9f3de0247fd912a77b7f6cae7447f6d3ad5-refs/branch-heads/3904@{#800}),platform=Linux 4.10.0-35-generic x86_64)
[19:55:45] E/launcher - Error: Error while running testForAngular: script timeout
(Session info: headless chrome=78.0.3904.108)
(Driver info: chromedriver=78.0.3904.70 (edb9c9f3de0247fd912a77b7f6cae7447f6d3ad5-refs/branch-heads/3904@{#800}),platform=Linux 4.10.0-35-generic x86_64)
at executeAsyncScript_.then (/app/node_modules/protractor/built/browser.js:727:23)
at ManagedPromise.invokeCallback_ (/app/node_modules/selenium-webdriver/lib/promise.js:1376:14)
at TaskQueue.execute_ (/app/node_modules/selenium-webdriver/lib/promise.js:3084:14)
at TaskQueue.executeNext_ (/app/node_modules/selenium-webdriver/lib/promise.js:3067:27)
at asyncRun (/app/node_modules/selenium-webdriver/lib/promise.js:2927:27)
at /app/node_modules/selenium-webdriver/lib/promise.js:668:7
at processTicksAndRejections (internal/process/task_queues.js:86:5)
[19:55:45] E/launcher - Process exited with error code 199
onPrepare: () => {
jasmine.getEnv().addReporter(myReporter);
browser.get(baseUrl);
browser.manage().window().maximize();
browser.manage().timeouts().implicitlyWait(5000);
return browser.driver.wait(() => {
return browser.driver.getCurrentUrl().then((url: String) => {
return url == baseUrl;
});
}, 10000);
}
expect(getSomeElement().isPresent()).toBe(true);
expect(getSomeElement().isDisplayed()).toBe(true);
, I would like to use only one 'expect' statement if possible.
Hello, I'm having troubles to get working my testing environment in Gitlab CI.
I using a kubernetes runner to run a job with my E2E test.
I've working this with chrome, but I having issues with Firefox. And we are trying to use multicapabilities just to run both browser (Chrome, Firefox). So I'm trying to get running in pipepeline boths. But I even can run only firefox.
This is one of the errors that I'm having:
[19:41:46] D/launcher - Running with --troubleshoot
[19:41:46] D/launcher - Protractor version: 5.4.2
[19:41:46] D/launcher - Your base url for tests is URL
[19:41:46] D/plugins - Plugin "protractor-image-comparison" loaded.
[19:41:46] I/launcher - Running 1 instances of WebDriver
[19:41:46] D/local - Attempting to find the SeleniumServerJar in the default location used by webdriver-manager
[19:41:46] D/local - Attempting to find the gecko driver binary in the default location used by webdriver-manager
[19:41:46] I/local - Starting selenium standalone server...
[19:41:47] I/local - Selenium standalone server started at http://10.36.0.4:345234/wd/hub
[19:41:51] E/runner - Unable to start a WebDriver session.
[19:41:51] E/launcher - Error: WebDriverError: newSession
Build info: version: '3.141.59', revision: 'e82be7d358', time: '2018-11-14T08:25:53'
System info: host: 'runner-zxqbkdf4-project-62-concurrent-0jd9zn', ip: '10.36.0.5', os.name: 'Linux', os.arch: 'amd64', os.version: '4.14.138+', java.version: '1.8.0_232'
Driver info: driver.version: unknown
remote stacktrace: stack backtrace:
0: 0x57af6d - backtrace::backtrace::trace::h59229d13f6a8837d
1: 0x57b0c2 - backtrace::capture::Backtrace::new::h23089c033eded8f0
2: 0x4472fc - webdriver::error::WebDriverError::new::h0b226f62ff19e120
3: 0x455bb8 - geckodriver::marionette::MarionetteSession::response::hcd41032e9ef5a928
4: 0x46ace4 - geckodriver::marionette::MarionetteConnection::send_command::hd7b113ec7d281909
5: 0x426e5f - <webdriver::server::Dispatcher<T, U>>::run::h62323eaff3e71b8c
6: 0x40935c - std::panicking::try::do_call::hb7e6ff6d130a72cf
7: 0x5de23a - panic_unwind::__rust_maybe_catch_panic
at /checkout/src/libpanic_unwind/lib.rs:98
8: 0x41c003 - <F as alloc::boxed::FnBox<A>>::call_box::hd6ceeda495c4fa0e
9: 0x5d68d4 - alloc::boxed::{{impl}}::call_once<(),()>
at /checkout/src/liballoc/boxed.rs:650
- std::sys_common::thread::start_thread
at /checkout/src/libstd/sys_common/thread.rs:21
- std::sys::imp::thread::{{impl}}::new::thread_start
at /checkout/src/libstd/sys/unix/thread.rs:84
at Object.checkLegacyResponse (/builds/automation/bender/node_modules/selenium-webdriver/lib/error.js:546:15)
at parseHttpResponse (/builds/automation/bender/node_modules/selenium-webdriver/lib/http.js:509:13)
at /builds/automation/bender/node_modules/selenium-webdriver/lib/http.js:441:30
at processTicksAndRejections (internal/process/task_queues.js:97:5)
[19:41:51] E/launcher - Process exited with error code 100