Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • 05:23
    briancullinan commented #2375
  • 05:23
    briancullinan edited #2375
  • 05:23
    briancullinan edited #2375
  • 05:12
    briancullinan commented #2236
  • 05:12
    briancullinan commented #2236
  • 05:12
    briancullinan commented #2236
  • 05:12
    briancullinan edited #2236
  • 05:11
    briancullinan edited #2236
  • 04:25
    briancullinan edited #2099
  • 04:25
    briancullinan edited #2099
  • Aug 14 20:33
    ChandlerFerry edited #8700
  • Aug 14 20:18
    linux-foundation-easycla[bot] commented #8700
  • Aug 14 20:15
    ChandlerFerry edited #8700
  • Aug 14 20:15
    linux-foundation-easycla[bot] commented #8700
  • Aug 14 20:15
    ChandlerFerry opened #8700
  • Aug 14 20:11
    ChandlerFerry edited #8699
  • Aug 14 20:10
    ChandlerFerry opened #8699
  • Aug 14 20:10
    ChandlerFerry labeled #8699
  • Aug 14 20:10
    ChandlerFerry labeled #8699
  • Aug 14 19:11
    magz99 commented #8692
Federico Francia
@federico.francia:matrix.org
[m]
so i use something like it
await driver.touchPerform([
  { action: "press", options: from },
  { action: "wait", options: { ms: browser.isIOS ? 180 : 250 } },
  { action: "moveTo", options: to },
  { action: "release" },
]);
it works well, it is reliable
even tough it is slow
but when i have to scroll till an element is in viewport
it is ok, i know how to do
but when i have tp scroll to the top of the page
i have no an element to look for
so i don't know when i reached the top and i have to stop scrolling
Christian Bromann
@christian-bromann
no
Federico Francia
@federico.francia:matrix.org
[m]
our app is native (react native)
Christian Bromann
@christian-bromann
I am not sure then
Federico Francia
@federico.francia:matrix.org
[m]
uhm, maybe i can find a way to get the coordinate of the centre of the page
Nodar Rusia
@Nodosy
1 reply
Federico Francia
@federico.francia:matrix.org
[m]
then scroll/swipe
and then get the centre again
and compare the two values
do you know if there is a wdio function to get the coordinates of the center of the screen?
Federico Francia
@federico.francia:matrix.org
[m]
the only way i got until now, but it is too heavy, it is compare the driver.getPageSource() before and after the scroll
if they are equal it means
no scroll happened then i reached the top
but it is no efficient, i'm looking for a smarter way
[0-0] 13:54:51 - I scroll UP until the top of the page [Start]
[0-0] pageSourceBefore === pageSourceAfter false
[0-0] pageSourceBefore === pageSourceAfter false
[0-0] pageSourceBefore === pageSourceAfter false
[0-0] pageSourceBefore === pageSourceAfter true
can i use the while loop in async? i mean while ( pageSourceBefore === pageSourceAfter ) { do async stuff}
Christian Bromann
@christian-bromann
yes
Federico Francia
@federico.francia:matrix.org
[m]
ok, thanks
i try
if a smarter solution to my question comes in your mind, please let me know
@erwinheitzman: please also you, if you know a better way to do it let me know
Erwin Heitzman
@erwinheitzman
@federico.francia:matrix.org I don't, sorry

@federico.francia:matrix.org if you are able to scroll using javascript you can use:

window.scrollTo(0, document.body.scrollHeight);

it might save you a few scrolls perhaps

Christian Bromann
@christian-bromann
it’s a native app
Erwin Heitzman
@erwinheitzman
oh yeah that won't work
Federico Francia
@federico.francia:matrix.org
[m]
:-(
Federico Francia
@federico.francia:matrix.org
[m]
while with async doesnt work
maybe i have to use p-iteration
but p-iteration doens't provide while, just foreach, find, etc..
Christian Bromann
@christian-bromann
you can use while (…) { … } in async
Federico Francia
@federico.francia:matrix.org
[m]
yes, now i am tying in this way
(async ()=>{
let i=0;
while(await getBar(i)) {
if (await getBar3(i)) {
console.log(doing something with even value ${i})
}
i++;
}
const scrollUpToTheTop = async (scrollView) => {
await (async ()=>{
let pageSourceBefore, pageSourceAfter;
while (!pageSourceBefore || pageSourceBefore === pageSourceAfter) {
pageSourceBefore = await driver.getPageSource()
await swipeGesture('UP', scrollView);
pageSourceAfter = await driver.getPageSource()
console.info("pageSourceBefore === pageSourceAfter", pageSourceBefore === pageSourceAfter)
}
})();
}
now i am running it, let's verify it works..
Dragos Campean
@dragosMC91

hello, i just updated @wdio/cli to latest version 7.20.9 and im having some problems with the capabilities:
i have defined an array of 2 capability sets for chrome desktop & mobile, the mobile capability contains an exclude rule to filter out all spec files containing desktop in the name

            exclude: [
                '../shared/tests/**/*desktop*.js',
                ...specificExcludes.chromeDesktopExcludes,
            ],

but now when i run a spec file like featuredAgencies.desktop.test.js the mobile capability is also executed, i guess this is coming from https://github.com/webdriverio/webdriverio/pull/8456/files , any idea how can make it ignore the mobile capability when im running a desktop specific test ?

5 replies
Lorslux
@Lorslux
Can someone help me with this error?
3 replies
image.png
Debashis
@dadebash
image.png
1 reply
Can someone Please tell me why I am getting "No Specs Found to Run".. Thanks in advance
Lay Mui
@LayMui
I have a OTP input box with 5 fields. when I use the webdriverio API addValue in the loop, the OTP code will not get displayed, the 1st code get displayed, the 2nd code will get displayed in the 1st field replacing the 1st code. this happen on android but not iOS.
2 replies
DikshaBaluja
@DikshaBaluja

Hi,
I'm running a webdriverio project on a jenkins slave with this following capabilities in webdriverio
I'm getting chrome binary not found error, Kindly help

capabilities: [ { // maxInstances can get overwritten per capability. So if you have an in-house Selenium // grid with only 5 firefox instances available you can make sure that not more than // 5 instances get started at a time. maxInstances: 1, // browserName: "chrome", acceptInsecureCerts: true // If outputDir is provided WebdriverIO can capture driver session logs // it is possible to configure which logTypes to include/exclude. // excludeDriverLogs: ['*'], // pass '*' to exclude all driver session logs // excludeDriverLogs: ['bugreport', 'server'], } ],

and following command in Execute Shell in jenkins configure section
`
function chrome_setup(){
echo "* Starting Chrome Setup *"
if [[ $(dpkg -l | grep google-chrome | wc -l ) -eq 1 ]]; then
echo "package exits. proceeding with test";
else

    #Install Dependencies for google-chrome
    sudo apt-get update && sudo apt --fix-broken -y install
    wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb || true
    sudo apt install -f ./google-chrome-stable_current_amd64.deb || true
    google-chrome --version || true
fi

}
`