Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • Nov 27 23:50
    rpala-commits commented #2521
  • Nov 27 23:50
    rpala-commits commented #2521
  • Nov 27 23:46
    rpala-commits commented #2521
  • Nov 27 23:46
    rpala-commits commented #2521
  • Nov 27 23:35
    rpala-commits commented #2521
  • Nov 27 23:35
    rpala-commits commented #2521
  • Nov 27 23:30
    rpala-commits commented #2521
  • Nov 27 23:30
    rpala-commits commented #2521
  • Nov 27 23:28
    rpala-commits commented #2521
  • Nov 27 23:28
    rpala-commits commented #2521
  • Nov 27 23:23
    rpala-commits commented #2521
  • Nov 27 23:23
    rpala-commits commented #2521
  • Nov 27 21:49
    rpala-commits commented #2521
  • Nov 27 21:49
    rpala-commits commented #2521
  • Nov 27 19:48
    MancLad89 commented #2549
  • Nov 27 19:48
    MancLad89 commented #2549
  • Nov 27 19:31
    Pieras2 commented #2549
  • Nov 27 19:31
    Pieras2 commented #2549
  • Nov 27 19:28
    Pieras2 commented #2549
  • Nov 27 19:28
    Pieras2 commented #2549
chungcareer
@chungcareer
For example .waitForElementVisible("input[type=email]", "Visible email input") I get an error message "Error: Provided locating strategy... is not supported". It works fine when i did provide the first argument but it wasn't like this before
Andrei Rusu
@beatfactor

Did anyone else run into this issue where waitForElementVisible Error out due to I didn't specify the first argument (locate strategy).

Sounds like a bug. Which version is that?

dharls36
@dharls36

Hi.
I have a requirement to upload an image to a webpage.
A snippet of the html looks like this;

<div id="uploadPanel" class="dropzone ember-view dz-clickable"><div class="dz-default dz-message"><span>
            <div class="row">
                <div class="column small-centered large-9 xlarge-7 xxlarge-5">
                    <div class="row">
                        <div class="column large-3">
                            <span class="fa fa-camera fa-5x"></span>
                        </div>
                        <div class="column show-for-large large-9">
                            <span class="dropzone-message__text">Drag or click here to upload</span>
                        </div>

I've seen on Stackoverflow what appears to be a simple answer, but this doesn't appear to work for me.
My code is as below;

