We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 9cf8a9e commit 014f645Copy full SHA for 014f645
1 file changed
pages/playwright/index.html
@@ -48,6 +48,12 @@ <h2>Usefull snippets</h2>
48
// extra step for codegen
49
await expect(page.locator("body")).toHaveCount(1);
50
./node_modules/.bin/playwright codegen http://0.0.0.0:5678/vite-project/dist/
51
+
52
+ // extract css of the element
53
+ const button = await page.getByRole("button", { name: "OK" });
54
+ const backgroundColor = await button.evaluate((el) => {
55
+ return window.getComputedStyle(el).getPropertyValue("background-color");
56
+ });
57
58
</script>
59
0 commit comments