Having issue launching Firefox using Playwright for .Net - playwright

I have built a framework that utilizes Playwright for .Net. I have some enum values I have declared for all my browsers. I have created a Driver.cs class to handle the launching of the different browsers I pass as enum values. When I run the test, I am able to run against Chrome but not firefox. Here is my nuget packages
I get the following error:
Here is my driver class
Here is the first portion of my Test class which will take parameterized browser enums to be used across test methods. It also calls instantiates the driver class and sets the launch options
Lastly, this is how the tests is using the logic
[
The error I get is again:
Looks like Playwright Test or Playwright was just installed or updated. ║
║ Please run the following command to download new browsers: ║
║ ║
║ pwsh bin\Debug\netX\playwright.ps1 install ║
║ ║
║ <3 Playwright Team
I have ran the following command at the directory level of the test on my windows machine
pwsh bin\Stage\netcoreapp3.1\playwright.ps1 install
Yet, I still cannot get firefox to launch. What should I do?

Related

electron-builder package for windows in dev mode

I need to test my app on windows, but I am using a mac. It is very easy to package the app to run on windows, but I cannot package the app in dev-mode. I am using electron-is-dev to decide if I am running in dev or not. I need to run my tests on windows because I am testing a very specific windows hardware functionality. I don't want to comment my if(isDev){doSomething} just to run these test, and then uncomment it before I push the change. I was hoping there is some flag I can set in the electron-build cli, or maybe run electon . -windows?
Parse the parameter by adding sample code below to your electron main.js
const args = process.argv.slice(1);
windows = args.some(val => val === '-windows');
It can still be parsed on electron executable app by running in cmd like "electronapp.exe -windows"
The best way to do this so as to use the IsDev is to add the ELECTRON_IS_DEV environment variable to the app kinda like #carlokid suggested. I used: https://stackoverflow.com/a/34769146/3966009. This is the target I used for my app:
C:\Windows\System32\cmd.exe /c "SET ELECTRON_IS_DEV=1 && START ^"^" ^"C:\Program Files (x86)\My App\Fun Time.exe^""

Yeoman. The filename, directory name, or volume label syntax is incorrect

Reinstalled Windows 10 (Version 10.0.14393). Reinstalled the following:
Java
java version "1.8.0_121"
Java(TM) SE Runtime Environment (build 1.8.0_121-b13)
Java HotSpot(TM) 64-Bit Server VM (build 25.121-b13, mixed mode)
nodejs (v6.9.5)
NPM (3.10.10)
Yarn (v0.19.1)
Yeoman (installed with yarn global add yo)
When I write yo -v in cmd in any folder, runned with administrator or not, I take:
The filename, directory name, or volume label syntax is incorrect.
UPDATE:
The only workaround I found is to use the full path of yo:
C:\Users\<username>\AppData\Local\Yarn\config\global\node_modules\.bin\yo.cmd
It may be that your PATH does not point to global NPM modules yet. The FAQ and links are more helpful for gnu/linux or mac users. The PATH is a list of the places that your operating system checks whenever you type a command.
Since you are using Windows, to add the modules path temporarily (just for one session) at the prompt, just type (obviously use the correct path with your correct username and please take note of the ; separator character):
path = %path%;C:\Users\<username>\AppData\Local\Yarn\config\global\node_modules\.bin\
You should then be able to run 'yo -v' without pointing to the full path name, since the console now knows to check that folder also. If that works for you, you can add that path permanently using the instructions described on another SO post here.
Finally (and this is only slightly related to your question), since i notice you've got the Windows 10 anniversary update, if you have Linux experience, you may prefer to use "Windows subsystem for Linux", which is a bash shell (Ubuntu 14) on Windows, that you can use instead of the default command prompt. You can find it under "Add / Remove programs --> Turn Windows features on or off --> (scroll right down) --> Windows subsystem for Linux (beta)". Your local file system will be at "/mnt/c" so you can get to it from within the shell or from windows explorer. I've had fewer problems using this and since so many tutorials are written with bash (not command prompt) in mind, it's useful to use it instead of cmd.
You'll need to install dependencies in the usual way using apt-get (as it won't use the ones you've installed on the windows side) and you'll need to prefix commands that make system changes with 'sudo'. e.g.
sudo npm -g modulename

Install Visual studio 2015 in different drive

I have no space in my C drive. I want to install VIsual studio 2015 in D drive. But when i click exe file and run it shows the C drive path only..
How can i install in C drive ?
Can anyone help me to done this?
Thank you..
This is because once a set of shared components is installed, we install all the other components to the same directory structure. The workaround is to find the products that also installed these shared components and remove them, follow the steps as below extract from: https://blogs.msdn.microsoft.com/heaths/2015/07/14/how-to-install-visual-studio-to-another-directory-when-a-pre-release-is-installed/
Download and install http://psmsi.codeplex.com. These are general-purpose PowerShell cmdlets I created for all sorts of development and troubleshooting operations for Windows Installer-based installs. You do not need to elevate to install them, though if you pre-elevate you can install them per-machine (by default they are per-user).
Open an elevated PowerShell command prompt and run the following to discover which products have installed the key shared component:
get-msicomponentinfo '{777CBCAC-12AB-4A57-A753-4A7D23B484D3}' | get-msiproductinfo
If you’re fine with uninstalling all the listed products (especially given that you’re probably going to install RTM next), run the following:
get-msicomponentinfo '{777CBCAC-12AB-4A57-A753-4A7D23B484D3}' | get-msiproductinfo | uninstall-msiproduct -properties IGNOREDEPENDENCIES=ALL

Build Windows CE apps in Rhostudio

I installed the RhoMobileSuite 5.2.2. I've a regular account in rhomobile.com.
When I try to run apps with run configuration ( windows mobile / windows CE ) it doesn't work and I get this error:
PWD: C:\Users\Administrator\workspace\store
CMD: rake run:wm
rake aborted!
Exception: Could not build licensed features
Tasks: TOP => run:wm => config:wm => config:common
(See full trace by running task with --trace)
-$TIME$- message [ First timestamp ] time is { 2015-09-05T10:52:55Z } milliseconds from start (0)
Connecting to rhomobile.com
Starting rhodes build system using ruby version: 1.9.3
-$TIME$- message [ config:common ] time is { 2015-09-05T10:53:02Z } milliseconds from start (6820)
Connecting to rhomobile.com
**** NOTE: You use sdk parameter in build.yml ****************************************************************
To use latest Rhodes gem, run migrate-rhodes-app in application folder or comment sdk in build.yml.
**************************************************************************************************************
**** ERROR: Could not build licensed features. ***************************************************************
You have free subscription on rhomobile.com. RhoElements features are available only for paid accounts.
The following features are only available in RhoElements v2 and above:
- Barcode extension
- Indicators extension
- HardwareKeys extension
- CardReader extension
- Signature Capture
- Windows Mobile/Windows CE platform support
- Symbol device capabilities
- Symbol WebKit Browser
For more information go to rhomobile website
In order to upgrade your account please log in to https://rms.rhomobile.com
Select "change plan" menu item in your profile settings.
**************************************************************************************************************
I've Windows 7 ultimate edition & Visual studio 2013 ultimate edition
I can run apps with rhostudio on iphone, android and win 32 rhosimulator
any help ?
`
First of all, to build Windows CE/Windows Mobile applications you need Visual Studio 2008, that's the latest Visual Studio version that support those Operative Systems.
I've done a quick test and it works for me using RMS v5.2.2 and Visual Studio 2008 (plus the WM6.5.3 SDK and the Symbol MC3000 PSDK for Windows CE support, you can find the detailed setup on RMS documentation).
If you're moving a project from a previous RMS version to the latest available, always remember to do a rake clean:<your target platform> as a first step.
Edit: Forgot to mention the very important thing that, Windows Mobile/Windows CE support, requires a paid license. You can get more information on RhoMobile website and looking at the API list where, everything linked to Windows Mobile/Windows CE is marked as a paid feature.

how to define step definitions location for cucumber in intelliJ 12

I have my feature files in src/resources/com/features and my step definitions in src/main/java/com/step_definitions
My tests all run correctly, but intelliJ refuses to see where the step defs are, even if I ask it to create a new one. Where is this configured?
I was just tearing my hair out with exactly the same problem (for the record my background is Java, Ruby, Cucumber and RubyMine but I'm completely new to IntelliJ and Cucumber-JVM).
In the Cucumber-JVM run configuration you must specify the package where the step definitions are stored in the glue field as mentioned in the IntelliJ documentation. IntelliJ - for me at least - does not seem to provide a default value.
To elaborate further, a very basic project looks like this:
Example
└───src
├───main
│ └───java
└───test
├───java
│ └───com
│ └───bensnape
│ └───example
│ MyStepdefs.java
└───resources
example.feature
The glue value here would be com.bensnape.example.
Update
After playing with IntelliJ some more this morning, it seems that it does provide the glue value for you if you adhere to the Cucumber-JVM conventions - i.e. the features must live under src/test/resources/<package> and similarly, the steps must live under src/test/java/<package>.
Example project tree:
Example
└───src
├───main
│ └───java
└───test
├───java
│ └───com
│ └───bensnape
│ └───example
│ MyStepdefs.java
│
└───resources
└───com
└───bensnape
└───example
example.feature
If you mark the folder as a (test) source root (right click folder -> Mark directory as -> (Test) Source Root) it will work as well.
My grails project is set up like this:
test
├───cucumber
│ └───steps
│ └───support
│ └───features
└───unit
Unit was marked as test source root, after also marking cucumber as one the step definitions were parsed correctly.
The default convention is to have step definitions defined in a step_definitions sub-folder under the features directory. The name of the sub-folder isn't important; it will work the same whatever the name is.
My guess is that an IDE would follow the same convention, and hence IntelliJ should execute the features correctly if the step_definitions folder is moved under features folder.
The cucumber command takes a -r option to require files before executing the features. This option can be used to make it look for step_definitions in a non-conventional place.
I am guessing you may have -r src/main/java/com/step_definitions on your local configuration for cucumber to see these step_definitions when invoked from commandline.
Running cucumber --verbose shows where the command line is finding the step definition code.
You can set the glue location globally by opening "Edit Configurations -> Defaults -> Cucumber Java -> Glue" and add the package names.
(IntelliJ 12.1.4)
I was having the same problem with version 12.1.3. My folders and files are set out in the standard way as described by the other answers and marking the code as a test source did not resolve it.
Then I updated to 12.1.6 the problem was fixed :)

Resources