Skip to content

Commit

Permalink
[JS] Link code sample to github [deploy site]
Browse files Browse the repository at this point in the history
  • Loading branch information
harsha509 committed Apr 19, 2024
1 parent 7d8ec12 commit 91aa817
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 27 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -943,13 +943,9 @@ result = driver.execute_script("return arguments[0].innerText", header)
# Executing JavaScript directly
driver.execute_script("alert('hello world')")
{{< /tab >}}
{{< tab header="JavaScript" >}}
// Stores the header element
let header = await driver.findElement(By.css('h1'));

// Executing JavaScript to capture innerText of header element
let text = await driver.executeScript('return arguments[0].innerText', header);
{{< /tab >}}
{{< tab header="JavaScript" text=true >}}
{{< gh-codeblock path="examples/javascript/test/interactions/windows.spec.js#L33-L37" >}}
{{< /tab >}}
{{< tab header="Kotlin" >}}
// Stores the header element
val header = driver.findElement(By.cssSelector("h1"))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -905,13 +905,9 @@ result = driver.execute_script("return arguments[0].innerText", header)
# Executing JavaScript directly
driver.execute_script("alert('hello world')")
{{< /tab >}}
{{< tab header="JavaScript" >}}
// Stores the header element
let header = await driver.findElement(By.css('h1'));

// Executing JavaScript to capture innerText of header element
let text = await driver.executeScript('return arguments[0].innerText', header);
{{< /tab >}}
{{< tab header="JavaScript" text=true >}}
{{< gh-codeblock path="examples/javascript/test/interactions/windows.spec.js#L33-L37" >}}
{{< /tab >}}
{{< tab header="Kotlin" >}}
// Stores the header element
val header = driver.findElement(By.cssSelector("h1"))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -924,13 +924,9 @@ result = driver.execute_script("return arguments[0].innerText", header)
# Executing JavaScript directly
driver.execute_script("alert('hello world')")
{{< /tab >}}
{{< tab header="JavaScript" >}}
// Stores the header element
let header = await driver.findElement(By.css('h1'));

// Executing JavaScript to capture innerText of header element
let text = await driver.executeScript('return arguments[0].innerText', header);
{{< /tab >}}
{{< tab header="JavaScript" text=true >}}
{{< gh-codeblock path="examples/javascript/test/interactions/windows.spec.js#L33-L37" >}}
{{< /tab >}}
{{< tab header="Kotlin" >}}
// Stores the header element
val header = driver.findElement(By.cssSelector("h1"))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -885,12 +885,8 @@ result = driver.execute_script("return arguments[0].innerText", header)
# Executing JavaScript directly
driver.execute_script("alert('hello world')")
{{< /tab >}}
{{< tab header="JavaScript" >}}
// Stores the header element
let header = await driver.findElement(By.css('h1'));

// Executing JavaScript to capture innerText of header element
let text = await driver.executeScript('return arguments[0].innerText', header);
{{< tab header="JavaScript" text=true >}}
{{< gh-codeblock path="examples/javascript/test/interactions/windows.spec.js#L33-L37" >}}
{{< /tab >}}
{{< tab header="Kotlin" >}}
// Stores the header element
Expand Down

0 comments on commit 91aa817

Please sign in to comment.