Selenium WebDriver C# - Find element in a classic ASP Web page that includes multiple ASP files -


i'm trying write automated test case website, built using classic asp. each web page (when viewed in browser) created using multiple asp files, each of takes panel in overall web page. when trying use selenium webdriver, can see elements in main content, cannot find elements in "included asp files".

for example, content of navigation panel coming asp file; achieved doing this...

navpanel.body.nav.location.href = "navi.asp" 

although content of navi.asp page shows when viewed in browser, i'm not able contents using:

driver.findelements(by.cssselector("*")) 

could please let me know how can find elements defined in "included" asp file?

here additional info - summary of html source viewed in browser follows - can see below, there multiple elements , default webdriver seems picking elements of last occurrence of tag i.e, contents of "content" frame. but, want access elements in "nav" frame. how can switch between these frames. tried using driver.switchto().frame("nav") didn't work because frame not visible within "content" frame.

<html>    <head></head>   <frameset name="body">       <html>         <frame name="**nav**"></frame>           <html>              <form id="**form1**"></form>           </html>         </frame>         <frame name="**content**">           <html>           </html>         </frame>       </html>   </frameset> </html> 

it doesn't matter language web page built with, can use browser see css selector use...

using chrome (you can similar things in different browsers too):

right click on element interested , press "inspect element" go elements tab , right click on html tag of element , select "copy css path" , copy proper css selector clip board.

look @ picture below: enter image description here


Comments

Popular posts from this blog

PHP DOM loadHTML() method unusual warning -

python - How to create jsonb index using GIN on SQLAlchemy? -

c# - TransactionScope not rolling back although no complete() is called -