-13.2 C
United States of America
Monday, January 20, 2025

keyboard – How can I automate clicking in a Chrome extension popup with a hotkey?


I wish to create a workflow on my Mac the place I choose textual content on a Chrome webpage after which press a hotkey mixture to alter the title of tab to be the chosen textual content.

I generate a number of tabs that get equivalent titles and I wish to tag them with one thing based mostly on the contents to give you the chance inform them aside. I take advantage of the Chrome extension Tabs Outliner that shows a tree diagram of my tabs with their titles. As soon as the tab construction is in Tabs Outliner, I can do numerous issues like copy the tree of that window and paste it into Google docs as an archive of the tabs I created, my analysis, testing variations, no matter.

However all my numerous archiving flows rely upon the tabs having significant titles. The web site(s) aren’t doing that sufficiently for my functions, so I wish to manually tag them, generally as shortly and simply as attainable. Choose textual content and press a hotkey appears about as fast as I can get wanting having the pc learn my thoughts and observe my eye actions. Perhaps add the complexity of stopping to permit me to edit the pasted textual content after which urgent one other hotkey to substantiate and transfer on.

My concept is to have the hotkey provoke one thing like the next computerized move.

  1. Cmd+C: Copy the chosen textual content.
  2. Ctrl+Shift+A: Open the RenameTab Chrome extension.
  3. Cmd+V: Paste the copied textual content into the RenameTab textual content area within the dropdown.
  4. CLICK the “Lock Title (beta)” button within the RenameTab dropdown.
  5. Ctrl+Tab: Transfer to the subsequent browser tab.

I can write a easy Service to ship all of the keystrokes. However do not know how you can automate the Click on that’s required.

I need to have the ability to do that roughly 20-40 instances a day, day after day, so I can not presume that the Chrome window will probably be on the identical display screen location, on the identical monitor, the identical window measurement, or any of the opposite assumptions that fundamental click-automation scripts like Cliclick appear to require.

I can presume that the RenameTab dropdown will probably be on the identical relative location to the Higher Proper nook of the Chrome window (truly relative to the extension button which is usually secure). The picture right here is on Home windows, from the Chrome internet retailer, however I am engaged on a Mac.

Dropdown is positioned relative to the Upper Right corner of the browser.

I’ve discovered references to Selenium as presumably ready to try this click on, however the Selenium tutorials that I’ve discovered wish to put me by weeks of changing into a Take a look at Automation knowledgeable.

I presume that Selenium can do its factor in a method that defaults to the present browser window, present browser tab. However how do I inform Selenium the place to click on?

Can Selenium acknowledge that the browser body, not the present internet web page, has displayed a dropdown window and might it discover the button by title? All of the stuff I have been capable of perceive about Selenium up to now is that it appears to cope with the displayed internet web page, so perhaps it can not cope with having the ability to determine content material that is generated by the browser body itself.

Do I perhaps have to forgo Selenium as an alternative utilizing extra fundamental click on automation instruments and seize the present window measurement after which subtract the coordinates based mostly on the Higher Proper nook to get the press coordinates relative to the present window? Do I have to additionally cope with the present window place on the display screen?

Sorry for dumping all the main points, however I do not know how you can ask the query extra merely with out working the danger of presuming what the answer is after I actually do not know. So I am making an attempt to elucidate precisely what I wish to do, in what context, and why. In researching this, again and again I discover that the descriptions of assorted instruments are enthusiastic descriptions of how the device works in use instances that do not appear to overlap with mine, with out ever explaining the underlying working mechanism in order that I can decide whether or not or not the device is even presumably outfitted to do the job.

Any skilled steerage could be appreciated. When you can inform me issues like “Cliclick presumes this so you will not be capable to …” or “Selenium can solely cope with what it will get from … so you may need to …” or level me to the place the essential working ideas are outlined, I might be grateful.

Thanks.

Related Articles

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Latest Articles