- Get link
- Other Apps
Video Tutorial link https://youtu.be/oQ4-HjhCbis
package testNGExamples;
import org.testng.annotations.Test;
import org.testng.annotations.BeforeTest;
import org.openqa.selenium.By;
import org.openqa.selenium.Keys;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.chrome.ChromeDriver;
import org.testng.Assert;
import org.testng.annotations.AfterTest;
public class BingTest {
WebDriver driver;
@Test
public void bingTitleVerification() {
driver.get("http://bing.com");
Assert.assertEquals(driver.getTitle(), "Bing India");
}
@Test(dependsOnMethods="bingTitleVerification")
public void searchVerification() {
driver.findElement(By.name("q")).sendKeys("magnetic automation");
driver.findElement(By.name("q")).sendKeys(Keys.ENTER);
Assert.assertEquals(driver.getTitle(), "magnetic automation - Bing");
}
@BeforeTest
public void beforeTest() {
System.setProperty("webdriver.chrome.driver",
"C:\\Users\\mprem\\OneDrive\\Desktop\\SelJars\\chromedriver_win32\\chromedriver.exe");
driver = new ChromeDriver();
}
@AfterTest
public void afterTest() {
driver.quit();
}
}
- Get link
- Other Apps
Comments
Fantastic to read this blog. Thanks you so much for sharing this kind of article.
ReplyDeletePython Classes in Chennai
Python Classes Near Me
Best Python Training in Bangalore
Great post!!! Thanks for sharing this wonderful blog with us...
ReplyDeleteSEO Training in Chennai
SEO Course Online
SEO Training in Bangalore
SEO Training in Coimbatore
This post is so interactive and informative.keep updating more information...
ReplyDeleteETL tools
Python
valuable blog,Informative content...thanks for sharing, Waiting for the next update…
ReplyDeleteWhat is google flutter?
Benefits of Flutter
Really an informative blog...Thanks for sharing an informative article with us.
ReplyDeleteToefl Coaching in Madurai
Toefl Training in Madurai