Maven pom xml file issue USING SELEINUM WebDriver using Firfox

0 votes

I was automating the Mozilla Firefoz using Selenium Webdirver but
I was facing issue in the in Maven pom.xml file to create a project, which then can be imported into Eclipse.


I used the example which was on this
site http://docs.seleniumhq.org/docs/03_webdriver.jsp#introducing-webdriver  for opera browser

<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
             xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
             xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
    <modelVersion>4.0.0</modelVersion>
    <groupId>MySel20Proj</groupId>
    <artifactId>MySel20Proj</artifactId>
    <version>1.0</version>
    <dependencies>
        <dependency>
            <groupId>org.seleniumhq.selenium</groupId>
            <artifactId>selenium-java</artifactId>
            <version>2.28.0</version>
        </dependency>
        <dependency>
            <groupId>com.opera</groupId>
            <artifactId>operadriver</artifactId>
        </dependency>
    </dependencies>
    <dependencyManagement>
        <dependencies>
            <dependency>
                <groupId>com.opera</groupId>
                <artifactId>operadriver</artifactId>
                <version>1.1</version>
                <exclusions>
                    <exclusion>
                        <groupId>org.seleniumhq.selenium</groupId>
                        <artifactId>selenium-remote-driver</artifactId>
                    </exclusion>
                </exclusions>
            </dependency>
        </dependencies>
    </dependencyManagement>
</project>

How can I use it for Mozilla Firefoz ??

Apr 3, 2018 in Selenium by kurt_cobain
• 9,350 points
1,607 views

1 answer to this question.

0 votes
You don't need to change anything in your pom from because
in selenium-java dependency you get all java bindings for all browsers.But the only
thing that would change is your driver initialization code,  which is driver = new FirefoxDriver() instead of OperaDriver.
answered Apr 3, 2018 by ned_crew
• 1,610 points

Related Questions In Selenium

0 votes
1 answer

How can I download the *.jar file from http:// seleniumhq.org using selenium WebDriver?

For Selenium Standalone Server use this: profile.setPreference("browser.helperApps.neverAsk.saveToDisk", "application/java-archive"); and ...READ MORE

answered Apr 9, 2018 in Selenium by Martin
• 4,320 points
3,525 views
0 votes
1 answer
0 votes
1 answer

Downloading *.jar file from http:// seleniumhq.org using Selenium WebDriver

For Selenium Standalone Server: profile.setPreference("browser.helperApps.neverAsk.saveToDisk", "application/java-archive"); If downloading ...READ MORE

answered Apr 17, 2018 in Selenium by Shubham
• 13,490 points
6,267 views
0 votes
1 answer

Reading the pdf file using selenium webdriver

Use should use PDFBox and FontBox. ...READ MORE

answered Apr 25, 2018 in Selenium by Vardy
• 2,360 points
7,867 views
0 votes
1 answer

Uploading File using Selenium WebDriver

Make sure that the input element is visible ...READ MORE

answered May 2, 2018 in Selenium by Meci Matt
• 9,460 points
1,405 views
0 votes
1 answer
0 votes
2 answers

Finding WebDriver element with Class Name in java

The better way to handle this element ...READ MORE

answered Apr 10, 2018 in Selenium by nsv999
• 5,500 points
13,649 views
0 votes
2 answers

Problem while using InternetExplorerDriver in Selenium WebDriver

enable trusted connection  in internet explorer by ...READ MORE

answered Aug 31, 2020 in Selenium by Sri
• 3,190 points
9,131 views
0 votes
1 answer

Geo-location microphone camera pop up

To Allow or Block the notification, access using Selenium and you have to ...READ MORE

answered May 11, 2018 in Selenium by Samarpit
• 5,910 points
7,209 views
0 votes
2 answers

How to use such xpath to find web elements

xpath are two types. 1) Absolute XPath:    /html/b ...READ MORE

answered Sep 3, 2020 in Selenium by Sri
• 3,190 points
7,865 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP