microsoft-edge 相关问题

Microsoft Edge是一个针对Windows 10发布的新Web浏览器,与Internet Explorer(IE)11一起安装.Edge旨在成为IE的替代Web浏览器,因为IE将在IE 11之后停止开发.Edge使用EdgeHTML布局引擎(三叉戟叉)和Chakra Javascript引擎。

我已经验证了扩展程序的 json 文件。但该图标没有显示在边缘。我该如何解决这个问题?

我之前的问题。 答案很有帮助,但我仍然遇到图标问题。 它在边缘仅显示为拼图图标,但我需要更改其图标。 图标: 我已经验证过了...

回答 1 投票 0

如何让扩展程序或选项卡在浏览器中使用无限量的 RAM

我已经使用 ChatGPT 很长时间了,我想保留我的提示的离线副本。我遇到了一个名为“ExportGPT”的扩展,它可以让我将聊天内容导出为 PDF、Word...

回答 1 投票 0

到底如何关闭地址栏边缘搜索?

我真的找不到关闭地址栏搜索的方法。我只想转到我输入的绝对地址。我知道在前面添加 http:// 可以做到这一点。但不,我只想要一个仅方法类型...

回答 2 投票 0

如何从命令提示符关闭 Microsoft Edge 浏览器的当前选项卡?

>启动microsoft-edge:http://google.com 它在边缘浏览器新选项卡中打开了 google.com。现在我想关闭。在这里我使用了 stop 但它不起作用。 >停止 microsoft-edge:http://google.com

回答 5 投票 0

Selenium Edge Python 错误在测试执行后自动关闭 Edge 浏览器

我正在尝试测试 selenium 以获取自动登录网站的解决方案,但我什至无法让 Selenium 保持打开状态。它做了现在应该做的事情,然后在没有医生的情况下立即退出......

回答 4 投票 0

Chrome 通过 Windows 命令提示符打印到 PDF

我正在尝试将网页打印为 PDF,但截至本周仍无法正常工作。我正在使用 Chrome,但它也无法与 Edge 配合使用。 “C:\Program Files (x86)\Google\Chrome\Applicatio

回答 0 投票 0

