dongyanghan0556 2013-01-11 03:29
浏览 73
已采纳

Selenium 2和Firefox配置文件未应用

So i'm stuck, I'm running my script through a proxy which requires HTTP Authentication, however I can't authenticate with @:.. So I decided to create a profile that has the authentication plugin added for FireFox and make it auto input.

I've made the zip base64 file, as I'm running on OSX I used the following commands,

zip -r profile 3rkomsuo.selenium

openssl base64 -in "profile.zip" -out "profile.zip.b64"

The file is 24MBs tho(edit, disabled firebug and now it's only about 4MB, still no luck)? I only added 2 plugins, firebug and Auth plugin, that's tiny! Now I've put the file into my web directory, I'm running MAMP, and I send the profile as described.

$session = $web_driver->session('firefox', array("firefox_profile" => file_get_contents("profile.zip.b64"))); 

I've checked the POST, send a correct array, i've increased PHP POST size in php.ini to 64MBs just in case, however nothing works, still loads the basic(nothing set up) profile? If anyone could help you would be my hero as I've spent several hours debugging this without any luck!

  • 写回答

2条回答 默认 最新

  • duanmu5039 2013-01-12 08:15
    关注

    Managed to set up the profile, make sure you rename prefs.js to user.js and zip the folder contents for the profile, not the profile folder itself!

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(1条)

报告相同问题?

悬赏问题

  • ¥15 电脑开机过商标后就直接这样,求解各位
  • ¥15 mysql , 用自己创建的本地主机和用户名 登录不上
  • ¥15 关于#web项目#的问题,请各位专家解答!
  • ¥15 vmtools环境不正常
  • ¥15 请问如何在Ubuntu系统中安装使用microsoft R open?
  • ¥15 jupyter notebook
  • ¥30 informer时间序列预测
  • ¥20 SSR引物多态性分析
  • ¥15 大漠插件在Win11易语言注册调用和免注册灵异事件,VS上注册调用完全没问题
  • ¥15 Addressable缓存机制做热更新的问题