This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import {Web5} from '@tbd54566975/web5'; | |
const {web5, did: userDid} = await Web5.connect(); | |
console.log(userDid); | |
await web5.did.resolve(userDid).then(console.log); | |
//Schema we'll use for Book Reviews | |
const schema = { | |
"context": 'https://schema.org/', | |
"type": 'Review', |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const schema = { | |
"context": "https://schema.org/", | |
"type": "Review", | |
get uri() { return this.context + this.type} | |
} | |
let reviews = [ | |
{ | |
"@context": schema.context, | |
"@type": schema.type, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
WebElement shadowRoot = (WebElement)((JavascriptExecutor)driver) | |
.executeScript( | |
"return arguments[0].shadowRoot", | |
driver.findElement(By.id("component-id"))); | |
shadowRoot.findElement(By.id("child-element")).getText(); |