I'm trying to automate login with Rselenium in Rstudio please see below
remote_driver <- rsDriver(browser = "firefox",
geckover = "0.33.0",
verbose = FALSE,
port = 4457L)
# Assign the remote driver object to a variable
driver <- remote_driver[["client"]]
I can easily locate the username
and the userID
without any error:
Sys.sleep(2)
reseller_id_input <- driver$findElement(using = 'id', "gwt-debug-Reseller_ID")
# Supply a value to the input field (e.g., "your_reseller_id")
reseller_id_input$sendKeysToElement(list("Napset"))
user_id_input <- driver$findElement(using = 'xpath', "//div[contains(text(),'User ID:')]//following::input[1]")
#Supply a value to the input field (e.g., "your_user_id")
user_id_input$sendKeysToElement(list("Yodigzy"))
The problem is the password part, when I locate the password field and send in password text, it doesn't reflect in the password field and does not show or display any error:
#Locate the Password input field
password_field <- driver$findElement(using = "id", value = "gwt-debug-Password")
password_field$sendKeysToElement(list("your-password"))
Without this password, I can't proceed to login. Is there any logic behind this or what? I really need help with this.
Thanks