Hi I am having a problem in nokogiri::HTML::Document.xpath method
for the site
http://services.ptcmysore.gov.in/RNetTracking/Track.aspx?RNetNo=RK633253644IN
Code
doc=
agent.get(“http://services.ptcmysore.gov.in/RNetTracking/Track.aspx?RNetNo=RK633253644IN”)
page1 = Nokogiri::HTML(open(doc.uri.to_s))
x = [page1.css(“#GridView1 th”)[0].text,page1.css(“#GridView1
td”)[0].text,page1.css(“#GridView1 th”)[1].text,page1.css(“#GridView1
td”)[1].text,page1.css(“#GridView1 th”)[2].text,page1.css(“#GridView1
td”)[2].text,page1.css(“#GridView1 th”)[3].text,page1.css(“#GridView1
td”)[3].text]
puts x
puts page1.css(‘#pnlDetail div #GridView2 tr th’)[0].text#Error
india.rb:22:in <main>': undefined method
text’ for nil:NilClass
(NoMethodError
)