I'm running over all textnodes of my DOM and check if the nodeValue contains a certain string.  /html/body//text()[contains(.,'test')]   This is case sensitive. However, I also want to catch Test, TEST oder TesT. Is that possible with X...
I try to set select option attribute to selected. But I try to avoid using nth-child in CasperJS because there are bugs in PhantomJS's nth-child. So I try to use this as the subtitution of jQuery(css_path).  function setSelectedCountry(i){     wi...
XPath can do everything querySelector can do, and more, so when would you ever choose the latter? I haven't seen any speed benchmarks comparing the two, so right now I'm choosing based on syntax conciseness, which seems kind of arbitrary.  Ed...
In order to implement drag and drop for Selenium tests, I referred to http://elementalselenium.com/tips/39-drag-and-drop There it's mentioned to use javascript(from https://gist.github.com/rcorreia/2362544) to handle drag and drop.  I implemented...
I am in the process of learning and simultaneously building a web spider using scrapy. I need help with extracting some information from the following javascript code:  <script language="JavaScript" type="text/javascript+gk-onload"...
I am trying to use document.evaluate() to extract certain child elements out of a <svg> element. But I have problems by just extracting the <svg> itself. I can extract everything up to the <svg>, but no further. For example this wor...
I want to read the value of a javascript variable using Xpath the js text is as follows:   var item_url = 'nahodka_sobaki_prodam_schenkov_labradora_278393584'   , item_phone = '994h4ada5cc0f9605334b81edd8a4ad548189hbfea9627bf5beb5cb7c699...
I have two XPaths, for example:  /html/body/div[3]/div[4]/table/tbody/tr[2]/td[4] and /html/body/div[3]/div[4]/table/tbody/tr[2]/td[3]/a[2]   How can I find the first common ancestor now? In this case it would be /html/body/div[3]/div[4]/table/tbody/...
Here's the two scenarios.    We are using a manually built xml soap request with xmlhttprequest, sending it to a wcf soap service, getting back the response and using xPath to parse the data and fill out a drop down list.  We are sending a json r...
I am trying to parse an xml document with XPath.  The script works just fine on chrome, but gives me the following error:     WrongDocumentError: Node cannot be used in a document other than the   one in which it was created   The code in question is...

Tags

Recent Questions

Top Questions

Home Tags Terms of Service Privacy Policy DMCA Contact Us

©2020 All rights reserved.