--suiteRetries
option, my github action runs forever (it sais passed successfully but does not exit). I run it using the following command:xvfb-run --auto-servernum --server-args='-screen 0, 1920x1080x24' yarn test -e local --suiteRetries 3 --verbose
. Did any of you ever meet this problem?
Hello @gravityvi, I start with the auto-generated one so I put only the chrome part :
chrome: {
desiredCapabilities : {
browserName : 'chrome',
'goog:chromeOptions' : {
// More info on Chromedriver: https://sites.google.com/a/chromium.org/chromedriver/
//
// This tells Chromedriver to run using the legacy JSONWire protocol (not required in Chrome 78)
w3c: true,
args: [
'--load-extension=/home/john/Dev/Liberty/libertyGC'
]
}
},
webdriver: {
start_process: true,
server_path: '',
cli_args: [
// --verbose
]
}
},
browser.waitForElementVisible(selector, timeout);
it work as expected, fails the test and skip the other ones
await browser.waitForElementVisible(selector, timeout);
the test continue and ignore the flag of 'abortOnAssertionFailure'
const chrome = require('selenium-webdriver/chrome');
const capabilities = new chrome.Options();
capabilities.addExtention(<file-path>)
module.exports = {
test_settings: {
chrome: {
capabilities,
webdriver: {
start_process: true,
server_path: require('chromedriver').path,
cli_args: [
// --verbose
]
}
}
}
};
function waitForElementVisible(selector, timeout = 1500) {
return new Promise((resolve, reject) => {
console.log(`elementIsVisible:${selector}`);
b.waitForElementVisible(selector, timeout, (data) => {
if (data.status === -1) reject(data.result.error);
resolve();
})
});
}
here's how I do it:
npm install chromedriver
nightwatch --env chrome
it never fails.
checkElementsTextIsEqual(selector, text) {
this.api.elements(selector, function (elements) {
elements.value.forEach(function (res) {
this.elementIdText(res.ELEMENT, function (result) {
this.assert.equal(result.value, text);///
npm install nightwatch@next
. You can find more details in the this blog post: https://nightwatchjs.org/blog/nightwatch-v2-beta-is-available.html