Jump to content
UBot Underground

Clicking Images In Gmail


Recommended Posts

Hello everyone,

 

I am trying to have my bot log in to gmail, go to the spam folder search for a specific text within a specific number of pages. When it finds an email that matches it clicks it, choose display images, then clicks one of the images and from there chooses not spam, and continues to look through the emails from the last page it left off. I have all of this working minus clicking on the images. I have tried several things such as scraping the content of the email and using a regex expression to find image source, image link, .jpg, etc.. but nothing is working. When I try to click the image nothing happens. Am I missing something? I have attached some of the code so you can see if its an issue with how I am going about it. In this I have tried wildcards and still having no luck! Any suggestions would be much appreciated!

                    loop while($comparison(#TriggerEmail,"= Equals","true")) {
                        set(#currentpage,$url,"Global")
                        click(<innertext=w"*You were added to the system *">,"Left Click","No")
                        wait for element(<innertext=w"*You were added to the system *">,"","Appear")
                        click(<innertext="Display images below">,"Left Click","No")
                        wait for browser event("Everything Loaded",10)
                        wait(2)
                        click(<((tagname="img" AND outerhtml=w"*#http://*") AND outerhtml=w"*.jpeg\">*")>,"Left Click","No")
                        click(<value="Not Spam">,"Left Click","No")
                        wait for element(<innertext="The conversation has been unmarked as spam and moved to the Inbox.   Learn more">,10,"Appear")
                        LoadLastPage(#currentpage)
                        set(#TriggerEmail,$search page("You were added to the system"),"Global")
                    }
                }
                else {
                    if($comparison(#NextButton,"= Equals","true")) {
                        then {
                            click(<innertext="Older ›">,"Left Click","No")
                            wait for browser event("Everything Loaded","")
                        }
                        else {
                            stop script
                        }
                    }

EDIT *SOLVED* I managed to find a way to preserve the links using a regex expression to scrape the links, then load them in a new browser! 

http:\/\/www.google.com\/url\?q\=http[\%\.0-9a-zA-Z&\=]+
Edited by Kabone
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...