problèmes avec l'import de selenium
Bonjour, à tous.
Avant tout une petite présentation de mes "talents" je suis un absolute beginner en java. Cependant j'ai de très bonne notions de C, fortran, matlab et algorithmique en général. je programme sur mac.
J'essaye de développer un programme me permettant de simuler une connection sur un site internet (dans mon exemple wikipédia) er de reproduire mes clics et écritures.
Pour simuler mon action sur le site internet j'utilise un add-on sur firefox qui s'appelle katalon.
Sur eclipse j'ai ajouté les librairies junit, selenuim server stand alone et, client combined.
mon problème est le suivant:
The package org.openqa.selenium is accessible from more than one module: okio,
org.openqa.selenium.core
Merci à vous pour votre aide !
pour info voici mes commandes:
Code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32
| import java.util.regex.Pattern;
import java.util.concurrent.TimeUnit;
import org.junit.*;
import static org.junit.Assert.*;
import static org.hamcrest.CoreMatchers.*;
import org.openqa.selenium.*;
import org.openqa.selenium.firefox.FirefoxDriver;
import org.openqa.selenium.support.ui.Select;
public class TestWiki {
private WebDriver driver;
private String baseUrl;
private boolean acceptNextAlert = true;
private StringBuffer verificationErrors = new StringBuffer();
@Before
public void setUp() throws Exception {
driver = new FirefoxDriver();
baseUrl = "https://www.katalon.com/";
driver.manage().timeouts().implicitlyWait(30, TimeUnit.SECONDS);
}
@Test
public void testWiki() throws Exception {
driver.get("https://www.google.com/search?client=firefox-b-d&q=wikipedia");
driver.findElement(By.xpath("(.//*[normalize-space(text()) and normalize-space(.)='Résultats Web'])[1]/following::h3[1]")).click();
driver.findElement(By.id("searchInput")).click();
driver.findElement(By.id("searchInput")).clear();
driver.findElement(By.id("searchInput")).sendKeys("test d");
driver.findElement(By.xpath("(.//*[normalize-space(text()) and normalize-space(.)='Version mobile'])[1]/following::div[4]")).click();
driver.findElement(By.xpath("(.//*[normalize-space(text()) and normalize-space(.)='Description'])[1]/following::span[2]")).click();
} |