Page 1 of 1

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

Posted: Thu Mar 22, 2018 10:57 am
by odklizec
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?

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

Posted: Thu Mar 22, 2018 2:54 pm
by krstcs
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...).

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

Posted: Thu Mar 22, 2018 3:10 pm
by odklizec
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 :(

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

Posted: Thu Mar 22, 2018 3:33 pm
by krstcs
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...).