I have to capture Site seal. Which provided by third party for my site has been validated and is secured for online transactions. I couldn't capture its element id. If i right click it shows an ale开发者_如何学Pythonrt "This Site Seal is protected". Is any way i can capture this by selenium. you can find site seal below the bottom pan in this URL:https://www.grandstadium.tv/Default.aspx
The HTML for the Site Seal is:
<a onclick="window.open("https://seals.networksolutions.com/siteseal_seek/siteseal?v_shortname=NETSP&v_querytype=W&v_search=www.grandstadium.tv&x=5&y=5","NETSP","width=450,height=500,toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,copyhistory=no,resizable=no");return false;" href="#">
<img oncontextmenu="alert('This SiteSeal is protected');return false;" style="border: medium none ;" src="https://seal.networksolutions.com/images/prorecgreen.gif">
</a>
Unfortunately it does not have an ID for locating the element, however you could use the following XPath to locate it:
//img[@src='https://seal.networksolutions.com/images/prorecgreen.gif']
So your check might be:
assertVisible | //img[@src='https://seal.networksolutions.com/images/prorecgreen.gif']
精彩评论