Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • 00:53
    codecov[bot] commented #4720
  • 00:53
    codecov[bot] commented #4720
  • 00:52
    codecov[bot] commented #4720
  • 00:52
    codecov[bot] commented #4720
  • 00:50
    codecov[bot] commented #4720
  • 00:50
    codecov[bot] commented #4720
  • 00:30
    codecov[bot] commented #4542
  • 00:30
    christian-bromann synchronize #4542
  • 00:30

    christian-bromann on cb-drop-node-8

    fix unit test (compare)

  • 00:26
    codecov[bot] commented #4720
  • 00:26
    christian-bromann synchronize #4720
  • 00:26

    christian-bromann on cb-get-rid-of-WebdriverIOAsync

    get rid of WebdriverIOAsync int… (compare)

  • 00:24
    christian-bromann synchronize #4740
  • 00:24

    christian-bromann on cb-update-typescript

    fix types (compare)

  • 00:07
    christian-bromann review_requested #4720
  • 00:06
    mgrybyk opened #4720
  • 00:06

    christian-bromann on cb-get-rid-of-WebdriverIOAsync

    get rid of WebdriverIOAsync int… (compare)

  • 00:03
    christian-bromann review_requested #4740
  • 00:02
    christian-bromann synchronize #4740
  • 00:02

    christian-bromann on cb-update-typescript

    update typescript to v3.7.3 (compare)

Diana Bell
@bagills_gitlab
image.png
Diana Bell
@bagills_gitlab
I did try switching around the call to waitForExist so it is called on the element ($('[name="q"]').waitForExist(5000);) with the same issue
Christian Bromann
@christian-bromann
@bagills_gitlab there are no selectors allowed for commands anymore
use the $ and $$ to query elements
also check the API .. it has changed https://webdriver.io/docs/api.html
Diana Bell
@bagills_gitlab

@christian-bromann

I did try switching around the call to waitForExist so it is called on the element ($('[name="q"]').waitForExist(5000);) with the same issue

Md Afsar Ali
@afsarali273

Hi All,

getting below error :

CMM-C02XF43DJG5J:config tconnect$ npm run web

> tconnect-uiautomation@1.1.5 web /Users/tconnect/FERepo/telstra-connect-fe/tests/webdriverioFramework
> wdio ./test/config/suite.web.conf.js

