When I try to target the email element by class or id, it will throw an error:
run-time error '438': object doesn't support this property or method
There are no iframes and I can't seem to switch to a window either(that I am seeing).
Here is vba code:
Set bot = New Selenium.ChromeDriver
bot.start baseUrl:="https://app.powerbi.com/singleSignOn"
bot.Get "/"
Application.Wait Now + TimeValue("00:00:3")
Dim FindBy As New Selenium.By
With bot
.FindElementsByCss(".pbi-text-input").Click
.FindElementsById("email").SendKeys ("testing")
end with
Html code:
</head>
<body>
<div id="emailCollection" class="emailBlock" style="display: none;"> <!-- The popup window -->
<div class="emailLogoAndName">
<object type="image/svg+xml" data="13.0.17576.29/images/PowerBI_MasterLogo.svg"></object>
<label>Power BI</label>
</div>
<div class="emailDetailArea">
<div class="emailDetailHeader"><label>Enter your email, we'll check if you need to create a new account.</label></div>
<div class="emailDetailContent">
<div class="emailDetailContentArea">
<div class="emailContentInput">
<div class="emailInputTitle">Email</div>
<div><input class="pbi-text-input" type="text" placeholder="Enter email" id="email"></div>
<div class="emailInputError" style="display: none;"></div>
</div>
<div class="emailContentDisclaimers">
<div class="emailDisclaimer1">
By proceeding you acknowledge that if you use your organization's email, your organization may have rights to access and manage your data and account.
<span class="learnMoreBtn" onmouseover="setPosition(event)">
Learn more about using your organization's email
<span class="learnMoreText">
<b>Using your organization's email address to sign up</b>
<p>If you use an email address provided by an organization you are affiliated with (like an employer or school), the owner of the email domain may (i) manage and administer your account, including modifying and terminating your access and (ii) access and process your data, including the contents of your communications and files. Your directory data (including name, signup date, and email) may be visible to other users of these services within your organization.
</p>
</span>
</span>
</div>
<div class="emailDisclaimer2">
By clicking Submit, you agree to these <a href='https://go.microsoft.com/fwlink/?LinkID=870457&clcid=0x409' target='_blank'>terms and conditions</a> and allow Power BI to get your user and tenant details. <a href='https://go.microsoft.com/fwlink/?LinkID=521839&clcid=0x409' target='_blank'>Microsoft Privacy Statement</a>
</div>
</div>
</div>
<button class="pbi-fluent-button primary" id="submitBtn" onclick="submitEmail()">Submit</button>
</div>
</div>
<div class="emailLogoArea">
<object type="image/svg+xml" data="13.0.17576.29/images/PowerBI_MasterLogo.svg"></object>
</div>
</div>
</body>
</html>