0% found this document useful (0 votes)
3 views2 pages

Selenium Task

The document is a Java class named CBAProject that automates the registration process for a website using Selenium WebDriver. It includes methods to navigate through the registration form, fill in user details, and submit the form. The main method initializes the registration process by creating an instance of the CBAProject class and calling the cbaRegistration method.

Uploaded by

senthilviv
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
3 views2 pages

Selenium Task

The document is a Java class named CBAProject that automates the registration process for a website using Selenium WebDriver. It includes methods to navigate through the registration form, fill in user details, and submit the form. The main method initializes the registration process by creating an instance of the CBAProject class and calling the cbaRegistration method.

Uploaded by

senthilviv
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd

package javapackage.

SampleProject;

import [Link];

import [Link];
import [Link];
import [Link];
import [Link];

public class CBAProject {

public void cbaRegistration(){

[Link]("[Link]", "D:\\Selenium\\
[Link]");
WebDriver driver=new ChromeDriver();

[Link]("[Link]
[Link]");
[Link]().window().maximize();
[Link]().timeouts().implicitlyWait(10, [Link]);

[Link]().frame("frmRegistration");
[Link]([Link]("//*[@id=\"form1\"]/div[1]/div[1]/div/
a")).click();
[Link]("Clicked Registration Button");

[Link]([Link]("//*[@id=\"btnNext\"]")).click();
[Link]("Clicked Lets Go Button");

[Link]([Link]("//*[@id=\"chkTerms\"]")).click();
[Link]("Checked terms & Conditions");

[Link]([Link]("//*[@id=\"btnSubmit\"]")).click();
[Link]("Clicked Next Button");

[Link]([Link]("//*[@id=\"txtUserName\"]")).sendKeys("Senthilkumar");
[Link]("Entered userName");

[Link]([Link]("//*[@id=\"txtPassword\"]")).sendKeys("Password");
[Link]("Entered Password");

[Link]([Link]("//*[@id=\"txtReenterPassword\"]")).sendKeys("Password"
);
[Link]("Re-entered Password");

Select dropDown = new Select([Link]([Link]("ddlSecret1")));


[Link]("What is your favourite colour ?");

[Link]([Link]("//*[@id=\"txtSecret1\"]")).sendKeys("Green");

Select dropDown1 = new Select([Link]([Link]("ddlSecret2")));


[Link]("What is your favourite sports team ?");
[Link]([Link]("//*[@id=\"txtSecret2\"]")).sendKeys("Team
India");

[Link]("Entered all the mandatory details");

[Link]([Link]("//*[@id=\"btnSubmit\"]")).click();
[Link]("Clicked submit button");
}

public static void main(String args []) {


CBAProject task = new CBAProject();
[Link]();
}
}

You might also like