gillian 0 Posted October 13, 2011 Report Share Posted October 13, 2011 In Ubot 4: Can someone work out what's happening on amazon Search? I have a script that takes a keyword from a list, puts it into the search bar, clicks the "go" button and then goes to the next keyword in the list. However, on the second loop, instead of the "go" button getting clicked it seems to search in Listmania instead. For example: glass flowers is put into the Amazon search bar"go" button is clickedglass flower results are returnedPC speakers is pur into the Amazon search barbut it doesn't appear to click "go" but rather ends up in Listmania See screenshot: Any ideas on how I can fix this? ThanksGillian Quote Link to post Share on other sites
JohnB 255 Posted October 13, 2011 Report Share Posted October 13, 2011 Place a command in the loop that chooses Amazon from that dropdown and not Listmania as it seems to be switching to it. John Quote Link to post Share on other sites
gillian 0 Posted October 14, 2011 Author Report Share Posted October 14, 2011 Place a command in the loop that chooses Amazon from that dropdown and not Listmania as it seems to be switching to it. John I did that but it doesn't make a difference. I added a change dropdown command between the type text and click, in the loop. I put pause script under it so I can see that "All Departments" is indeed showing in the dropdown. But when I move the script on and it clicks it still ends up on the listmania page. Is there another way to define the go click other than by image (which is what Ubot chooses as the element)? Maybe that would work. ThanksGillian Quote Link to post Share on other sites
LoWrIdErTJ - BotGuru 904 Posted October 14, 2011 Report Share Posted October 14, 2011 ui text box("Keyword", #keyword) navigate("http://www.amazon.com/", "Wait") type text(<name="field-keywords">, #keyword, "Standard") click(<alt="Go">, "Left Click", "No") Enjoy! Quote Link to post Share on other sites
gillian 0 Posted October 14, 2011 Author Report Share Posted October 14, 2011 ui text box("Keyword", #keyword) navigate("http://www.amazon.com/", "Wait") type text(<name="field-keywords">, #keyword, "Standard") click(<alt="Go">, "Left Click", "No") Enjoy! Thanks for the suggestion but that didn't work either. In the end I solved the Listmania problem by making the click element <class=nav-submit-input>. Then I had a problem where the browser wasn't being cleared and I ended up with multiple keywords in the search box so I solved that by navigating to amazon.com (thus emptying the search box) every time the loop searched for a new keyword. I'm sure there must be a better way of doing that but I couldn't find it! Now the issue is that it's picking up a blank at the end of each list, i.e. it searches with an empty search box. I am using $list total and $next list item but it seems to be searching for one extra item that isn't there. How do I stop this from happening? thanksGillian Quote Link to post Share on other sites
LoWrIdErTJ - BotGuru 904 Posted October 14, 2011 Report Share Posted October 14, 2011 if list item = nothingdo nothingelsesearch keyword also stead of navigating change value to the search bar stead of typing text Quote Link to post Share on other sites
gillian 0 Posted October 14, 2011 Author Report Share Posted October 14, 2011 if list item = nothingdo nothingelsesearch keyword also stead of navigating change value to the search bar stead of typing text Still struggling with this. It made sense until I tried to put it into action! Looking at the first bit. When I add if $list item I need to put in a position. What is the postion? I want something equivalent to "current list item". And how do I add = nothing? And what does the search keyword equate to? I don't have search keyword except by using "type text" to type it into the Amazon search bar and clicking the "go" button. Will try and tackle the navigating bit once I've got this sorted. Which, as you can see, could be a while. Quote Link to post Share on other sites
LoWrIdErTJ - BotGuru 904 Posted October 14, 2011 Report Share Posted October 14, 2011 can you share what you have going right now code wise and I can add in there what you need. Quote Link to post Share on other sites
gillian 0 Posted October 16, 2011 Author Report Share Posted October 16, 2011 can you share what you have going right now code wise and I can add in there what you need. I'm having lots of freezing problems with Ubot4 and so had to redo the bot when it got corrupted. I think this is what I had when I asked for help regarding the empty list item and navigation problems to which you responded above: Thanks so much for your help.Gillian Quote Link to post Share on other sites
gillian 0 Posted October 16, 2011 Author Report Share Posted October 16, 2011 This is really starting to drive me nuts now. I tried to add 2 .pngs but it only showed one. They I tried to edit the post and now it appears that neither .png is showing. I'll try the reply again . . . Quote Link to post Share on other sites
gillian 0 Posted October 16, 2011 Author Report Share Posted October 16, 2011 can you share what you have going right now code wise and I can add in there what you need. I'm having lots of freezing problems with Ubot4 and so had to redo the bot when it got corrupted. I think this is what I had when I asked for help regarding the empty list item and navigation problems to which you responded above: I can't seem to add the second file so I'll put it in a new post . . . Quote Link to post Share on other sites
gillian 0 Posted October 16, 2011 Author Report Share Posted October 16, 2011 Here's the second file: Hope they make sense! thanks for your helpGillian Quote Link to post Share on other sites
JohnB 255 Posted October 16, 2011 Report Share Posted October 16, 2011 Hi Gillian. One method we like to use (TJ as well) is to not use the $next list item constant, but rather set a variable outside the loop and use $list item instead (where you increment the variable). It just seems to perform better at times. It would look like this: http://screencast.com/t/kL8juD8W John Quote Link to post Share on other sites
LoWrIdErTJ - BotGuru 904 Posted October 16, 2011 Report Share Posted October 16, 2011 also add a wait/delay after the click. Quote Link to post Share on other sites
gillian 0 Posted October 16, 2011 Author Report Share Posted October 16, 2011 Thanks to you both. Have tried to make the changes you suggested but Ubot keeps freezing and I keep having to restart my computer to get it to work again. Most times I loose the changes I've made. Now even that's working. I've restarted 3 times and it still won't connect so I'm giving up for today. It's tempting to go back to 3.5 (and I may have to) but I'd rather not as it's confusing enough as it is, without learning both versions! Will try again tomorrow. Quote Link to post Share on other sites
Guest klauzser Posted October 17, 2011 Report Share Posted October 17, 2011 Same thing happened to me. I though it is normal. Anyway, thanks to the scripts you guys provided. I will try it out later on. Quote Link to post Share on other sites
gillian 0 Posted October 17, 2011 Author Report Share Posted October 17, 2011 if list item = nothingdo nothingelsesearch keyword also stead of navigating change value to the search bar stead of typing text Still trying to work this out . . . I have made the $next list item into the variable #current KW Then I have a loopifCondition to Run Commands: And I'm trying to put here your: list item = nothingI have: #current KW "=0" Is that what you meant? Then for your "do nothing" I have simply left the then node empty. Is that correct? Elsetype #current KW into the browser But what's happening is it is ignoring the actual current keyword, which I can see has the correct value when I look in the debugger, and typing nothing into the browser. So, I've done something wrong. Quote Link to post Share on other sites
LoWrIdErTJ - BotGuru 904 Posted October 17, 2011 Report Share Posted October 17, 2011 if you like gillian email me the source and I will take a look for you and make adjustments to it. admin@botguru.net Quote Link to post Share on other sites
gillian 0 Posted October 17, 2011 Author Report Share Posted October 17, 2011 Email on its way. Thanks! Quote Link to post Share on other sites
LoWrIdErTJ - BotGuru 904 Posted October 17, 2011 Report Share Posted October 17, 2011 rebuilt, and emailed back to you.. See tab 4 I created, and merged the tabs you had created into 1 complete functional tab, and runs seamlessly now. Quote Link to post Share on other sites
gillian 0 Posted October 17, 2011 Author Report Share Posted October 17, 2011 Grrrrrrr!!!! Was so looking forward to seeing what you'd done but I can't get Ubot to connect to the browser again. I've restarted the computer 5 times over the last couple of hours but it's not happening. As soon as I can connect I'll give it a whirl and report back. Thanks again for your efforts. Gillian 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.