how to automate native Edge (login) dialog via webdriver?

Technology specific object identification, supported applications, web technologies, and 3rd party controls.
User avatar
odklizec
Ranorex Guru
Ranorex Guru
Posts: 3947
Joined: Mon Aug 13, 2012 9:54 am
Location: Zilina, Slovakia

how to automate native Edge (login) dialog via webdriver?

Post by odklizec » Thu Mar 22, 2018 10:57 am

Hi guys,

I'm currently exploring webdriver integration and I quickly realized that there is no way to automate native Edge (most probably other browsers too) dialogs (in my case login form). I confirmed this with Ranorex support, but I'm sure I'm not alone who needs to login before the main page could be automated? So I would like to ask you guys, what is your solution of this webdriver limitation?

I found out about Selenium method called authenticateUsing() but I don’t see a way how to use it from Ranorex…
https://stackoverflow.com/questions/243 ... 3#25945253

I also thought about programmatically turning the webdriver node OFF, automate the native form via desktop node and turning the webdriver node ON again, but I was told that this is not possible either.

Any other (working) idea?
Pavel Kudrys
Ranorex explorer at Descartes Systems

Please add these details to your questions:
  • Ranorex Snapshot. Learn how to create one >here<
  • Ranorex xPath of problematic element(s)
  • Ranorex version
  • OS version
  • HW configuration

krstcs
Ranorex Guru
Posts: 2683
Joined: Tue Feb 07, 2012 4:14 pm
Location: Austin, Texas, USA

Re: how to automate native Edge (login) dialog via webdriver?

Post by krstcs » Thu Mar 22, 2018 2:54 pm

I think the only real solution would be to stop using native dialogs in web applications. Developers should probably not be depending on having access to those parts of the browser because they are always changing things. Devs can't, and shouldn't, depend on that dialog being available to the HTML app in the future. But that's just my opinion. :D

Everywhere I've been, they are using or moving to web-based login systems, where all the dialogs are part of the HTML, so it is browser agnostic.

Unfortunately, that also means I have no clue as to how to work around it, and I'm not on WebDriver yet due to some other issues (that are hopefully fixed in 8.1...).
Shortcuts usually aren't...

User avatar
odklizec
Ranorex Guru
Ranorex Guru
Posts: 3947
Joined: Mon Aug 13, 2012 9:54 am
Location: Zilina, Slovakia

Re: how to automate native Edge (login) dialog via webdriver?

Post by odklizec » Thu Mar 22, 2018 3:10 pm

Hi Kelly,

Thanks for input. That is unfortunately not an option. I hate the native browser dialogs, because they make the web-based automation a nightmare, especially while testing in multiple browsers. Sadly, devs/management think they are OK and TA is not their main concern ;) Too bad there is not some kind of workaround in Ranorex/webdriver integration, because without the possibility to automate native forms, there is not much use for me, despite its huge potential :(
Pavel Kudrys
Ranorex explorer at Descartes Systems

Please add these details to your questions:
  • Ranorex Snapshot. Learn how to create one >here<
  • Ranorex xPath of problematic element(s)
  • Ranorex version
  • OS version
  • HW configuration

krstcs
Ranorex Guru
Posts: 2683
Joined: Tue Feb 07, 2012 4:14 pm
Location: Austin, Texas, USA

Re: how to automate native Edge (login) dialog via webdriver?

Post by krstcs » Thu Mar 22, 2018 3:33 pm

Yeah, I understand. The issue is Ranorex's WD integration assumes (incorrectly) that everything in the test is done in either the native context or the WD context. I think this is a bad design, but it is what it is.

I always thought that WD should be handled by a new top-level repository element type, so your top level repo parent would be "/webdriver[@browser='Chrome']" and then you would put the elements under that, and Ranorex would automatically switch back and forth. The issue is that this would require a complete redesign of how Ranorex integrates with WD. But that's a different discussion...

I think your management may need to realize that if they don't fix this they won't be able to test against Edge. Without being able to login, your app test on Edge is pretty much worthless. Not sure how much customer usage you have on Edge, we're starting to see a little, but most of ours is in Chrome or IE (ugh...).
Shortcuts usually aren't...