0

I would like to know if there are complete tutorials on Selenium web driver. I am using the IDE to record test cases and exporting them as junit/webdriverbacked to eclipse. I have just started using selenium. So, can you help me find some more detailed and advanced tutorials. Most of the test cases work just fine with FF but its not always the case when i use IE and at times i get varying result for the same test case(no modification made).

Kiara
  • 25
  • 7

2 Answers2

1

This is a very good compendium.

That's all, sry

Franz Ebner
  • 4,951
  • 3
  • 39
  • 57
0

5minutes manual.getting started with selenium .see here

about setting up IE driver you can get here

common idea of setting up IDE for selenium tests: 1) i use IDEA + maven 2) so you simply create maven project + add appropriate dependency in local pom file:

<dependency>

org.seleniumhq.selenium selenium-java 2.24.1

then maven automatically suggest autoimport of all the needed. Then you can simply pass you code you generated by selenium IDE in approptiate java file(e.g):

import com.thoughtworks.selenium.SeleneseTestBase;
import org.junit.After;
import org.junit.Before;
import org.junit.BeforeClass;
import org.junit.Test;
import org.openqa.selenium.By;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.WebElement;
import org.openqa.selenium.firefox.FirefoxDriver;

import java.util.concurrent.TimeUnit;

public class HomePageTest extends SeleneseTestBase{

static WebDriver driver;

@Before
public void openFirefox(){

driver = new FirefoxDriver();
driver.manage().timeouts().implicitlyWait(5, TimeUnit.SECONDS);

}

@Test
public void testHomePage(){
driver.get("https://www.google.by/");
WebElement search = driver.findElement(By.xpath("//*[@id=\"gbqfq\"]"));
search.sendKeys("laptop");
search.submit();

}

@After
public void closeFirefox(){
// driver.quit();
}

}

And run the test. enjoy)

Community
  • 1
  • 1
eugene.polschikov
  • 7,254
  • 2
  • 31
  • 44