const path = require('path');
 module.exports = {
...
browser.setValue('.dropzone.ember-view.dz-clickable', path.resolve('/file_path/filename.jpeg'));

(although I've tried referencing a few other elements, but with no luck).

It doesn't fail as such (i.e. there are no error messages, and the test doesn't stop), but the file is not uploaded.

Am I missing something obvious with this functionality, or is this upload functionality way, way more complicated in nightwatchjs than a simple setvalue command?

Any help would be greatly appreciated. Thanks.

2 replies
chungcareer
@chungcareer

Sounds like a bug. Which version is that?

Its version 1.4.2

srathibandlarp
@srathibandlarp
Hi, I just upgraded to 1.4.1 and I noticed that my windowHandles is not working anymore, I keep seeing this error:
Error: Error while running "window" command: POST requests to /window must include a name parameter also.
2 replies
This is my test code implementing the windowHandles function:
      browser.windowHandles(windowResult => {
        browser.switchWindow(windowResult.value[1])
          .pause(1000).page.large.search().waitForURLEquals(result.value)
      })
result.value uses the result from the previous function that I didn't include in the paste above, but the windowHandles is where it's failing at.
lakshmiVasavi414
@lakshmiVasavi414

Hi , I am trying to run the Nightwatch tests in gitci , I am facing certificate issues when i run in gitci pipeline , I have added below code to supress certificates , Still I am faing same issue
'chrome': {
desiredCapabilities: {
browserName: 'chrome',
javascriptEnabled: true,
"acceptSslCerts": true,
"acceptInsecureCerts": true,
chromeOptions: {

      binary: require('puppeteer').executablePath(),
      args: [

        '--no-sandbox',
        "--start-maximized",
        '--headless',
        '--ignore-certificate-errors',
        // '--disable-dev-shm-usage'
      ],
      w3c: false,
    }
  }
}

Can someone help me here .. to fix the issue

lakshmiVasavi414
@lakshmiVasavi414
Adding nightwatch.conf.js here

const chromedriver = require('chromedriver');
const process = require('process');
const seleniumServer = require('selenium-server');
console.log(require('puppeteer').executablePath());
console.log(chromedriver.path)
module.exports = {
src_folders: ['.'],
globals_path: "./tests/resources/globals.js",
custom_commands_path: "./tests/commands",
page_objects_path: "./tests/pageObjects",
test_workers: false,
selenium: {
start_process: false,
server_path: require('selenium-server').path,
// port: 4444,
cli_args: {
'webdriver.chrome.driver': chromedriver.path
}
},
webdriver: {
start_process: false,

cli_args:
    { 'webdriver.chrome.driver': require('chromedriver').path
    }

},

test_settings: {
default: {
// "launch_url": "http://127.0.0.1/",
"selenium_port": 4444,
"selenium_host": "${SELENIUM_HOST}",
"silent": true,
"screenshots": {
"enabled": true,
"path": "./tests_output/",
on_failure: true
},
"desiredCapabilities": {
"browserName": "chrome",
"javascriptEnabled": true,
"acceptSslCerts": true

  }
},

'chrome': {
  desiredCapabilities: {
    browserName: 'chrome',
    javascriptEnabled: true,
    "acceptSslCerts": true,
    "acceptInsecureCerts": true,
    chromeOptions: {

      binary: require('puppeteer').executablePath(),
      args: [

        '--no-sandbox',
        "--start-maximized",
        '--headless',
        '--ignore-certificate-errors',
        // '--disable-dev-shm-usage'
      ],
      w3c: false,
    }
  }
}

}
};

Alexandru Cuciureanu
@acuciureanu
Hi. are there any plans for supporting Selenium Grid 4?
Andrei Rusu
@beatfactor

Hi. are there any plans for supporting Selenium Grid 4?

@acuciureanu are there compatibility issues with Selenium Grid 4?

lakshmiVasavi414
@lakshmiVasavi414
@beatfactor , Can you please check 2495 once
Diego Molina
@diemol
Hi everyone
Is Nightwatch W3C compatible?
Diego Molina
@diemol
I am trying to start a session on Sauce Labs with these caps:
      desiredCapabilities: {
        browserName: 'chrome',
        platformName: 'macOS 10.15',
        'sauce:options' : {
          username: '${SAUCE_USERNAME}',
          accessKey: '${SAUCE_ACCESS_KEY}',
          name: 'Sample Test on ecosia'
        }
      }
and when I run the test with --verbose, I see these payload being sent:
{
  desiredCapabilities: {
    browserName: 'chrome',
    platform: 'ANY',
    platformName: 'macOS 10.15',
    'sauce:options': {
      username: 'diego.molina',
      accessKey: 'XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXX',
      name: 'Sample Test on ecosia'
    },
    name: 'Sample Test'
  }
}
Which seems wrong because the capabilities block is missing
Vikram1887
@Vikram1887
Hi, is it possible to use global variable in pageObject elements. For Example: byList: {
selector: //li[contains(text(), client.globals.byListVariable)],
locateStrategy: 'xpath'
},
shreev1
@shreev1
hi friends, is there any way to get the xpath of the element using the internet explorer, the way we can get in chrome.
shreev1
@shreev1
im stuck as chrome is not supported and have only IE to usees. your help will be highly appreciated.
Andrei Rusu
@beatfactor

and when I run the test with --verbose, I see these payload being sent:

{
  desiredCapabilities: {
    browserName: 'chrome',
    platform: 'ANY',
    platformName: 'macOS 10.15',
    'sauce:options': {
      username: 'diego.molina',
      accessKey: 'XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXX',
      name: 'Sample Test on ecosia'
    },
    name: 'Sample Test'
  }
}

did you already try setting this?

"chromeOptions": {
                    "w3c": true
                }
Diego Molina
@diemol
ChromeDriver runs in w3c mode by default, why is that necessary?
And chromeOptions should be prefixed with goog:, otherwise it is not a valid W3C capability, right?
Diego Molina
@diemol
The problem, in general, is that the payload is wrong. It is not sending the capabilities block at all.
shreev1
@shreev1
hi friends, I'm facing issue in executing nightwatch on windows 10, it gives error Connection refused! Is selenium server started? its a blocker for me and I have certain timelines, Can some one please guide on the same.
dharls36
@dharls36
@shreev1 I've had this issue in the past, and for me it was due to my installed Chrome version not being compatible with my Chromedriver version, so might be worth checking browser and driver compatibility first.
1 reply
Dongapure
@Dongapure
Hi everyone , am using Chrome browser to run test cases...I have one test case where I have to click on messanger icon and it's gives popup to chose appropriate app or cancel it ...used dismissAlert() but not working...can anyone help on this please
is there anyway to press an esc button alone without focusing to any elements??? Tried for Chrome not working..
Dongapure
@Dongapure
Can anyone reply please
Herbert Knapp
@HMKnapp

hello!

i have encountered a strange error. i can open the page, print the source but waitForElementVisible always times out

let me give you an example

'Demo test': function (browser) { browser .url('https://1.1.1.1/') .pause(2000) .source((result) => { console.log(result.value); }) .waitForElementVisible('body',9000) .assert.containsText('body', '1.1.1.1') .end() }

sorry that should have been a codeblock
printing the source works. means the page gets loaded but any waitForElementVisible times out and i do not know why
i'm using docker selenium/hub with selenium/node-chrome
Herbert Knapp
@HMKnapp
what i tried so far apart from excluding network errors with the 1.1.1.1 and using the source print to make sure it is not a network issue, i used waitForElementPresent() as well but with the same result: timeout
Herbert Knapp
@HMKnapp

interestingly a titleContains() works:

.assert.titleContains('The free app')

but any waitForElement{Present,Visible} afterwards fails, times out

Herbert Knapp
@HMKnapp
SOLVED! it's chrome, not nightwatchjs. will post solution in a minute
Herbert Knapp
@HMKnapp
SOLUTION: use selenium/node-chrome:3.14.0-gallium all other versions tried did not work for me
Diego Molina
@diemol
That is not really a proper solution, https://github.com/SeleniumHQ/docker-selenium/releases/tag/3.14.0-gallium uses Google Chrome: 69.0.3497.100, that is a version released 2 years ago
probably something has evolved in Chrome and Nightwatch needs to catch up
Herbert Knapp
@HMKnapp
@diemol true, not the best option. i have since scrapped it and gone with selenium docker grid and version 4.0.0-alpha-7-prerelease-20201009. still using nightwatchjs for testing. works fine so far, just not with opera for some reason
shreev1
@shreev1
Hi Friends, I am facing an issue. Nightwatch setup is perfectly working with chrome but when i run for IE, it gives me -- Connection Refused! Is Selenium server started? When I checked in the logs for more details, I got logs trace like - Selenium is up and running, session Cleaner initialized with insideBrowserTimeout, creating new session for capabilities and then --Failed to load the library from temp directory.
I beleive IE Driver is creating a IDE tmp file in temp folder and then getting error
Any help will be highly appreciated
I tried downloading a IE Driver and executing, thats having same issue with error message as -- Could not find entry point in extracted library
shreev1
@shreev1
anybody having steps to setup nightwatch with IE driver to execute the tests on Internet explorer
Andrei Rusu
@beatfactor

Hey everyone, we just released v1.5. You can now use libraries like the selenium-webdriver or webdriver.io directly inside your Nightwatch tests! I personally think that this is pretty much a game-changer .

https://twitter.com/nightwatchjs/status/1318651996136738817

zwbetz-gh
@zwbetz-gh
Very nice!
Amit Zur
@amitzur
Hello, could you help me with answering this question about custom commands?
https://groups.google.com/u/1/g/nightwatchjs/c/pKwbiuPExGg