Jump to content
UBot Underground

Problem With Click Command


Recommended Posts

I’m a beginner trying to do my first bot.

I’ve managed to get it to navigate to the page I want, then to click on to a further page, and then click on to another one.

I’m trying to scrape information from this last page in the form of two lists which will go on to a table. It turns out that to get one of the lists to list the items in the right order, I have to click on a certain box – it doesn’t take me to a new page, it just arranges the order of the items on the page.

When I try to use the “click” command here it doesn’t work, it just highlights items on the page. Is there another command I should be using here?

Link to post
Share on other sites

Sorry – just worked out how to do that.

 

navigate("betting.racingpost.com","Wait")
click(<id="nm_track_3">,"Left Click","No")
click(<innertext="2:00 British Stallion Studs EBF Maiden Fillies' Stakes (Plus 10 Race) 7f50y">,"Left Click","No")

 

So Line 1 takes me to the website
Line 2 is supposed to take me to the first track
Line 3 is supposed to take me to the first race of the first track

 

Across the top of the Race Card that we reach after Line 3 are some words which you can click on to change the order of the runners. I need to click on “NO.” – but I am not having much luck.

 

I have also discovered another problem.

 

The code for the racetrack and the races changes every day. So If I program it to work on one day, it won’t work the next. Ultimately what I am trying to do is scrape 2 or 3 bits of information on every horse in every race, every day.

Link to post
Share on other sites

I'm sorry, I understand a little

navigate("http://betting.racingpost.com/","Wait")
wait for browser event("Everything Loaded","")
wait(1)
click(<id="nm_track_3">,"Left Click","No")
wait(1)
click(<innertext="2:00 British Stallion Studs EBF Maiden Fillies' Stakes (Plus 10 Race) 7f50y">,"Left Click","No")
Link to post
Share on other sites

Thanks pasha – that made it work a lot better, and taught me some useful commands.

 

I still have the problem though of not being able to click on the “NO.” at the top of the card on the final page – see my attachment  (I’ve drawn a circle round it).

 

navigate("http://betting.racingpost.com","Wait")
wait for browser event("Everything Loaded","")
wait(1)
click(<id="nm_track_3">,"Left Click","No")
wait(1)
click(<innertext="2:00 British Stallion Studs EBF Maiden Fillies' Stakes (Plus 10 Race) 7f50y">,"Left Click","No")
click(<undefined=undefined>,"Left Click","No")

Edited by Notorious
Link to post
Share on other sites

navigate("http://betting.racingpost.com/","Wait")
wait for browser event("Everything Loaded","")
wait(1)
click(<id="nm_track_3">,"Left Click","No")
wait(1)
click(<innertext="2:00 British Stallion Studs EBF Maiden Fillies' Stakes (Plus 10 Race) 7f50y">,"Left Click","No")
wait for browser event("Everything Loaded","")
wait(2)
click(<id="sc_sort-no">,"Left Click","No")
  • Like 1
Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...