automation

How to “hook in” puppeteer into a running Chrome instance/tab

天涯浪子 提交于 2020-08-26 06:17:06
问题 Is it somehow possible to attach puppeteer to a running Chrome instance (manually started browser) and then takeover control within a tab? I'm assuming that it's eventually related to start the Chrome browser using the --no-sandbox flag but don't know how to continue from there. Thanks for any help 回答1: You can use puppeteer.connect(options) (see here): const puppeteer = require('puppeteer'); const browserWSEndpoint = 'a browser websocket endpoint to connect to'; const browser = await

How to use fake-web cam on mozilla firefox using selenium java

試著忘記壹切 提交于 2020-08-24 10:23:34
问题 I am trying to automate a website that has a webcam stream in it. In order to automate it, I need some way to fake a webcam. I know the option -use-fake-device-for-media-stream simulates a webcam in Chrome. This is working for me in Chrome. Now I need to get the same working in Firefox. I got the following information from internet while researching on this. "In Firefox, a special fake:true variable in the getUserMedia() calls will achieve this". I did not understand how to code this up. Can

Assignment to constant variable exception

那年仲夏 提交于 2020-08-20 15:45:10
问题 I am getting the following exception: Value currently is [object Object] popup.html:1 Error handling response: TypeError: Assignment to constant variable. at chrome-extension://....../popup.js:19:18 Trying to get the input from my Chrome extension and using it in here... const settings = { name: "", email: "", tel: "", cc_number: "", cc_exp: "", cc_csc: "", address_line1: "", address_level2: "", address_level1: "", postal_code: "" } function getSettingsfromStorage() { chrome.storage.local.get