Selenium with Java Tutorial

Selenium Real Time Project code only for Rs 1000/- (No explanation)
[Will assist in configuration of project in eclipse and executing the project]

Selenium Real Time Project code and Explanation of code Rs 2000/-
[
  1. Will assist in configuration of project in eclipse and executing the project,
  2. Will explain how the code has been developed
  3. Will explain how the test frame work has been developed
  4. will explain how the TestNg, Maven, Jenkins and HTML reports has been used in the project
]

Core Java video tutorial with support: 4000 INR

Selenium WebDriver video tutorial with support: 4000 INR

Selenium and Java video tutorial with support: 6000 INR

Email to msrqatech@gmail.com if you need  the above:


Selenium WebDriver configuration in Eclipse IDE



Identifying the WebElements in Selenium





Sample Gmail Login programme with Selenium WebDriver




import org.openqa.selenium.By;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.chrome.ChromeDriver;
import org.openqa.selenium.firefox.FirefoxDriver;


public class GmailLoginTest {

/**
* @param args
*/
public static void main(String[] args) {
// TODO Auto-generated method stub
//WebDriver driver=new FirefoxDriver();
System.setProperty("webdriver.chrome.driver", "D:\\drivers\\chromedriver.exe");
WebDriver driver=new ChromeDriver();//Opens an empty instance of firefox browser
driver.manage().window().maximize();//Maximzes thr browser window
driver.get("https://www.gmail.com");//Navigate to the gmail page
driver.findElement(By.id("Email")).sendKeys("selenium123");
driver.findElement(By.id("Passwd")).sendKeys("sdsafa");
driver.findElement(By.id("signIn")).click();
driver.quit();

}

}

  Handling Drop down fields and radio buttons in selenium WebDriver (Day4)



import org.openqa.selenium.By;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.WebElement;
import org.openqa.selenium.firefox.FirefoxDriver;
import org.openqa.selenium.support.ui.Select;

public class FaceBookRegistration {

    /**
     * @param args
     */
    public static void main(String[] args) {
        // TODO Auto-generated method stub
        WebDriver driver=new FirefoxDriver();
        driver.get("https://www.facebook.com");
        driver.manage().window().maximize();
        driver.findElement(By.id("u_0_1")).sendKeys("selenium");
        driver.findElement(By.id("u_0_3")).sendKeys("selenium");
        driver.findElement(By.id("u_0_5")).sendKeys("selenium@gmail.com");
        driver.findElement(By.id("u_0_8")).sendKeys("selenium@gmail.com");
        driver.findElement(By.id("u_0_a")).sendKeys("selenium12345");
        new Select(driver.findElement(By.xpath("//*[@id='month']"))).selectByVisibleText("May");
        new Select(driver.findElement(By.name("birthday_day"))).selectByVisibleText("20");
        new Select(driver.findElement(By.id("year"))).selectByVisibleText("1985");      
        driver.findElement(By.xpath("//*[@id='u_0_e']")).click();
        driver.findElement(By.id("u_0_i")).click();

    }

}



 Retrieving the list of values present in a Drop down field using selenium WebDriver (Day5)



import java.util.List;
import org.openqa.selenium.By;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.WebElement;
import org.openqa.selenium.firefox.FirefoxDriver;


public class RetriviningTheValuesFromDropDown {

/**
* @param args
*/
public static void main(String[] args) {
// TODO Auto-generated method stub
WebDriver driver=new FirefoxDriver();
driver.manage().window().maximize();
driver.get("https://www.facebook.com");
WebElement monthdrop=driver.findElement(By.id("month"));
List<WebElement> months=monthdrop.findElements(By.tagName("option"));
for(int i=0;i<months.size();i++)
{
String value=months.get(i).getText();
System.out.println(value);
}
}
}

 Handling Alerts in selenium WebDriver (Day6)



import org.openqa.selenium.Alert;
import org.openqa.selenium.By;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.firefox.FirefoxDriver;


public class HandlingAlerts {

    /**
     * @param args
     * @throws InterruptedException
     */
    public static void main(String[] args) throws InterruptedException {
        // TODO Auto-generated method stub
        WebDriver driver=new FirefoxDriver();
        driver.get("http://www.ksrtc.in/");
        driver.manage().window().maximize();
        driver.findElement(By.id("matchStartPlace")).sendKeys("BANGAORE");
        driver.findElement(By.xpath("//*[@id='Table_3']/tbody/tr[1]/td[2]/div/a")).click();
        Thread.sleep(10000);
       Alert all= driver.switchTo().alert();
      System.out.println(all.getText());
       all.accept();

    }

}





8 Comments

  1. Java Online Training from India Java Online Training from India Core Java Training Online Core Java Training Online Java Training InstitutesJava Training Institutes

    ReplyDelete
  2. Learned a lot of new things from your post!Good creation ,It's amazing blog Java Online Training Hyderabad

    ReplyDelete
  3. Thanks For posting About The Concept Of integration In Java With the Selenium Web Driver Course.really thanks For posting About Java.

    ReplyDelete
  4. This comment has been removed by the author.

    ReplyDelete

  5. Great Post,really it was very helpful for us.
    Thanks a lot for sharing!
    I found this blog to be very useful!!
    Software testing training in Bangalore

    ReplyDelete