문제

I am trying to accessing the url using gebish.

Browser homePageBrowser = new Browser(driver: new HtmlUnitDriver())
HomePage.url = "http://edition.cnn.com/"
homePageBrowser.with {
    to HomePage
    pageTitle = title
}

Here is the code of HomePage.groovy

class HomePage extends Page {
    static url = "http://edition.cnn.com/"
    static content = {
    title {
        $("title").text()
    }
}

I am not getting response from cnn.com where as if i visit site manually in the browser i am able to get.This is only happening for "http://edition.cnn.com". I am able to get response for remaining urls. Please help me to fix this problem

도움이 되었습니까?

해결책

Problem with that site is having meta refresh in the header tags. including driver.webClient.refreshHandler = new ThreadedRefreshHandler() this code solved my problem

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top