Warning: file_get_contents(/data/phpspider/zhask/data//catemap/6/multithreading/4.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
RSelenium打开方法失败,错误为10061_R - Fatal编程技术网

RSelenium打开方法失败,错误为10061

RSelenium打开方法失败,错误为10061,r,R,我想让硒第一次起作用。这是我的密码: library(RSelenium) checkForServer() RSelenium::startServer() remDr <- remoteDriver() startServer() remDr$open() …然后返回“success”,以及站点快照,这向我表明它可以通过防火墙,而这不是问题所在 我错过了什么明显的东西吗?任何指点都将受到感激 我想我应该说,如果有更好的方法,我为什么要尝试使用硒。基本上,我想进入一个网页,填写一些下拉

我想让硒第一次起作用。这是我的密码:

library(RSelenium)
checkForServer()
RSelenium::startServer()
remDr <- remoteDriver()
startServer()
remDr$open()
…然后返回“success”,以及站点快照,这向我表明它可以通过防火墙,而这不是问题所在

我错过了什么明显的东西吗?任何指点都将受到感激

我想我应该说,如果有更好的方法,我为什么要尝试使用硒。基本上,我想进入一个网页,填写一些下拉列表,然后按下一个按钮来下载文件

已安装的版本包括:

  • PhantomJSV2.0
  • 硒元素v1.0
  • RStudio v0.98.1083
  • R v3.1.1(64位)
  • Windows 7(64位)

尝试使用其他端口:
RSelenium::startServer(args=c(“-port 4567”))
<代码>遗憾的是,这不起作用。我还尝试了一些其他端口,但没有成功。我应该补充一点,我也遇到了同样的错误。运行Selenium服务器时,从
RSelenium::startServer(invisible=FALSE)
开始,并检查可视控制台是否有错误。很可能您的Selenium服务器没有启动。感谢您一直支持我@jdharison。我已经按照你的建议做了,但是在我能够阅读之前,控制台会闪烁并消失。我将尝试从命令行手动启动Selenium服务器。
[1] "Connecting to remote server"
[[1]]
[1] "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Strict//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd\">\r\n<html xmlns=\"http://www.w3.org/1999/xhtml\" xml:lang=\"en\">\r\n<head>\r\n \r\n<title>Error Message</title>\r\n<meta http-equiv=\"content-type\" content=\"text/html; charset=utf-8\" />\r\n\r\n<style>\r\nbody {\r\n\t\r\n\tbackground:#e5eaf5 url(/Wbo-FD9B7ED9-215B-4626-9B9E-D453142D7B18/bg.gif) top left repeat-x ;\r\n\tmargin:0px 0px 0px 0px;\r\n\tfont-family:Arial, Helvetica, sans-serif;\r\n\tmin-width:1000px;\r\n\tfont-size:12px;\r\n\tcolor:#000000;\r\n\tdirection:ltr;\r\n\t}\r\nimg {border:none}\r\n\r\n\r\n\t.main {\r\n\t\twidth:100%;\r\n\t\tbackground:url(/Wbo-FD9B7ED9-215B-4626-9B9E-D453142D7B18/topright.gif) top right no-repeat;\r\n\t\tmin-width:1000px;\r\n\t\tmin-height:400px;\r\n\t\tmargin-left:auto;\r\n\t\tmargin-right:auto;\r\n\t\ttext-align:left;\r\n\t}\r\n\t\r\n\t.logo {float:left;  height:103px; }\r\n\t.sidetext {float:right; width:182px; height:52px; background:url(/Wbo-FD9B7ED9-215B-4626-9B9E-D453142D7B18/sidetext.png) top left; border:1px solid #2a2e31; margin-right:20px; margin-top:20px; padding:4px; }\r\n\t.sidetextNone {visibility:hidden; }\r\n\t\r\n\t.whiteline {float:left; clear:both; font-size:20px; margin-left:47px; margin-top:17px; color:#ffffff; white-space:nowrap; }\r\n\t.bold {font-weight:bold;}\r\n\t\r\n\t.maintext {float:left; margin-top:20px; clear:both; color:#000; margin-left:47px;}\r\n\t\r\n\t.color1 {color:#677183;}\r\n\t\r\n\tul {margin-top:0; padding-left:15px; padding-top:5px; padding-bottom:5px;}\r\n\t\r\n\tul li {list-style-image:url(/Wbo-FD9B7ED9-215B-4626-9B9E-D453142D7B18/bullet.gif)}\r\n\tA {\r\n    FONT-WEIGHT: bold; COLOR: #005a80;\r\n}\r\nA:hover {\r\n    FONT-WEIGHT: bold;COLOR: #0d3372;\r\n}\r\n</style>\r\n  \r\n</head>\r\n<body>\r\n\t<div class=\"main\">\r\n        <div class=\"logo\"><img src=\"/Wbo-FD9B7ED9-215B-4626-9B9E-D453142D7B18/logo.png\" alt=\"ForeFront\" /></div>\r\n        <div class=\"whiteline\"><td id=L_10061_2><span class=\"bold\">Network Access Message:</span> The page cannot be displayed </td></div>\r\n    <div class=\"maintext\">\r\n    <td id=L_10061_3><span class=\"bold color1\">Explanation:</span> The Web server refused the connection.  </td><br />\r\n<br />\r\n\r\n<td id=L_10061_5><span class=\"bold color1\">Try the following:</span></td><br />\r\n\r\n<ul>\r\n<li><td id=L_10061_6><span class=\"bold\">Refresh page:</span> Search for the page again by clicking the Refresh button. The timeout could have occurred due to Internet congestion.   </td></li>\r\n<li><td id=L_10061_7><span class=\"bold\">Check spelling:</span> Check that the Web page address is spelled correctly. The address may have been mistyped.</td></li>\r\n<li><td id=L_10061_8><span class=\"bold\">Access from a link:</span> If there is a link to the page you are looking for, try accessing the page from that link. </td></li>\r\n<li><td id=L_10061_9><span class=\"bold\">Contact website:</span>You may want to contact the website administrator to make sure the Web page still exists. You can do this by using the e-mail address or phone number listed on the website home page.</td></li>\r\n</ul>\r\n<br />\r\n\r\n<td id=L_10061_10><span>If you are still not able to view the requested page, try contacting your administrator or Helpdesk.</span></td> <br />\r\n\r\n<br />\r\n<td id=L_10061_11><span class=\"bold color1\">Technical Information (for support personnel)</span></td><br />\r\n<ul>\r\n<li><td id=L_10061_12><span class=\"bold\">Error Code 10061:</span> Connection refused</td></li>\r\n<li><td id=L_10061_13><span class=\"bold\">Background:</span>The server you are attempting to access has refused the connection with the gateway. This usually results from trying to connect to a service that is inactive on the server.</td></li>\r\n<li><td id=L_10061_14><span class=\"bold\">Date:</span></td> 24/02/2015 3:45:09 AM [GMT]</li>\r\n<li><td id=L_10061_15><span class=\"bold\">Server:</span></td> MELDVTMG1.oceania.cshare.net </li>\r\n<li><td id=L_10061_16><span class=\"bold\">Source:</span> Remote server </td></li>\r\n</ul>\r\n    </div>\r\n</div>\r\n</body>\r\n</html>\r\n"
require(RSelenium)
pJS <- phantom()
Sys.sleep(5) # give the binary a moment
remDr <- remoteDriver(browserName = 'phantomjs')
remDr$open()
var page = require('webpage').create();
page.open('http://www.news.com.au/', function(status) {
  console.log("Status: " + status);
  if(status === "success") {
    page.render('example.png');
    console.log('http://www.news.com.au/');
  }
  phantom.exit();
});