Get certified for free when you join Fabric Data Days 2026 and dive into Fabric, Power BI, SQL, AI, and other essential data skills.
Join nowJuly 28 - August 9 | Final Round of the Power BI Dataviz World Championships. This is your chance. Learn more
Trying to use playwright to automate testing Power BI reports like the user would click. I am trying to "get" a value from a visual. I have it working using the nth-child(#) or nth-of-type(#).
Example.
These work to click or "get" the value:
await page.click('.bodyCells > :nth-child(1) > :nth-child(1) > :nth-child(4) > div:nth-of-type(1)');
const test4 = await page.textContent('.bodyCells > :nth-child(1) > :nth-child(1) > :nth-child(4) > div:nth-of-type(1)');
console.log(test4);
const test5 = await page.textContent('.bodyCells > :nth-child(1) > :nth-child(1) > :nth-child(4) > :nth-child(1)');
console.log(test5);
const elementByClass = await page.$('.bodyCells > :nth-child(1) > :nth-child(1) > :nth-child(4) > div:nth-of-type(1)')
const innerText = await elementByClass.innerText()
console.log(innerText)
Is there a way to not use the "nth-child" and actually reference the "div title=rowHeader name" and the "div title = columnHeader name" to "get" the value in that cell of this visual. example below get 258,886.064
If you love stickers, then you will definitely want to check out our community sticker challenge, Barcelona edition!
Check out the July 2026 Power BI update to learn about new features.
| User | Count |
|---|---|
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |
| User | Count |
|---|---|
| 4 | |
| 3 | |
| 2 | |
| 1 | |
| 1 |