Sie sind auf Seite 1von 2

package co.in.edureka.

assignment1;

import java.awt.RenderingHints.Key;
import java.util.concurrent.TimeUnit;

import org.openqa.selenium.By;
import org.openqa.selenium.Keys;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.WebElement;
import org.openqa.selenium.chrome.ChromeDriver;
import org.openqa.selenium.interactions.Actions;
import org.openqa.selenium.support.ui.ExpectedCondition;
import org.openqa.selenium.support.ui.ExpectedConditions;
import org.openqa.selenium.support.ui.WebDriverWait;

public class CaseStudyModule5


{
public static WebDriver driver=null;
public static WebDriverWait wait=null;

public static void main(String[] args) throws InterruptedException {

System.setProperty("webdriver.chrome.driver",
".//Drivers//chromedriver.exe");
driver= new ChromeDriver();
driver.manage().window().maximize();
driver.manage().timeouts().implicitlyWait(20,TimeUnit.SECONDS);
driver.navigate().to("https://www.edureka.co/");

driver.findElement(By.xpath("//a[text()='Log In' and


@href='javascript:void(0);']")).click();
WebElement email=driver.findElement(By.id("si_popup_email"));
wait=new WebDriverWait(driver,30);
Thread.sleep(2000);

wait.until(ExpectedConditions.elementToBeClickable(email)).sendKeys("neha.tyagi1909
@gmail.com");
driver.findElement(By.id("si_popup_passwd")).sendKeys("Neha@127");
driver.findElement(By.xpath("//button[text()='Login']")).click();

wait.until(ExpectedConditions.titleContains("Instructor-Led Online
Training "));
Thread.sleep(2000);
driver.findElement(By.className("webinar-profile-name")).click();
driver.findElement(By.xpath("//a[text()='My Profile']")).click();

driver.findElement(By.xpath("(//i[@class='icon-pr-edit'])
[2]")).click();
driver.findElement(By.xpath("//a[@aria-
controls='personalDetails']")).click();

Thread.sleep(1000);

WebElement CurrentRole=
driver.findElement(By.xpath("//input[@name='currentrole' and @type='text']"));
Actions action=new Actions(driver);
wait.until(ExpectedConditions.elementToBeClickable(CurrentRole)).click();

action.moveToElement(CurrentRole).sendKeys(Keys.CONTROL +
"a").sendKeys(Keys.DELETE).build().perform();
driver.findElement(By.xpath("//a[text()='Manual Tester']")).click();

WebElement tick= driver.findElement(By.xpath("(//i[@class='icon-


Lms_upload-success'])[5]"));

wait.until(ExpectedConditions.visibilityOf(tick));

wait.until(ExpectedConditions.visibilityOfElementLocated(By.xpath("//button[text()=
'Continue']"))).click();

/*
* WebElement loader= driver.findElement(By.className("editloader"));
* wait.until(ExpectedConditions.invisibilityOf(loader));
*/
/*river.navigate().back();
Thread.sleep(1000);
driver.navigate().back();*/
WebElement
arrow=driver.findElement(By.xpath("//div[@class='loaderbackoverlay']"));
wait.until(ExpectedConditions.elementToBeClickable(arrow)).click();

driver.findElement(By.className("user_name")).click();
driver.findElement(By.xpath("//a[text()='Log Out']")).click();

driver.quit();

Das könnte Ihnen auch gefallen