Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
    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
    You can check out the Playwright guide here: https://playwright.dev/docs/network#handle-requests
    Let us know if you have any questions :)
    EugenePetrik
    @EugenePetrik
    @flaurida Thank you! Merry Christmas!
    EugenePetrik
    @EugenePetrik
    Yes, I have one. How do I take a screenshot if a test fails?
    Jon Perl
    @jperl
    You could wrap your test in a try/catch and call page.screenshot
    However we are working on a much nicer way to debug for qawolf 2.0, will share details about that shortly
    @/all So that we can answer questions more quickly we are moving our chat to Slack. You can join here http://slack.qawolf.com
    Laura Cressman
    @flaurida
    @EugenePetrik see Jon's answer above and let us know if that helps. Merry Christmas to you as well :blush:
    EugenePetrik
    @EugenePetrik
    @flaurida Thank you! It is very helpful
    Jae Lee
    @jaequery
    hi i am having an issue with iframe,. i submit a form through iframe fine using .contentFrame(). and doing frame.click(). but on the subsequent page, im having a hard time performing a check on a checkbox. when i do frame.check('#chkbox'); i get an error :
        TimeoutError: frame.check: Timeout 3000ms exceeded.
        =========================== logs ===========================
        waiting for selector "#chkAgreement"
          selector resolved to visible <input type="checkbox" id="chkAgreement" name="chkAgree…/>
        attempting click action
          waiting for element to be visible, enabled and not moving
          element is visible, enabled and does not move
          scrolling into view if needed
          done scrolling
          checking that element receives pointer events at (147.47,399.98)
          <label for="chkAgreement">I agree, I have read and accept the terms and con…</label> intercepts pointer events
        retrying click action, attempt #1
          waiting for element to be visible, enabled and not moving
          element is visible, enabled and does not move
          scrolling into view if needed
    6 replies
    what does that mean?