Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
    Laura Cressman
    @flaurida
    Hi @imdevgun I'd need to see more of your code to help here, would you mind sending me a direct message? No worries I think we can sort this out :)
    @Vesnushki can you try this? const searchValue = await page.$eval('#search', el => el.value);
    Make sure to replace the selector, like so: const searchValue = await page.$eval('[name="searchTxt"]', el => el.value);
    2 replies
    Vesnushki
    @Vesnushki
    Hello, guys! Is any chance to configure the browser to fullscreen mode? was unable to find any info.
    Laura Cressman
    @flaurida
    @Vesnushki try passing the --start-fullscreen flag to the args key in launch:
    ie qawolf.launch({ args: ['--start-fullscreen'] });
    19 replies
    maheshpatnam
    @maheshpatnam
    @jperl can you please tell me how to get colour of webelement? . I am using following code , But it is not working
    const videoIconSelector = '//span[text()=\'videocam\']';
    let videoIconColour = page.getAttribute(videoIconSelector,'color');
    console.log(videoIconColour);
    maheshpatnam
    @maheshpatnam
    @flaurida can u please help me?
    Laura Cressman
    @flaurida
    Hi @maheshpatnam are you trying to get the CSS color (as in font color), or background color?
    ie something like
    const color = await page.evaluate(() => {
      const videoIcon = document.querySelector( '//span[text()=\'videocam\']');
      const videoIconStyles = window.getComputedStyle(videoIcon);
      return videoIconStyles.getPropertyValue('color');
    });
    Note that it may look slightly different for you - color in CSS means font color, which may not be what you want. It may be background-color, fill, or stroke.
    maheshpatnam
    @maheshpatnam
    Thanks @flaurida , I will check now
    maheshpatnam
    @maheshpatnam
    page.evaluate: Evaluation failed: TypeError: Failed to execute 'getComputedStyle' on 'Window': parameter 1 is not of type 'Element'.
    at eval (playwright_evaluation_script517:3:40)
    at UtilityScript.callFunction (playwright_evaluation_script462:305:24)
    at UtilityScript.<anonymous> (playwright_evaluation_script518:1:44) Getting this @flaurida
    Laura Cressman
    @flaurida
    @maheshpatnam OK, I see. I'd probably add a console log to see what the videoIcon is. I am happy to debug on a call with you as well if you are willing. feel free to DM me
    From the error message it looks like videoIcon is not an element, so perhaps document.querySelector is returning null here if the element is not found
    maheshpatnam
    @maheshpatnam
    @flaurida i used this code , it worked for me , Thanks
    sync function getAVtestIconColour(page) {
    const videoIconColor = await page.evaluate(() => {
    const videoIcon = document.evaluate('//span[text()=\'videocam\']/parent::div', document, null, XPathResult.ANY_TYPE, null).iterateNext();
    const videoIconStyles = window.getComputedStyle(videoIcon);
    return videoIconStyles.getPropertyValue('background-color');
    });
    Laura Cressman
    @flaurida
    @maheshpatnam great glad you figured it out! It seems like the issue was finding videoIcon in the first place
    1 reply
    maheshpatnam
    @maheshpatnam
    Hi All, Is there way to check button is enabled or disabled in playwright?, I am using following code , But It is not working
    async function isStickerButtonDisabled(page) {
    const stickerButtonStateValue = await page.evaluate(() => {
    const stickerButton = document.querySelector('button[data-heap-id="userMenuToggleSticker"]');
    const stickerButtonState = window.getComputedStyle(stickerButton);
    return stickerButtonState.getPropertyValue('disabled');
    });
    console.log('button state is' + stickerButtonStateValue);
    }
    @flaurida @jperl can you guys help me?
    maheshpatnam
    @maheshpatnam
    I used following code , It worked
    async function isStickerButtonDisabled(page) {
    const stickerButtonState = await page.evaluate(() => {
    const stickerButton = document.querySelector('button[data-heap-id="userMenuToggleSticker"]');
    return stickerButton.disabled
    });
    return stickerButtonState;
    }
    Laura Cressman
    @flaurida
    @maheshpatnam are you set then?
    maheshpatnam
    @maheshpatnam
    yes @flaurida
    1 reply
    sushmitha gayam
    @sushmithaGayam
    Hey i just started using qawolf. I have a scenario where I'm trying to generate screenshots on different browsers and using this command "npx qawolf test --all-browsers <filrname>". Is there away qawolf can tell me which browser instance its currently running the tests on?
    1 reply
    maheshpatnam
    @maheshpatnam
    Hi All,
    Is there any way to check element not present in playwright?, Currently I am using following code, But it is not working.
    async function isFloatingVideoNotPresent(page) {
    await page.mainFrame().waitForSelector(floatingVideoSelector);
    if (await page.$$(floatingVideoSelector).length === 0) {
    return true;
    }
    else {
    return false;
    }
    } @flaurida @jperl
    2 replies
    Denver Peterson
    @denver
    Trying to run some mobile browser tests and when I pass in --firefox I get an error browser.newContext: options.isMobile is not supported in Firefoxbrowser.newContext: options.isMobile is not supported in Firefox:
    4 replies
    Maybe I need to update playwright.
    Denver Peterson
    @denver
    Is there a way to modify a configuration to run the actual applications for chrome, firefox, safari on a mac instead of chromium, nightly, playwright (1.0)?
    1 reply
    Shabeer Ali M
    @shabeer_ali_m_twitter
    Hii is this helpfull to test REST API ?
    3 replies
    maheshpatnam
    @maheshpatnam
    Hi All, Is there any way to get title of newly opened page in new tab in playwright?
    3 replies
    Laura Cressman
    @flaurida
    Thanks @denver ! ^
    maheshpatnam
    @maheshpatnam
    @denver How can i open new page in already opened page?
    maheshpatnam
    @maheshpatnam
    i used following code ,It worked, Thanks @denver
    let pages = await contextAA.pages();
    await pages[1].bringToFront();
    console.log(pages[1].title());
    Laura Cressman
    @flaurida
    @maheshpatnam are you set then?
    maheshpatnam
    @maheshpatnam
    yes @flaurida
    Hi All, How to get value of input tag in playwright?
    Laura Cressman
    @flaurida
    @maheshpatnam try this
    const searchValue = await page.$eval('#myId', el => el.value);
    maheshpatnam
    @maheshpatnam
    Thanks @flaurida, I used above code, It worked for me
    Laura Cressman
    @flaurida
    @maheshpatnam great!
    Matt Bangert
    @mattbangert
    Is anyone experiencing empty videos and no logs in the artifact directories? Upon a test run, the directories are made for each test and I get a video file, but the video is blank and there are no logs. Here is my execution command QAW_ARTIFACT_PATH=/tmp/testArtifacts/ DEBUG=pw:api BASE_URL=<my_url> yarn qawolf test absoluteDaysSaveCorrectly
    4 replies
    Denver Peterson
    @denver
    When I run tests on Mac, the tests run in Chromium, Nightly (Firefox) and Playwright (webkit).
    Is there a way to change a config and point to the actual applications if I wanted to? ie. Chrome (not as important), firefox (mac) and safari?
    6 replies