Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/javascript/464.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
Javascript 卡斯佩斯赢得';t单击日期表 dave@dbox:~$casperjs——版本 1.1.0-beta3 dave@dbox:~$phantomjs——版本 1.9.2_Javascript_Css Selectors_Click_Casperjs - Fatal编程技术网

Javascript 卡斯佩斯赢得';t单击日期表 dave@dbox:~$casperjs——版本 1.1.0-beta3 dave@dbox:~$phantomjs——版本 1.9.2

Javascript 卡斯佩斯赢得';t单击日期表 dave@dbox:~$casperjs——版本 1.1.0-beta3 dave@dbox:~$phantomjs——版本 1.9.2,javascript,css-selectors,click,casperjs,Javascript,Css Selectors,Click,Casperjs,Linux dbox 3.16.0-4-amd64#1 SMP Debian 3.16.7-ckt11-1+deb8u4(2015-09-19)x86_64 GNU/Linux 我还尝试了stack和CasperJS文档中的许多其他示例。.internal content.col-sm-8>center>table>tbody>tr>td>form>table>tbody>tr>td>input是CSS选择器,而不是标签(元素文本)。您需要使用casper。单击(选择器)而不是casper。单击

Linux dbox 3.16.0-4-amd64#1 SMP Debian 3.16.7-ckt11-1+deb8u4(2015-09-19)x86_64 GNU/Linux


我还尝试了stack和CasperJS文档中的许多其他示例。

.internal content.col-sm-8>center>table>tbody>tr>td>form>table>tbody>tr>td>input
是CSS选择器,而不是标签(元素文本)。您需要使用
casper。单击(选择器)
而不是
casper。单击标签(文本)

按日期搜索可下载的完整图表:
8月21日
<td>
    Search Downloadable Full Charts by Date:
    <br>
    <select name="raceDate">
        <option value="20150821">August 21</option>
        <option value'"20150822">August 22</option>
        ...these options continue until yesterday(the default)
        ...
        <option selected="" value="20151004">October 4</option>
    </select>
    <input type="submit" onclick="setSearch('D');" value="Search">
webElem <- remDr$findElement(using = 'xpath',
                             "/html/body/div/div[4]/div[1]/center/
                             table/tbody/tr/td/form/table/tbody/tr/td/input")
webElem$clickElement()
casper.then(function(){
    this.clickLabel('.interior-content.col-sm-8>center>table>tbody>tr>td>form>table>tbody>tr>td>input');
});
casper.then(function(){ 
    console.log('clicked search default search ok, new location is ' + this.getCurrentUrl());
}); 
dave@dbox:~$ casperjs --version 1.1.0-beta3 dave@dbox:~$ phantomjs --version 1.9.2
this.click(".interior-content.col-sm-8>center>table>tbody>tr>td>form>table>tbody>tr>td>input");