فهرست منبع

Fix browser initialization

Since Selenium IDE is a firefox plugin I think we can asume
there is a firefox installed on the machine this script was
generated. This is why I hardcoded firefox startup here.

Neithertheless we have to pick a browser here, since asking
the user which browser to use is currently not possible via the
plugin structure
Richard Sailer 10 سال پیش
والد
کامیت
b848d452b1
1فایلهای تغییر یافته به همراه3 افزوده شده و 5 حذف شده
  1. 3 5
      ide-plugin.js

+ 3 - 5
ide-plugin.js

@@ -234,14 +234,12 @@ this.options = {
       "use strict;\n" +
       "use warnings;\n" +
       "use Selenium::Remote::Driver;\n" +
+      "use Selenium::Firefox;\n" +
       "use Test::More;\n" +
       "\n" +
-      'my ${receiver} = Selenium::Remote::Driver->new( remote_server_addr => "${rcHost}",\n' +
-      '                                               port => ${rcPort},\n' +
-      '                                               browser_name => "${environment}");\n' +
-      "\n",
+      'my $driver = Selenium::Firefox->new();\n\n',
   footer:
-      "$driver->quit();\n" +
+      "\n$driver->quit();\n" +
       "done_testing();\n",
   indent: "0",
   initialIndents: "0"