开发者

How to verify whether Site seal logo is preseneted in my site or not by selenium?

开发者 https://www.devze.com 2022-12-26 03:33 出处:网络
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开

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(&quot;https://seals.networksolutions.com/siteseal_seek/siteseal?v_shortname=NETSP&amp;v_querytype=W&amp;v_search=www.grandstadium.tv&amp;x=5&amp;y=5&quot;,&quot;NETSP&quot;,&quot;width=450,height=500,toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,copyhistory=no,resizable=no&quot;);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']
0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号