使用以下代码,我能够使浏览器选择2014/15赛季。您将需要检查各种下拉菜单的内容,并根据需要进行扩展。
rD <- rsDriver(port=4444L,browser="chrome")remDr <- rD$client#navigate to main pageremDr$navigate('https://www.premierleague.com/stats/top/players/total_pass')#find 'filter by season' box and click itwebElem <- remDr$findElement(using = 'xpath', value = "//*[@data-dropdown-block='FOOTBALL_COMPSEASON']")webElem$clickElement()#find 2014/15 season and click itwebElem1 <- remDr$findElement(using = 'xpath', value = "//*[@data-option-name='2014/15']")webElem1$clickElement()
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)