Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
PerlMonks  

Re^8: Using WWW::Selenium To Test Or Automate An Ajax Website

by Limbic~Region (Chancellor)
on Nov 28, 2009 at 14:55 UTC ( #809896=note: print w/replies, xml ) Need Help??


in reply to Re^7: Using WWW::Selenium To Test Or Automate An Ajax Website
in thread Using WWW::Selenium To Test Or Automate An Ajax Website

icleave,
Please remove your user name and password. That is a stupendously bad idea. I assumed you would have /msg'd them to me. I have them now and will update this node later today with a working version.

Update: It appears that codes appearing on US bottles of coke do not work at the UK site. I will need a few codes to make this work - you have my email address.

Update 2: While I read the terms of use and didn't see anything preventing scraping or automation, the US site heavily relies on JavaScript that gives the appearance of thwarting this type of automation.

  • I needed to use $sel->focus($loc) to ensure the 'onFocus' event triggered
  • The above could also have been accomplished with $sel->fire($loc, 'event')
  • I also needed to use $sel->mouse_over($loc) before clicking the button
Additionally, the site used fancy CSS to get you to click on an image of what kind of soda the code came from. After spending a lot of time getting that "just right", I realized it was not necessary - if entered the next code it would just silently update your points. You can also completely ignore any pop-ups when you go to the site because they do not interfere with site interaction.

I would be happy to share with you the code I wrote to automate the US site but I don't know how applicable it will be to the UK site. Beyond that, I am not interested in doing this for you as it is very time consuming to get "just right". You have my email if you would like to consider other arrangements.

Cheers - L~R

  • Comment on Re^8: Using WWW::Selenium To Test Or Automate An Ajax Website

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://809896]
help
Chatterbox?
[MidLifeXis]: Most likely it is a code that some undocumented system, hidden behind layers of IT, deep in the bowels of the building under the machine room floor, reads that code to keep a presence switch from going off. :-b
[MidLifeXis]: I think I forgot "running on a farm of commodore 64, vic 20s, trs 80s, and apple ]|[e systems"
[GotToBTru]: oh I know what it is .. but it is a number only slightly useful to me and of no possible use to our customer
[MidLifeXis]: Whew - you just saved the free world. <o)
[GotToBTru]: i guess it's a placeholder, the code will only fill it in if there is nothing else to use
[GotToBTru]: but then .. if you have nothing to say, why not say nothing?
[MidLifeXis]: I have a user who has a lot of say on how some of our processes work that abhors significant blanks. Perhaps that is a part of it. A not-so-obvious "this space intentionally left blank" indicator.

How do I use this? | Other CB clients
Other Users?
Others romping around the Monastery: (8)
As of 2017-01-20 19:09 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Do you watch meteor showers?




    Results (176 votes). Check out past polls.