Giter VIP home page Giter VIP logo

Comments (8)

ziczhu avatar ziczhu commented on August 19, 2024

@lengyao88 这个取决你用的客户端,takeScreenshot没有参数,并不会返回截图的保存地址,返回的是图片的base64字符串,如果你的客户端支持saveScreenshot类似的函数,通常是saveScreenshot(path) 这样,就返回截图地址了。

from macaca.

loneyao avatar loneyao commented on August 19, 2024

好的,我先试下。

from macaca.

tsj1107 avatar tsj1107 commented on August 19, 2024

如果是PC端测试 可使用 wd-next API参见https://github.com/macacajs/wd-next/tree/master/docs

移动端测试 可使用 wd API参见https://github.com/admc/wd/blob/master/doc/api.md

from macaca.

loneyao avatar loneyao commented on August 19, 2024

我想实现一个滑动的话,看https://github.com/admc/wd
这个文档可以吗?

from macaca.

tsj1107 avatar tsj1107 commented on August 19, 2024

可以

from macaca.

loneyao avatar loneyao commented on August 19, 2024

GET /session/:sessionId/screenshot
Take a screenshot of the current page.

takeScreenshot(cb) -> cb(err, screenshot)

takeScreenshot()我设置为takeScreenshot(path)但是直接报错啊。

from macaca.

loneyao avatar loneyao commented on August 19, 2024

.takeScreenshot(path); 我是这样写的,我看到上面是有定义这个path的,但是这个应用应该是支持截图的把。

from macaca.

ziczhu avatar ziczhu commented on August 19, 2024

@lengyao88 你看你用的库 如果是wd,是有两个方法的,takeScreenshot() 返回 Base64,saveScreenshot(path) 才是保存到path地址。

from macaca.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.