Frank 177 Posted May 21, 2016 Report Share Posted May 21, 2016 Hey all, Is there any way to be running a child browser window in ubot and have it look at the main window and do something in the main window while working in the child window? Frank Quote Link to post Share on other sites
HelloInsomnia 1103 Posted May 25, 2016 Report Share Posted May 25, 2016 Like maybe scrape something from the main window and have the child browser sit there waiting for some information? I created a (very) basic script that will basically work like this: Child browser goes to a form then waits for the main browser to scrape some info and "send" it. The main browser goes and scrapes up some random usernames and then the child browser sees that the variable is filled and then uses that info to populate a username field. I'm not 100% sure if this is what you mean but it may help. set(#username,$nothing,"Global") set(#child_browser_ready,"false","Global") thread { comment("wait a few seconds for the other thread to get there") loop while($comparison(#child_browser_ready,"=","false")) { wait(1) } navigate("http://www.spinxo.com/","Wait") clear list(%usernames) add list to list(%usernames,$list from text($scrape attribute($element child(<id="divNames">),"innertext"),$new line),"Delete","Global") set(#username,$random list item(%usernames),"Global") } thread { in new browser { navigate("https://ubotstudio.com/site/playground-simple-form/","Wait") wait for browser event("Everything Loaded","") set(#child_browser_ready,"true","Global") comment("Wait for main browser to get info") loop while($is blank(#username)) { wait(1) } type text(<username field>,#username,"Standard") alert("Look in child browser for result") wait(20) } } 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.