wzeller Posted February 10, 2010 Report Share Posted February 10, 2010 I'm writing a macro that interfaces with a website and loads several pages and processes a bunch of stuff. And, just when I thought I was almost finished, the very last button to click has a special challenge for me. There are a variable number of pop-up ads on the page at both the top and bottom (between 0 and 2, inclusively), and each of those will have at least one link. Which means that both tabbing from the top of the page down and shift-tabbing from the bottom up are unreliable ways to get the focus onto the button. The presence or absence of the top of the page popups also change the physical location of the button vertically so I can't use mouse motion. From what I've read in the forum here, the whole browser window is one big control, so using a control variable is probably not an option either. The browser I'm using is Google Chrome, and I did have one idea that might work but it seems ludicrously roundabout: I could hit Ctrl-F and then type in text matching a label that sits a fixed distance and direction from the button. That will perform a "find on page" search and highlight the label in orange. Then I could search a rectangular area for the first orange pixel and put the mouse there, and then move the mouse in the right direction for the right distance, and then click. But there has just GOTTA be a better way than that. (I'm already running ad blocking software, and if that was working perfectly then the pop-ups would be gone and the problem with them. But some get through, thus the challenge. I even tried disabling the popup blocker figuring at least I'd have a constant number of ads - but it turns out that the number of ads shown really is different from time to time.) Very frustrating. I've spent quite some time going through these forums but haven't found a solution. Any ideas/pointers? w Quote Link to comment Share on other sites More sharing options...
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.