Selenium tips and tricks

How to solve WebDriverException: f.QueryInterface is not a function

Hello, Welcome to Selenium tutorial, today we will discuss how to solve WebDriverException: f.QueryInterface is not a function.

You will get this exception frequently while working with Selenium so we will discuss this exception in detail.

Please refer below post if you are new in Selenium.

1- How to handle exception in Selenium.

2- Different Run time exception in Selenium.

We have get method in Selenium to open particular URL.

driver.get(“www.google.com”);

 

If you run above program then you will get below exception:

Exception in thread “main” org.openqa.selenium.WebDriverException: f.QueryInterface is not a function
Command duration or timeout: 62 milliseconds.

WebDriverException: f.QueryInterface is not a function

WebDriverException: f.QueryInterface is not a function

 

 

 

WebDriverException: f.QueryInterface is not a function

While passing URL in Selenium we have to pass protocol as well so that Selenium can understand which protocol to use while communicating.

There are so many protocols available some of them are

FTP, SMTP, HTTP etc.

 

Solution:

While passing URL we have to mention HTTP also.

driver.get(“http://www.learn-automation.com”);

Thanks for visiting. Please share this article with other if you find this article interesting.

Have a nice day 🙂

Like Facebook Page for more updates-Learn-Automation facebook page

Join Selenium Group for discussion and queries- Learn-Automation group

 

 

author-avatar

About Mukesh Otwani

I am Mukesh Otwani working professional in a beautiful city Bangalore India. I completed by BE from RGPV university Bhopal. I have passion towards automation testing since couple of years I started with Selenium then I got chance to work with other tools like Maven, Ant, Git, GitHub, Jenkins, Sikuli, Selenium Builder etc.

Related Posts

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.