Opera Extension: selecting text and page menu - opera-extension

What is the simplest way to create Opera addon with such functionality: user selects text on the page (eg. menu), clicks right button and sees:
?

You should use the Context Menu extension APIs.

Related

How to get rid of google pop-ups while testing and navigation google url?

Every time I navigate to google through Selenium, I encounter this popup. I can't click on the search bar. Is there a way to close permanently this popup without using any JS alert method etc.?
I tried some extensions but it didn't work
Click the Lock button (đź”’) on the top-left of the search box
Click on 'Cookies'
Make sure you're on 'allowed' and find anything on the lines of google.com
Click Block, Done and refresh the page
Additionally, you may want to try it first without the web-driver 'Chrome is being controlled by automated test software' mode, so open Google Chrome you way you usually would.

ShadowRoot handling in Safari

When I put a focusable element in the shadow DOM, OSX Safari doesn't include it in the tab sequence (unlike all other browsers). The button is visible, clickable but not accessible for keyboard users. Is this a known bug? Is there a way to handle it besides making the component tabbable and forwarding focus (which seems kind of gross)?
Here's what a minimal example looks like in Safari's console
<div class="host">
Shadow Content (Open)
<button>Click me</button>
</div>
I created this example by calling .attachShadow({"mode": "open"}) on div.host then setting its .shadowRoot.innerHTML to "<button>Click me</button>"
I'm having this issue in components I created. I tested the example above in Chrome and the button is included in the tab sequence as expected.
Safari doesn't enable tab navigation by default, it must be enabled via preferences.
Tab highlights the next text field or pop-up menu. Tab also highlights
buttons and other controls if “All controls” is selected in the
Shortcuts pane of the Keyboard pane of System Preferences.
Option-Tab highlights the same items as Tab plus all other clickable
items.
To swap the behavior of Tab and Option-Tab, turn on “Press Tab to
highlight each item on a webpage” in the Advanced pane of Safari
preferences.
https://support.apple.com/guide/safari/keyboard-and-other-shortcuts-cpsh003/mac

How to use Firebug CSS on dynamically appearing components?

I am working on a Javascript Based site, which uses the Dojo Framework.
I am using a DataPicker. I wish to change the background color of the datePicker, and hence I wish to look at where in the CSS is the color being set, so that I can override it in my CSS.
Usually I use FireBug and 'Inspect Element in FireBug' to view the HTML and CSS together. (or even Google Chrome's developer tools)
However this datepicker is a dynamically created component, and If I right click, or move my mouse into the Firebug window, the date picker is shutdown/destroyed. (You can check out the sample on the linked page itself)
Is there a way to inspect the CSS on these kinds of dynamic elements, using Firebug, or something else?
The best approach I've found for the dijit popup widgets is (using chrome)
Open the popup (in this case the date picker)
Right click on the element
Select "Inspect Element" from context menu
Chrome will open and transfer focus to the developer tools without blurring the focus of the page, keeping the popup open, allowing you to modify attributes and css rules and getting instant feedback.

Webdriver: Click on button's part for open color chooser

I use Selenium to test some web-product in my company.
Product has button, which open dialog to choose color. I think it's created using 'extJS' (I'm not so sure).
But then i click to any part of that button, using Webdriver, it's always just set current selected color, but newer opened dialog window to select color.
I found similar button on some random site, which has similiar behavior.
Link to site with button on developer.yahoo.com
So in source of the page you can see, that there is no specific element for right part of button, with down-oriented arrow.
So xPath
//*[#id='color-picker-button']
describe button in all,right part and left part.
But every child element of this describe only left part of this button, so right part with arrow has no any specific xPath to click in my WebDriver text.
I also tried things like
driver.action.move_to(element, coordinate_right, coordinate_down).perform
but it has no effect for me.
So in general my question is :
How to open color selector window on that Yahoo page
Use the SendKeys() method and send the "down arrow" key to the control (C#):
element.SendKeys(Keys.ArrowDown);
That should open it right up.

iOS - Add menu item to Safari "Open with"

I'm new to iOS development - How do I create a Safari extension that adds a new item to the "Open with" menu (the same menu where I can bookmark the page)? I'd like to share the page URL that the user is currently viewing with a third-party app.
Thanks
Assuming you are using Xcode, go to your project settings, then choose your target. In the Info tab, you would add a Document Type which will associate it (doc, xls, txt, etc) with your application. If you open the item in safari, you will be presented with an option to open it in your app. In recent versions of mobile safari, I believe a bar appears at the top of the document presenting you with this option as opposed to appearing in the 'Add Bookmark' popover.
Here is some detailed information.