How can I click on Context menu for translate webpage in webdriver? - webdriver

I want to click on this text Translate to English
Using this code I have opened Context menu $driver->action()->contextClick()->perform();
If I press Arrow up key and after press Enter then page is translated
I have tried this code but it is not working:
$driver->getKeyboard()->sendKeys(WebDriverKeys::ARROW_UP);
$driver->getKeyboard()->sendKeys(WebDriverKeys::ENTER);
How do press Arrow up and press Enter? or any alternative solution for clicking Translate to English text?

Related

How to highlight text on web pages using a keyboard

I need to take screenshots of a web page. I want to highlight certain areas of the page before taking the screenshot. I am visually impaired, so using the mouse is out of the question.
I generally use shift and the arrow keys to select text. While this works on web pages, the text is selected, but not highlighted. IE I know it is selected, but someone who will look at the screenshot won't be able to see it.
Q: is there a way of highlighting text on a web page using the keyboard?
I am using Windows 11 with NVDA as my screen reader.
This appears to be possible with Google Chrome if the accessibility option "Navigate pages with a text cursor" is enabled—also known as "caret browsing". Here is a Google Chrome help article about it: "Use a text cursor to navigate & select text".
The article states that this setting can be toggled by pressing F7, or by opening the "Customize and control Google Chrome" menu, opening "Settings", navigating to the "Advanced" tab, then selecting "Accessibility".
This mode allows you to use the arrow keys to move the text cursor around the page, similar to if you were editing a block of text. Text can be visually highlighted by navigating to the start of the text you want to highlight, holding the Shift key, and then arrowing to the end of the text.
I'm not sure how well this will work in conjunction with NVDA though.

Editing Build Settings in xcode 4

I have been unable to work out how to edit build settings using the pop-up shown below.
I can enter multiple lines in the pop-up by clicking the '+'. My questions are :-
What is the checkbox next to the setting used for?
Once I have entered one or more settings in the pop-up, how do I make them transfer to the setting I am editing. There isn't a 'Save' button, and clicking off the pop-up closes it but doesn't seem to save the entered data.
Thanks
To delete, check the checkbox and click "-".
To make a new one, click "+".
To save, click "Done".
Welcome to the Wonderful World of Apple UX.

SELENIUM: how to click on a blank section of webpage

I have a search textbox, which has some default text "search your item" visible in it.
Once you click on the search box to enter any word, the default text disappears and the word is typed.
Now, if the word inside the search box is deleted and then you click on any place on the blank part of the page, then the default text appears.
I would like to simulate this using selenium. I am able to delete the word from the search box, but after deleting the word, how do i click on any blank part of the page so that the default text is visible again?
thanks for the help in advance.
Simply use the code:
selenium.FireEvent("//id of the text box","blur");

What is the proper name for a multibutton?

I'm trying to design a UI in Qt and I can't find anywhere in the designer a button which can be "droped down" like combobox. What I mean by that is that I would like to have this button with his "default" option choosen so if I like it I would have to just click on it but if I would like to choose different option I would be able to clik the little arrow on the right side of this button and then pick option suitable for me at that moment.
You're looking for a QToolButton that has a set of actions or a menu set on it. From the documentation, the QToolButton::ToolButtonPopupMode...
Describes how a menu should be popped up for tool buttons that has a menu set or contains a list of actions.
Of it's values, the two that I see most frequently are DelayedPopup:
After pressing and holding the tool button down for a certain amount of time (the timeout is style dependant, see QStyle::SH_ToolButton_PopupDelay), the menu is displayed. A typical application example is the "back" button in some web browsers's tool bars. If the user clicks it, the browser simply browses back to the previous page. If the user presses and holds the button down for a while, the tool button shows a menu containing the current history list
And MenuButtonPopup:
In this mode the tool button displays a special arrow to indicate that a menu is present. The menu is displayed when the arrow part of the button is pressed.

VSTO C#: How to disable the popup (tooltip) on a Ribbon Button

I developed a plugin for outlook 2007 that adds a button to the office ribbon.
I wanted to know if there is any possibility (programmatically) to not show the popup message when hoovering over the button with the mouse pointer.
When I hover over the button, a little popup (tooltip) with the following text is displayed: MyAddinName Press F1 for help
Is there any way to suppress this message for this custom button?
It's not possible to remove that text. Microsoft puts it there so that third-party add-ins are clearly identified and their product doesn't get blamed for buggy behavior.

Resources