예제 #1
0
파일: googler.go 프로젝트: wirepair/autogcd
func loadGcd(ele *autogcd.Element, tab *autogcd.Tab) {
	log.Printf("clicking google link\n")
	err := ele.Click()
	if err != nil {
		log.Fatalf("error clicking google link: %s\n", err)
	}
	tab.WaitFor(waitForRate, waitForTimeout, autogcd.TitleContains(tab, "wirepair/gcd"))
	log.Printf("here we are, bask in its glory")
	time.Sleep(5 * time.Second)
}
예제 #2
0
파일: googler.go 프로젝트: wirepair/autogcd
// Set various timeouts
func configureTab(tab *autogcd.Tab) {
	tab.SetNavigationTimeout(navigationTimeout) // give up after 10 seconds for navigating, default is 30 seconds
	tab.SetStabilityTime(stableAfter)
	if debug {
		domHandlerFn := func(tab *autogcd.Tab, change *autogcd.NodeChangeEvent) {
			log.Printf("change event %s occurred\n", change.EventType)
		}
		tab.GetDOMChanges(domHandlerFn)
	}
}