Quality Testing

Quality is delighting customers

Team,

I am new to Selenium and I have to write a small script for inserting different values into a text box, of any kind, namely  "E-mail ID" field, "Name" field or etc.

If any one can get me a script for this, it would be greatly appreciated.

Also, please direct me to how to use that script and where to use it..

I have just started learning the Selenium IDE as a start up..

Team, eagerly waiting for your valuable responses. Please help me..

Thank you,

Raj.

Views: 1022

Reply to This

Replies to This Discussion

Please send me your notes at my mail id chinna7292@gmail.com 

thanks,

Chinna

kiran pls share the same on solanki.madan89@gmail.com...am new to selenium...

Hi,

Please also send me the notes of selenium at mohit.khatri28@gmail.com

Hello,

Please send script  to me : mgtinagandhi@gmail.com

Regard,

Mugdha

Hi Kiran,

Please also send me the notes on selenium script at manukeerthi@gmail.com

Thanks in advance

hey kiran plz u also send me selenium IDE notes ...my email id is kavitabankar23689@gmail.com

Please send it to me as well at smita_jain78@yahoo.com

Hi Kiran.

Please send me some notes for Selenium RC if u have..

Here is my Email ID: narendrawh@gmail.com

Enviorment: Selenium WebDriver, MozillaFirefox V6 & above,
Eclipse: JRE Lib should have following jar files
1.selenium-server-standalone.jar,
2. selenium-java-client-driver.jar,
3. JUnit.jar
Script for Amazon :

import org.openqa.selenium.By;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.WebElement;
import org.openqa.selenium.firefox.FirefoxDriver;
import org.openqa.selenium.support.ui.WebDriverWait;

public class Amazon {
public static void main(String[] args) {
WebDriver driver = new FirefoxDriver();
try {
driver.get("http://www.amazon.com/");
new WebDriverWait(driver, 30000);
WebElement login = driver.findElement(By.xpath("//*[@id='navidWelcomeMsg']/span[2]/a"));
login.click();
driver.getTitle();
new WebDriverWait(driver, 30000);
WebElement userName = driver.findElement(By.id("ap_email"));
userName.sendKeys("ptc.techtest@gmail.com");
WebElement password = driver.findElement(By.id("ap_password"));
password.sendKeys("punepune123");
password.submit();
new WebDriverWait(driver, 30000);
WebElement Search = driver.findElement(By.id("twotabsearchtextbox"));
Search.sendKeys("500 GB Hard disk");
new WebDriverWait(driver, 10000);
WebElement SearchButton = driver.findElement(By.id("navGoButton"));
SearchButton.submit();
//new WebDriverWait(driver, 10000);
WebElement linkClick = driver.findElement(By.xpath("//*[@id='result_1']/div[3]/div[1]/a"));
linkClick.click();
new WebDriverWait(driver, 50000);
WebElement addToCartButton = driver.findElement(By.xpath("//*[@id='addToCartButton']"));
addToCartButton.click();
new WebDriverWait(driver, 30000);
WebElement proceedToCheckout = driver.findElement(By.id("hlb-next-steps"));
proceedToCheckout.click();
new WebDriverWait(driver, 30000);
driver.getTitle();
WebElement signinButton = driver.findElement(By.id("signInSubmit"));
signinButton.click();
new WebDriverWait(driver, 30000);
driver.getTitle();
WebElement shipToAddress = driver.findElement(By.xpath("//*[@id='existingaddresses']/div[1]/form/input[3]"));
shipToAddress.click();
new WebDriverWait(driver, 30000);
driver.getTitle();
WebElement continueToAddress = driver.findElement(By.xpath("//*[@id='continue']"));
continueToAddress.click();
new WebDriverWait(driver, 30000);

} finally {
driver.getTitle();
}
}

}

Attachments:

Hi Raj,

I have posted an attachment, it has text fields, link and so on. You should modify based on ur xpath or Ids...

Regards,

Ravi

RSS

TTWT Magazine


Advertisement

Advertisement

Advertisement

Advertisement

© 2020   Created by Quality Testing.   Powered by

Badges  |  Report an Issue  |  Terms of Service