Trying to find CSS locator - xpath

Unable to locate. I have tried several
driver.findElement(By.cssSelector("app-button[class='transfer-button ng-star-inserted']")).click();

Related

IStringLocalizer create resx files

I want to add some translations to my Blazor web application. Upon research I found a great way to do this is using IStringLocalizer like described here.
However I find it hard to manually create the *.resx files. I mean every class has a localizer instance via
#inject Microsoft.Extensions.Localization.IStringLocalizer<MyPage> _localizer
and text is translated like this
#_localizer["This is a translated text."]
Now is there a way to execute a command in Developer Command Prompt with a given language in order to automatically create translation files for all localizer instances, so files like Resources\MyPage.en.resx and Resources\MyPage.de.resx and so on are created and can be translated?

Loading a Xaml Resource in a WinUI Component

I am running an unpackaged app and manually loading objects across a Proxy-Stub Server using base.h. I have a Window.Xaml with a Microsoft::UI::Xaml::Frame as the root element, in a WinUI component. I have tried both calling to get the IActivationFactory to the Xaml resource and creating it using:
auto oMyWindow = oObj.ActivateInstance<Window>();
or getting a runtime class to make<MyWindow>() the resource, but Initialize() fails both ways with:
WinRT originate error - 0x80004005 : 'Cannot locate resource from 'ms-appx:///MyWindow.xaml'.'.
Is there something I am unaware of that can be done to fix this so I can proceed? My alternative is using separate .exe processes to encapsulate, but this requires a lot of IPC work. It's not that I won't have to use other IPC options, it's just that I'd like to keep my late bound modules, tightly bound. And no, I have no intention of manually loading an entire interface with multiple pages.
Your application seems to be unable to find the file you're referencing. Make sure the application has the correct path. Using an absolute path instead of a relative path should work.

How to locate HTML elements in SpreadJS

My company uses SpreadJS to embed an Excel like sheet into a web page. I'm trying to find a way to create automation tests for this, but I'm unable to locate any of the document information due to the following error:
"You need a browser which full supports HTML5 Canvas to run SpreadJS". I've tried several different browsers, all of which are up to date, and yet I still run into the same issue.
Does anyone know a way around this?
Here is an online example. Let say I just want to modify cell A1 and then retrieve its value:
driver = webdriver.Chrome(paht_to_driver_variable) driver.get("grapecity.com/spreadjs/designer/index.html")

MEAN stack add new module

I created new module with name "mean.recipes". But it's javascript files are not loaded.
I am missing injection of dependency to load those modules but not able to find the place.
I went through javascript files but could not find the exact file.
can someone point me to right file ?
Starting with the documentation helps.. If it's MEAN.io you can find more information here: http://learn.mean.io/#mean-stack-packages-dependency-injection

How to load PHPMailer on cakePHP 3 [duplicate]

I'm currently building a new CakePHP app with version 3.0.0-RC1, and trying to install and use the jasig/phpCAS plugin. Using this guide, I've run the following command from the command prompt: composer require jasig/phpcas
This correctly copies the jasig/phpcas files into the vendor directory of my app, but one of the other files that the guide says should be updated (vendor/cakephp-plugins.php) doesn't even exist.
I've had a tough time accessing the plugin. I want to be able to call its static methods, and I keep getting errors of the form: Error: Class 'App\Controller\phpCAS' not found. (The exact directory in the error changes depending on where I'm calling the method from.)
I don't know if this is due to not having the cakephp-plugins.php file, or if I'm not calling the plugin correctly. It's my understanding that if the plugin is loaded I should just be able to call static methods on it like this: phpCAS::methodName()
First of all jasig/phpcas is not a CakePHP plugin. And the vendor/cakephp-plugins.php file is created by the CakePHP plugin installer, so if you don't see such a file, you seem to have either not installed any plugins yet, or you are not using a recent version of the installer, as the creation of this file has been introduced just recently.
Regarding the error about the class not being found, you are missing the leading namespace separator (\phpCAS::methodName()) to access the class in the global namespace, respectively you are missing a proper import (use phpCAS;) that would make the class available in the current namespace.
In case you are not familiar with namespaces, you may want to start with: http://php.net/namespaces

Resources