Skip to content

While using .Click I'm getting error #13

Closed
@nareshdeee10

Description

image
I'm getting the above error while trying to automate google page search particularly while clicking the google search button.

Below is my code:
Sub Example3()
Set driver = New WebDriver

driver.Chrome "DriverPath\chromedriver.exe"
driver.OpenBrowser
driver.NavigateTo "https://www.google.com/"
driver.FindElement(By.name, "q").SendKeys "Cricket Live Score"
driver.FindElement(By.name, "btnK").Click  'Here I'm Getting the error while clicking
Debug.Print driver.FindElement(By.name, "btnK").GetAttribute("value") 'Here I'm not getting an error but I can able to the value

driver.CloseBrowser
driver.Quit
Set driver = Nothing

End Sub

Question - can you please assist me with how to use click and fix the issue.

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions