Skip to content

Instantly share code, notes, and snippets.

View Xotabu4's full-sized avatar

Oleksandr Khotemskyi Xotabu4

View GitHub Profile
Xotabu4 / promise.ts
Last active February 6, 2020 14:31 — forked from SergeyPirogov/promise
const sendCommand = (target, method, params) => {
return new Promise((resolve, reject) => {
chrome.debugger.sendCommand(target, method, params, result => {
if (chrome.runtime.lastError) {
} else {
console.log(method, result);
Xotabu4 /
Created May 7, 2018 23:37 — forked from ChadKillingsworth/
Selenium Testing with Shadow DOM

End-to-end Testing with Shadow DOM

As the web component specs continue to be developed, there has been little information on how to test them. In particular the /deep/ combinator has been deprecated in Shadow DOM 1.0. This is particularly painful since most end-to-end testing frameworks rely on elements being discoverable by XPath or calls to querySelector. Elements in Shadow DOM are selectable by neither. has the standard actions by selectors, but also allows browser executable scripts to return an element