我正在尝试滚动直到页面上可见某个元素,以便Selenium可以双击该元素。如果该元素不可见,我将继续收到“ Selenium消息:(189,2887)超出视口宽度(1600)和高度(803)的范围”的错误消息。
#Navigating to Webpage for Mechanical Air Conditioner
url <- "https://www.walmart.com/ip/GE-5-000-BTU-Mechanical-Air-Conditioner-AET05LY/993795463"
rD <- rsDriver(browser = "firefox")
remDr <- rD$client
remDr$open() #Open Browser
#remDr$getStatus
remDr$navigate(url) #Navigate to WalMart Page
#Select See all Reviews
see_all_select_Elem <- remDr$findElement(using = "class name", value = "ReviewsHeader-seeAll") #Find Select All Reviews Button
see_all_select_loc <- remDr$mouseMoveToLocation (webElement = see_all_select_Elem) #Hover mouse over select All Reviews Button
see_all_select <- remDr$doubleclick(buttonId = 'LEFT') #Double Click Select All Reviews Button
如何使Selenium滚动直到see_all_select_Elem可见,以便双击功能起作用。