c# - Click on dynamically generated element after body onload using Selenium -


i'll best convey situation date can give limited.

there button inside webpage when clicked creates new tab html source below.

<html><head><meta content="ie=5.0000" http-equiv="x-ua-compatible"> <title>report viewer webpage</title> <meta content="text/html; charset=windows-1252" http-equiv=content-type> <script src="javascript1.js"></script>  <script src="javascript2.js"></script>  <script src="anotherjavascript.js"></script> </head> <body onload="callinit('abc_defg_hijkl_1_',''); window_onload();" onhelp=common_showhelp() leftmargin=0 topmargin=0 bgcolor=#c6c6c6 currjshelpvar="help_reports_viewer_dlg"> <object id=crviewer codebase="/viewer/activexviewer/activexviewer.cab#version=9,2,0,442" classid=clsid:1123452wduihed:1325726gdujbea:12r432vd width="100%" height="99%" viewastext> <param name="lastprop" value="500"> <!--bunch of other params go here--> <param name="_cx" value="26987"> <script language=vbscript> <!--some business logic--> </script>  <object id=reportsource codebase="/viewer/activexviewer/activexviewer.cab#version=9,2,0,442" classid=clsid:1123452wduihed:1325726gdujbea:12r432vd width="1%" height="1%"></object> <object id=viewhelp codebase="/viewer/activexviewer/activexviewer.cab#version=9,2,0,442" classid=clsid:1123452wduihed:1325726gdujbea:12r432vd width="1%" height="1%"></object> </body> </html> 

and page content this: enter image description here

and of course crystal report.

all want click on neat little export button sitting right beside print button above text preview.

and using selenium automate this. problem is, selenium works html elements , believe buttons in page activex controls or else. , loaded after call <body> tag's onload call.

one of biggest constraint application works in ie , power of ie developer tools not enabling me inspect button element. ie developer tools doesn't see buttons html elements. don't exist ie developer tools. using ie 9 way.

what me in automating clicking of export button ? javascript ??

when inspected webpage, first <object> right after <body> taking space of view. , think randomly generated elements going inside dynamically.

given html code you're showing, seems content of page activex.

as result, there no way kind of automation selenium said yourself, selenium works html.


Comments

Popular posts from this blog

php - regexp cyrillic filename not matches -

c# - OpenXML hanging while writing elements -

sql - Select Query has unexpected multiple records (MS Access) -