JARS for using Selenium class functions in code

0 votes

As of now, I've included three JARS for executing the tests (with Java) recorded.  

junit-4.10.jar
selenium-java-2.24.1.jar
selenium-server-standalone-2.24.1.jar

Inspite of importing the following packages, I'm not able to access Selenium class functions like getAlert() or getConfirmation().

import org.junit.After;
import static org.junit.Assert.fail;
import org.junit.Before;
import org.junit.Test;
import com.thoughtworks.selenium.Selenium;
import java.util.NoSuchElementException;
import java.util.concurrent.TimeUnit;
import org.openqa.selenium.WebElement;
import org.openqa.selenium.firefox.FirefoxDriver;
import org.openqa.selenium.Alert;
import org.openqa.selenium.By;
import org.openqa.selenium.htmlunit.HtmlUnitDriver;
import org.openqa.selenium.support.ui.Select;
import org.openqa.selenium.NoAlertPresentException;
import org.openqa.selenium.WebDriver;

So are there any library files or JAR files that I have missed out to add?

Apr 12, 2018 in Selenium by kappa3010
• 2,020 points
188 views

1 answer to this question.

0 votes
Yup. I'm not sure, exactly which JARS contain which package functions..So just download all the JARS from this link and get it added to your library path: https://www.seleniumhq.org/download/
answered Apr 12, 2018 by nsv999
• 5,090 points

Related Questions In Selenium

0 votes
1 answer

Identifying the page iframe in Selenium using Java Code

Open the page in a browser and ...READ MORE

answered May 24, 2018 in Selenium by Samarpit
• 5,130 points
99 views
0 votes
1 answer

How to wait for the webpage to load in selenium using java

Firstly, when you launch a web application, ...READ MORE

answered Aug 28, 2018 in Selenium by bug_seeker
• 15,350 points
172 views
+2 votes
1 answer
0 votes
1 answer
0 votes
1 answer

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,090 points
584 views
0 votes
1 answer
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,130 points
898 views
0 votes
1 answer

How to use such xpath to find web elements

It's much simpler to use: #MyDiv123 > div.super or ...READ MORE

answered Jun 14, 2018 in Selenium by Samarpit
• 5,130 points
572 views
0 votes
1 answer

What's the difference between functions getClass() and getAttribute(“class”) in Selenium?

The simple difference is that, getClass() returns ...READ MORE

answered Apr 7, 2018 in Selenium by nsv999
• 5,090 points
3,063 views
0 votes
3 answers

How to specify "ENTER" button functionality in Selenium WebDriver code?

using OpenQA.Selenium.Interactions; Actions builder = new Actions(driver); ...READ MORE

answered Feb 12 in Selenium by anonymous
8,944 views