How do you input a URL when no authentication is use?

I am new to automated testing and the framework so please bear with me.
I have an internal website for an application where we do not use http or https.
Example: application.company.com
It appears Selenium requires the url to have an http or https prefix otherwise an error is thrown. I could not locate another keyword which I could use so let me know if a better one exists for this issue.

These are my variables:
${url} application.company.com
${browser} chrome

My test case:
open browser ${url} ${browser}
maximize browser window
sleep 5s
close browser

If I place a http or https in front of --application.company.com-- the url is input into the address bar but of course, I receive a 404. (The – in front are placed because new users cannot have more than two links in a post)

If I do not use http or https I receive the following error:

PS C:\Work\Robot Scripts\ME> [35488:168:0214/161535.298:ERROR:chrome_browser_main_extra_parts_metrics.cc(227)] START: ReportBluetoothAvailability(). If you don’t see the END: message, this is --crbug.com/1216328–.
[35488:168:0214/161535.298:ERROR:chrome_browser_main_extra_parts_metrics.cc(230)] END: ReportBluetoothAvailability()
[35488:168:0214/161535.299:ERROR:chrome_browser_main_extra_parts_metrics.cc(235)] START: GetDefaultBrowser(). If you don’t see the END: message, this is --crbug.com/1216328–.
[35488:35224:0214/161535.304:ERROR:device_event_log_impl.cc(214)] [16:15:35.304] USB: usb_device_handle_win.cc:1049 Failed to read descriptor from node connection: A device attached to the system is not functioning. (0x1F)
[35488:35224:0214/161535.311:ERROR:device_event_log_impl.cc(214)] [16:15:35.311] USB: usb_device_handle_win.cc:1049 Failed to read descriptor from node connection: A device attached to the system is not functioning. (0x1F)
[35488:35224:0214/161535.311:ERROR:device_event_log_impl.cc(214)] [16:15:35.311] USB: usb_device_handle_win.cc:1049 Failed to read descriptor from node connection: A device attached to the system is not functioning. (0x1F)
[35488:168:0214/161535.314:ERROR:chrome_browser_main_extra_parts_metrics.cc(239)] END: GetDefaultBrowser()

Hi @bweston ,

As per the documentation Open Browser is designed to be used with the http or https like this:

	Open Browser	http://example.com	Chrome

Are you saying you get a 404 if you set your url variable to this?

	${url}    http://application.company.com

if that’s giving you a 404, it’s probably not a selenium library or robot framework issue, so I would suggest trying that url in incognito mode to see if you really get a 404? make sure you do this from the machine that you are running your robot script on.

There is some other ways you can enter a url, but I expect this will give you the same 404 error, but I’ll include them as an FYI

	Open Browser	http://${url}	Chrome

or

	Open Browser	about:blank		Chrome		# opens chrome with a blank page
	Go To	${url}

I resolved the problem. The URL I was using was incorrect as I appended the word “login” after .com (/login). This is why I was receiving the 404.

Thank you for reviewing the issue.

1 Like