panoz 1 Posted June 11, 2013 Report Share Posted June 11, 2013 (edited) I keep trying to click this button on Amazon but it never seem to react, only when I click on the window or scroll down will it react to the click. very weird, I don't see any javascript either. Here's the sample bot. Can anybody help? Thanks! amazon next button.ubot Edited June 11, 2013 by panoz Quote Link to post Share on other sites
north_star 16 Posted June 11, 2013 Report Share Posted June 11, 2013 (edited) why dont you try to use V4, its more easier to use than the V3.5 , Edited June 11, 2013 by north_star Quote Link to post Share on other sites
iDollarsteam 13 Posted June 11, 2013 Report Share Posted June 11, 2013 is img recognition available in v3.5? if it is, then I think you can use it to click the buttons this is the code that I used in v4 to make it work: click(<innerhtml=" <span class=\"bg-text\">Back</span> <span class=\"bg-image\" title=\"Back\"></span> ">, "Left Click", "No") click(<innerhtml=" <span class=\"bg-text\">Next</span> <span class=\"bg-image\" title=\"Next\"></span> ">, "Left Click", "No") the code is for the back button and for the next button, I think that you can use the tags in your click event in v3.5 Quote Link to post Share on other sites
panoz 1 Posted June 12, 2013 Author Report Share Posted June 12, 2013 It's not easy to select element or "choose by attribute" for scraping like in v3.5 that's why I opted to use v3.5, what tags element are you refering to?is img recognition available in v3.5? if it is, then I think you can use it to click the buttons this is the code that I used in v4 to make it work: click(<innerhtml=" <span class=\"bg-text\">Back</span> <span class=\"bg-image\" title=\"Back\"></span> ">, "Left Click", "No") click(<innerhtml=" <span class=\"bg-text\">Next</span> <span class=\"bg-image\" title=\"Next\"></span> ">, "Left Click", "No") the code is for the back button and for the next button, I think that you can use the tags in your click event in v3.5 Quote Link to post Share on other sites
panoz 1 Posted June 13, 2013 Author Report Share Posted June 13, 2013 is img recognition available in v3.5? if it is, then I think you can use it to click the buttons this is the code that I used in v4 to make it work: click(<innerhtml=" <span class=\"bg-text\">Back</span> <span class=\"bg-image\" title=\"Back\"></span> ">, "Left Click", "No") click(<innerhtml=" <span class=\"bg-text\">Next</span> <span class=\"bg-image\" title=\"Next\"></span> ">, "Left Click", "No") the code is for the back button and for the next button, I think that you can use the tags in your click event in v3.5 I'm being a noob. How do I enter this code into ubot v4? I can't seem to get it to work. Here's what I'm doing: Quote Link to post Share on other sites
iDollarsteam 13 Posted June 13, 2013 Report Share Posted June 13, 2013 try this code : set(#URL, "http://www.amazon.com/Apple-iPhone-16GB-Black-Verizon/dp/B004ZLV5UE/ref=sr_1_1?s=wireless&ie=UTF8&qid=1371147950&sr=1-1", "Global") navigate(#URL, "Wait") wait for browser event("Page Loaded", "") wait for element(<id="purchaseShvl">, "", "Appear") loop(5) { comment("Back button") click(<class="auiTestSprite s_shvlBack">, "Left Click", "No") wait(1) } comment("Next Button") click(<class="auiTestSprite s_shvlNext">, "Left Click", "No") 1 Quote Link to post Share on other sites
Pete 121 Posted June 13, 2013 Report Share Posted June 13, 2013 nnavigate("http://www.amazon.com/Apple-iPhone-16GB-Black-Verizon/dp/B004ZLV5UE/ref=sr_1_1?s=wireless&ie=UTF8&qid=1371147950&sr=1-1", "Wait") loop(20) { run javascript("window.scrollBy(0,50); // horizontal and vertical scroll increments scrolldelay = setTimeout(\'pageScroll()\',.1000);") wait(.100) } wait for element(<href="#Next">, "", "Appear") wait for element(<innertext=w"Page 1 of *">, "", "Appear") loop($subtract($trim($scrape attribute(<class="num-pages">, "innertext")), 1)) { click(<href="#Next">, "Left Click", "No") wait(1) } 1 Quote Link to post Share on other sites
panoz 1 Posted June 14, 2013 Author Report Share Posted June 14, 2013 ok, I just pasted these code directly into code view as it appears, but the bot won't save or let me view by node view for me to make edits. Is there something that I'm missing? Quote Link to post Share on other sites
panoz 1 Posted June 14, 2013 Author Report Share Posted June 14, 2013 nnavigate("http://www.amazon.com/Apple-iPhone-16GB-Black-Verizon/dp/B004ZLV5UE/ref=sr_1_1?s=wireless&ie=UTF8&qid=1371147950&sr=1-1", "Wait") loop(20) { run javascript("window.scrollBy(0,50); // horizontal and vertical scroll increments scrolldelay = setTimeout(\'pageScroll()\',.1000);") wait(.100) } wait for element(<href="#Next">, "", "Appear") wait for element(<innertext=w"Page 1 of *">, "", "Appear") loop($subtract($trim($scrape attribute(<class="num-pages">, "innertext")), 1)) { click(<href="#Next">, "Left Click", "No") wait(1) }Thanks! I'll give it a go, I think your code might work, because it won't register the click if there was no movement on the page (very weird) Quote Link to post Share on other sites
panoz 1 Posted June 14, 2013 Author Report Share Posted June 14, 2013 ok, I just pasted these code directly into code view as it appears, but the bot won't save or let me view by node view for me to make edits. Is there something that I'm missing?Nevermind, got it to work, there was an extra n in navigate at the very beginning. And the script works, thanks a million! Quote Link to post Share on other sites
iDollarsteam 13 Posted June 14, 2013 Report Share Posted June 14, 2013 Anytime ... Good luck with your boots! 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.