开发者

Check if JS file is included

开发者 https://www.devze.com 2023-02-04 19:16 出处:网络
How can I check if a js file is included in my web page?I had a look of a lot of Selenium 开发者_JS百科Documentations, but i did not find what i want.

How can I check if a js file is included in my web page? I had a look of a lot of Selenium 开发者_JS百科Documentations, but i did not find what i want.

Thanks a lot for you reply.


I found the answer of my own question (with the JUnit 3 format):

verifyTrue(selenium.isElementPresent("//script[@type='text/javascript'][contains(@src,'my.js')]"));
0

精彩评论

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