I use Karate paralel run and everything is OK when I use driver configuration:
karate.configure('driver', { type: 'geckodriver', executable: '/Users/rabu/Downloads/geckodriver'});
But I need to change the executable URL from code above to:
project (driver is part of the test project), e.g.: "src/test/java/drivers/geckodriver"
HTTP/HTTPS url e.g. driver is available on "http://radimbukovsky.cz/extra/geckodriver"
I have tried many url variations but I have not been successfull.
Thank you for the help.
Try
karate.configure('driver', { type: 'geckodriver', executable: './src/test/java/drivers/geckodriver'});
Related
I am very new to the nextjs and have come across the Image component issue. I also checked around and it seems that there are similar questions but none of them has the given scenario.
I am trying to load image from the remote source via Image component. The documentation saying that you should adjust your next.config.js file to allow remote images. Since I am using next 13.0.3 version I am using images.remotePatterns property. Despite this fact I am still getting an error of hostname not being configured.
Can you please suggest what I am doing wrong and how to overcome that problem?
Br,
Aleks.
next.config.js
images: {
remotePatterns: [
{
protocol: 'https',
hostname: 'swiperjs.com',
port: '',
pathname: '/demos/images/**',
}
],
},
Usage:
<Image
src="https://swiperjs.com/demos/images/nature-1.jpg"
className={styles.swiperslideimg}
alt="test" width={400} height={400}/>
Error:
Invalid src prop (https://swiperjs.com/demos/images/nature-1.jpg) on next/image, hostname "swiperjs.com" is not configured under images in your next.config.js
See more info: https://nextjs.org/docs/messages/next-image-unconfigured-host
That configuration should work. Note that you have to restart the development server by rerunning yarn run dev or npm run dev for these configuration changes to take effect.
I faced the same problem and found the solution i was using
Notus NextJS
which had a slightly older version of nextjs so i ran
npm outdated
and updated the package.json and ran
npm run install:clean
Try to leave just that:
images: {
remotePatterns: [
{
hostname: 'swiperjs.com',
}
],
},
Can someone please provide me with a sample file for Packer creating OS image? I have this one:
{
"builders": [{
"type": "openstack",
"ssh_username": "ubuntu",
"tenant_name": "mytenant",
"flavor": "m1.tiny",
"identity_endpoint": "http://1.2.3.4:5000/",
"availability_zone": "az1",
"source_image": "Ubuntu 16.04 With Proxy",
"image_name": "Ubuntu 16.04 With Proxy and Python"
}],
"provisioners": [
{
"type": "shell",
"script": "python.sh"
}
]
}
but OS always returns:
==> openstack: Error launching source server: Invalid request due to incorrect syntax or missing required parameters.
I have no idea what I am missing.
Of course i have correct OS_ env values preset for my Nova API.
You have to use source_image_name or use the ID to reference the image
From the docs:
source_image (string) - The ID or full URL to the base image to use. This is the image that will be used to launch a new server and provision it. Unless you specify completely custom SSH settings, the source image must have cloud-init installed so that the keypair gets assigned properly.
source_image_name (string) - The name of the base image to use. This is an alternative way of providing source_image and only either of them can be specified.
See source_image
I've just installed Codeception (using Composer) with Symfony 2.3 in a Vagrant box running on Windows 8.1. When I try to run tests using bin/codecept run or bin/codecept run acceptance, I get this error:
Log path is not defined by key "paths: _logs"
I do have a tests/_logs folder present. The codeception.yml is posted below. The weird thing is, when I change the name of _logs folder to anything else (for example 'log'), with a corresponding change to the "log" parameter in codeception.yml, I still get the same error message that refers to "_logs". Even if I delete the _logs directory and/or remove the reference to it in codeception.yml, I get the same error message. I tried reinstalling Codeception, restarting Vagrant, rebooting the computer, and still getting the same error.
My two teammates are able to run tests with the same code and with the same Vagrant box with no problems. The difference is that one of them is using a Mac OS and the other one is using a PC with Linux. Could this problem be related to Windows?
Here's my codeception.yml file:
paths:
tests: tests
log: tests/_logs
data: tests/_data
helpers: tests/_helpers
settings:
bootstrap: _bootstrap.php
suite_class: \PHPUnit_Framework_TestSuite
colors: true
memory_limit: 1024M
log: true
modules:
config:
Db:
dsn: 'mysql:dbname=s2_at_test;host=127.0.0.1'
user: 's2_at_test'
password: #hidden#
dump: tests/_data/dump.sql
populate: true
cleanup: true
I currently have a suite of tests which are run in Chrome using grunt-protractor-runner.
I need to get the tests running on IE11 but having problems at the minute.
protractor.conf.js has this:
capabilities: {
'browserName': 'internet explorer',
'platform': 'ANY',
'version': '11'
},
Gruntfile.js has this:
protractor: {
options: {
configFile: 'protractor.conf.js'
},
'internet explorer': {
options: {
args: {
browser: 'internet explorer',
version: '11'
}
}
}
},
I have installed the IE Driver by running:
node C:\git\trove\node_modules\grunt-protractor-runner\node_modules\protractor\bin\webdriver-manager update --ie
And so I have IEDriverServer.exe in the folder with the other drivers (C:\git\trove\node_modules\grunt-protractor-runner\node_modules\protractor\selenium)
I get the below issue:
Running "express:dev" (express) task
Starting background Express server
debugger listening on port 5858
Express server listening on 9000, in test mode
Running "protractor:internet explorer" (protractor) task
Starting selenium standalone server...
[launcher] Running 1 instances of WebDriver
Selenium standalone server started at http://169.100.24.92:61862/wd/hub
ERROR - Unable to start a WebDriver session.
C:\git\trove\node_modules\grunt-protractor-runner\node_modules\protractor\node_modules\selenium-webdriver\lib\atoms\error.js:113
var template = new Error(this.message);
^
>>
Fatal error: protractor exited with code: 1
I'm not sure what to try - it doesn't give me any useful errors like those I've seen on other posts. I've tried specifying seleniumArgs in protractor.conf.js like so:
seleniumArgs: ['-Dwebdriver.ie.driver=C:\git\trove\node_modules\grunt-protractor-runner\node_modules\protractor\selenium\IEDriverServer.exe'],
But this doesn't help either.
Can anyone please advise?
Dont use the Protractor inside grunt-protractor-runner.
install protractor globally i.e.,:
npm install -g protractor
webdriver-manager update
webdriver-manager update --ie
now start your selenium webdriver server inside cmd window:
webdriver-manager start
In your protractor conf.js file make sure you point to this selenium web driver server i.e.,
seleniumAddress: 'http://localhost:4444/wd/hub',
You can verify this URL from the cmd window where your selenium web driver server is running.
Now you should be able to run your testcases against IE browser as well.
I faced a trouble attempting to clean distributive directory on remote file server.
I have a folder and access it via double slash notation like
//foldername/projectname/subfolder/
I've configured my Gruntfile.js for grunt-contrib-clean task like this:
clean: {
files: [
{
src: ['//foldername/projectname/subfolder/']
}
]
}
In my tasks list I also have a grunt-contrib-copy task which launches after grunt-contrib-clean to load distributive and this task uses the same src path to folder on network.
So when i launch the grunt - "clean" task actually doesn't clean the subfolder but the "copy" succesfully copies files.
When I try to launch grunt with --verbose command i have a next log:
Running "clean" (clean) task
Verifying property clean exists in config...OK
Files: [no src]
Options: force=false, no-write=false
Options: force=false, no-write=false
So it seems that task can't find the files but the reason is undefined.
Access to server is authorized and i'm enter credentials via default Windows prompt. And I have credentials for changing/deleting folder.
Can anybody help me and answer why the clean task doesn't find my directory.
Thanks!
It does. Here is an example:
dev: {
options: {
'force': true
},
expand: true,
cwd: '//someserver/someshare/somepath',
src: '{,*/}*'
},
Use force=true to go clean the subfolder:
force
Type: Boolean
Default: false
This overrides this task from blocking deletion of folders outside current working dir (CWD). Use with caution.
and no-write=true to get verbose output.
Also, check the version to see if the Windows bug has been fixed:
2013-07-15 v0.5.0 Use rimraf directly, version 2.2.1 to fix issue on Windows. Add no-write option to mimic grunt.file.delete behavior.
References
npmjs: grunt-contrib-clean
grunt-contrib-clean: Failing on Windows 8