Monday, September 6, 2010

Getting selenium request ,response

Programmer Question

i tried the below code but req/response is not captured??



String trafficOutput = selenium.captureNetworkTraffic("xml");
selenium.type("q", "selenium rc");
selenium.click("btnG");
selenium.waitForPageToLoad("30000");

selenium.open("/#hl=en&source=hp&q=selenium+rc&btnG=Google
+Search&aq=f&aqi=&aql=&oq=&gs_rfai=&fp=ff64793e1cab64b9");
selenium.click("//ol[@id='rso']/li[1]/h3/a/em");
selenium.waitForPageToLoad("30000");
selenium.click("link=Selenium Core");
selenium.waitForPageToLoad("30000");
selenium.click("link=our documentation");
selenium.waitForPageToLoad("30000");
selenium.click("link=Projects");
selenium.waitForPageToLoad("30000");
// assertTrue(selenium.isTextPresent("Results * for selenium
rc"));

String resposneText = selenium.getHtmlSource();
DataOutputStream dos = new DataOutputStream(new
FileOutputStream("output", true));

System.out.println("value is-------- "+trafficOutput);
System.out.println("val is "+resposneText);

dos.writeBytes(trafficOutput);
dos.close();


but no req/response this case?? getting value for
System.out.println("val is "+resposneText);



Find the answer here

No comments:

Post a Comment

LinkWithin

Related Posts with Thumbnails