Nokogiri::HTML

10 weergaven
Naar het eerste ongelezen bericht

noli emeterio

ongelezen,
6 jul 2020, 06:50:3406-07-2020
aan nokogiri-talk
Im new in using Ruby and gems. 

I was given a task to run scripts using Ruby. and im encountering this error,

NoMethodError:
  undefined method `html_part' for #<Email:0x007fa2ac2c3f98>.

An error occurred in a `before(:suite)` hook.
Failure/Error: link = Nokogiri::HTML(mail.html_part.body.to_s).xpath("//a[text()=\"#{link_text}\"]")

Not sure what is wrong here.. any help?


Mike Dalessio

ongelezen,
6 jul 2020, 07:10:0006-07-2020
aan nokogiri-talk
Hi Noli,

Thanks for asking this question, I'll try to help.

I'm not sure this has anything to do with Nokogiri. This code is calling the method `#html_part` on the object named `mail` which appears to be of type `Email`. This error message is telling us that the method `#html_part` isn't defined on that object.

Maybe you can take a look at the `mail` object -- its type and how it was created -- to resolve this?

--
You received this message because you are subscribed to the Google Groups "nokogiri-talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to nokogiri-tal...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/nokogiri-talk/35430a93-a78e-4ac7-aa1c-c363b3c20a4dn%40googlegroups.com.

noli emeterio

ongelezen,
7 jul 2020, 19:48:1807-07-2020
aan nokogiri-talk
Thanks Mike! i have looked into the script and it is not Nokogiri related. 
Allen beantwoorden
Auteur beantwoorden
Doorsturen
0 nieuwe berichten