'Opens a new browser instance to given URL.
Returns the index of this browser instance which can be used later to
switch back to it. Index starts from 1 and is reset back to it when
`Close All Browsers` keyword is used. See `Switch Browser` for
example.
Optional alias is an alias for the browser instance and it can be used
for switching between browsers (just as index can be used). See `Switch
Browser` for more details.
Possible values for `browser` are as follows:
| firefox          | FireFox   |
| ff               | FireFox   |
| internetexplorer | Internet Explorer |
| ie               | Internet Explorer |
| googlechrome     | Google Chrome |
| gc               | Google Chrome |
| chrome           | Google Chrome |
| opera            | Opera         |
| phantomjs        | PhantomJS     |
| htmlunit         | HTMLUnit      |
| htmlunitwithjs   | HTMLUnit with Javascipt support |
| android          | Android       |
| iphone           | Iphone        |
| safari           | Safari        |
| edge             | Edge          |
Note, that you will encounter strange behavior, if you open
multiple Internet Explorer browser instances. That is also why
`Switch Browser` only works with one IE browser at most.
For more information see:
http://selenium-grid.seleniumhq.org/faq.html#i_get_some_strange_errors_when_i_run_multiple_internet_explorer_instances_on_the_same_machine
Optional \'remote_url\' is the url for a remote selenium server for example
http://127.0.0.1:4444/wd/hub. If you specify a value for remote you can
also specify \'desired_capabilities\' which is a string in the form
key1:val1,key2:val2 that will be used to specify desired_capabilities
to the remote server. This is useful for doing things like specify a
proxy server for internet explorer or for specify browser and os if your
using saucelabs.com. \'desired_capabilities\' can also be a dictonary
(created with \'Create Dictionary\') to allow for more complex configurations.
Optional \'ff_profile_dir\' is the path to the firefox profile dir if you
wish to overwrite the default.'

@keyword
def open_browser(self, url, browser='firefox', alias=None, remote_url=False, desired_capabilities=None, ff_profile_dir=None):

    if remote_url:
        self.info(("Opening    browser    '%s'    to    base    url    '%s'    through    remote    server    at    '%s'" % (browser, url, remote_url)))
    else:
        self.info(("Opening    browser    '%s'    to    base    url    '%s'" % (browser, url)))
    browser_name = browser
    browser = self._make_browser(browser_name, desired_capabilities, ff_profile_dir, remote_url)
    try:
        browser.get(url)
    except:
        self.ctx.register_browser(browser, alias)
        self.debug(("Opened    browser    with    session    id    %s    but    failed    to    open    url    '%s'" % (browser.session_id, url)))
        raise
    self.debug(('Opened    browser    with    session    id    %s' % browser.session_id))
    return self.ctx.register_browser(browser, alias)
