foldog22 0 Posted July 15, 2013 Report Share Posted July 15, 2013 (edited) Hello, I am new to UBOT and looking for a bit of help. Create a List, from scraping a page for attribute, then clicking a random item in the list. Here is my code. When I run the code, it never clicks on anything from the list. add list to list(%VidCats, $scrape attribute(<href=w"Videos.aspx?cId=*">, "href"), "Delete", "Global")click(<href=$random list item(%VidCats)>, "Left Click", "No")wait for browser event("Page Loaded", "") Below is a sample from the source code of the page. I want to create a list from the below (VidCats)</li><li><a href="Videos.aspx?cId=167&category=Arts/Crafts">Crafts</a></li><li><a href="Videos.aspx?cId=21&category=Arts/Dance">Dance</a></li><li><a href="Videos.aspx?cId=208&category=Arts/Design">Design</a></li><li><a href="Videos.aspx?cId=168&category=Arts/Digital Art">Digital Art</a></li><li><a href="Videos.aspx?cId=25&category=Arts/Drawing & Painting">Drawing & Painting</a></li><li><a href="Videos.aspx?cId=241&category=Arts/Filmmaking">Filmmaking</a></li><li><a href="Videos.aspx?cId=22&category=Arts/Jewelry">Jewelry</a></li><li><a href="Videos.aspx?cId=23&category=Arts/Juggling">Juggling</a></li><li><a href="Videos.aspx?cId=157&category=Arts/Magic">Magic</a></li><li><a href="Videos.aspx?cId=24&category=Arts/Origami">Origami</a></li><li><a href="Videos.aspx?cId=158&category=Arts/Photography">Photography</a></li><li><a href="Videos.aspx?cId=212&category=Arts/Sculpture">Sculpture</a></li><li><a href="Videos.aspx?cId=207&category=Arts/Writing & Publishing">Writing & Publishing</a></li><li><a href="Videos.aspx?cId=160&category=Arts/Others">Others</a></li></ul></li><li><a href="Videos.aspx?cId=18&category=Auto">Auto</a><ul class="videosub-level"><li><a href="Videos.aspx?cId=221&category=Auto/Automotive">Automotive</a></li><li><a href="Videos.aspx?cId=273&category=Auto/Car Shows">Car Shows</a></li><li><a href="Videos.aspx?cId=274&category=Auto/Models & Reviews">Models & Reviews</a></li><li><a href="Videos.aspx?cId=152&category=Auto/Motorcycles">Motorcycles</a></li><li><a href="Videos.aspx?cId=151&category=Auto/Off Road">Off Road</a></li><li><a href="Videos.aspx?cId=153&category=Auto/Repairs & Maintenance">Repairs & Maintenance</a></li><li><a href="Videos.aspx?cId=155&category=Auto/Others">Others</a></li></ul></li><li><a href="Videos.aspx?cId=2&category=Business">Business</a><ul Edited July 15, 2013 by foldog22 Quote Link to post Share on other sites
pftg4 102 Posted July 16, 2013 Report Share Posted July 16, 2013 you need to use element from text pftg4 Quote Link to post Share on other sites
foldog22 0 Posted July 16, 2013 Author Report Share Posted July 16, 2013 For the scrape? I don't think the scrape is my issue, I think the clicking from the list is my problem. I come to the conclusion because even if I use a list from text, I have the same issue. Quote Link to post Share on other sites
Lizzard 0 Posted July 16, 2013 Report Share Posted July 16, 2013 Once you scraped a list of elements to click which in this case will be for instance:<a href="Videos.aspx?cId=241&category=Arts/item1">Item 1</a><a href="Videos.aspx?cId=241&category=Arts/item2">Item 2</a><a href="Videos.aspx?cId=241&category=Arts/item3">Item 3</a> Same those to a list and randomly get one from the list, (then remove it if you want). Next, ran replace on the item leaving online what want to click, such as "Item 1". Set the whole thing on a loop and use variables to make things easier to go through the list. If the click is not working. Testing on it own as a node, maybe you are clicking on the wrong element. Quote Link to post Share on other sites
foldog22 0 Posted July 16, 2013 Author Report Share Posted July 16, 2013 I am sorry but I don't understand. I don't think it is the list, because I also tried List from file, then Click Random List Item and that didn't work either. I think my issue is grabbing an item off of the list and clicking it. When I look at debugging I can see a list has items in it with the correct URL. Once you scraped a list of elements to click which in this case will be for instance:<a href="Videos.aspx?cId=241&category=Arts/item1">Item 1</a><a href="Videos.aspx?cId=241&category=Arts/item2">Item 2</a><a href="Videos.aspx?cId=241&category=Arts/item3">Item 3</a> Same those to a list and randomly get one from the list, (then remove it if you want). Next, ran replace on the item leaving online what want to click, such as "Item 1". Set the whole thing on a loop and use variables to make things easier to go through the list. If the click is not working. Testing on it own as a node, maybe you are clicking on the wrong element. Quote Link to post Share on other sites
pftg4 102 Posted July 16, 2013 Report Share Posted July 16, 2013 it not going to work unless you use element from text in your click node Pftg4 Quote Link to post Share on other sites
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.