質問

Im trying to check if a url entered into the target field for the command "checkUrl" is valid or not using javascript, but i keep getting an error. There are multiple pages listed within the sites I'm testing and I have the need to verify if the pages have been added with the correct name, or even at all using the relative url.

Selenium.prototype.doCheckUrl = function(locator){
var request = new XMLHttpRequest();  

request.open('GET', locator, true);  
request.send();  

if (request.status === "404") {  
request.message = false ;

} 
}
役に立ちましたか?

解決

他のヒント

You can also see the full discussion here : https://code.google.com/p/selenium/issues/detail?id=141

But, it seems that the dev team is opposed to this feature :(

ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top