Forum Discussion

VitoC's avatar
VitoC
New Member
9 years ago
Solved

Clicking on a PowerBi Dashboard reports with Selenium

Hello there,

I posted a message yesterday but it seems to have disapeared, i'm new here...

 

Ok, my problem is that I dont success to click on a Dashboard widget (ChartPie for example) using selenium.

 

When the PowerBi widget is not embedded in Html (generally has a Id in the Html code, <div id="container" class="e-datavisualization-chart e-js"....... ), I can easily click on it or on a particular object in the widget (for example a point in a Graph). but when it comes to get to slices in a chartPie (BUT On which we can perform a Focus Mode,  or Export Data on it... ), I cant get them.

 

In fact, its html code is very different as the other one, (embedded code) and there are no id tags (a lot of div and class, though, like: <div class="visualContainer unselectable ng-isolate-scope......... ). I failed to grab an Element using all the Get choices in Selenium (other Bys, like CssSlector, tagname, class, even XPath isnt working), do you know why? I cant click on any widget in the mainwindow (central) Does someone know how to click on a particular embedded report object??

 

Thank you for helping me out!

  • Ok, I found the solution, it was because it was in a frame and i had to switch to this frame before getting anything.

     

    Browser.WebDriver.SwitchTo().Frame(myFrame);

     

    Hope it will be helpful to someone

5 Replies

  • Hello there,

    I am doing some automatic testing using selenium and I have a Page with some PowerBI widgets. When the widget is not embedded in the html code (I can get Id of the widget like <div id="ReviewPositioning" class="e-datavisualization-chart e-js" .... ), I success to find one object in this widget (for example a point in a Chart) but when it is embedded like a report (several widgets with "Focus mode" or "Export Data" possible), In the html I see only div classes but very few Ids and i cant find anything with the other Bys (selector, tagname, classname, or even XPath),  nothing is working !!

    Does anyone have some advice for me? 

     

    Thanks in advance

    Guillaume

     

    • Eric_Zhang's avatar
      Eric_Zhang
      Microsoft Employee

      VitoC

      According to your description, the question seems how Selenium can get the html elements of Embedded Power BI reports. I suggest you post the question in the dedicated Selenium forum and you will get better response there.

      • VitoC's avatar
        VitoC
        New Member

        Eric_Zhang

         

        Thanks for your answer, ill try on Selenium forum. So frustrating I can get some of the widgets but not the embedded ones...