How can I use edgeOptions args in the webdriverIO (or protractor)conf file to load extension? for new edge drivers (81.xx) - protractor

I'm trying to automate an extension for Microsoft Edge (Chromium) and it was working fine until the Microsoft Edge browser got updated to 80.xx and ended the support of chromeOptions for their new edge drivers.
Like earlier, I was using chromeOptions with Edge driver to load the extension but now by ending the support of chromeOption for the new edge drivers, I'm not able to load the extension or pass any arguments to the Edge Browser for WebdriverIO ( or Protractor) framework.
So how can I use the edgeOptions in the conf file to pass the arguments?

Anyway, I got the solution for this, just need to add "ms:edgeOptions" under capabilities (like goog:chromeOptions) and by doing that it will treat the args as Chromium.

Related

How to add extension to apigee-emulator on local environment?

Recently we get the need for work on the same apigee proxy more than one developer. So we are trying to use the apigee-emulator to allow us to use git as version control
We already have everything setup for VScode as it says on the documentation.
The problem is with an `extension callout we have inside one of our proxies that we need to access to salesforce. When we try to push our proxies to the apigee-emulator we get this error
If we search for the callout we can see it's the one that try to access to salesforce
How can we add this extension to be used inside the apigee-emulator?
From the error it looks like you are using Apigee Edge ExtensionCallout policy.
The vscode extension and the emulator cater towards the features available in the X and hybrid versions of Apigee. More information here
The extensions feature you are using has been replaced by the Integration callout policy.
Hope that helps

Is it OK for me to develop against UWP with JavaScript on Visual Studio 2017?

My company is using RPG Maker MV (based on JavaScript) and looking to port over to Xbox UWP. It's no longer supported in the latest version of Visual Studio.
Is there a workaround or should I abandon this and convert over to C#?
Sadly this has indeed been deprecated, but as a workaround you can use a WebView to host the game which is what I do with mine. You'll still have to deal with a few extra things if you want to use the Xbox storage functions (see here for my commentary on this) and you still need to implement sign-in (which I'm still working on) but once you add the WebView to your MainPage.xaml name it something like ContentViewport and (immediately following your login and file processing logic) add the following line of code:
ContentViewport.Source = new Uri("ms-appx-web:///index.html");
Or wherever your index.html is, so if you prefer assets over package root with the www folder copied in as a base, you can use the following:
ContentViewport.Source = new Uri("ms-appx-web:///assets/www/index.html");

VS Code API - remote calls

I am currently investigating VS code extensions in conjunction with a code generation project. While I understand that the VS code API is fairly full-fledged to allow in-extension manipulation of documents I can't figure out how to do this outside of the extension.
Are there ways of remotely executing the vs code JavaScript APIs outside of vscode which in turn will drive the GUI.
I am trying to figure out if I can do any of the following:
Execute the API JavaScript code when through the code cli
Run a web server/socket within an extension to listen to events from external systems and execute the JS API accordingly
If not socket/rest server, should I listen to filesystem changes and react accordingly?
Basically, what are the options for remote control driving of vs code?
I've faced a similar problem with an editor extension I'm working on.
I would highly recommend listening to file changes outside of VSCode APIs. This way the majority of your code is not bound to a specific editor. I also had much more difficulty using the VSCode API called createFileSystemWatcher as it didn't capture all changes.
Upon activation, run a child process using a file watcher library. I'd recommend using chokidar - its the same library VSCode uses internally but with more extensive access to the API.
// get your workspace uri & root uri
const workspaceRoots = vscode.workspace.workspaceFolders
if (!workspaceRoots || !workspaceRoots.length) {
throw new Error('No workspace root path')
}
const workspaceRoot: vscode.WorkspaceFolder = workspaceRoots[0]
const rootUri = vscode.workspace.getWorkspaceFolder(workspaceUri);
// the action you want to trigger
const command = vscode.commands.registerCommand('YOUR_CUSTOM_COMMAND', yourCustomFunction)
// file watcher
const fsWatcher = chokidar.watch('watcher_name', {
cwd: rootUri.uri.path,
interval: 1000,
})
// listen to any add/update/delete fs events
fsWatcher.on('change', (path, event) => {
vscode.commands.executeCommand('YOUR_CUSTOM_COMMAND')
})
On any file change, it can trigger the action of your choice.
If a VS Code extension can achieve everything you are after, then the simplest approach would be to let the extension be driven externally. VS Code extensions run in a node.js environment, so they can start a http server, listen on a named pipe, or communicate with the outside world using pretty much any other mechanism.
You can also take a look at VS Code support for testing extensions, since tests also just use standard VS Code extension apis: https://code.visualstudio.com/api/working-with-extensions/testing-extension
For the development of VS Code itself, there are some automation scripts that simulate user actions. If you really need to, I believe you could adopt these script to your use case, however I can't say how much work it would be. These script also break if the UI changes. Better to go the extension route if possible

How to run Inferno JSX on server?

I am trying to use Inferno to render on the server. The documentation inferno-server and server-side-rendering does not say show to set-up babel & run the sever.
All I could find is InfernoJS Babel Plugin but noting about running it on Node.
Any help would be appreciated.
Could you explain what you mean by "Running on node"?
Inferno Babel plugin converts the JSX code into a regular JS code, which runs without problems on node (the server uses renderToString). While you are not using browser elements (document and other tools), everything should be fine.
Then you need to make a separate component for the client, which when requested will be given as a bundle along with the html page, and then using hydrate function to "cling" into webpage and bind items.
you can check my repository (although this is for TypeScript): https://github.com/MrFoxPro/inferno-isomorphic-tempalte

Coded UI - Add-ons

I'm using VS 2013 with CodedUI to automate UI tests on an application that is not built by my client (it's an implementation project). When inspecting the UI Control using inspect or coded UI, I see that the Automation ID keeps changing and I have no real way (beside position based) to capture my controls (the application is developed in Delphi).
So I'm wondering if there exist some library or add-ons (or something not even related to Coded UI and VS) that can help with this? For example some tools that can capture a screen shot of the control and then map it (the screenshot) to an Control Id that I will define and use that to automate?
Wow....I was able to find a way to do what I need using sikuli (http://www.sikuli.org/) checkout this post. Ill actually try it out tomorrow. But I found on the web (link below) that it`s possible.
From Coded UI we can call the sikuli script like that:
Process process = new Process();
ProcessStartInfo startInfo = new System.Diagnostics.ProcessStartInfo();
startInfo.FileName = #"D:\Sikuli\ds.bat";
process.StartInfo = startInfo;
process.Start();
process.WaitForExit();
(code from) https://answers.launchpad.net/sikuli/+question/232233 , read this post guys!