Skip to content

Commit

Permalink
[JS] link code samples to github [deploy site]
Browse files Browse the repository at this point in the history
  • Loading branch information
harsha509 committed Oct 18, 2023
1 parent 70802b6 commit 4270a4f
Show file tree
Hide file tree
Showing 4 changed files with 44 additions and 108 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -54,12 +54,8 @@ driver.get("https://www.selenium.dev/selenium/web/inputs.html");
#fetch display status
val = driver.find_element(name: 'email_input').displayed?
{{< /tab >}}
{{< tab header="JavaScript" >}}
// Navigate to url
await driver.get("https://www.selenium.dev/selenium/web/inputs.html");

// Resolves Promise and returns boolean value
let result = await driver.findElement(By.name("email_input")).isDisplayed();
{{< tab header="JavaScript" text=true >}}
{{< gh-codeblock path="/examples/javascript/test/elements/information.spec.js#L16-L17">}}
{{< /tab >}}
{{< tab header="Kotlin" >}}
//navigates to url
Expand Down Expand Up @@ -113,13 +109,9 @@ driver.get 'https://www.selenium.dev/selenium/web/inputs.html'
# Returns true if element is enabled else returns false
ele = driver.find_element(name: 'button_input').enabled?
{{< /tab >}}
{{< tab header="JavaScript" >}}
// Navigate to url
await driver.get('https://www.selenium.dev/selenium/web/inputs.html');

// Resolves Promise and returns boolean value
let element = await driver.findElement(By.name("button_input")).isEnabled();
{{< /tab >}}
{{< tab header="JavaScript" text=true >}}
{{< gh-codeblock path="/examples/javascript/test/elements/information.spec.js#L23-L24">}}
{{< /tab >}}
{{< tab header="Kotlin" >}}
//navigates to url
driver.get("https://www.selenium.dev/selenium/web/inputs.html")
Expand Down Expand Up @@ -168,13 +160,9 @@ driver.get 'https://www.selenium.dev/selenium/web/inputs.html'
# Returns true if element is checked else returns false
ele = driver.find_element(name: "checkbox_input").selected?
{{< /tab >}}
{{< tab header="JavaScript" >}}
// Navigate to url
await driver.get('https://www.selenium.dev/selenium/web/inputs.html');

// Returns true if element ins checked else returns false
let res = await driver.findElement(By.name("checkbox_input")).isSelected();
{{< /tab >}}
{{< tab header="JavaScript" text=true >}}
{{< gh-codeblock path="/examples/javascript/test/elements/information.spec.js#L30-L31">}}
{{< /tab >}}
{{< tab header="Kotlin" >}}
//navigates to url
driver.get("https://www.selenium.dev/selenium/web/inputs.html")
Expand Down Expand Up @@ -219,13 +207,9 @@ driver.get 'https://www.selenium.dev/selenium/web/inputs.html'
# Returns TagName of the element
attr = driver.find_element(name: "email_input").tag_name
{{< /tab >}}
{{< tab header="JavaScript" >}}
// Navigate to URL
await driver.get('https://www.selenium.dev/selenium/web/inputs.html');

// Returns TagName of the element
let value = await driver.findElement(By.name('email_input')).getTagName();
{{< /tab >}}
{{< tab header="JavaScript" text=true >}}
{{< gh-codeblock path="/examples/javascript/test/elements/information.spec.js#L37-L38">}}
{{< /tab >}}
{{< tab header="Kotlin" >}}
//navigates to url
driver.get("https://www.selenium.dev/selenium/web/inputs.html")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,12 +53,8 @@ driver.get("https://www.selenium.dev/selenium/web/inputs.html");
#fetch display status
val = driver.find_element(name: 'email_input').displayed?
{{< /tab >}}
{{< tab header="JavaScript" >}}
// Navigate to url
await driver.get("https://www.selenium.dev/selenium/web/inputs.html");

// Resolves Promise and returns boolean value
let result = await driver.findElement(By.name("email_input")).isDisplayed();
{{< tab header="JavaScript" text=true >}}
{{< gh-codeblock path="/examples/javascript/test/elements/information.spec.js#L16-L17">}}
{{< /tab >}}
{{< tab header="Kotlin" >}}
//navigates to url
Expand Down Expand Up @@ -108,13 +104,9 @@ driver.get 'https://www.selenium.dev/selenium/web/inputs.html'
# Returns true if element is enabled else returns false
ele = driver.find_element(name: 'button_input').enabled?
{{< /tab >}}
{{< tab header="JavaScript" >}}
// Navigate to url
await driver.get('https://www.selenium.dev/selenium/web/inputs.html');

