Jump to content
UBot Underground

Working Between Browser Windows


Recommended Posts

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

Link to post
Share on other sites

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)
    }
}
Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...