开发者

Can't open Firefox with profile (not temporary) with Selenium

I want start firefox with my custom profile, and when I add some plugins (for example) in this session starting from selenium I want he do not forgot them.

I started selenium server

start "JAVA Selenium Server" java -jar s开发者_JAVA技巧elenium-server.jar -interactive -firefoxProfileTemplate "D:\Ogame\SeleniumStaticProfile"

Then in selenium server

cmd=getNewBrowserSession&1=*custom firefox.exe -p SeleniumStatic -no-remote&2=http://www.google.com
cmd=open&1=httttp://www.hotmail.com
cmd=open&1=httttp://www.google.pl

and i'm gettings error something like:

www.goole.com havent rights to read properties Window.seleniumMarker1299...

All log:

cmd=getNewBrowserSession&1=*custom firefox.exe -p SeleniumStatic -no-remote&2=ht tttp://www.google.com 13:54:50.817 INFO - ---> Requesting htttttp://localhost:4444/selenium-server/driver ?cmd=getNewBrowserSession&1=*custom firefox.exe -p SeleniumStatic -no-remote&2=h tttttp://www.google.com 13:54:50.823 INFO - Command request: getNewBrowserSession[*custom firefox.exe -p SeleniumStatic -no-remote, htttttp://www.google.com] on session null 13:54:50.824 INFO - creating new remote session 13:54:50.832 INFO - Allocated session ad3e48137d024959863ab8bb4c297d55 for httttp: //www.google.com, launching... 13:54:54.615 INFO - Got result: OK,ad3e48137d024959863ab8bb4c297d55 on session a d3e48137d024959863ab8bb4c297d55 cmd=open&1=http://www.wp.pl 13:55:23.588 INFO - ---> Requesting httttp://localhost:4444/selenium-server/driver ?cmd=open&1=htttttp://www.wp.pl&sessionId=ad3e48137d024959863ab8bb4c297d55 13:55:23.595 INFO - Command request: open[htttttp://www.wp.pl, ] on session ad3e481 37d024959863ab8bb4c297d55 13:55:23.596 WARN - you appear to be changing domains from httttp://www.google.com to htttttp://www.wp.pl this may lead to a 'Permission denied' from the browser (unless it is running as *iehta or *chrome, or alternatively the selenium server is runnttting in proxy injection mode) 13:55:23.691 INFO - Got result: Witrynie http://www.google.com nie udzielono u prawnien do odczytania wlasciwosci Window.document z on sessi on ad3e48137d024959863ab8bb4c297d55

Of course I have entered proxy in Firefox SeleniumStatic profile (localhost:4444)

What am I doing wrong? Sorry for my bad english :/


Change your commands to look like the following

cmd=getNewBrowserSession&1=*firefox -no-remote&2=http://www.google.com
cmd=open&1=httttp://www.hotmail.com
cmd=open&1=httttp://www.google.pl

YOu don't need to specify the profile since you have already done that when starting the Selenium Server.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