Block by a simple acl authentication for selenium test
I'm trying to write selenium tests for a web si开发者_如何学Pythonte.
I used a Tomcat server with a MemoryRealm authentication cf
<Realm className="org.apache.catalina.realm.MemoryRealm" pathname="/DEV/tomcat1/conf/tomcat-users.xml"/>
I didn't see how to set authentication in my tests. I tried to put in "selenium.open"
selenium.open("http://user:pass@myserver:8080/index.jsp");
Selenium launched the server, opened the web site, but stays on auth without filling the user/password form.
Is it just not possible and do I have to change tomcat auth, or did I just miss something?
i try the same and for mi it work in some case. for example:
this work only for apache in linux and in some IIS $this->setBrowserUrl("http://USER:PASSWORD@IP:PORT");
精彩评论