Thursday, 12 September 2013

How to Clear the Frame Work Boby

How to Clear the Frame Work Boby

Hi I am Working on the Selenium Web driver With TestNG Class, In My Web
Application I found small
Issue. In My Web Application Frame Work Body (Like Compose Box in Gmail),
In that Frame Work Body
Default Text Will be displaying, I need to Clear that Default Values in
the Frame Work and I need to
send the new Values in to the Frame Work Body, So I am using Below Code.
//Clearing the Values in the Body
//Entering the Cursor into the Body of the Text
driver.switchTo().frame(APL.MT_ET_FrameWork_Body_ID);
System.out.println("Entered the Cusor into the Body of the Text Box");
//Clicking the Cursor in the Frame Work Main Body.
driver.findElement(By.id(APL.MT_ET_MainBody_TxtBox_ID)).click();
System.out.println("Clicking the Cursor in the Body");
//Clearing the Frame Work Main Body
driver.findElement(By.id(APL.MT_ET_MainBody_TxtBox_ID)).clear();
System.out.println("Clearing the Values in the Body");
Note:- Here Frame Work Main Body is Not Clearing. So I need some Code and
I am using this Code also
But Not Working Fine. Below Three Options also not working fine.
//Clear the Frame Work Main Body by using Back_Space![enter image
description here][1] and Sending
Keys into that Frame Work
//driver.findElement(By.id(APL.MT_ET_MainBody_TxtBox_ID)).sendKeys(s16.getCell(1,j).BACK_SPACE);
//Clearing the Frame Work Main Body
//driver.findElement(By.tagName("//p")).clear();
//Clearing the Frame Work Main Body
// driver.findElement(By.tagName("//body/p")).clear();
// System.out.println("Clearing the Values in the Body");

No comments:

Post a Comment