Search
 
 

Display results as :
 


Rechercher Advanced Search

Latest topics
» Regarding Alert Interface
Fri Feb 24, 2017 2:00 pm by karthikeyakumar

» Geting issues in identifying the elsements in webdriver
Fri Feb 17, 2017 4:41 pm by janbaskt

» WebDriver - why not to use a singlton for it?
Fri Feb 17, 2017 4:40 pm by janbaskt

» WebDriver session when using testng annotation to invoke driver instance
Fri Feb 17, 2017 4:39 pm by janbaskt

» Selenium fails to launch Chrome
Fri Feb 17, 2017 4:39 pm by janbaskt

» why do i get this error
Fri Feb 17, 2017 4:38 pm by janbaskt

» Selenium Tutorial
Thu Feb 16, 2017 5:21 pm by Rahul

» When to use Selenium IDE, RC and WebDriver
Mon Feb 13, 2017 2:35 pm by azharuddin

» How to integrate selenium with ZAPI-Zephyr
Sat Feb 11, 2017 2:25 am by gseera002c

Navigation
 Portal
 Index
 Memberlist
 Profile
 FAQ
 Search

EDIT TEXT AREA

View previous topic View next topic Go down

EDIT TEXT AREA

Post by kumar123 on Mon Sep 10, 2012 12:54 am

I want to edit text present in text area of a webpage and then updated text should appear in that webpage text area.

I have tried using below code, but i am getting htmlSource element not found exception.

driver.findElement(By.xpath("(//textarea[@id='htmlSource'])")).sendKeys("My text to your text edit");

can any one help me i have tried may ways used xpath, name, id etc but no help i got. Please help.
I am using selenium, testng scripts. JDK1.6

Regards,
kumar.

kumar123

Posts : 1
Join date : 2012-09-10

Back to top Go down

Re: EDIT TEXT AREA

Post by sreekumar on Wed Sep 12, 2012 3:13 pm

Kumar 123

First clear the text box and add the new text.

driver.findbyElement(By.xpath("").clear();

driver.findElement(By.xpath("(//textarea[@id='htmlSource'])")).sendKeys("My text to your text edit");

Now it will update new text every time in text box

sreekumar
Active particpant
Active particpant

Posts : 16
Join date : 2011-12-27
Age : 32
Location : Hyderabad

Back to top Go down

View previous topic View next topic Back to top

- Similar topics

 
Permissions in this forum:
You cannot reply to topics in this forum