Failed loading configuration file: /Users/tconnect/FERepo/telstra-connect-fe/tests/webdriverioFramework/test/config/suite.web.conf.js
/Users/tconnect/FERepo/telstra-connect-fe/tests/webdriverioFramework/test/config/suite.web.conf.js:1
(function (exports, require, module, __filename, __dirname) { import merge from 'deepmerge';
                                                              ^^^^^^

SyntaxError: Unexpected token import
    at createScript (vm.js:74:10)
    at Object.runInThisContext (vm.js:116:10)
    at Module._compile (module.js:588:28)
    at Object.Module._extensions..js (module.js:635:10)
    at Module.load (module.js:545:32)

related to deepmerge utility

Christian Bromann
@christian-bromann
@bagills_gitlab what issue?
Md Afsar Ali
@afsarali273
can anyone please help
Christian Bromann
@christian-bromann
@afsarali273 you can’t use es6 imports on the config file
Diana Bell
@bagills_gitlab
@christian-bromann the error waitForExist is not a function
Christian Bromann
@christian-bromann
@bagills_gitlab can you provide the whole error?
Md Afsar Ali
@afsarali273
@christian-bromann THANKS
Diana Bell
@bagills_gitlab
I don't know what kind of black magic just happened but now it's working @christian-bromann
rhonjo
@rhonjo
hello anyone have luck with testing on MS edge with browserstack? In my test, if I use setValue or addValue into an input I get this error "JSON format error: parameters object must contain pair with name "keysToSend"". The bug I am encountering is very similar to this webdriverio/webdriverio#3324 . But I am running wdio 5.4.15
Diana Bell
@bagills_gitlab
Sorry I'm dumb
Thanks!
Christian Bromann
@christian-bromann
Haha .. no worries
John Robinson
@jrobinson01
trying to use the allure-reporter in jenkins. It generally seems to be working but allure is reporting 0 suites/tests. my config:
[
    'allure', {
      outputDir: './build/allure-results',
      disableWebdriverStepsReporting: true,
    }
  ]
I really don't quite understand what the disableWebdriverStepsReporting setting does
Nikolas Addison
@naddison
@christian-bromann What am I missing to get this webdriverio/webdriverio#3868 to pass the codecov bot, I got a checkmark from one posting, I don't understand the second X
John Robinson
@jrobinson01
derp. I guess it helps if my outputDir in my config lines up with the dir I told jenkins about for the allure-results
John Robinson
@jrobinson01
when working with custom-elements, a common thing is to wait for them to be upgraded. I will probably open a PR to get this added as a native command to work alongside the shadow dom commands, but wanted to make sure I'm doing this right.(It seems to work as expected)
browser.addCommand('waitForUpgraded', () => browser.execute(() =>
  customElements.whenDefined(this.tagName.toLowerCase())), true);
customElements is in the browser and whenDefined(tag) returns a promise that resolves when the element has been upgraded
GineaPig
@GineaPig
@rhonjo I have no luck for using setValue in MS edge too. I just use the work around by executing javascript to set value in MS edge
John Robinson
@jrobinson01
more fun stuff. Now I'm using the --watch flag. When I change a file wdio tries to run tests again, but can't connect to selenium. I'm using the selenium standalone service
Christian Bromann
@christian-bromann
@naddison let me comment in the PR
Nikolas Addison
@naddison
Thanks!
Vadym Morozov
@flexin777
@christian-bromann Hello
Is there a function to scroll to element with offset?
I can not click element, because there is bar in front of it. I need to scroll a littlebit up
Element is not clickable at point (x, x). Other element would receive the click: ..."
Rome Moore
@RomeMoore
my wdio install all of a sudden stopped creating the error screenshots
anybody have any idea what might have happened? using v4, team confict on yarn.lock file
John Robinson
@jrobinson01
is --watch not supported with the selenium standalone service, or do I need to do something extra to keep selenium running?
John Robinson
@jrobinson01
even better, is --watch not working at all? I can't get it working with either chromedriver or selenium. It runs fine the first time but when a file change triggers it a second time, it can't connect to something...
Error: connect ECONNREFUSED 127.0.0.1:1935\n    at TCPConnectWrap.afterConnect [as oncomplete]
(net.js:1191:14)\n    at <Jasmine>
Christian Bromann
@christian-bromann
not sure but it should never close down the driver
it is definitely working, I demoed it couple of times
John Robinson
@jrobinson01
I don't think I'm doing anything crazy. I'm using the suites feature of the config and launching wdio via an npm script
run-s clean:errorShots && run-s clean:logs && wdio build-tasks/webdriver/wdio-local.conf.js --suite=components --watch
rhonjo
@rhonjo
@GineaPig thanks for info. ill try that out
philicia
@tirzahtoh_twitter
Hi, on iphone 6 v.12.2 the browser.clearElement() to clear the textfield isn't working.
Rahul Srivastava
@Raulster24

Test Scenario :- I am writing test to click on a link from a set of links incrementally, navigate to a page, verify the title and then come back and continue the same for subsequent links.

Problem:- with the help of for (let i=0;i<ele.length;i++) i am able to perform this test successfully but i want to use the forEach method and perform click operation on each element, verify text matches and then navigate back and repeat the operation for each element in array of allLinks defined below.
But i am not able to do it for all elements in array as it always clicks the first element of the array, Can someone please help on this?

code:-

get allLinks() {return $$("//div[@class='text-section']//ul//a");}

verifyLinkRedirectionToCorrectPage() {
        const result = true;
        const linkElements = this.allLinks;
        console.log(linkElements);
        linkElements.forEach((link) => {
            const linkText = this.driver.textOf(link);
            console.log(linkText);
            this.driver.click(link);
             this.driver.awaitExists(this.faqCategoryHeading, 10000);
            const faqCategoryHeading = this.driver.textOf(this.faqCategoryHeading);
            if (faqCategoryHeading !== linkText) {
                result = false;
            }
             this.open(previous url);
        });
        return result;
    }
What can be the probable reasons for the forEach method not performing the same operation for other elements in the array?
Rahul Srivastava
@Raulster24
driver.click() is just a custom method , similarly driver.awaitexists()
    static click(selector, timeout = DEFAULT_TIMEOUT) {
        this.awaitExists(selector, timeout);
        return selector.click();
    }
John Robinson
@jrobinson01
Is it possible to change the config.waitForTimeout value for one test only? I see browser.setTimeout({...}) but am not sure any of the values it accepts will do what I want.
John Robinson
@jrobinson01
looks like I also need to set the jasmine default timeout
Rahul Srivastava
@Raulster24
I looked into what kind of array we are getting through $$ and here is what i am getting
[ Element {
    sessionId: '13bf8147a5d7049a00b456cf1785547b',
    elementId: '0.09826134116960206-1',
    ELEMENT: '0.09826134116960206-1',
    selector: '//div[@class=\'faq-topic-listing-wrapper\']//ul//li//a',
    parent:
     Browser {
       sessionId: '13bf8147a5d7049a00b456cf1785547b',
       capabilities: [Object],
       addCommand: [Function],
       config: [Object] },
    index: 0,
    emit: [Function: bound ],
    addCommand: [Function] },


  Browser {
    sessionId: '13bf8147a5d7049a00b456cf1785547b',
    capabilities:
     { browserName: 'chrome',
       acceptInsecureCerts: true,
       'goog:chromeOptions': [Object] },
    elementId: '0.09826134116960206-2',
    ELEMENT: '0.09826134116960206-2',
    selector: '//div[@class=\'faq-topic-listing-wrapper\']//ul//li//a',
    parent:
     Browser {
       sessionId: '13bf8147a5d7049a00b456cf1785547b',
       capabilities: [Object],
       addCommand: [Function],
       config: [Object] },
    index: 1,
    emit: [Function: bound ],
    addCommand: [Function] },



  Browser {
    sessionId: '13bf8147a5d7049a00b456cf1785547b',
    capabilities:
     { browserName: 'chrome',
       acceptInsecureCerts: true,
       'goog:chromeOptions': [Object] },
    elementId: '0.09826134116960206-3',
    ELEMENT: '0.09826134116960206-3',
    selector: '//div[@class=\'faq-topic-listing-wrapper\']//ul//li//a',
    parent:
     Browser {
       sessionId: '13bf8147a5d7049a00b456cf1785547b',
       capabilities: [Object],
       addCommand: [Function],
       config: [Object] },
    index: 2,
    emit: [Function: bound ],
    addCommand: [Function] },


  Browser {
    sessionId: '13bf8147a5d7049a00b456cf1785547b',
    capabilities:
     { browserName: 'chrome',
       acceptInsecureCerts: true,
       'goog:chromeOptions': [Object] },
    elementId: '0.09826134116960206-4',
    ELEMENT: '0.09826134116960206-4',
    selector: '//div[@class=\'faq-topic-listing-wrapper\']//ul//li//a',
    parent:
     Browser {
       sessionId: '13bf8147a5d7049a00b456cf1785547b',
       capabilities: [Object],
       addCommand: [Function],
       config: [Object] },
    index: 3,
    emit: [Function: bound ],
    addCommand: [Function] },



  Browser {
    sessionId: '13bf8147a5d7049a00b456cf1785547b',
    capabilities:
     { browserName: 'chrome',
       acceptInsecureCerts: true,
       'goog:chromeOptions': [Object] },
    elementId: '0.09826134116960206-5',
    ELEMENT: '0.09826134116960206-5',
    selector: '//div[@class=\'faq-topic-listing-wrapper\']//ul//li//a',
    parent:
     Browser {
       sessionId: '13bf8147a5d7049a00b456cf1785547b',
       capabilities: [Object],
       addCommand: [Function],
       config: [Object] },
    index: 4,
    emit: [Function: bound ],
    addCommand: [Function] },
Shouldn't that give an array of elements like, for an example ,
> browser.$$(".link-gray-dark")
[ { ELEMENT: '0.15821111822631395-1',
    'element-6066-11e4-a52e-4f735466cecf': '0.15821111822631395-1',
    value: { ELEMENT: '0.15821111822631395-1' },
    selector: '.link-gray-dark',
    index: 0 },
  { ELEMENT: '0.15821111822631395-2',
    'element-6066-11e4-a52e-4f735466cecf': '0.15821111822631395-2',
    value: { ELEMENT: '0.15821111822631395-2' },
    selector: '.link-gray-dark',
    index: 1 },
    ....
Rahul Srivastava
@Raulster24
However when i do console log of getText for each link it displays the text of all of them, but clicking on only first element.
Can anyone please help by their suggestions?