Jump to content
UBot Underground

Here's One For The Pro's


Recommended Posts

I've coded a ton of bots but I just ran into a simple problem and I'm not sure how to do this.

 

I need to have the ability to have the browser window to focus in on and display an element on the page. So, if the element is sitting below the fold, out of sight, I'd like a command that will bring it to the top of the page. There is a focus command but it doesn't do this.

 

Any thoughts?

 

 

Frank

Link to post
Share on other sites

Untested first thoughts

 

Can you not just change the element and add an anchor so you can just click and scroll to it?

Link to post
Share on other sites

Hi,

 

Javascript maybe:

run javascript("var element = document.getElementById(\"support\")
element.scrollIntoView(true)")

 

Sample code will scroll "Screen resolution" to top of browser window.

 

Sample code using getElementById:

navigate("http://www.infobyip.com/", "Wait")
run javascript("var element = document.getElementById(\"screen_dimensions\")
element.scrollIntoView(true)")

 

Sample code using getElementByTagName:

navigate("http://www.infobyip.com/", "Wait")
run javascript("var element = document.getElementsByTagName(\"td\")[42]
element.scrollIntoView(true)")

 

Kevin

Link to post
Share on other sites

THIS IS CRAZY!

 

I have three bots now that are now broken. This trick is now failing.

 

One of my bots is a Pinterest bot so scrolling down automatically is essential.

 

My test site which was eBay changed to a Pinterest look from yesterday so that bot no longer works either.

 

UGHHHH!

Link to post
Share on other sites

It seems to work and then not work. VERY strange.

 

I am also working on a way to use the $exist function. It actually blinks the screen so I have a small hunch that might be a tiny bit of hope for another possible workaround.

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