OK i have done that but it brings be back to the same issue. I am at the sign-in page. To summarize what the test case is expected to do is the following.
a) It gets an activation code from a web page,
b) opens a new tab and navigates to the camera web page where this activation code will be used.
c) Need to sign-in to this activation web page.
d) The function takes username/password as parameters,
eg: lets say the username is “admin”.
How do i know what keys to press using the robot? What are the command lines I need to use for this?
robot.keyPress(KeyEvent.XXXX);
What is XXXX in this case? Is that even possible to achieve?
Thanks
I’ve never used Robot to do this. This is a browser-level notification, so aside from passing the credentials in the URL, you may try and handling it with desired capabilities:
@mgrandillo I was hoping your Robot code (with keypresses for “admin” etc) would just work after the login panel appears. Hopefully, the panel places the focus in the Username field - right? Then using Robot, you can TAB to the password field and issue the keypresses for the password. Then, finally, issue an ENTER keypress.
That said, and since the auth seems to be indicating plain-text, I fancy Brandon’s original idea (credentials in the URL) has a good chance of working. Try it. It’s the easiest approach, by far - then you can ditch all that Robot stuff.