Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • Jun 27 20:01
    garg3133 assigned #3171
  • Jun 27 20:01
    garg3133 assigned #3171
  • Jun 27 20:01
    garg3133 edited #3171
  • Jun 27 20:01
    garg3133 edited #3171
  • Jun 27 20:01
    garg3133 edited #3171
  • Jun 27 20:01
    garg3133 edited #3171
  • Jun 27 20:00
    garg3133 synchronize #3171
  • Jun 27 20:00
    garg3133 synchronize #3171
  • Jun 27 15:33
    chriscuba23 edited #3256
  • Jun 27 15:33
    chriscuba23 edited #3256
  • Jun 27 15:31
    chriscuba23 edited #3256
  • Jun 27 15:31
    chriscuba23 edited #3256
  • Jun 27 15:30
    chriscuba23 edited #3256
  • Jun 27 15:30
    chriscuba23 edited #3256
  • Jun 27 15:29
    chriscuba23 edited #3256
  • Jun 27 15:29
    chriscuba23 edited #3256
  • Jun 27 15:28
    chriscuba23 commented #3256
  • Jun 27 15:28
    chriscuba23 commented #3256
  • Jun 27 15:20
    chriscuba23 edited #3256
  • Jun 27 15:20
    chriscuba23 edited #3256
Victoria0214
@Victoria0214
this function is in fileExplorer page, and I call it in specs fileExplorer.checkElementsTextIsEqual("@itemType", "Folder");
Ravi Sawlani
@gravityvi
Nightwatch v2 is now available in Beta :tada: . You can try it out with: npm install nightwatch@next. You can find more details in the this blog post: https://nightwatchjs.org/blog/nightwatch-v2-beta-is-available.html
Leo Laskin
@llaskin
is there a way to get the webdriver "driver" or "browser" object out of the "client" object?
1 reply
Ravi Sawlani
@gravityvi
Hey @llaskin, what's the version of Nightwatch you are using?
Alex
@awulkan
Is the console window supposed to pop up during every test on version 2.0.0-beta.1?
8 replies
psyfreak-dev
@psyfreak-dev
How to customize nightwatchjs xml output ?. Is it possible to do that. Thanks :pray
Cleverson Sampaio
@clevsampaio
image.png
How do I force the error to be a true error for the cucumber, I don't want it to appear that in the end it was all right
I've already used try/catch, but it doesn't work
Cleverson Sampaio
@clevsampaio
This happens with the sendKeys command.
I've tried using "suppressNotFoundErrors" but it doesn't seem to work
dharls36
@dharls36

I'd like to load a page and perform some functions before the start of each of my tests.

Is this possible?

I've added this in my globals file, but it doesn't seem to work;

module.exports = {
    beforeEach: function (browser, done) {
        console.log('setting up the test...');
        browser.url('https://www.******.co.uk');
        browser.pause(10000);
        done();
    }
};

Am I doing something obviously wrong with this, as it doesn't seem to display the 'setting up the test' text or load the webpage before the test starts. Thanks.

dharls36
@dharls36

Ok, so I now need to run code in my command script that references an entry in my globals file.

So far, my code looks like this in my command file;

var cmsDataNewsLetterSettings = require('../../config/commands/solr_query/globalSettings/newsletterSignUp');
var cmsNewsletterSettingsPage;

module.exports = {
     before: function(done) {
        var solrPrdCmsClient = this.globals.solrPrdCmsClient;
        cmsDataNewsLetterSettings.newsletter_signup_prompt_settings(solrPrdCmsClient, function(err,cmsNewsletterSettings) {
            if(err) {
                console.log(err);
                done(err);
            } else {
                cmsNewsletterSettingsPage = cmsNewsletterSettings;
                done();
            }
        });
    var numberOfPagesBeforePromptDisplayed = cmsNewsletterSettingsPage.i_NewsletterSignupPageViewThreshold;
    console.log(numberOfPagesBeforePromptDisplayed);
    }
};

However, I'm getting the error message;

command: "TypeError: Cannot read property 'solrPrdCmsClient' of undefined

Am I right in thinking that this error is caused by the command script not recognising the globals reference, or is the error elsewhere? Thanks.

Freddie
@fredski02
I'm using my camera and microphone. I get a permissions pop up, is there a way i can hit accept or tell chrome to auto accept in a config?
Victoria0214
@Victoria0214
Hi all nightwatch users! Which reporter could you advice? I see some bugs related to screenshots in already used allure reporter https://www.npmjs.com/package/nightwatch-allure, and #This project is no longer being maintained
Do you have some examples of successful and useful reporter?
dharls36
@dharls36

Hi.

As part of a beforeEach hook, I have this in my globals.js file;

var launchUrl = 'https://www.parkers.co.uk/';

