Noob-Botier 1 Posted June 26, 2013 Report Share Posted June 26, 2013 Hi All: Struggling with something here that I need advice on. See the script below, once this completes, there is a "Property Details" link on the right I need to get access to. The ubot browser shows an odd object that doesn't do what a normal browser does. How do I get at the info on this page in order to scrape it? set user agent("Chrome")navigate("http://gis2.co.dakota.mn.us/maps/property.htm", "Wait")wait for browser event("Everything Loaded", "")type text(<name="searchOne">, "42-83400-05-104", "Standard")click(<name="submit1">, "Left Click", "No")wait for browser event("Everything Loaded", "")wait(1) any suggestions would be helpful. -Noob Quote Link to post Share on other sites
UBotDev 276 Posted June 27, 2013 Report Share Posted June 27, 2013 Try to use "wait for element" command instead of fixed delay 1 sec. With this new command you should wait for "Property Details" to come up. 1 Quote Link to post Share on other sites
Noob-Botier 1 Posted June 27, 2013 Author Report Share Posted June 27, 2013 I can wait for element, I dont think that matters, does it? Either way I can get to the page that shows "Property Details". My issue isnt waiting for the "Property Details" to appear, its clicking on the "Property Details" link and getting the tab/new window to popup. The ubot browser doesnt correctly open the new page. Other ideas? Thanks.Noob Quote Link to post Share on other sites
UBotDev 276 Posted June 27, 2013 Report Share Posted June 27, 2013 Sorry...now I see what's your problem...in normal browser that would open in new tab/browser, and that's why it gets displayed like popup in UBot (which is actually an iframe). You can actually scrape content from iframe, or do any other stuff in there. If you want to open that page in main UBot browser you need to scrape SRC parameter of that iframe window, and navigate to the URL scraped. Hope that helps. Quote Link to post Share on other sites
Noob-Botier 1 Posted June 27, 2013 Author Report Share Posted June 27, 2013 Uhh... could you point me int he right direction on that? Maybe a link to something similar or an small example? Thanks. Quote Link to post Share on other sites
UBotDev 276 Posted June 28, 2013 Report Share Posted June 28, 2013 Here is an example, where I load HTML / iframe manually, then I scrape its SRC parameter: load html("<iframe src=\"http://www.facebook.com\"></iframe> ") wait for browser event("Everything Loaded", "") wait for element(<tagname="iframe">, "", "Appear") wait(3) navigate($scrape attribute(<tagname="iframe">, "src"), "Wait") 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.