cnishina on selenium4
chore(release): bumpb version t… (compare)
[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
how can i read the params defined in protractor config js file
Could share how are you declaring protractor params?
I have this test in Protractor:
My po.ts file
async enterPincode(pincode) {
element(by.id('mat-input-0')).sendKeys(pincode);
const enterbtn = element(by.id('joinCompetition'));
const res = await browser.waitForAngular();
return enterbtn.click();
}
async welcomeModalOpen() {
const previewModal = element(by.id('mat-dialog-1'));
console.log('welcomeModalOpen Start Time: ', Date.now());
try {
const res = await previewModal.isPresent();
return true;
} catch (err) {
return false;
}
My e2e-spec.ts file
it('Should open preview-modal if a valid pincode is entered in the welcome modal', async () => {
console.log(2)
const valiePin = '144458';
await homePage.enterPincode(valiePin);
await expect(homePage.welcomeModalOpen()).toBeTruthy();
}, MAX_SAFE_TIMEOUT);
My protractor.conf.js file
// @ts-check
// Protractor configuration file, see link for more information
// https://github.com/angular/protractor/blob/master/lib/config.ts
const { SpecReporter } = require("jasmine-spec-reporter");
/**
* @type { import("protractor").Config }
*/
exports.config = {
//allScriptsTimeout: 11000,
specs: ["./src/**/*.e2e-spec.ts"],
capabilities: {
browserName: "chrome",
chromeOptions: {}
},
directConnect: true,
baseUrl: "http://localhost:4200/",
seleniumAddress: "http://localhost:4444/wd/hub/",
framework: "jasmine2",
jasmineNodeOpts: {
showColors: true,
defaultTimeoutInterval: 30000,
print: function() {}
},
onPrepare() {
require("ts-node").register({
project: require("path").join(__dirname, "./tsconfig.json")
});
jasmine.getEnv().randomizeTests(true);
jasmine.getEnv().addReporter(
new SpecReporter({
spec: {
displayStacktrace: true,
displayErrorMessages: true,
displayDuration: true,
displayFailed: true,
displaySuccessful: true,
displayPending: true
}
})
);
}
};
I keep geeting a ScriptTimeoutError: script timeout
Can someone give my an ideer of what I´m doing wrong :-)
Hello there!
Someone knows which is the difference between run tests using:
directConnect: True/False
And
seleniumAddress: http://blabla.bla
And
Using no one, that's my case.
I guess I'm using a default case, but I'm not clear about what is the default one.
I was reading some forums, And the doubt come to me, because at the moment, I'm not using neither config (directConnect nor seleniumAddress)
It`s been a while since the last update for 6.0 version and looks like repo is dead now with lots of open PRs((
I use protractor on several projects and really interested in migrating to 6.0, but unable to do it due to several issues. Few months ago I already submitted PR to fix several issues. It successfully was merged, but still, the new version has not been published yet.
Do you need help with the maintenance of this project, and in general, will it be supported in the future?
Hi guys, is there any new news?
I have version :-
protractor 5.4.2
steps to run our app on IE:-
run webdriver-manager update --ie
IEdriverserver.exe is 3.150.1 ,
standalone service is 3.14.59 jar
geckodriver-v0.26.0.exe
chromedriver_79.0.3945.36.zip
open the another terminal and run ng e2e
the error was :-
Angular Live Development Server is listening on localhost:4200, open your browser on http://localhost:4200/
i 「wdm」: Compiled successfully.
[12:05:28] I/launcher - Running 1 instances of WebDriver
[12:05:28] I/local - Starting selenium standalone server...
[12:05:29] I/local - Selenium standalone server started at http://10.154.204.250:52076/wd/hub
[12:05:29] E/launcher - Unable to create new service: InternetExplorerDriverService
os.name: 'Windows 10', os.arch: 'amd64', os.version: '10.0', java.version: '1.8.0_201'
Driver info: driver.version: unknown
[12:05:29] E/launcher - SessionNotCreatedError: Unable to create new service: InternetExplorerDriverService
can you help me why I am receiving this error and how I can fix this?
@yenilmez_gitlab https://stackoverflow.com/questions/50642308/webdriverexception-unknown-error-devtoolsactiveport-file-doesnt-exist-while-t
Try some of those answers. If I remember correctly, I think I actually fixed this by temporarily disabling my anti-virus software
{
"desiredCapabilities": {
"browserName": "chrome"
},
"capabilities": {
"firstMatch": [
{
"browserName": "chrome"
}
]
}
}
capabilities
key is missing in the Protractor request
browser.actions().keyDown(protractor.Key.CONTROL).sendKeys(protractor.Key.F5).perform();
but still it is not bringing up the changes. How can I achieve this?
node_modules/protractor/built/index.d.ts:5:10 - error TS2440: Import declaration conflicts with local declaration of 'PluginConfig'.
5 import { PluginConfig, ProtractorPlugin } from './plugins';
~~~~~~~~~~~~
node_modules/protractor/built/index.d.ts:5:24 - error TS2440: Import declaration conflicts with local declaration of 'ProtractorPlugin'.
5 import { PluginConfig, ProtractorPlugin } from './plugins';
~~~~~~~~~~~~~~~~