Forum Posts

m.choyon.2128
Feb 19, 2022
In Thread Discussions
I pasted the installation code /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)" now its not proceeding after the lock screen
Maven for eclipse  content media
0
0
4
m.choyon.2128
Feb 19, 2022
In Thread Discussions
package Testing; import org.openqa.selenium.By; import org.openqa.selenium.WebDriver; import org.openqa.selenium.chrome.ChromeDriver; import org.testng.Assert; import org.testng.annotations.AfterMethod; import org.testng.annotations.BeforeMethod; import org.testng.annotations.DataProvider; import org.testng.annotations.Test; public class applelogt { WebDriver driver; @BeforeMethod public void setLogIn() { System.setProperty("webdriver.chrome.driver", "/Users/Mac/Desktop/Automation/Selenium/chromedriver "); driver = new ChromeDriver(); driver.manage().deleteAllCookies(); driver.manage().window().maximize(); } @Test (dataProvider="GetData") public void SiteRun(String username, String password) throws InterruptedException { driver.get("https://www.apple.com/"); Thread.sleep(2000); System.out.println("SUCCESSFULLY WEBSITE LOADED"); String website="APPLE.com"; System.out.println(website); String Choyon= driver.getTitle(); System.out.println("Tile is :"+ Choyon); Thread.sleep(3000); driver.findElement(By.xpath("/html/body/nav/div/ul[1]/li[3]/div/a")).click(); System.out.println("Cart is clicked"); Thread.sleep(2000); driver.findElement(By.xpath("/html/body/nav/div/aside[2]/div[2]/nav/ul/li[4]/a")).click(); System.out.println("Account is clicked"); Thread.sleep(2000); driver.findElement(By.xpath("/html/body/div[3]/apple-auth/div/div[1]/div/sign-in/div/div[1]/div[1]/div/div/div[1]/div/div/input")).click(); System.out.println("Sign in space clicked"); Thread.sleep(2000); driver.findElement(By.xpath("/html/body/div[3]/apple-auth/div/div[1]/div/sign-in/div/div[1]/div[1]/div/div/div[1]/div/div/input")).clear(); System.out.println("SignIn Space cleared"); Thread.sleep(2000); driver.findElement(By.xpath("/html/body/div[3]/apple-auth/div/div[1]/div/sign-in/div/div[1]/div[1]/div/div/div[1]/div/div/input")).click(); System.out.println("Sign in space clicked"); Thread.sleep(2000); driver.findElement(By.xpath("/html/body/div[3]/apple-auth/div/div[1]/div/sign-in/div/div[1]/div[1]/div/div/div[1]/div/div/input")).sendKeys(username); Thread.sleep(2000); System.out.println("User Name is :" + username ); driver.findElement(By.xpath("/html/body/div[3]/apple-auth/div/div[1]/div/sign-in/div/div[1]/button[1]")).click(); Thread.sleep(2000); System.out.println("Login button clicked"); //password Xpath // /html/body/div[3]/apple-auth/div/div[1]/div/sign-in/div/div[1]/div[1]/div/div/div[2]/div/div/input driver.findElement(By.xpath("/html/body/div[3]/apple-auth/div/div[1]/div/sign-in/div/div[1]/div[1]/div/div/div[2]/div/div/input")).sendKeys(password); Thread.sleep(2000); System.out.println("Password entered"); driver.findElement(By.xpath("/html/body/div[3]/apple-auth/div/div[1]/div/sign-in/div/div[1]/button[1]")).click(); Thread.sleep(2000); System.out.println(" After Password OK button clicked "); } @AfterMethod public void close() { driver.close(); } @DataProvider public Object[] [] GetData() { Object[] [] vipdata = new Object[3][2]; vipdata[0][0]="choyon58@gmail.com"; vipdata[0][1]= "choyon1234"; vipdata[1][0]="innsire2"; vipdata[1][1]="innsireagain345"; vipdata[2][0]="choyoninnsire3"; vipdata[2][1]="innsireagain678"; return vipdata; } /* @Test public void zelle() { Assert.assertTrue(false); } */ }

2/19 
FAILED CONFIGURATION: @BeforeMethod setLogIn content media
0
0
8

m.choyon.2128

More actions

IT Consulting, Training and Job Placement services