Testing tricks is a blog related to software testing. (Anyone who is interested to write articles or want to share their experience regarding Software Testing are Welcome.) Currently I am working as a Project Manager in QA in Birlasoft. My total experience is in US GL, Property & Casualty & little in Commercial Auto. Working in GWPC with integration as SAP for FSCD & RI shinde.of.santosh@gmail.com
Friday, May 4, 2012
code for searching images from google using Selenium Rc
code for searching images from Google using Selenium RC and Eclipse
package tests;
import com.thoughtworks.selenium.*;
import java.util.regex.Pattern;
class SearchImages{
public static Selenium selenium = null;
public static void testUntitled() throws Exception {
selenium = new DefaultSelenium("localhost", 4444, "*chrome", "http://www.google.co.in//");
selenium.start();
selenium.open("//");
selenium.click("css=#gb_2 > span.gbts");
selenium.waitForPageToLoad("30000");
selenium.type("id=lst-ib", "ram");
selenium.click("name=btnG");
selenium.waitForPageToLoad("50000");
selenium.click("css=i.close_btn");
selenium.waitForPageToLoad("50000");
}
public static void main(String args[]){
try {
SearchImages.testUntitled();
} catch (Exception e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
}
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment