So the issue is Microsoft Edge because it first starts out as a winAPP you cannot use web.document to latch on to the HTML elements. So when I am trying to bypass the ssl security warning using the guide here http://www.ranorex.com/forum/using-popu ... t5409.html I am unable to see the html elements even though they are embedded behind the winapp. The spy tool cannot see them and writing in a manual xpath does not work. Please help!
[img]RanorexIssue.JPG[/img]
Microsoft Edge browser intial element recongition
Microsoft Edge browser intial element recongition
- Attachments
-
- RanorexIssue.JPG (40.67 KiB) Viewed 2046 times
- Support Team
- Site Admin
- Posts: 12167
- Joined: Fri Jul 07, 2006 4:30 pm
- Location: Graz, Austria
Re: Microsoft Edge browser intial element recongition
Hello mtaylor,
You could watch for the following tab to exist:
Afterwards, simply navigate to the “Continue to this webpage…” as you did in Chrome.
Hope this information helps.
Sincerely,
Robert
You could watch for the following tab to exist:
Afterwards, simply navigate to the “Continue to this webpage…” as you did in Chrome.
Hope this information helps.
Sincerely,
Robert
Re: Microsoft Edge browser intial element recongition
SO here is the issue. I see what you are saying to do and I am sort of doing that however...
I'm noticing that two instances of the Popupwatcher are being called when I get to Chrome/Edge. Then because its trying to execute my method twice there are tabs and enters flying everywhere.
[img]Capture.jpg[/img]
I'm noticing that two instances of the Popupwatcher are being called when I get to Chrome/Edge. Then because its trying to execute my method twice there are tabs and enters flying everywhere.
[img]Capture.jpg[/img]
- Attachments
-
- Capture.JPG (58.58 KiB) Viewed 1997 times
Re: Microsoft Edge browser intial element recongition
I figured it out and for those that need the code for all the browsers here you go:
Code: Select all
public partial class OpenBrowser
{
public static TestGroovApp.GroovAppRepository SSLRepo = TestGroovApp.GroovAppRepository.Instance;
/// <summary>
/// This method gets called right after the recording has been started.
/// It can be used to execute recording specific initialization code.
/// </summary>
///
private void Init()
{
PopupWatcher securityPopupWatcher = new PopupWatcher();
if(BrowserName.Equals("Chrome")){
securityPopupWatcher.Watch(SSLRepo.GoogleChrome.PrivacySecurityWarnings.AddressAndSearchBarInfo, ConfirmSecurityWarningCE);
}
if(BrowserName.Equals("IE")){
securityPopupWatcher.Watch(SSLRepo.InternetExplorer.PrivacySecurityWarnings.OverridelinkInfo, ConfirmSecurityWarningIE);
}
if(BrowserName.Equals("Firefox")){
securityPopupWatcher.Watch(SSLRepo.Firefox.PrivacySecurityWarnings.FirefoxInitialWarning.IUnderstandTheRisksInfo, ConfirmSecurityWarningFFAdd);
securityPopupWatcher.Watch(SSLRepo.Firefox.PrivacySecurityWarnings.FirefoxPopupSecurityForm, ConfirmSecurityWarningFFConfirm);
}
if(BrowserName.Equals("Edge")){
securityPopupWatcher.Watch(SSLRepo.MicrosoftEdge.PrivacySecurityWarnings.CertificateErrorTabCaptionInfo, ConfirmSecurityWarningMEConfirm);
}
//securityPopupWatcher.Watch(SSLRepo.Safari.ClientInfo, ConfirmSecurityWarningSF);
securityPopupWatcher.Start();
}
public void ConfirmSecurityWarningCE(Ranorex.Core.Repository.RepoItemInfo myInfo, Ranorex.Core.Element myElement)
{
SSLRepo.GoogleChrome.PrivacySecurityWarnings.AddressAndSearchBar.PressKeys("{Tab}{Tab}{Tab}{Tab}{Enter}{Tab}{Enter}");
Validate.Exists(repo.GroovLoginAndLogout.LoginPanelInfo);
}
public void ConfirmSecurityWarningIE(Ranorex.Core.Repository.RepoItemInfo myInfo, Ranorex.Core.Element myElement)
{
Report.Log(ReportLevel.Info, "This appears to be IE");
SSLRepo.InternetExplorer.PrivacySecurityWarnings.Overridelink.Click();
Report.Log(ReportLevel.Info, "Succesfully Accecpted Security Warning for Internet Explorer");
}
public void ConfirmSecurityWarningFFAdd(Ranorex.Core.Repository.RepoItemInfo myInfo, Ranorex.Core.Element myElement)
{
Report.Log(ReportLevel.Info, "This appears to be Firefox");
SSLRepo.Firefox.PrivacySecurityWarnings.FirefoxInitialWarning.IUnderstandTheRisks.Click();
SSLRepo.Firefox.PrivacySecurityWarnings.FirefoxInitialWarning.ExceptionDialogButton.Click();
}
public void ConfirmSecurityWarningFFConfirm(Ranorex.Core.Repository.RepoItemInfo myInfo, Ranorex.Core.Element myElement)
{
SSLRepo.Firefox.PrivacySecurityWarnings.FirefoxPopupSecurityForm.PermanentlyStoreThisException.Uncheck();
SSLRepo.Firefox.PrivacySecurityWarnings.FirefoxPopupSecurityForm.ConfirmSecurityException.Click();
Report.Log(ReportLevel.Info, "Succesfully Accecpted Security Warning for Firefox");
}
public void ConfirmSecurityWarningMEConfirm(Ranorex.Core.Repository.RepoItemInfo myInfo, Ranorex.Core.Element myElement)
{
Report.Log(ReportLevel.Info, "This appears to be Edge");
SSLRepo.MicrosoftEdge.Self.Click(Location.UpperRight);
SSLRepo.MicrosoftEdge.PrivacySecurityWarnings.SearchOrEnterWebAddress.PressKeys("{Tab}{Tab}{Return}");
Validate.Exists(repo.GroovLoginAndLogout.DivTagAppLogin);
}
public void CheckandConfirmSecurity()
{
}
}
- Support Team
- Site Admin
- Posts: 12167
- Joined: Fri Jul 07, 2006 4:30 pm
- Location: Graz, Austria
Re: Microsoft Edge browser intial element recongition
Hello mtaylor,
Thank you for sharing your experience to our community.
Sincerely,
Robert
Thank you for sharing your experience to our community.
Sincerely,
Robert