Needing to use "Found Image" to locate a button on a webpage, but it's a translucent button that changes colors based on whatever random image is behind it, so the image-find function isn't finding it because it seems to care more about color than shape.
So I was hoping for the capability to grayscale the screen and the search-image and then do the search.
Can you post screenshots of some examples of the button? You could probably do the grayscale with imagemagick--but maybe it's not necessary and some clever person here could come up with a different way other than found image.
I'm pretty good with python for data analysis, but I'm definitely not smart enough for this answer. The DOM is still pretty confusing for me. I think the element I'm trying to click is in a "Shadow DOM" (?).
The relative XPath is: //ytd-video-owner-renderer[@class='style-scope ytd-watch-metadata']//a[@class='yt-simple-endpoint style-scope yt-formatted-string'][normalize-space()='Guardian News']
It contains the username, so it won't work for every youtube video, whereas the JS Path is:
All I needed was the way to return a URL. A YouTube video was just an example of a page type that features an element whose JSPath is consistent, but the URL changes.
The only bit I needed to know was to add .href at the end. The rest of it I can get from SelectorsHub.
Your plug-in built a more complex query than necessary.
This works reliably for the given element on the YouTube page, although it's pretty general and therefore fragile (being that it's the first element with ID = "text", and that could easily change).