def test_incorrect_parse_xpath(self): s = Silk(self.io_loop) s.parse_url('//count()',LOCAL_URL%(LOCAL_PORT,'index.html'), self.stop) try: self.wait() except XPathEvalError: pass
def test_parse_url(self): s = Silk(self.io_loop) s.parse_url('//text()', LOCAL_URL%(LOCAL_PORT,'index.html'), self.stop) xpath_elements = self.wait() self.assertTrue(type(xpath_elements=='list'))