Since my chrome update, I cannot make any nightwatch tests work on Windows 10.
At first the system simply couldn't set values. So I updated to the latest nightwatch, then updated to latest chromedriver.exe and latest selenium jar.
Now the test simply shows data: in the url of the driven browser instead of loading the page. There is also a "disable developer mode extensions" popup and a warning that "--ignore-certificate-errors" is no longer supported.
Any ideas what I'm supposed to have done?
Chromedriver.exe version: 2.38
Selenium Standalone Server: selenium-server-standalone-3.9.1.jar
Nightwatch version: nightwatch#0.9.21
Thanks for any help. Here's my config:
{
"src_folders": ["tests"],
"output_folder": "reports",
"custom_commands_path": "",
"custom_assertions_path": "",
"page_objects_path": "pages",
"globals_path": "globals",
"selenium": {
"start_process": true,
"server_path": "./lib/selenium-server-standalone-3.9.1.jar",
"log_path": "./reports",
"host": "127.0.0.1",
"port": 4444,
"cli_args": {
"webdriver.chrome.driver": "./lib/chromedriver.exe"
}
},
"test_settings": {
"default": {
"launch_url": "https://modaquote.com",
"selenium_port": 4444,
"selenium_host": "localhost",
"silent": true,
"desiredCapabilities": {
"browserName": "chrome",
"javascriptEnabled": true,
"acceptSslCerts": true
}
}
}
}
You have to update Chromedriver to match your new version of Chrome. It should fix there issues.
Related
I am using Macos -v Ventura 13.0.1....after updating the Os my VScode starts misbehaving...as I run code the terminal opens and then closes immediately without showing anything..
These are my setting.json
{
{
"window.zoomLevel": 1,
"code-runner.runInTerminal": true,
"files.autoSave": "onFocusChange",
"liveServer.settings.donotShowInfoMsg": true,
"liveServer.settings.CustomBrowser": "chrome",
"explorer.confirmDragAndDrop": false,
"editor.minimap.enabled": false,
"files.associations": {
"*.ejs": "html"
},
"workbench.iconTheme": "helium-icon-theme",
"workbench.colorTheme": "One Dark Pro Mix",
"terminal.integrated.enableMultiLinePasteWarning": false,
"terminal.integrated.defaultProfile.linux": "",
"terminal.integrated.env.linux": {
}
}
}
I have tried to delete/reset settings json but nothing changes and rest settings I am unable to understand
After enabling "Windows Authentication" and disabling "Anonymous Authentication", when I try to debug my application, a new Chrome window opens, but it stays on "about:blank" and doesn't redirect to my application URL. It works normally on Firefox. It also works fine after I disable "Windows Authentication" and enable "Anonymous Authentication". When I "Run without debugging" it also works correctly. The debugging doesn't stop when I close the browser and vice versa.
I am creating ASP.Net Core hosted Blazor WebAssembly application.
Here is my launchSettings.json:
{
"iisSettings": {
"windowsAuthentication": false,
"anonymousAuthentication": true,
"iisExpress": {
"applicationUrl": "http://localhost:51213",
"sslPort": 44322
}
},
"profiles": {
"IIS Express": {
"commandName": "IISExpress",
"launchBrowser": true,
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development"
},
"inspectUri": "{wsProtocol}://{url.hostname}:{url.port}/_framework/debug/ws-proxy?browser={browserInspectUri}"
},
"AccessManager.Server": {
"commandName": "Project",
"launchBrowser": true,
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development"
},
"applicationUrl": "https://localhost:5001;http://localhost:5000",
"inspectUri": "{wsProtocol}://{url.hostname}:{url.port}/_framework/debug/ws-proxy?browser={browserInspectUri}"
}
}
}
The problem only occurs when I'm using the "IIS Express" profile. It works fine when I use "AccessManager.Server" profile.
Had the same issue (already answered it here), a simple Ctrl + Shift + I triggers the page to load in my case.
i want to use opera for a web based application that needs to run in kiosk mode and i tried chrome but some features like npapi plugin is disabled in chome that's why i need to run my web-based app on opera but i am finding difficult to run opera in kiosk mode,i tried /kioskmode, -kioskmode, /k in shortcut of opera("C:\Program Files (x86)\Opera\launcher.exe" /KioskMode) but it's not working for me.Am i doing something wrong? According to their link http://help.opera.com/Windows/12.10/en/kiosk.html This should work right?
You can use nwjs. Near nwjs.exe create package.json with next options:
{
"main": "<web app url>",
"name": "kiosk example",
"description": "kiosk example",
"version": "0.0.1",
"window": {
"toolbar": false,
"frame": false,
"resizable": false,
"show": true,
"kiosk": true,
"title": "kiosk example"
},
"webkit": {
"plugin": true
},
"chromium-args": "--force-gpu-rasterization"
}
Also, I recommend you to create kiosk user and set nwjs.exe as shell for this user. Windows 7 and early:
Windows Registry Editor Version 5.00
[HKEY_CURRENT_USER\Software\Microsoft\Windows NT\CurrentVersion\Winlogon]
"Shell"="C:\\full\\path\\to\\nwjs.exe>"
Windows 8 and later:
Windows Registry Editor Version 5.00
[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\System]
"Shell"="C:\\full\\path\\to\\nwjs.exe>"
I have this below config and already set prompt_for_download to false but for some reason, when I run the test, prompt for download dialogue is keep appearing. Am I doing something wrong?
For download code, I'm following solution from here and
ChromeDriver 2.14.
Thanks.
capabilities: {
'browserName': 'chrome',
'chromeOptions': {
args: ['--lang=en', '--start-maximized'],
prefs: {
'download': {
'prompt_for_download': false,
'default_directory': '/tmp/downloads',
},
},
},
},
I think you also need to add directory_upgrade:
prefs: {
download: {
prompt_for_download: false,
directory_upgrade: true,
default_directory: '/tmp/downloads'
},
},
Aside from that, make sure /tmp/downloads directory exists and there are permissions to write into it. Also see a similar issue:
Setting chromedriver preferences on protractor tests
Is there a way to tell chromedriver (the webdriver implementation within Chrome) to use Canary, Beta or current production chrome?
You can ask ChromeDriver to use a Chrome executable in a non-standard location
ChromeOptions options = new ChromeOptions();
options.setBinary("/path/to/other/chrome.exe");
On Mac OS X, this should be the actual binary, not just the app. e.g., /Applications/Google Chrome.app/Contents/MacOS/Google Chrome.
[via chromedriver Capabilities and Switches]
And the way to do this in theintern is by the following config
capabilities: {
'selenium-version': '2.35.0',
'chrome': {chromeOptions: {'binary': '/Applications/Google\ Chrome\ Canary.app/Contents/MacOS/Google\ Chrome\ Canary'}},
},
Also, if you're looking to configure the selenium node directly here's how to pass the configuration in:
{
"capabilities": [
{
"browserName": "chrome",
"platform": "MAC"
},
{
"browserName": "chromeCanary",
"platform": "MAC",
"chromeOptions": {
"binary": "/Applications/Google\ Chrome\ Canary.app/Contents/MacOS/Google\ Chrome\ Canary"
},
"maxInstances": 1,
"seleniumProtocol": "WebDriver"
},
{
"browserName": "firefox",
"platform": "MAC"
}
],
"configuration": {
"host": "localhost",
"port": 8989,
"hubPort": 4444,
"hubHost": "localhost"
}
}
It should be this Google Chrome Canary.app and not just Google Chrome.app.
Try this:
options.setBinary("/Applications/Google Chrome Canary.app/Contents/MacOS/Google Chrome Canary");
ChromeDriver driver = new ChromeDriver(options);