Prechádzať zdrojové kódy

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 9 rokov pred
rodič
commit
b848d452b1
1 zmenil súbory, kde vykonal 3 pridanie a 5 odobranie
  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"