Hi
im making a bot that clicks on buttons on a webpage
the number of buttons varies according to the search criteria
how to make the bot press the button
each button is recognized by the following id
<a id ctl00_content_SearchResultJobOffers_gridJobOffers_ ApplyToJobOffer0_button
and the following button
ctl00_content_SearchResultJobOffers_gridJobOffers_ ApplyToJobOffer1_button
i want to make a foreach loop but dont know how to let the program know the number of items
thanks
3 replies to this topic
#1
Posted 14 December 2010 - 02:34 PM
|
|
|
#2
Posted 14 December 2010 - 05:45 PM
Couldn't you just parse the html content? Or perhaps you could just search for specific ids?
#3
Posted 15 December 2010 - 06:20 AM
you should check out the HtmlAgilityPack, it allows you to turn the HTML page into an HtmlDocument, that mirrors XmlDocument in almost every way. it even allows you to use XPath, even if the document isn't valid XML (like no closing tags for example).
Html Agility Pack
Html Agility Pack
#4
Posted 15 December 2010 - 07:34 AM
Hi guys
thanks for the reply
basicaly after doing search the page displays
"search returned X results"
so i could get the X from there using substring
but i was looking for a more elegant solution
i will check the html agility pack - thanks for the tip
thanks for the reply
basicaly after doing search the page displays
"search returned X results"
so i could get the X from there using substring
but i was looking for a more elegant solution
i will check the html agility pack - thanks for the tip
1 user(s) are reading this topic
0 members, 1 guests, 0 anonymous users


Sign In
Create Account

Back to top









