qawolf.launch({ args: ['--start-fullscreen'] });
getComputedStyle
API here https://developer.mozilla.org/en-US/docs/Web/API/Window/getComputedStyle
const color = await page.evaluate(() => {
const videoIcon = document.querySelector( '//span[text()=\'videocam\']');
const videoIconStyles = window.getComputedStyle(videoIcon);
return videoIconStyles.getPropertyValue('color');
});
color
in CSS means font color, which may not be what you want. It may be background-color
, fill
, or stroke
.
videoIcon
is not an element, so perhaps document.querySelector
is returning null
here if the element is not found
const searchValue = await page.$eval('#myId', el => el.value);
QAW_ARTIFACT_PATH=/tmp/testArtifacts/ DEBUG=pw:api BASE_URL=<my_url> yarn qawolf test absoluteDaysSaveCorrectly
@/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
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'));
});
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.....