Which params are you using for `visit`?

Em qua, 26 de dez de 2018 às 16:11, fugee ohu <fugee...@gmail.com> escreveu:

>
>
> On Wednesday, December 26, 2018 at 11:58:35 AM UTC-5, Rafael Belo wrote:
>>
>> You've to include Capybara::DSL.
>>
>> ```
>> include Capybara::DSL
>> ```
>>
>> Em qua, 26 de dez de 2018 às 13:21, fugee ohu <fuge...@gmail.com>
>> escreveu:
>>
>>>
>>>
>>> On Wednesday, December 26, 2018 at 10:25:33 AM UTC-5, Rafael Belo wrote:
>>>>
>>>> Capybara has a friendly interface for your web drivers, you can
>>>> integrate it with selenium, webkit, poltergeist and other.
>>>> Try to use it, I think you will like it.
>>>>
>>>> https://github.com/teamcapybara/capybara
>>>>
>>>> Em qua, 26 de dez de 2018 às 12:08, fugee ohu <fuge...@gmail.com>
>>>> escreveu:
>>>>
>>>>>
>>>>>
>>>>> On Wednesday, December 26, 2018 at 9:49:28 AM UTC-5, Rafael Belo wrote:
>>>>>>
>>>>>> Yes, if you are using capybara, you may use `visit '
>>>>>> http://myurl.com/goes-here'` <http://myurl.com/goes-here'>
>>>>>>
>>>>>> Em qua, 26 de dez de 2018 às 11:21, fugee ohu <fuge...@gmail.com>
>>>>>> escreveu:
>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> On Wednesday, December 26, 2018 at 8:19:47 AM UTC-5, Rafael Belo
>>>>>>> wrote:
>>>>>>>>
>>>>>>>> You are passing an URL instead of a script.
>>>>>>>> This function "execute_script" it's to execute sobre javascript
>>>>>>>> "script".
>>>>>>>> You've to visit the page with the browser support.
>>>>>>>> If you're using Capybara, you shoul use the "visit" function
>>>>>>>> passing the URL that you want to go.
>>>>>>>> But if not, you've to look which command your driver has to visit
>>>>>>>> URL's.
>>>>>>>>
>>>>>>>> Em quarta-feira, 26 de dezembro de 2018 03:51:39 UTC-3, fugee ohu
>>>>>>>> escreveu:
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> On Tuesday, December 25, 2018 at 6:40:23 PM UTC-5, Hassan
>>>>>>>>> Schroeder wrote:
>>>>>>>>>>
>>>>>>>>>> On Tue, Dec 25, 2018 at 3:16 PM fugee ohu <fuge...@gmail.com>
>>>>>>>>>> wrote:
>>>>>>>>>> >
>>>>>>>>>> > How do i scrape dynamic content from Struts framework with Ruby
>>>>>>>>>>
>>>>>>>>>> Same as any web source: send a request, parse the response. Is
>>>>>>>>>> there some particular issue you're encountering?
>>>>>>>>>>
>>>>>>>>>> --
>>>>>>>>>> Hassan Schroeder ------------------------ hassan.s...@gmail.com
>>>>>>>>>> twitter: @hassan
>>>>>>>>>> Consulting Availability : Silicon Valley or remote
>>>>>>>>>>
>>>>>>>>>
>>>>>>>>> browser.execute_script('
>>>>>>>>> https://gpsfront.sitename.com/getI2iRecommendingResults.do?callback=jQuery18307882644047005491_1545806199753&currentItemList=32819755026&categoryId=200001521&shopId=2339135&companyId=238468932&recommendType=&scenario=pcDetailLeftTopSell&limit=6&offset=0&_=1545806304149
>>>>>>>>> ')
>>>>>>>>>
>>>>>>>>> Selenium::WebDriver::Error::UnknownError: unknown error:
>>>>>>>>> Runtime.evaluate threw exception: SyntaxError: Unexpected end of input
>>>>>>>>>   (Session info: chrome=71.0.3578.80)
>>>>>>>>>   (Driver info: chromedriver=2.42.591071
>>>>>>>>> (0b695ff80972cc1a65a5cd643186d2ae582cd4ac),platform=Linux 
>>>>>>>>> 4.15.0-43-generic
>>>>>>>>> x86_64)
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>> Must I use the url?
>>>>>>>
>>>>>>>
>>>>>>> --
>>>>>>> You received this message because you are subscribed to a topic in
>>>>>>> the Google Groups "Ruby on Rails: Talk" group.
>>>>>>> To unsubscribe from this topic, visit
>>>>>>> https://groups.google.com/d/topic/rubyonrails-talk/CpOPHz-zFsc/unsubscribe
>>>>>>> .
>>>>>>> To unsubscribe from this group and all its topics, send an email to
>>>>>>> rubyonrails-ta...@googlegroups.com.
>>>>>>> To post to this group, send email to rubyonra...@googlegroups.com.
>>>>>>> To view this discussion on the web visit
>>>>>>> https://groups.google.com/d/msgid/rubyonrails-talk/acaef991-80d3-4c6c-bccc-fdc017ef4734%40googlegroups.com
>>>>>>> <https://groups.google.com/d/msgid/rubyonrails-talk/acaef991-80d3-4c6c-bccc-fdc017ef4734%40googlegroups.com?utm_medium=email&utm_source=footer>
>>>>>>> .
>>>>>>> For more options, visit https://groups.google.com/d/optout.
>>>>>>>
>>>>>>
>>>>>>
>>>>>> --
>>>>>> *Rafael Belo*
>>>>>> Web Developer
>>>>>> Skype: rafaelrpbelo
>>>>>> Twitter: @rafaelrpbelo
>>>>>> Linkedin: rafaelrpbelo <https://www.linkedin.com/in/rafaelrpbelo/>
>>>>>>
>>>>>
>>>>> This is the first time I'm hearing Capybara recommended for web
>>>>> scraping Is this the preferred method for what I'm trying to do?
>>>>>
>>>>> --
>>>>> You received this message because you are subscribed to a topic in the
>>>>> Google Groups "Ruby on Rails: Talk" group.
>>>>> To unsubscribe from this topic, visit
>>>>> https://groups.google.com/d/topic/rubyonrails-talk/CpOPHz-zFsc/unsubscribe
>>>>> .
>>>>> To unsubscribe from this group and all its topics, send an email to
>>>>> rubyonrails-ta...@googlegroups.com.
>>>>> To post to this group, send email to rubyonra...@googlegroups.com.
>>>>> To view this discussion on the web visit
>>>>> https://groups.google.com/d/msgid/rubyonrails-talk/6d8212f3-dae8-444c-9004-28a4c5b0b103%40googlegroups.com
>>>>> <https://groups.google.com/d/msgid/rubyonrails-talk/6d8212f3-dae8-444c-9004-28a4c5b0b103%40googlegroups.com?utm_medium=email&utm_source=footer>
>>>>> .
>>>>> For more options, visit https://groups.google.com/d/optout.
>>>>>
>>>>
>>>>
>>>> --
>>>> *Rafael Belo*
>>>> Web Developer
>>>> Skype: rafaelrpbelo
>>>> Twitter: @rafaelrpbelo
>>>> Linkedin: rafaelrpbelo <https://www.linkedin.com/in/rafaelrpbelo/>
>>>>
>>>
>>> I need to work in rails console and when I run `visit ...`  rails
>>> complains of no matching route
>>>
>>> --
>>> You received this message because you are subscribed to a topic in the
>>> Google Groups "Ruby on Rails: Talk" group.
>>> To unsubscribe from this topic, visit
>>> https://groups.google.com/d/topic/rubyonrails-talk/CpOPHz-zFsc/unsubscribe
>>> .
>>> To unsubscribe from this group and all its topics, send an email to
>>> rubyonrails-ta...@googlegroups.com.
>>> To post to this group, send email to rubyonra...@googlegroups.com.
>>> To view this discussion on the web visit
>>> https://groups.google.com/d/msgid/rubyonrails-talk/2ae5f27c-eb96-4de2-bc2d-0974387b21c7%40googlegroups.com
>>> <https://groups.google.com/d/msgid/rubyonrails-talk/2ae5f27c-eb96-4de2-bc2d-0974387b21c7%40googlegroups.com?utm_medium=email&utm_source=footer>
>>> .
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>>
>>
>> --
>> *Rafael Belo*
>> Web Developer
>> Skype: rafaelrpbelo
>> Twitter: @rafaelrpbelo
>> Linkedin: rafaelrpbelo <https://www.linkedin.com/in/rafaelrpbelo/>
>>
>
> require 'capybara/rails'
> include Capybara::DSL
>
> No change I still get the same routing error
> ActionController::RoutingError (No route matches [GET]
> "/getI2iRecommendingResults.do"):
>
> --
> You received this message because you are subscribed to a topic in the
> Google Groups "Ruby on Rails: Talk" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/rubyonrails-talk/CpOPHz-zFsc/unsubscribe
> .
> To unsubscribe from this group and all its topics, send an email to
> rubyonrails-talk+unsubscr...@googlegroups.com.
> To post to this group, send email to rubyonrails-talk@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/rubyonrails-talk/33affd05-6ac8-4dd9-b8a6-8258e6796ddd%40googlegroups.com
> <https://groups.google.com/d/msgid/rubyonrails-talk/33affd05-6ac8-4dd9-b8a6-8258e6796ddd%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
> For more options, visit https://groups.google.com/d/optout.
>


-- 
*Rafael Belo*
Web Developer
Skype: rafaelrpbelo
Twitter: @rafaelrpbelo
Linkedin: rafaelrpbelo <https://www.linkedin.com/in/rafaelrpbelo/>

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to rubyonrails-talk+unsubscr...@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/rubyonrails-talk/CAMVeeFEKB7thAAw46%3DZc4ByZDEnsZkWuHAth2_mYvqY7iE4Vgw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to