Showing results for 
Search instead for 
Did you mean: 
New Member

Automation Testing using Selenium



I am trying to automate my Power BI report validation. Basically, we want to make sure that the output generated on the report matches the datasource manipulation. For that, I am using Selenium to extract the values of the objects using their Xpath or Css selector. The challenge is everytime I run my script, the path changes. Does anyone know why does that keep happening. I checked with the developers and they assured that nothing from the UI got changed.

Is there any other tool for automation testing?

Any help is much appreciated!




Frequent Visitor

@HarjyotKaur what kind of selectors are you using? I've had some luck in using CSS selectors and requesting developers to put alt-text on all charts I need to interact with. In the DOM, you'll see the alt-text as "aria-label" attributes, so you can write CSS selectors like, "div.slicer[aria-label*=\"YOUR_ALT_TEXT\"]". These tend not to change much as long as you find the right element to use. 


As for your question about other tools, I developed PowerTester after going down the selenium route for a client and finding that the amount of work involved in creating and maintaining tests became the bottleneck for our team. 


Hi! I'm going to write Portuguese, and I hope you can understand. Are you using Selenium through Power BI service or desktop?
I'm trying to do something like that in an online report, but the script can't interact with the elements.
My goal is to automatically export the data from a table in the visual.
Can you use filters and select elements with Selenium? Any tips that can help me?


Super User IV
Super User IV

@HarjyotKaur No specific tools that I know of but there is a blog article for DAX testing:


No idea about Selenium. Would need to know more about the script and how it is accessing the report.


@ me in replies or I'll lose your thread!!!

I have a NEW book! 
DAX Cookbook from Packt
Over 120 DAX Recipes!

Did I answer your question? Mark my post as a solution!

Proud to be a Super User!

Helpful resources

PBI_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

Get Ready for Power BI Dev Camp

Microsoft named a Leader in The Forrester Wave

Microsoft received the highest score of any vendor in both the strategy and current offering categories.

Get Ready for Power BI Dev Camp

Power BI Dev Camp - September 30th, 2021

Mark your calendars and join us for our next Power BI Dev Camp!

PowerPlatform 768x460.png

Microsoft Learn

Check out our new Discover Your Career Path blog post series and get all the details.

Top Solution Authors