0

I'm trying to login in on this site and I am succesful on entering my login information, using the code below (without my own info ofcourse). However, I have not been successful in pressing the login bottum. Doing it manually, pressing the enter key also works.

I have included some of the code i have tried with out succes in the bottum.

I hope someone can point me in the right direction.

remDr$navigate("https://www.virtualmanager.com/da/login")
username <- remDr$findElement(using = "xpath",value='//*[(@id = "email")]')
username$sendKeysToElement(list("myemail@thisisafakeemail.com"))
password <- remDr$findElement(using = "id",value="password")
password$sendKeysToElement(list("mypassword"))

#remDr$sendKeysToActiveElement(list(key = "enter"))
#login <- remDr$findElement(using = "xpath",value="//input")
#login$sendKeysToElement(list("laptops",key="enter"))
#login$clickElement()
#remDr$findElement(using = "xpath",value="//input")$clickElement()
#remDr$mouseMoveToLocation(webElement = login)
#login$click()
undetected Selenium
  • 183,867
  • 41
  • 278
  • 352

1 Answers1

0

To click() on the element Login you can use either of the following locator strategies:

  • Using css_selector:

    login <- remDr$findElement(using = "css selector",value="input[name='loginbtn'][value='Login']")
    login$clickElement()
    
  • Using xpath:

    login <- remDr$findElement(using = "xpath",value="//input[@name='loginbtn' and @value='Login']")
    login$clickElement()
    

Reference

Package ‘RSelenium’

undetected Selenium
  • 183,867
  • 41
  • 278
  • 352