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 need to parse an XML/HTML file within the cloud-code of parse.com.  I've got a string which contains the source-code of the html file.   I've already tried multiple frameworks like jsdom etc, but nothing seems to work in the Parse.com-cloud...
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/...
I am trying to build a function that will properly quote/escape an attribute in XPath.  I have seen solutions posted in C# here and here, but my implementation in JavaScript results in an error "This expression is not a legal expression"  Her...

Tags

Recent Questions

Top Questions

Home Tags Terms of Service Privacy Policy DMCA Contact Us

©2020 All rights reserved.