-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
200d9a4
commit 9568916
Showing
14 changed files
with
157 additions
and
1 deletion.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
package doubts; | ||
|
||
public class SampleReturnDemo { | ||
|
||
public static void main(String[] args) { | ||
|
||
add(3,5); | ||
|
||
add(10,20); | ||
|
||
|
||
} | ||
|
||
public static void add(int a,int b) { | ||
|
||
int sum = a+b; | ||
System.out.println(sum); | ||
|
||
} | ||
|
||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
package doubts.nestedclassesdemo; | ||
|
||
public class ClassA { | ||
|
||
int a = 10; | ||
static int b = 20; | ||
|
||
public void sampleAOne() { | ||
System.out.println("Inside sampleAOne method"); | ||
} | ||
|
||
public static void sampleATwo() { | ||
System.out.println("Inside sampleATwo method"); | ||
} | ||
|
||
static class ClassB{ | ||
|
||
int c = 30; | ||
static int d = 40; | ||
|
||
public void sampleBOne() { | ||
System.out.println("Inside sampleBOne method"); | ||
System.out.println(b); | ||
ClassA ca = new ClassA(); | ||
System.out.println(ca.a); | ||
ca.sampleAOne(); | ||
sampleATwo(); | ||
} | ||
|
||
public static void sampleBTwo() { | ||
System.out.println("Inside sampleBTwo method"); | ||
} | ||
|
||
} | ||
|
||
|
||
|
||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
package doubts.nestedclassesdemo; | ||
|
||
import doubts.nestedclassesdemo.ClassA.ClassB; | ||
|
||
public class Demo { | ||
|
||
public static void main(String[] args) { | ||
|
||
ClassB cb = new ClassB(); | ||
System.out.println(cb.c); | ||
System.out.println(ClassB.d); | ||
cb.sampleBOne(); | ||
ClassB.sampleBTwo(); | ||
|
||
|
||
} | ||
|
||
} |
25 changes: 25 additions & 0 deletions
25
src/test/java/jquerydropdowndemo/JQueryDropDownDemoTwo.java
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
package jquerydropdowndemo; | ||
|
||
import org.openqa.selenium.By; | ||
import org.openqa.selenium.WebElement; | ||
import org.openqa.selenium.chrome.ChromeDriver; | ||
|
||
public class JQueryDropDownDemoTwo { | ||
|
||
public static void main(String[] args) { | ||
|
||
ChromeDriver driver = new ChromeDriver(); | ||
driver.manage().window().maximize(); | ||
driver.get("https://www.jqueryscript.net/demo/Drop-Down-Combo-Tree/"); | ||
|
||
WebElement singleSelectionDropdown = driver.findElement(By.id("justAnotherInputBox")); | ||
singleSelectionDropdown.click(); | ||
|
||
WebElement singleChice3Option = driver.findElement(By.xpath("(//span[text()='choice 3'])[3]")); | ||
singleChice3Option.click(); | ||
|
||
|
||
|
||
} | ||
|
||
} |
28 changes: 28 additions & 0 deletions
28
src/test/java/jquerydropdowndemo/JQueryDropdownDemoOne.java
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
package jquerydropdowndemo; | ||
|
||
import java.time.Duration; | ||
|
||
import org.openqa.selenium.By; | ||
import org.openqa.selenium.WebElement; | ||
import org.openqa.selenium.chrome.ChromeDriver; | ||
|
||
public class JQueryDropdownDemoOne { | ||
|
||
public static void main(String[] args) { | ||
|
||
ChromeDriver driver = new ChromeDriver(); | ||
driver.manage().window().maximize(); | ||
driver.manage().timeouts().implicitlyWait(Duration.ofSeconds(10)); | ||
driver.get("https://www.jqueryscript.net/demo/Drop-Down-Combo-Tree/"); | ||
|
||
WebElement singleSelectionDropdown = driver.findElement(By.id("justAnotherInputBox")); | ||
singleSelectionDropdown.click(); | ||
singleSelectionDropdown.sendKeys("choice 6"); | ||
|
||
WebElement choice623Option = driver.findElement(By.xpath("//h3[text()='Single Selection']/following::div[3]//li/span[text()='choice 6 2 1']")); | ||
choice623Option.click(); | ||
|
||
|
||
} | ||
|
||
} |
26 changes: 26 additions & 0 deletions
26
src/test/java/jquerydropdowndemo/JQueryDropdownDemoThree.java
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
package jquerydropdowndemo; | ||
|
||
import org.openqa.selenium.By; | ||
import org.openqa.selenium.Keys; | ||
import org.openqa.selenium.WebElement; | ||
import org.openqa.selenium.chrome.ChromeDriver; | ||
|
||
public class JQueryDropdownDemoThree { | ||
|
||
public static void main(String[] args) { | ||
|
||
ChromeDriver driver = new ChromeDriver(); | ||
driver.manage().window().maximize(); | ||
driver.get("https://www.jqueryscript.net/demo/Drop-Down-Combo-Tree/"); | ||
|
||
WebElement singleDropdownField = driver.findElement(By.id("justAnotherInputBox")); | ||
singleDropdownField.click(); | ||
singleDropdownField.sendKeys("choice 2"); | ||
singleDropdownField.sendKeys(Keys.ARROW_DOWN); | ||
singleDropdownField.sendKeys(Keys.ARROW_DOWN); | ||
singleDropdownField.sendKeys(Keys.ARROW_DOWN); | ||
singleDropdownField.sendKeys(Keys.ARROW_DOWN); | ||
singleDropdownField.sendKeys(Keys.ENTER); | ||
} | ||
|
||
} |
2 changes: 1 addition & 1 deletion
2
target/classes/META-INF/maven/sfp/SeleniumFirstProject/pom.properties
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
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.