// Resolves Promise and returns boolean value
let element = await driver.findElement(By.name("button_input")).isEnabled();
{{< /tab >}}
{{< tab header="JavaScript" text=true >}}
{{< gh-codeblock path="/examples/javascript/test/elements/information.spec.js#L23-L24">}}
{{< /tab >}}
{{< tab header="Kotlin" >}}
//navigates to url
driver.get("https://www.selenium.dev/selenium/web/inputs.html")
Expand Down Expand Up @@ -160,13 +152,9 @@ driver.get 'https://www.selenium.dev/selenium/web/inputs.html'
# Returns true if element is checked else returns false
ele = driver.find_element(name: "checkbox_input").selected?
{{< /tab >}}
{{< tab header="JavaScript" >}}
// Navigate to url
await driver.get('https://www.selenium.dev/selenium/web/inputs.html');

// Returns true if element ins checked else returns false
let res = await driver.findElement(By.name("checkbox_input")).isSelected();
{{< /tab >}}
{{< tab header="JavaScript" text=true >}}
{{< gh-codeblock path="/examples/javascript/test/elements/information.spec.js#L30-L31">}}
{{< /tab >}}
{{< tab header="Kotlin" >}}
//navigates to url
driver.get("https://www.selenium.dev/selenium/web/inputs.html")
Expand Down Expand Up @@ -210,13 +198,9 @@ driver.get 'https://www.selenium.dev/selenium/web/inputs.html'
# Returns TagName of the element
attr = driver.find_element(name: "email_input").tag_name
{{< /tab >}}
{{< tab header="JavaScript" >}}
// Navigate to URL
await driver.get('https://www.selenium.dev/selenium/web/inputs.html');

// Returns TagName of the element
let value = await driver.findElement(By.name('email_input')).getTagName();
{{< /tab >}}
{{< tab header="JavaScript" text=true >}}
{{< gh-codeblock path="/examples/javascript/test/elements/information.spec.js#L37-L38">}}
{{< /tab >}}
{{< tab header="Kotlin" >}}
//navigates to url
driver.get("https://www.selenium.dev/selenium/web/inputs.html")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,12 +54,8 @@ driver.get("https://www.selenium.dev/selenium/web/inputs.html");
#fetch display status
val = driver.find_element(name: 'email_input').displayed?
{{< /tab >}}
{{< tab header="JavaScript" >}}
// Navigate to url
await driver.get("https://www.selenium.dev/selenium/web/inputs.html");

// Resolves Promise and returns boolean value
let result = await driver.findElement(By.name("email_input")).isDisplayed();
{{< tab header="JavaScript" text=true >}}
{{< gh-codeblock path="/examples/javascript/test/elements/information.spec.js#L16-L17">}}
{{< /tab >}}
{{< tab header="Kotlin" >}}
//navigates to url
Expand Down Expand Up @@ -109,13 +105,9 @@ driver.get 'https://www.selenium.dev/selenium/web/inputs.html'
# Returns true if element is enabled else returns false
ele = driver.find_element(name: 'button_input').enabled?
{{< /tab >}}
{{< tab header="JavaScript" >}}
// Navigate to url
await driver.get('https://www.selenium.dev/selenium/web/inputs.html');

// Resolves Promise and returns boolean value
let element = await driver.findElement(By.name("button_input")).isEnabled();
{{< /tab >}}
{{< tab header="JavaScript" text=true >}}
{{< gh-codeblock path="/examples/javascript/test/elements/information.spec.js#L23-L24">}}
{{< /tab >}}
{{< tab header="Kotlin" >}}
//navigates to url
driver.get("https://www.selenium.dev/selenium/web/inputs.html")
Expand Down Expand Up @@ -166,13 +158,9 @@ driver.get 'https://www.selenium.dev/selenium/web/inputs.html'
# Returns true if element is checked else returns false
ele = driver.find_element(name: "checkbox_input").selected?
{{< /tab >}}
{{< tab header="JavaScript" >}}
// Navigate to url
await driver.get('https://www.selenium.dev/selenium/web/inputs.html');

