Quality Testing

Quality is delighting customers

Anybody can give me xpath for textarea node in below HTML code

<li><div style="width: 255px;" unselectable="on"><div class=" nicEdit-panelContain" style="overflow: hidden; width: 100%; border: 1px solid rgb(204, 204, 204); background-color: rgb(239, 239, 239);" unselectable="on"></div></div><div style="width: 255px; border-width: 0pt 1px 1px; border-style: none solid solid; border-color: -moz-use-text-color rgb(204, 204, 204) rgb(204, 204, 204); overflow-y: auto; overflow-x: hidden;"><div class=" nicEdit-main " contenteditable="true" style="width: 247px; margin: 4px; min-height: 45px; overflow: hidden;"> </div></div><textarea id="tempVar8" name="City" style="display: none;"> </textarea></li>

Views: 4047

Reply to This

Replies to This Discussion




if text area's id is uniq





Thnaku Saritha ,I tried first solution but its not worked for me 

and also text area's id is unique but dynamically generated

Can you give me other options?

Please find the xpath of the text area below:



You can use xpather/firebug etc (firefox plugins) to verify your xpaths

Hi prabhu ,

The thing is  text area is inside text editor so to enter anything in to that field need to locate editor first then after text area i hope ,if am wrong pls correct me

I am using firebug to verify xpaths still unable to enter in to that feild


xpath=//html/body/div[3]/div/div[2]/div[3]/ul/form/li[37]/div[2]/div     from firedug

ya it may be..but if u have an id/name for the element we can directly use that name/id as the xpath of that element unless and until its is embedded in a iframe.


I think , U should take


type   //html/body/div[3]/div/div[2]/div[3]/ul/form/li[37]/div[2]/div/textarea       TEST

ya I tried still same problem
if ur using selenium, then try to record the action u want tod in ide and just see the xpath once. then u might have some idea

ya I tried with ide its getting recorded as


But still unable to enter in to that field


TTWT Magazine





© 2020   Created by Quality Testing.   Powered by

Badges  |  Report an Issue  |  Terms of Service