I am new in using RSelenium
, I wanted to simply click a load data button and then click the generated CSV from a webpage, but I cant find the element properly, here is what I do:
library(RSelenium)
library(dplyr)
library(tidyverse)
mydriver <- rsDriver(browser = "chrome", port= 4837L, chromever="93.0.4577.63")
remDr <- mydriver[['client']]
remDr$open()
link_download <- "https://forexsb.com/historical-forex-data"
remDr$navigate(link_download)
These are several ways of what I use to select the load data button, but produce No Such Element Found
:
load_data_element <- remDr$findElement(using="css selector", value="#btn btn-primary")
load_data_element$clickElement()
load_data_element <- remDr$findElement(using="css selector", value=".btn-load-data")
load_data_element$clickElement()
load_data_element <- remDr$findElement(using="xpath", value="//button[@id='btn-load-data']")
load_data_element$clickElement()
load_data_element <- remDr$findElement(using="xpath", value="//*[@id='btn-load-data']")
load_data_element$clickElement()
And this is The Only Selector which found some element, but still nothing happen when it is clicked:
load_data_element <- remDr$findElement(using="xpath", value="//button")
load_data_element$clickElement()
Any guide will be helpful, Thankyou!