I'm running an automated test on my wordpress
website using selenium wrapper (through VBA).
When the login button is clicked, I get this error:
ERROR: Cookies are blocked or not supported by your browser
I've changed the settings in IE to accept all cookies. Chrome does accept cookies by default but for some reason, this doesn't seem to work. Could it be the user agent?
My wordpress version is 4.5
'Login code
Sub InitiateLogin()
web_driver.get "wp-login", -1, False
web_driver.findElementById(Base64DecodeString("STUFFHERE")).SendKeys Base64DecodeString("STUFFHERE")
web_driver.findElementById(Base64DecodeString("STUFFHERE")).SendKeys Base64DecodeString("STUFFHERE")
web_driver.findElementById("wp-submit").Click
web_driver.setTimeout ("120000")
web_driver.setImplicitWait (5000)
End Sub
I was able to login to the account without issues using the below code.
Private driver As SeleniumWrapper.WebDriver
Private Sub Login()
Set driver = New SeleniumWrapper.WebDriver
Call driver.Start("chrome", "https://wordpress.com/")
driver.get ("/wp-login.php")
driver.findElementById("user_login").Clear
driver.findElementById("user_login").SendKeys "your userid here"
driver.findElementById("user_pass").Clear
driver.findElementById("user_pass").SendKeys "your password here"
driver.findElementById("wp-submit").Click
End Sub
Hope this helps.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With