dom - Access specific text in body that has no tag -


this dom of page,

<html>     <head>     <body>         <div id="content">         take/o a/o look/o at/o the/o section/o about/o filling/o in/o forms/o   using/o         <div id="footer">     </body> </html> 

i want access text not under tag body after <div id="content"> , before <div id="footer"> in page body.

i tried:

  1. drv.findelement(( by.xpath("//html/body"))).gettext(); give me full text in page under body tag.

  2. drv.findelement(( by.xpath("//html/body/data"))) // error unable locate element

now can use following preceding xpath option, doubt tag in page?

from wording, assume mean html code, closed head , div tags:

<html>     <head></head>     <body>         <div id="content"></div>         take/o a/o look/o at/o the/o section/o about/o filling/o in/o forms/o   using/o         <div id="footer"></div>     </body> </html> 

in case, answer of question, looking for: how text of element in selenium webdriver (via python api) without including child element text?


Comments

Popular posts from this blog

javascript - Karma not able to start PhantomJS on Windows - Error: spawn UNKNOWN -

c# - Display ASPX Popup control in RowDeleteing Event (ASPX Gridview) -

Nuget pack csproj using nuspec -