Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/java/344.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
Java 使用selenium查找页面源代码_Java_Selenium - Fatal编程技术网

Java 使用selenium查找页面源代码

Java 使用selenium查找页面源代码,java,selenium,Java,Selenium,我必须使用密码 this.setUp("http://www.remax.com/", "*firefox"); selenium.open("/404/index.aspx?aspxerrorpath=/public/pages/searchresults.aspx"); slenium.click("link=Find a RE/MAX Office"); selenium.waitForPageToLoad("30000"); selenium.selectFrame("REMAX AGE

我必须使用密码

this.setUp("http://www.remax.com/", "*firefox");
selenium.open("/404/index.aspx?aspxerrorpath=/public/pages/searchresults.aspx");
slenium.click("link=Find a RE/MAX Office");
selenium.waitForPageToLoad("30000");
selenium.selectFrame("REMAX AGENT SEARCH");
selenium.click("ctl00_PlaceHolderMain_ButtonSearch");
要找到给定url的源代码,但我必须找到很少的源代码,因为这里使用java脚本+框架+Ajax代码

我必须使用selenium-server2.0.jar

请帮助我使用selenium获取url的源代码


谢谢,

获取HTML源代码的命令是正确的-我只是自己测试了它-因此我怀疑Selenium没有正确配置,或者存在其他一些环境问题


你能提供你所看到的全部例外情况吗?另外,您能否确认是否在
open
getHtmlSource
行(或另一行)上引发了异常?

如果您可以详细说明如何才能使其正常工作,可能会对其他人有所帮助-以防他们遇到同样的问题。