小编Sac*_*ola的帖子

An error occurred while trying to start ChromeDriver: cannot resolve path: "/node_modules/.bin/chromedriver"

When I am setting the initial setup Nightwatchjs(using the beginner tutorial) I got the error like:

An error occurred while trying to start ChromeDriver: cannot resolve path: "/node_modules/.bin/chromedriver".

package.json

{
  "name": "intro-to-nightwatchjs",
  "version": "1.0.0",
  "description": "",
  "main": "index.js",
  "scripts": {
    "test": "nightwatch"
  },
  "keywords": [],
  "author": "",
  "license": "ISC",
  "devDependencies": {
    "chromedriver": "^80.0.1",
    "minimist": "^1.2.5",
    "nightwatch": "^1.3.4",
    "optimist": "^0.6.1"
  }
}
Run Code Online (Sandbox Code Playgroud)

nightwatch.conf.js

module.exports = {
  "src_folders" : ["tests"],

  "webdriver" : {
    "start_process": true,
    "server_path": "/node_modules/.bin/chromedriver",
    "port": 9515
  },

  "test_settings" : …
Run Code Online (Sandbox Code Playgroud)

selenium nightwatch.js e2e-testing

4
推荐指数
1
解决办法
2187
查看次数

如何根据新的分页更新解析shopify分页链接字符串?

我有一个包含上一页和下一页链接的字符串:

Link: "<https://{shop}.myshopify.com/admin/api/{version}/products.json?page_info={next_page_info}&limit={limit}>; rel={next}, <https://{shop}.myshopify.com/admin/api/{version}/products.json?page_info={prev_page_info}&limit={limit}>; rel={previous}"
Run Code Online (Sandbox Code Playgroud)

期待输出

array(
    'next' => {next_page_info},
    'prev' => {prev_page_info}
);
Run Code Online (Sandbox Code Playgroud)

链接字符串也有一些条件如下:

  1. 字符串具有下一个和上一个链接

  2. 字符串只有下一个链接输出应该是 array('next' => '{next_page_info}' );

  3. 字符串只有上一个链接输出应该是array('prev' => '{prev_page_info}');

php shopify shopify-app

3
推荐指数
1
解决办法
1152
查看次数