module.exports = {
    beforeEach: function (browser, done) {
        browser.testSetup(launchUrl);
        done();
    },

However, instead of the definitive https://www.parkers.co.uk for the launchUrl, I'd like to reference this in a similar way as my test cases, so that it can be used for each environment (dev, test, etc). For example, in my test cases this URL is defined in the form of browser.launch_url, which it gets from my nightwatch.conf.js config file;

test_settings: {
        default: {
              launch_url: 'https://www.parkers.co.uk/'
          },

Is it possible to reference this nightwatch.conf.js entry within the globals.js file?

Any help would be greatly appreciated.

Rezaul Hassan
@RezhaBlue
Hi all, my team and I are having issues running firefox. It launches the browser but refuses to acknowledge any elements. I've confirmed the selector (both css and xpath variant) is correct and provided more than ample time for page load, dom ready, etc. with multiple polling. No matter what it times out searching for an element that is obviously there. It feels like its not looking at the webpage after browser launch. There are no iframes on the page. Has anyone else experienced this? I am using nightwatch 1.7.11 and 1.7.13 variants
The firefox version number is 95
We've tried on different people's computers (mac m1, ubuntu 20, windows 10, docker:node latest) and both dockerized/containerized and without, and in our local, testing, staging, and prod environments. None of these factors seem to alter the behavior
Rezaul Hassan
@RezhaBlue
This is the closest relevant nightwatch issue I could find relevant to our situation but couldnt find a suitable resolution. nightwatchjs/nightwatch#2017
2 replies
I forgot to mention we are also using selenoid hence the relevance to a selenium hub issue
Andrei Rusu
@beatfactor

/all Hello everyone! We have a new Discord server setup and we'll discontinue the Gitter soon. Please join us at

https://discord.gg/SN8Da2X

See you there!

dharls36
@dharls36
Screen Shot 2022-01-25 at 14.56.24.png

Hi all. I'm trying to find a specific entry in an injected script, within a page, and I can't find a way to do this.

Below is the html;

<script>
    var parkersConfig = {
        adRefreshTestCandidate: 'B',
        enableAdRequestLogging: false,
        environment: 'prd',
        debugMode: true,
        cookieDomain: 'parkers.co.uk',
        betaEscapeUrl: 'https://www.parkers.co.uk/',
        apiUrl: '/api/',
        assetsUrl: 'https://parkers-assets.bauersecure.com/',
        dataLayer: {"adverts":{"topAdVisibleFor":4000,"dfpAdUnitName":"car-reviews"},"oneSignal":{"carClassifications":["Saloon"],"section":"car-reviews"},"page":{"author":"Mike Humble","id":"195394","overrideGaLocation":null,"galleryGaLocation":"/car-review/gallery/","templateName":"Templates.ReviewIntroduction","cmsLastUpdatedDate":"16/11/2021"},"vehicle":{"vehicleType":"cars","vehicleName":"BMW 3-Series Saloon 2005","makeId":869,"makeName":"BMW","rangeId":100353,"rangeName":"3-Series","modelId":1345,"modelName":"3-Series Saloon (05-11)","bodyStyle":"Saloon","condition":"Used","fuelType":"petrol,diesel","gearboxType":"NotSet"},"suppressThirdPartyJavascript":false,"wordCount":"NotSet","suppressionExperimentId":"NotSet","analyticsAccount":"UA-10756961-1","gtmTestTagCandidate":"true","classification":"Saloon"},
        graph: null,
        userHasAcceptedStoreAccessInfoOnDevice: false
    };
    var bauerDataLayer = [ parkersConfig.dataLayer ];
    var webpackChunkManifest = {};
</script>

and I need to assert that the "templateName":"Templates.ReviewIntroduction", part of the injected script is correct.

Firstly, is this possible in Nightwatch (to assert part of an injected script), and if so how can it be done?

Any help would be greatly appreciated, as I'm well and truly stuck on this one. Thanks.

Andrei Rusu
@beatfactor
@dharls36
can you join us on Discord? https://discord.gg/SN8Da2X
alexanderdevm
@alexanderdevm
Anyone knows a workaround for safari v15 mac and nightwatch 1.7.13 with the following issue
Waiting for //*[contains(text(),"Sign In")] to be visible
 Error while running .isElementDisplayed() protocol action: The command 'GET /session/2A27DE92-D1C7-4F41-803E-B12241A33833/element/node-584DC41D-FBA9-4A24-B0AE-57265B99DEB7/displayed' was not found.
From what I have read is that the command /displayed was deprecated from safari, however I cannot find a workaround for it.
Ravi Sawlani
@gravityvi
Hey @alexanderdevm could you join us on discord? https://discord.gg/SN8Da2X
@alexanderdevm, one way would be to upgrade Nightwatch to v2 and it will handle this issue.
ruqqia18
@ruqqia18
How to resolve this error?
TimeoutError: An error occurred while running .click() command on <//button[3]/child::span[1]>: element click intercepted: Element <span class="MuiButton-label">...</span> is not clickable at point (208, 495).
in nightwatch.
.
Chris Jackson
@chris-jackson-actionqa

I'm trying to disable local storage for Chrome for a test. I figured out how to do this using an env in nightwatch.conf.js via --disable-local-storage. But I'd rather just disable local storage for a single test.

I tried const result = await browser.chrome.setPermission('persistent-storage', 'denied'), but that api seems to always return an error about "opaque origins".

Is there a way for me to disable local storage for a single test? Like manipulating browser.capabilities or something?