I'm using selenium_client with cucumber, webrat + IE
As you'd expect, Firefox works fine. I've tried the following:
selenium.is_visible("css=#flash .flash_notice")
selenium.is_visible("xpath=//*[@id='flash']/*[@class='flash_notice]")
selenium.is_visible("xpath=//*[@id='flash']/*[contains(@class,'flash_notice]')")
both cannot find the ...
Thanks to AakashM, he led me in the right direction. For the question below, this is the xPath expression that led me the right way:
"//channel/item[category[@domain='http://www.somelink.com/?category=4']]"
Original post:
I have an XML feed that looks something like this (excerpt):
<channel>
<title>Channel Name</title>
<link>Lin...
I have a button on my page that changes depending on what radio button is clicked. The button has the same text on it with the same id, but different classes. How do I test if the two different buttons exist depending on the radio.
<a id="submit" class="on" href="javascript:submit();">Submit</a>
<a id="submit" class="off" href="javascri...
Is there anyway to return an XPath string of a DOM element in Javascript?
...
I'm trying to figure out two things:
Can Xpath be used to query a SOAP-based web services server?
Is this built into the SOAP protocol such that any good SOAP server would handle the requests correctly without having to add custom handling of XPath queries?
The two questions may seem redundant, but I'm breaking them because:
I don'...
e4x programming extension is native to Actionscript and makes sense to use it over Xpath or any other DOM interfaces. I would like to know
from flex community if they had any bad experiences like performance, etc, or any other gotchas.
...
Hi, I need to filter a XPath expression to grab only a certain attribute as not empty.
I tried this:
<xsl:template match="DocumentElement/QueryResults[string(@FileName)]">
and this:
<xsl:template match="DocumentElement/QueryResults[string-length(@FileName)>0]">
but it did not work. I need the same kind of data returning from the f...
I am using "HtmlAgilityPack" to parse HTML content.
My target is to get number value.
<div>
some content 1
<br>
some <b>content</b> 2
<br>
<b>NUMBER:</b>
9788492688647
<br>
some content 3
<br>
some content 4
</div>
aim:
- get "9788492688647"
Anybody can tell me how to get value between /d...
How do I use something similar to the example below, but with the opposite result, i.e items that do not contain (default) in the text.
<test>
<item>Some text (default)</item>
<item>Some more text</item>
<item>Even more text</item>
</test>
Given this
//test/item[contains(text(), '(default)')]
would return the first i...
are there any alternatives to Xpath ? need to locate and extract specific element's texts for web scraping project.
xpath seem pretty limited against layout changes on web pages. slight shuffle, and xpath no longer works. also different browsers have different Xpaths as i discovered. Firefox automatically adds tbody after table, while I...
I am using the following Expression to select all hyperlinks
//a[@href]
How can I write an expression to select all hyperlinks which match this format
http://abc.com/articles/1
here http://abc.com/articles/ is constant and the article number increases
...
I've found this on http://www.perlmonks.org/?node_id=606909
looking by qualified name ...
In this case you can call findnodes method on any node, you don't need the XML::LibXML::XPathContext with its prefix => namespace mapping:
$doc->findnodes('///info/fooTransaction/transactionDetail/[name() = "histFile:transactionSummary"]/*')...
I have an XML like this
<?xml version="1.0" encoding="UTF-8"?>
<response>
<lst name="responseHeader">
<int name="status">0</int>
<int name="QTime">1</int>
<lst name="params">
<str name="start">num</str>
<str name="fl">string</str>
<str name="q">string</str>
<str name="rows">num</str>
<...
Can anyone help with the following XPath question? Given the node-set:
<table>
<rows>
<row>
<value column="Product">Coal</value>
<value column="Quantity">10000</value>
</row>
<row>
<value column="Product">Iron</value>
<value column="Quantity">5000</value>
</row>
<row>
<value column="P...
Given the following fragment of html:
<fieldset>
<legend>My Legend</legend>
<p>Some text</p>
Text to capture
</fieldset>
Is there an xpath expression that will return only the 'Text to capture' text node?
Trying /fieldset/text() yields three nodes, not just the one I need.
...
I'm using the following code to load in an XML file (actually an NZB):
QXmlQuery query;
query.bindVariable("path", QVariant(path));
query.setQuery("doc($path)/nzb/file/segments/segment/string()");
if(!query.isValid())
throw QString("Invalid query.");
QStringList segments;
if(!query.evaluateTo(&segments))
throw QString("Unable ...
I'm running one application in android browser which contain the following code..
if (typeof XPathResult != "undefined") {
//use build in xpath support for Safari 3.0
var xmlDocument = doc;
if (doc.nodeType != 9) {
xmlDocument = doc.ownerDocument;
}
results = xmlDocument.evaluate( xpathExpr,
...
I need to search for XML nodes whose names look like "image*", i.e. start with 'image'.
My sample XML:
<a name="image.1">
<b name="image.22" />
</a>
My XPath is /b[@name='image.22']. I want to write the seletion [@name='image.22'] in the form of using regular expression there. I've tried [@name='image.+'] but it doesn't work.
Ple...
Good day, colleagues!
Tell me please, how to make a dynamic xpath-parsing:
for example, instead of writing
$domXPath->query('//*[(@id = "article-id-18")]');
-> write something like that
$domXPath->query('//*[(@id = "article-id-*")]');
, because in my case, the site's script generate (every time) a new id for block, that contains ...
I need to get XmlNodeList where node name contains "mystring"
XML
<?xml version="1.0" encoding="utf-8"?>
<root>
<node1>
node1 value
</node1>
<node2_mystring>
node2 value
</node2_mystring>
<node3>
node3 value
</node3>
<node4_mystring>
node 4 value
</node4_mystring>
</root>
Desired output is
<?xml ...