无法让 Firebase Cloud Messaging 在 Android 上的 Edge 浏览器上运行FCM测试</tit...</desc> <question vote="1"> <p>所以,我编写了一段简单的代码:</p> <p>前端:</p> <pre><code><!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8" /> <title>FCM TEST</title> </head> <body> <p id="token" style="padding-left: 50px"></p> <script src="https://www.gstatic.com/firebasejs/10.7.0/firebase-app-compat.js"></script> <script src="https://www.gstatic.com/firebasejs/10.7.0/firebase-messaging-compat.js"></script> <script> const firebaseConfig = { apiKey: "XXXXX", authDomain: "XXXXX", projectId: "XXXXX", messagingSenderId: "XXXXX", appId: "XXXXX", }; firebase.initializeApp(firebaseConfig); const messaging = firebase.messaging(); if ("serviceWorker" in navigator) { navigator.serviceWorker .register("/firebase-messaging-sw.js") .then(function (registration) { console.log( "Registration successful, scope is:", registration.scope ); Notification.requestPermission() .then(function () { console.log("Notification Permission"); let serviceWorkerRegistration = { vapidKey: "XXXXX", }; if (registration) { console.log("included registration"); serviceWorkerRegistration = { ...serviceWorkerRegistration, ServiceWorkerRegistration: registration, }; } return messaging .getToken(serviceWorkerRegistration) .then((token) => { if (token) { console.log("Token: ", token); document.getElementById("token").innerHTML = token; } else { // Show permission request. console.log( "No Instance ID token available. Request permission to generate one." ); } }); }) .catch(function (reason) { console.error(reason); }); messaging.onMessage((payload) => { console.log( "[firebase-messaging-sw.js] Received foreground message ", payload ); // Customize notification here const notificationTitle = payload.data.title; const notificationOptions = { body: payload.data.body, // icon: "/firebase-logo.png", }; registration.showNotification( notificationTitle, notificationOptions ); }); }) .catch(function (err) { console.log("Service worker registration failed, error:", err); }); } </script> </body> </html> </code></pre> <p>我的 firebase-messaging-sw.js:</p> <pre><code>importScripts( "https://www.gstatic.com/firebasejs/10.7.0/firebase-app-compat.js" ); importScripts( "https://www.gstatic.com/firebasejs/10.7.0/firebase-messaging-compat.js" ); const firebaseConfig = { apiKey: "XXXXX", authDomain: "XXXXX", projectId: "XXXXX", messagingSenderId: "XXXXX", appId: "XXXXX", }; firebase.initializeApp(firebaseConfig); const messaging = firebase.messaging(); messaging.onBackgroundMessage((payload) => { console.log( "[firebase-messaging-sw.js] Received background message ", payload ); // Customize notification here const notificationTitle = payload.data.title; const notificationOptions = { body: payload.data.body, // icon: "/firebase-logo.png", }; self.registration.showNotification(notificationTitle, notificationOptions); }); </code></pre> <p>在后端,我制作了一个简单的 Node Express 服务器,您可以在其中从 FE 发送 FcmToken。 (确实需要复制 fcm 令牌并将其粘贴到 Postman 中)。</p> <pre><code>import { initializeApp, cert, applicationDefault } from "firebase-admin/app"; import { getMessaging } from "firebase-admin/messaging"; import express, { json } from "express"; import "dotenv/config"; import cors from "cors"; const app = express(); app.use(express.json()); app.use( cors({ origin: "*", methods: ["GET", "POST", "DELETE", "UPDATE", "PUT", "PATCH"], }) ); app.use(function (req, res, next) { res.setHeader("Content-Type", "application/json"); next(); }); initializeApp({ credential: applicationDefault(), }); app.post("/send", function (req, res) { const receivedTokens = req.body.fcmTokens; console.log("receivedToken", req.body.fcmTokens); const message = { data: { title: req.body.title, body: req.body.body, }, tokens: receivedTokens, }; getMessaging() .sendEachForMulticast(message) .then((response) => { res.status(200).json({ message: "Successfully sent message", token: receivedTokens, }); }) .catch((error) => { res.status(400); res.send(error); console.log("Error sending message:", error); }); }); app.get("/ping", function (req, res) { console.log("process env: ", process.env.GOOGLE_APPLICATION_CREDENTIALS) res.status(200).json({ message: "Successfully pinged test", file: process.env.GOOGLE_APPLICATION_CREDENTIALS, }); }); app.listen(3000, function () { console.log("Server started on port 3000"); }); </code></pre> <p>这段代码实际上适用于以下测试用例:</p> <ul> <li>Chrome Windows</li> <li>边缘窗口</li> <li>Chrome 安卓</li> <li>Chrome Mac 操作系统</li> <li>Edge Mac 操作系统</li> </ul> <p>它<strong>不</strong>工作的唯一测试用例是<strong>Android 上的Edge</strong>。我的 Android 上的 Edge 版本是 120.0.2210.64</p> <p>此外,也许值得注意的是,Android 上的 Edge 中的 onMessage 函数在其他任何地方都<strong>不</strong>被调用。</p> <p>有人知道为什么吗?或者也许有解决方案?我是不是做错了什么?</p> <p>提前致谢。</p> </question> <answer tick="false" vote="0"> <p>我也有同样的问题。 如果相同的代码在不同的浏览器上运行并且令牌正确,则您可能正在使用另一个应用程序的相同域或子域。</p> <p>示例:<br/> 如果您有一个带有 <a href="https://xxx.example.com/app1" rel="nofollow noreferrer">https://xxx.example.com/app1</a> 且带有推送通知的页面。如果您在 <a href="https://xxx.example.com/app2" rel="nofollow noreferrer">https://xxx.example.com/app2</a> 添加新应用程序,Edge 将无法管理通知(2024 年 8 月)。</p> <p>如果打开通知选项,Edge 将显示一条消息:“通知已在 app1 上设置”。我不知道为什么。也许是因为 FCM 的 Service Worker 位于根文件夹中?或者只是因为 Edge 无法在同一域或子域上拥有多个应用程序?</p> <p>要解决这个问题,必须创建多个子域:<br/> <a href="https://app1.example.com" rel="nofollow noreferrer">https://app1.example.com</a> 和 <a href="https://app2.example.com" rel="nofollow noreferrer">https://app2.example.com</a></p> <p>此时 Edge 将在您的 Android 上添加“app1”作为推送通道。</p> </answer> </body></html>

