fpmi.net.openURL with username and password

Hi, I have a link to a website that needs credentials. I want to incorportate that in to my url as fpmi.net.openURL(“http://username:password@host:port/”). However, I can see Internet Explorer 7 or 8 might not support this feature anymore.

Is there another workaround using Jython to pass credentials with the openURL feature?

For instance fpmi.net.openURL(“websiteurl”, username, password)

Please review the attached Jython sample code…it’s possible we just might be able to do this fairly easy, but I don’t know what limitations urllib2 and/or fpmi.net might have running on FPMI project.

Does fpmi.net have the following Jython class associations?

passman.add_password(None, theurl, username, password)

Thanks! - F
Jython urlOpen with Credentials.txt (2.89 KB)

Let me try to clear things up a bit.

First of all, fpmi.net.HTTPPasswordMgrWithDefaultRealm() is nonsensical. fpmi.net is not urllib2, and urllib2 is not fpmi.net. They aren’t aware of each other.

Second, urllib2 isn’t included in the Python implementation in FactoryPMI. The user manual defines what python libraries are available.

Third, urllib2 doesn’t do what you think it does. It does not open up a web browser at a given location so that the user can interact with the webapge. It opens up the URL for programmatic manipulation, so that you can programatically read the contents at that URL. Not what you wanted.

So, given all that, other than the old “username:password@” prefix, I don’t think there is much you can do. My only other thought would be to specifically invoke iexplore.exe with flags that give it the url, username and password (if such flags exist, I’m not sure).

Good luck.