Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
    Laura Cressman
    @flaurida
    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
    Jon Perl
    @jperl

    @/all we are “soft-launching” QA Wolf 2.0 next week. There are a ton of improvements: much better test creation experience, improved video recording, easier to set up in CI. However we are working on filling in some missing features and adding documentation.

    I want to learn from you all what we need to build before we replace 1.0 and release it officially. If you are interested in trying it out lets schedule a time and I will give you access https://calendly.com/jperl/60min

    Evgeniy Ostroverkhiy
    @hollligan
    @jperl Hello, are there any plans to update playwright to 1.5.2?
    3 replies
    sushmitha gayam
    @sushmithaGayam
    can you add support to scroll inside an iframe?
    1 reply
    Bratu Cătălin
    @CatalinBratu7

    Hi. I'm facing a small issue with my GitLab ci config and I thought maybe someone from here would be able to help me. I have multiple tests (different files) with await page.waitForTimeout. The files have different timeout values, basically I need to wait on different website if our single sign on solution logs out automaticaly the user. My problem is that if I have for example 3 tests, if the first test success the job/pipeline will close and it will not wait for the others to finish as well.
    qawolf:
    image: qawolf/playwright-ci:v1.0.0
    script:
    - npm install
    - npx qawolf test --headless
    variables:
    QAW_ARTIFACT_PATH: $CI_PROJECT_DIR/artifacts
    artifacts:
    when: always
    paths:
    - $CI_PROJECT_DIR/artifacts
    expire_in: 1 week
    File.test.js -> Example
    const qawolf = require("qawolf");

    let browser;
    let context;

    beforeAll(async () => {
    browser = await qawolf.launch();
    context = await browser.newContext();
    await qawolf.register(context);
    });

    afterAll(async () => {
    await qawolf.stopVideos();
    await browser.close();
    });

    test("After 45 minutes I should still be logged in CIM", async () => {
    const page = await context.newPage();
    await page.goto("https://xxxxxxxxxxxxxxxxxx/", { waitUntil: "domcontentloaded" });
    await page.check('"Normal"');
    await page.click(".primary");
    await page.click(".switcher");
    await page.click('[aria-label="Username"]');
    await page.fill('[aria-label="Username"]', "xxxxxxxxxxxx");
    await page.click("#password");
    await page.fill("#password", "xxxxxxx");
    await page.click(".submit");
    await page.waitForTimeout(2700000);
    const url = await page.url();
    expect(url).toEqual(expect.stringContaining('test-sso..com'));
    });

    Bratu Cătălin
    @CatalinBratu7

    Hi. I'm facing a small issue with my GitLab ci config and I thought maybe someone from here would be able to help me. I have multiple tests (different files) with await page.waitForTimeout. The files have different timeout values, basically I need to wait on different website if our single sign on solution logs out automaticaly the user. My problem is that if I have for example 3 tests, if the first test success the job/pipeline will close and it will not wait for the others to finish as well.
    qawolf:
    image: qawolf/playwright-ci:v1.0.0
    script:
    - npm install
    - npx qawolf test --headless
    variables:
    QAW_ARTIFACT_PATH: $CI_PROJECT_DIR/artifacts
    artifacts:
    when: always
    paths:
    - $CI_PROJECT_DIR/artifacts
    expire_in: 1 week
    File.test.js -> Example
    const qawolf = require("qawolf");

    let browser;
    let context;

    beforeAll(async () => {
    browser = await qawolf.launch();
    context = await browser.newContext();
    await qawolf.register(context);
    });

    afterAll(async () => {
    await qawolf.stopVideos();
    await browser.close();
    });

    test("After 45 minutes I should still be logged in CIM", async () => {
    const page = await context.newPage();
    await page.goto("https://xxxxxxxxxxxxxxxxxx/", { waitUntil: "domcontentloaded" });
    await page.check('"Normal"');
    await page.click(".primary");
    await page.click(".switcher");
    await page.click('[aria-label="Username"]');
    await page.fill('[aria-label="Username"]', "xxxxxxxxxxxx");
    await page.click("#password");
    await page.fill("#password", "xxxxxxx");
    await page.click(".submit");
    await page.waitForTimeout(2700000);
    const url = await page.url();
    expect(url).toEqual(expect.stringContaining('test-sso..com'));
    });

    I found the culprint, our shared runners had timeouts setted at 30 min.....

    3 replies
    G V Navin
    @gvnavin
    Hello team,
    I am exploring how to write test webapp test case quickly. I came across the qawolf. I am running it in my local to understand all the features. I have few questions to understand it better
    1. How to record video while running the tests in local ?
    2. How to record the logs while running the tests in local ?
    3. Can we make the qawolf to assert few items in the UI ?
    Laura Cressman
    @flaurida
    Hi @gvnavin - could you tell us more about your use case for recording video and logs locally?
    4 replies
    If you set this environment variable it should store artifacts
    Re #3 we don’t have that yet but it is coming soon!
    sushmitha gayam
    @sushmithaGayam
    Having trouble setting up jest-image-snapshot using qawolf. Is there a way to provide custom jest-config file which extend the default qawolf jest config file.
    1 reply
    sushmitha gayam
    @sushmithaGayam
    Is there a way to Reuse browser instance across different test files?
    2 replies
    maheshpatnam
    @maheshpatnam
    Any other way to check web element presence in webpage , I am using following code
    async function isPicturePreviewDisplayed(page) {
    const selector = 'div[title="image"]';
    await page.mainFrame().waitForSelector(selector);
    const picturePreviewElement = await page.$$(selector);
    if (picturePreviewElement.length > 0) {
    return true;
    }
    else {
    return false;
    }
    }
    Pavel Balmasov
    @pbalmasov
    Hi, it's possible to use running version of chrome, in qawolf create? I want to create test in chrome extension page with url like that: chrome-extension://aaaaaaaaaaaaaaaaaaaa/index.html
    Jon Perl
    @jperl
    This would be pretty difficult to do with QA Wolf right now. You could create a custom create template https://docs.qawolf.com/docs/configure_qa_wolf#createtemplate and provide --load-extension= as a an arg to launch. This is all about to change in 2.0 though that we are releasing this month
    I added this to the roadmap. We can see if it gets a lot of upvotes and then look into making this easier qawolf/qawolf#858
    EugenePetrik
    @EugenePetrik
    Hi everyone. Does QA Wolf support mocking and stubbing responses?
    Laura Cressman
    @flaurida
    Hi @EugenePetrik we generate Playwright code, which does support mocking and stubbing responses