所以,我编写了一段简单的代码: 前端: FCM测试</tit...</desc> <question vote="1"> <p>所以,我编写了一段简单的代码:</p> <p>前端:</p> <pre><code><!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8" /> <title>FCM TEST</title> </head> <body> <p id="token" style="padding-left: 50px"></p> <script src="https://www.gstatic.com/firebasejs/10.7.0/firebase-app-compat.js"></script> <script src="https://www.gstatic.com/firebasejs/10.7.0/firebase-messaging-compat.js"></script> <script> const firebaseConfig = { apiKey: "XXXXX", authDomain: "XXXXX", projectId: "XXXXX", messagingSenderId: "XXXXX", appId: "XXXXX", }; firebase.initializeApp(firebaseConfig); const messaging = firebase.messaging(); if ("serviceWorker" in navigator) { navigator.serviceWorker .register("/firebase-messaging-sw.js") .then(function (registration) { console.log( "Registration successful, scope is:", registration.scope ); Notification.requestPermission() .then(function () { console.log("Notification Permission"); let serviceWorkerRegistration = { vapidKey: "XXXXX", }; if (registration) { console.log("included registration"); serviceWorkerRegistration = { ...serviceWorkerRegistration, ServiceWorkerRegistration: registration, }; } return messaging .getToken(serviceWorkerRegistration) .then((token) => { if (token) { console.log("Token: ", token); document.getElementById("token").innerHTML = token; } else { // Show permission request. console.log( "No Instance ID token available. Request permission to generate one." ); } }); }) .catch(function (reason) { console.error(reason); }); messaging.onMessage((payload) => { console.log( "[firebase-messaging-sw.js] Received foreground message ", payload ); // Customize notification here const notificationTitle = payload.data.title; const notificationOptions = { body: payload.data.body, // icon: "/firebase-logo.png", }; registration.showNotification( notificationTitle, notificationOptions ); }); }) .catch(function (err) { console.log("Service worker registration failed, error:", err); }); } </script> </body> </html> </code></pre> <p>我的 firebase-messaging-sw.js:</p> <pre><code>importScripts( "https://www.gstatic.com/firebasejs/10.7.0/firebase-app-compat.js" ); importScripts( "https://www.gstatic.com/firebasejs/10.7.0/firebase-messaging-compat.js" ); const firebaseConfig = { apiKey: "XXXXX", authDomain: "XXXXX", projectId: "XXXXX", messagingSenderId: "XXXXX", appId: "XXXXX", }; firebase.initializeApp(firebaseConfig); const messaging = firebase.messaging(); messaging.onBackgroundMessage((payload) => { console.log( "[firebase-messaging-sw.js] Received background message ", payload ); // Customize notification here const notificationTitle = payload.data.title; const notificationOptions = { body: payload.data.body, // icon: "/firebase-logo.png", }; self.registration.showNotification(notificationTitle, notificationOptions); }); </code></pre> <p>在后端,我制作了一个简单的 Node Express 服务器,您可以在其中从 FE 发送 FcmToken。 (确实需要复制 fcm 令牌并将其粘贴到 Postman 中)。</p> <pre><code>import { initializeApp, cert, applicationDefault } from "firebase-admin/app"; import { getMessaging } from "firebase-admin/messaging"; import express, { json } from "express"; import "dotenv/config"; import cors from "cors"; const app = express(); app.use(express.json()); app.use( cors({ origin: "*", methods: ["GET", "POST", "DELETE", "UPDATE", "PUT", "PATCH"], }) ); app.use(function (req, res, next) { res.setHeader("Content-Type", "application/json"); next(); }); initializeApp({ credential: applicationDefault(), }); app.post("/send", function (req, res) { const receivedTokens = req.body.fcmTokens; console.log("receivedToken", req.body.fcmTokens); const message = { data: { title: req.body.title, body: req.body.body, }, tokens: receivedTokens, }; getMessaging() .sendEachForMulticast(message) .then((response) => { res.status(200).json({ message: "Successfully sent message", token: receivedTokens, }); }) .catch((error) => { res.status(400); res.send(error); console.log("Error sending message:", error); }); }); app.get("/ping", function (req, res) { console.log("process env: ", process.env.GOOGLE_APPLICATION_CREDENTIALS) res.status(200).json({ message: "Successfully pinged test", file: process.env.GOOGLE_APPLICATION_CREDENTIALS, }); }); app.listen(3000, function () { console.log("Server started on port 3000"); }); </code></pre> <p>这段代码实际上适用于以下测试用例:</p> <ul> <li>Chrome Windows</li> <li>边缘窗口</li> <li>Chrome 安卓</li> <li>Chrome Mac 操作系统</li> <li>Edge Mac 操作系统</li> </ul> <p>它<strong>不</strong>工作的唯一测试用例是<strong>Android 上的Edge</strong>。我的 Android 上的 Edge 版本是 120.0.2210.64</p> <p>此外,也许值得注意的是,Android 上的 Edge 中的 onMessage 函数在其他任何地方都<strong>不</strong>被调用。</p> <p>有人知道为什么吗?或者也许有解决方案?我是不是做错了什么?</p> <p>提前致谢。</p> </question> <answer tick="false" vote="0"> <p>我也有同样的问题。 如果相同的代码在不同的浏览器上运行并且令牌正确,则您可能正在使用另一个应用程序的相同域或子域。</p> <p>示例:<br/> 如果您有一个带有 <a href="https://xxx.example.com/app1" rel="nofollow noreferrer">https://xxx.example.com/app1</a> 且带有推送通知的页面。如果您在 <a href="https://xxx.example.com/app2" rel="nofollow noreferrer">https://xxx.example.com/app2</a> 添加新应用程序,Edge 将无法管理通知(2024 年 8 月)。</p> <p>如果打开通知选项,Edge 将显示一条消息:“通知已在 app1 上设置”。我不知道为什么。也许是因为 FCM 的 Service Worker 位于根文件夹中?或者只是因为 Edge 无法在同一域或子域上拥有多个应用程序?</p> <p>要解决这个问题,必须创建多个子域:<br/> <a href="https://app1.example.com" rel="nofollow noreferrer">https://app1.example.com</a> 和 <a href="https://app2.example.com" rel="nofollow noreferrer">https://app2.example.com</a></p> <p>此时 Edge 将在您的 Android 上添加“app1”作为推送通道。</p> </answer> </body></html>

