문제

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