Giter Site home page Giter Site logo

demo1's Introduction

package demo1;

import org.testng.annotations.Test; import org.testng.annotations.BeforeMethod; import org.testng.annotations.AfterMethod; import org.testng.annotations.BeforeClass; import org.openqa.selenium.By; import org.openqa.selenium.WebDriver; import org.openqa.selenium.chrome.ChromeDriver; import org.openqa.selenium.support.ui.Select;

public class NewTest {

 public static WebDriver driver ; 

@BeforeClass public void beforeClass() throws InterruptedException { System.setProperty("webdriver.chrome.driver", "/home/nadsoft34/Desktop/chromedriver"); driver = new ChromeDriver();
driver.manage().window().maximize(); driver.get("https://maxincomesystem.com/registration"); //Thread.sleep(8000); }

@BeforeMethod public void beforeMethod() throws InterruptedException { Thread.sleep(1000); }

@AfterMethod public void afterMethod() throws InterruptedException { Thread.sleep(1000); }

@Test public void f() { System.out.println("Hi test"); driver.findElement(By.xpath("/html/body/div[1]/div[8]/div/div[2]/div/div/div[1]/input")).sendKeys("Ziaqa10"); driver.findElement(By.xpath("/html/body/div[1]/div[8]/div/div[2]/div/div/div[2]/input")).sendKeys("Nadsoft"); driver.findElement(By.xpath("/html/body/div[1]/div[8]/div/div[2]/div/div/div[3]/input")).sendKeys("[email protected]"); driver.findElement(By.xpath("/html/body/div[1]/div[8]/div/div[2]/div/div/div[4]/input")).sendKeys("7020903936"); driver.findElement(By.xpath("/html/body/div[1]/div[8]/div/div[2]/div/div/div[5]/input")).sendKeys("Pune"); driver.findElement(By.xpath("/html/body/div[1]/div[8]/div/div[2]/div/div/div[6]/input")).sendKeys("Pune"); driver.findElement(By.xpath("/html/body/div[1]/div[8]/div/div[2]/div/div/div[7]/input")).sendKeys("Pune"); driver.findElement(By.xpath("/html/body/div[1]/div[8]/div/div[2]/div/div/div[7]/input")).sendKeys("MH"); // driver.findElement(By.xpath("/html/body/div[1]/div[8]/div/div[2]/div/div/div[8]/label/select")).click(); Select drpCountry = new Select(driver.findElement(By.xpath("/html/body/div[1]/div[8]/div/div[2]/div/div/div[8]/label/select"))); drpCountry.selectByVisibleText("India"); driver.findElement(By.xpath("/html/body/div[1]/div[8]/div/div[2]/div/div/div[9]/a")).click();

} }

demo1's People

Contributors

zia12527 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.