Quantcast
Channel: All Developer posts
Viewing all articles
Browse latest Browse all 48104

Re: Check if PowerBI page is loaded (using Selenium)

$
0
0

There are quite some code samples on the Github wiki, I suggest you check them out.

 

It would look something like this (combined this and this):

 

 

// HTML<div
    powerbi-type="report"
    powerbi-report-id="5dac7a4a-4452-46b3-99f6-a25915e0fe55"
    powerbi-embed-url="https://app.powerbi.com/reportEmbed"></div>

// JS
var embedConfiguration = {
    type: 'report',
    id: '5dac7a4a-4452-46b3-99f6-a25915e0fe55',
    embedUrl: 'https://app.powerbi.com/reportEmbed'
};
var $reportContainer = $('#reportContainer');
var report = powerbi.embed($reportContainer.get(0), embedConfiguration);

// Here we listen for the loaded event
report.on('loaded', event => {
    // Here the reports are loaded, do something that can be detected by Selenium.
    $('#reportContainer').addClass('done-loading');
});

 


Viewing all articles
Browse latest Browse all 48104

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>