回答 0 投票 0

Selenium IE 驱动程序启动浏览器窗口并超时。疑似边缘“防跟踪”干扰

我有一个使用 Selenium 来自动化一些数据收集的应用程序。截至上周,我的 IE 驱动程序代码已停止工作。我使用IE Driver,因为我交互的设备都使用IE8,我...

回答 1 投票 0

我需要一个脚本来更改ms Edge的起始页

我的问题是如何使用脚本或类似的东西更改 ms Edge 的起始站点。 (Powershell脚本是最好的)我只找到了这个并且它可以工作,但普通用户无法更改...

回答 1 投票 0

在 Python 中使用 Selenium 打开 URL 后,Edge 浏览器立即关闭

我正在尝试使用 Selenium 和 Edge 浏览器自动执行任务。 但是,运行我的脚本后,网页打开然后立即关闭。我尝试使用 #time.sleep() 来保持浏览...

回答 1 投票 0

使用缩放 CSS 时的 Edge 浏览器问题

我在视频上有一个滚动杰克,可以使用 css 变换缩放视频容器。它在所有浏览器上都能正常工作,但是在 IE 和 Edge 中它会进行缩放变换,但视频会变成像素...

回答 3 投票 0

Chrome 内存占用量攀升至 3.554 GB,尽管 JS 堆内存为 20 MB

我的应用程序由一个表组成,该表长时间接收和显示实时数据,因此不断在 DOM 中创建和销毁表行。 我注意到那里...

回答 1 投票 0

通过扩展API访问Chromium浏览器中的历史记录

我目前正在开发一个扩展,它将为标准 Edge 历史页面提供更好的替代方案。为了访问历史记录,我使用了 chrome.history,正如我之前所想的那样,它解决了我的

回答 1 投票 0

使用 selenium 接受 Edge 上的麦克风和摄像头权限

我正在 Edge 浏览器上运行 selenium 脚本。其中一项功能需要在两个窗口之间发起音频或视频呼叫。在 chrome 中,我们可以在 chrome 中使用 'use-fake-ui-for-media-stream'

回答 2 投票 0

从可移植可执行(PE)文件中提取/解析资源

我想使用官方程序以编程方式在 Windows 中安装 Edge MSI Edge 安装程序(151 MB),但避免使用管理员权限,并将提取的文件放在自定义文件夹中(n...

回答 1 投票 0

在 Android Edge 上将视频源作为 blob url 传递时,视频无法播放

我正在使用html5视频播放器来播放视频。我将该视频作为公共视频托管。我正在下载视频,然后将其转换为 blob,然后使用 createObjectURL() 方法...

回答 1 投票 0

有没有办法在Edge浏览器中获取xpath和css?

我有自动化测试脚本,它们在 Chrome 上运行良好。现在扩展了对 Edge 和 IE11 的支持。很少有测试脚本在 Edge 浏览器上失败。相同的定位器在 chrome 中工作正常...

回答 3 投票 0

window.open() 参数在 Edge 中不起作用

在 Servicenow 中,我需要从 UI 操作打开一个新窗口。 1. 在新窗口(不是选项卡)中打开 2. 显示导航工具栏(按钮) 3.显示滚动条 4. 可调整大小 我们...

回答 4 投票 0

使用客户端证书时 Chrome 和 Edge 重置连接

我尝试连接到使用SSL证书的网站,当尝试不包含当前用户中本地机器上安装的证书时,连接成功...

回答 1 投票 0

Python & Selenium 4 & Edge 浏览器 |加载个人浏览器配置文件(包括cookie)

使用 Selenium 4,我尝试加载我的个人浏览器配置文件(包括 cookie),以便它可以加载到我之前登录过的网站。我正在使用边缘浏览器。当测试...

回答 1 投票 0

最新问题
© www.soinside.com 2019 - 2025. All rights reserved.