OAuth new tab - mat-icon - oauth-2.0

I am trying to automate an application that opens new tab. When I analyzed the element it shows as <mat-icon> inside button. I can't find target attribute inside it. Also not able to find JavaScript code. Can you please help me with this scenario.
I am not able to find target or JavaScript code.

Related

Umbraco - editing preview window sidebar options

I have a project which is using Umbraco v7.7.9 installed with nuget.
I was wondering if it is possible to change the buttons displayed in the sidebar section when a user selects to preview a content node. Particularly I want to remove the option that allows the user to close the preview.
The reason I want to hide this option is because some of the content the backoffice users will be previewing will not actually be published yet so clicking the close preview button causes an error.
I first asked this question on the Umbraco forums but haven't received a response yet, here is the link to the question: https://our.umbraco.org/forum/extending-umbraco-and-using-the-api/90878-editing-preview-window-sidebar-options
Thank you in advance.
Currently no - it would not be possible without doing hacks in the Core that would be overwritten when you upgrade your site (unless you manually merge your changes in when updating).
If you however don't mind doing that - the file used for the preview function is /umbraco/preview/index.html. You should look for the element with an exitPreview() click handler attached to it.
In later versions (7.10+) this modification will have to be done in /umbraco/Views/Preview/Index.cshtml instead, as these static files will be changed to MVC actions.

Change help link in the Visual Editor of MediaWiki

Is there a way to change the help link in the toolbar dropdown in the new visual editor of MediaWiki?
I tried setting
"visualeditor-help-link":"mw:Help:VisualEditor/User guide/de"
in
"extentsions/VisualEditor/modules/ve-wmf/i18n/de.json"
as proposed here, but then my MediaWiki could not parse the JSON file. My goal is to link to the MediaWiki help page, that can be found here. The normal version:
"visualeditor-help-link":"[https://www.mediawiki.org/wiki/Help:VisualEditor/User_guide/de]"
did not work, neither did this:
"[[{{MediaWiki:visualeditor-helppagelink}}|Hilfe]]"
You should never ever change the source code of MediaWiki core or any extension. It makes an upgrade process much more hard and complicated. There are other ways to achieve a high customization of the user interface language :)
For your problem, it should be enough to create the following page in your wiki (like any other page, but you need the editinterface user right, which is assigned to sysops by default):
MediaWiki:visualeditor-help-link
Put the link you want to use into the textarea (without any wikitext, e.g. "Help:VisualEditor" (without any ")) and save the page.
After reloading the VisualEditor (maybe you need to clear your browser's cache using Ctrl + F5) the link should point to the new target you specified in the message above. If you use a message cache, it is maybe needed to rebuilt it.

How to implement Submit and Cancel buttons in IWizard implementation

How do we implement the OK/Submit button if the user chose his preferences and he is ready to start working on his new project? Furthermore - Cancel button - gracefully exit from the wizard and return to New Project dialog box without creating the project.
The IWizard interface (Microsoft.VisualStudio.TemplateWizard namespace) doesn't give you full control of the project creation. It allows you to do some things at specific phases of the project creation. It is cancelable throwing a WizardCancelledException. See also this explanation and also:
Pitfalls of cancelling a VSIX project template in an IWizard
If you want full control you can use the old COM-based IDTWizard interface (EnvDTE namespace) instead, which provides a single Execute method where you can show a form (cancelable) and add the project/files using EnvDTE.Solution.AddFromTempleate, EnvDTE.ProjectItems.AddFromTemplate, etc. See my post:
Project templates wizards (IWizard vs IDTWizard)

Selenium IDE simulate press ENTER for javascript configmation box

I am looking for allready for hours how to do this. So don't tell me to use search function. I know there are many things related.
There is many stuff on the internet and here, but no one works for me.
And I need a solution for Selenium IDE or something intergrated with it (if there is anything). Not RC and not WebDriver etc.
I need to simulate a key for an JavaScript confirmation popup, which has "OK" and "Cancel" buttons.
The problem is that I cannot select anything.
Popup appears when the site is opened. The Website itself is visible in the background, but no element can be selected (Firebug shows nothing as well, empty html(?)).
If I press ENTER key the confirmation box disappear (so it works fine manually).
This example seems good, but I can't find any interface in Selenium IDE to do this:
driver.switchTo().alert().accept();
(from Click in OK button inside an Alert (Selenium IDE))
I have only the following pattern:
Or write the test in html, which uses the "Command", "Target", "Value" pattern.
Appreciate any help.
EDIT1:
With the link provided by Janesh Kodikara
I have found that my problem is:
Selenium IDE will not be able to handle alerts that are within the page's onload() function. It will only be able to handle alerts that are generated after the page has completely loaded.
There is no "onload" function in my website, but the script part which creates the alert is inside html which is called with page (not in any function). This must be the same as "onload", because the alert comes immediately when the website is opened.
Once you have a confirmation box, you must consume it (Click OK or Cancel button)
You can use "chooseOkOnNextConfirmation" command to instruct Selenium IDE to simulate clicking OK button.
See http://www.guru99.com/enhancing-selenium-ide-script.html for more details.
You will not see the Javascript popup when IDE script is run.
Selenium IDE
Command : runScript
target : {window.onbeforeunload=function(e){};}
Command :click
target : xpath of button.
This will work fine but you are not able to see popup.

Display options.xul programmatically

I have an xul overlay based Firefox Add-on that works. It has inline options defined in content/options.xul and they display/function correctly when the user goes to Firefox->Add-ons->Extensions->{The Name of My Extension}->Options
The question, can I a create a button on my Add-on that will launch my options either by taking the user to Firefox->Add-ons->Extensions->{The Name of My Extension}->Options with one click or by launching a dialog based on options.xul?
Right now I am maintaining a separate options.html and options.js that gets and sets the same settings that options.xul handles when the user navigates there via the Firefox button but I would much rather dump options.html and options.js and only maintain my main.js and options.xul.
Any comments or code examples will be greatly appreciated.
This is easiest to do via a global function BrowserOpenAddonsMgr() defined in the browser window, like this:
BrowserOpenAddonsMgr("addons://detail/" + encodeURIComponent(addonID));
This function takes care of focusing the existing add-ons tab if there is one or opening a new tab. It will not scroll down to the options however which is an issue if the add-on has a lengthy description. Starting with Firefox 12 this can be solved by adding "/preferences" to the view identifier:
BrowserOpenAddonsMgr("addons://detail/" + encodeURIComponent(addonID) + "/preferences");
With older Firefox versions you are out of luck (and you shouldn't use this suffix there, it won't work). The other issue is that there can be a lengthy "loading" phase where the add-ons manager fetches metadata for all extensions.

Resources