Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Get Fabric Certified for FREE during AI Skills Fest. This week only. Secure your voucher now.

Reply
wadezone
Frequent Visitor

Using Node.js (Playwright) how to utilize columnHeader; rowHeader instead of nth-child

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:

awaitpage.click('.bodyCells > :nth-child(1) > :nth-child(1) > :nth-child(4) > div:nth-of-type(1)'); 

 

consttest4 = awaitpage.textContent('.bodyCells > :nth-child(1) > :nth-child(1) > :nth-child(4) > div:nth-of-type(1)'); 

console.log(test4); 

 

consttest5 = awaitpage.textContent('.bodyCells > :nth-child(1) > :nth-child(1) > :nth-child(4) > :nth-child(1)'); 

console.log(test5);

 

constelementByClass = awaitpage.$('.bodyCells > :nth-child(1) > :nth-child(1) > :nth-child(4) > div:nth-of-type(1)') 

constinnerText = awaitelementByClass.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 

 

cell.JPG

0 REPLIES 0

Helpful resources

Announcements
May Power BI Update Carousel

Power BI Monthly Update - May 2026

Check out the May 2026 Power BI update to learn about new features.

Fabric SQL PBI Data Days

Data Days 2026 coming soon!

Sign up to receive a private message when registration opens and key events begin.

New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.