Jump to content
UBot Underground

How To Get Around A Pop Up Window


Recommended Posts

Am trying to build a bot to log in to my matchbook account (http://matchbook.com) but I can't get passed to initial pop up banner ad that keeps displaying. I've tried to click the little cross at top right but that didn't work. Until I can make that pop up disappear, i can't do anything else?

 

Any suggestions? Thanks

 

The ___IMAGE___1___IMAGE___ is an image I took of the little X at top tight of the banner ad.

navigate("https://www.matchbook.com/", "Wait")

wait for element(<class="top-layer">, "", "Appear")

wait(5)

click(<image="___IMAGE___1___IMAGE___">, "Left Click", "No")
Link to post
Share on other sites

Well, a sort of solution - but there has to be a better way than this...

 

 

navigate("https://www.matchbook.com/", "Wait")
wait for element(<class="top-layer">, "", "Appear")
wait(3)
focus(<class="top-layer">)
wait(3)
click($element offset(<create account button>, 1), "Left Click", "No")
click(<class="close">, "Left Click", "No")
type text(<username field>, "xxxx", "Standard")
type text(<password field>, "yyyy", "Standard")
click(<login button>, "Left Click", "No")
Link to post
Share on other sites

The Communication plugin comes with a special command for popups CBrowser Popup Container this way you can handle popups what is currently not possible in Ubot itself. Plus a ton of other features!

 

http://i.imgur.com/Dq91BER.png

 

CBrowser Popup Container: Container that handles automation inside a popup

 

  • Like 1
Link to post
Share on other sites

yeah actually I got rid of that actually set <button aria-hidden="true" to <button aria-hidden="false"

just quickly but now I cant get the pop up back up again to test it !! after that is changed you can close it with a click

 

 

<div class="top-layer">
      <button class="btn btn-large btn-matchbook-danger joinOverlay" style="top:400px; left:392px;">JOIN NOW</button>
    </div>
        <button aria-hidden="true"

 

with change attribute or javascript

then click it,I done it once now I cant get the pop up back again to test it ha ha,as for the rest try

 

run javascript("var userName = document.getElementById(\'session_username\');
userName.value= (\"name here\");

var pass = document.getElementById(\'session_password\');
pass.value= (\"something\");


var login = document.getElementsByClassName(\"btn btn-info btn-small\");
login[0].click();

")

Link to post
Share on other sites

Thanks but i can't find <button aria-hidden="true" within the code. Is it in the code of the pop up (or was it when you tried it?)

Link to post
Share on other sites

this should work

 

click(<class="closeOverlay close">,"Left Click","No")

 

 

yes this is from the pop ups code

the code would be at near the end of the page because the pop up loading is one of the last actions of the page

set(#doc,$document text,"Global") the Ubot node scrape attribute would point you in the right direction,I think that had the attribute id="overlayBanner" or "top-layer",so find that in the document text

 

first thing I done is save the code before I clicked anything,actually a lovely free plugin is the save to clipboard,advanced file plugin I think it is called,

on my ubot suite I would always have this as a ui button and would hit it everytime I go to work on a new page

ui button("save") {
    plugin command("Advanced.File.dll""Save to Clipboard"$document text)
}

(thanks Kev)

Link to post
Share on other sites

Ahhhh Yessss!!

 

click(<class="closeOverlay close">,"Left Click","No")

 

That worked mate - thanks very much for your help with this.

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