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 PADS Logic 原理图
  • ¥15 PADS Logic 图标
  • ¥15 电脑和power bi环境都是英文如何将日期层次结构转换成英文
  • ¥15 DruidDataSource一直closing
  • ¥20 气象站点数据求取中~
  • ¥15 如何获取APP内弹出的网址链接
  • ¥15 wifi 图标不见了 不知道怎么办 上不了网 变成小地球了
  • ¥50 STM32单片机传感器读取错误
  • ¥50 power BI 从Mysql服务器导入数据,但连接进去后显示表无数据