Skip to main content

All Questions

Tagged with
0 votes
2 answers
50 views

How to extract the word Default from this xml?

<XCUIElementTypeCell type="XCUIElementTypeCell" enabled="true" visible="true" x="0" y="165" width="320" height="40"> <...
eva's user avatar
  • 63
1 vote
1 answer
98 views

How to see if one Nokogiri::XML::Node contains parts of another Nokogiri::XML::Node?

Using ruby Nokogiri I have a Nokogiri::XML::Node object (ConstituencyXMLNode inherits from Nokogiri::XML::Node) that is a tree object like such: #(ConstituencyXMLNode:0xc3c8 { name = "PP", ...
Kelsey Hannan's user avatar
0 votes
1 answer
61 views

Ruby - Nokogiri xml search with 2 conditions

I have an xml file. <generic:Obs> <generic:ObsKey> <generic:Value id="TIME_PERIOD" value="2020"/> <generic:Value id="SPECIFICATION" value=&...
Robert's user avatar
  • 1
-1 votes
1 answer
90 views

Is there a way to access the Xpath selector that Watir uses for selenium?

I'm familiar with using the various different approaches to selecting elements in Watir. Instead, I want to do the opposite: I have an element which I have already enumerated, and I want to generate a ...
Buffoonism's user avatar
  • 1,819
0 votes
1 answer
54 views

Custom function for class check in Nokogiri

How can I add a custom XPath function for class check to Nokogiri? I.e. something like https://gist.github.com/knu/087b7f89bb31de4f419c, but performing contains(concat(' ',normalize-space(@class),' '),...
Luma's user avatar
  • 47
0 votes
2 answers
196 views

How to search for nodes at the uppermost levels only in Ruby-Nokogiri?

HTML (particularly MathML) can be heavily nested. With Ruby-Nokogiri, I want to search for a node at the uppermost levels, which are arbitrary, within a parent node. Here is an example HTML/MathML. &...
Masa Sakano's user avatar
  • 2,185
1 vote
3 answers
552 views

Capybara checking HTML class and ID

I'm currently trying to find this element and have capybara validate that it's there. There's an element that shows up and I'm using page.should have_css to see if this element is there. <i class=&...
Rubyman543's user avatar
0 votes
1 answer
132 views

Ruby Nokogiri take all the content

i'm working on a scrapping project but i got a problem: I wanna get all the data of https://coinmarketcap.com/all/views/all/ with nokigiri but i only get 20 crypto name on the 200 loaded with nokogiri ...
davidzzz's user avatar
1 vote
1 answer
131 views

Iterations of elements in Nokogiri xpath

I tried to make iteration of some <li> elements Iteration won't work as expected: require 'nokogiri' doc = Nokogiri::HTML(<<-END_OF_HTML) <ul class="attribute_radio_list"&...
CannyFoxx's user avatar
1 vote
0 answers
82 views

Site-Prism nested repeating sections problem

I am having trouble limiting the matches for elements in a Section I'm writing. See the example HTML and Comment Section below. I want to be able to reply to a specific comment on the page. Comments ...
MartinP's user avatar
  • 93
0 votes
1 answer
471 views

How to use Nokogiri to get the full HTML without any text content

I'm trying to use Nokogiri to get a page's full HTML but with all of the text stripped out. I tried this: require 'nokogiri' x = "<html> <body> <div class='example'><span&...
jayp's user avatar
  • 352
-1 votes
1 answer
52 views

nokogiri run well but doesn't return anything

Hi and thanks for reading ! I'm learning how to use xpath and nokogiri and I followed same instructions than the tutorial on Engine Yard. I copy / paste exactly the same code, it runs well on terminal ...
Ambroise B's user avatar
0 votes
1 answer
78 views

Map element not using xpath

I am using site-prism and I am having difficulties in this situation, I don't want to use xpath. Ele esta implementado desta maneira: <img class="profile-pic" src="https://quasar-...
stasilvio's user avatar
0 votes
1 answer
98 views

Ruby Env Variable not interpolated when parsed using Nokogiri xpath

I have a private gitlab repo and I want to clone it. I have the password in an Environment variable. My gitlab repo URL with username and password variable is from the XML file. sample.xml <git> ...
Wolf's user avatar
  • 23
1 vote
2 answers
123 views

Can't click on href link using Watir and Xpath

I am trying to click all the links within a table. The xpath is below. (2..lines).each do |i| browser.element(:xpath => "//*[@id=\"StmtSummaryForm:stmtDataTabletbody0\"]/tr[{i}]/td[...
user2012677's user avatar
  • 5,635

15 30 50 per page
1
2 3 4 5
41