Jump to content
UBot Underground

Open In New Tab ? Need To Click (So Scraping Not Option)


Recommended Posts

Hi guys,

 

I need to click a link and normally in Chrome it just opens a new tab, but in Ubot its the same tab. While I can go back with JS this is not really ideal (proxies and all).

I there a way to click a link and have it open in a new tab? Tried with jquery but could not make it work.

 

I know I can scrape the URL and open in new browser, but I need the click to happen so that solution does not work here.

 

Thanks

Link to post
Share on other sites

I'm not sure I exactly follow, but I think this is what your looking for

 

You mightn't need the change attribute bit of code below but might help you

allow popups("In New Window")
navigate("http://www.ubotstudio.com/resources","Wait")
wait for browser event("Everything Loaded","")
change attribute($element offset(<login link>,0),"target","_blank")
click($element offset(<login link>,0),"Left Click","No")
in popup {
    alert("hello from window {$url}")
    close page
}

Link to post
Share on other sites

I am also guessing you want the user to be able to click stuff if so try this, very crappy code but works, click the login button manually, code will run until you switch page of main browser

allow popups("In New Window")
define navigateWithUserControl(#url) {
    navigate(#url,"Wait")
    wait for browser event("Everything Loaded","")
    change attribute($element offset(<login link>,0),"target","_blank")
    loop while($comparison(#url,"=",$url)) {
        in popup {
            alert("hello from window {$url}")
            close page
        }
        wait(0.1)
    }
}
navigateWithUserControl("http://www.ubotstudio.com/resources")

  • Like 1
Link to post
Share on other sites

Thanks , for some reason just saw this now. I tried it with jquery before, totally missed on the internal functionality.The site I am working with has it set up differently, but I am just experimenting with simply replacing the destination with "" seeing if it still counts the click on it.

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...