// Returns true if element ins checked else returns false
let res = await driver.findElement(By.name("checkbox_input")).isSelected();
{{< /tab >}}
{{< tab header="JavaScript" text=true >}}
{{< gh-codeblock path="/examples/javascript/test/elements/information.spec.js#L30-L31">}}
{{< /tab >}}
{{< tab header="Kotlin" >}}
//navigates to url
driver.get("https://www.selenium.dev/selenium/web/inputs.html")
Expand Down Expand Up @@ -216,13 +204,9 @@ driver.get 'https://www.selenium.dev/selenium/web/inputs.html'
# Returns TagName of the element
attr = driver.find_element(name: "email_input").tag_name
{{< /tab >}}
{{< tab header="JavaScript" >}}
// Navigate to URL
await driver.get('https://www.selenium.dev/selenium/web/inputs.html');

// Returns TagName of the element
let value = await driver.findElement(By.name('email_input')).getTagName();
{{< /tab >}}
{{< tab header="JavaScript" text=true >}}
{{< gh-codeblock path="/examples/javascript/test/elements/information.spec.js#L37-L38">}}
{{< /tab >}}
{{< tab header="Kotlin" >}}
//navigates to url
driver.get("https://www.selenium.dev/selenium/web/inputs.html")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,12 +47,8 @@ driver.get("https://www.selenium.dev/selenium/web/inputs.html");
#fetch display status
val = driver.find_element(name: 'email_input').displayed?
{{< /tab >}}
{{< tab header="JavaScript" >}}
// Navigate to url
await driver.get("https://www.selenium.dev/selenium/web/inputs.html");

// Resolves Promise and returns boolean value
let result = await driver.findElement(By.name("email_input")).isDisplayed();
{{< tab header="JavaScript" text=true >}}
{{< gh-codeblock path="/examples/javascript/test/elements/information.spec.js#L16-L17">}}
{{< /tab >}}
{{< tab header="Kotlin" >}}
//navigates to url
Expand Down Expand Up @@ -101,13 +97,9 @@ driver.get 'https://www.selenium.dev/selenium/web/inputs.html'
# Returns true if element is enabled else returns false
ele = driver.find_element(name: 'button_input').enabled?
{{< /tab >}}
{{< tab header="JavaScript" >}}
// Navigate to url
await driver.get('https://www.selenium.dev/selenium/web/inputs.html');

// Resolves Promise and returns boolean value
let element = await driver.findElement(By.name("button_input")).isEnabled();
{{< /tab >}}
{{< tab header="JavaScript" text=true >}}
{{< gh-codeblock path="/examples/javascript/test/elements/information.spec.js#L23-L24">}}
{{< /tab >}}
{{< tab header="Kotlin" >}}
//navigates to url
driver.get("https://www.selenium.dev/selenium/web/inputs.html")
Expand Down Expand Up @@ -152,13 +144,9 @@ driver.get 'https://www.selenium.dev/selenium/web/inputs.html'
# Returns true if element is checked else returns false
ele = driver.find_element(name: "checkbox_input").selected?
{{< /tab >}}
{{< tab header="JavaScript" >}}
// Navigate to url
await driver.get('https://www.selenium.dev/selenium/web/inputs.html');

// Returns true if element ins checked else returns false
let res = await driver.findElement(By.name("checkbox_input")).isSelected();
{{< /tab >}}
{{< tab header="JavaScript" text=true >}}
{{< gh-codeblock path="/examples/javascript/test/elements/information.spec.js#L30-L31">}}
{{< /tab >}}
{{< tab header="Kotlin" >}}
//navigates to url
driver.get("https://www.selenium.dev/selenium/web/inputs.html")
Expand Down Expand Up @@ -201,13 +189,9 @@ driver.get 'https://www.selenium.dev/selenium/web/inputs.html'
# Returns TagName of the element
attr = driver.find_element(name: "email_input").tag_name
{{< /tab >}}
{{< tab header="JavaScript" >}}
// Navigate to URL
await driver.get('https://www.selenium.dev/selenium/web/inputs.html');

// Returns TagName of the element
let value = await driver.findElement(By.name('email_input')).getTagName();
{{< /tab >}}
{{< tab header="JavaScript" text=true >}}
{{< gh-codeblock path="/examples/javascript/test/elements/information.spec.js#L37-L38">}}
{{< /tab >}}
{{< tab header="Kotlin" >}}
//navigates to url
driver.get("https://www.selenium.dev/selenium/web/inputs.html")
Expand Down

0 comments on commit 4270a4f

Please sign in to comment.