Skip to content

Commit e4954d8

Browse files
MustafaAgamyMostafaAgamyMustafaAgamy
authored
Add Demo Projects to the User Guide (#266)
* Add Parallel Execution Demo * Add SideBar Access * Fix Issues * Fix Issues * Fix Issues * Fix Parallel Repo Link Mobile Temp Page Added * Fix Parallel Repo Link Mobile Temp Page Added * Fix Parallel Repo Link Try the code snippet * Fix Parallel Repo Link Try the code snippet --------- Co-authored-by: MustafaAgamy <[email protected]> Co-authored-by: MustafaAgamy <[email protected]>
1 parent 680545e commit e4954d8

File tree

3 files changed

+62
-0
lines changed

3 files changed

+62
-0
lines changed

docs/Demos/mobile.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
---
2+
id: mobile
3+
title: Demo Projects For Mobile GUI
4+
sidebar_label: Mobile
5+
---
6+
### Basic Mobile GUI Automation Project
7+
8+
:::info
9+
You can visit this Repository to for a Demo on how to set Mobile GUI in SHAFT_ENGINE
10+
### [BasicMobile_Demo](https://github.com/MustafaAgamy/ShaftEngine-ParellelWithThreadLocal.git)
11+
:::

docs/Demos/web.md

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
---
2+
id: web
3+
title: Demo Projects For Web GUI
4+
sidebar_label: Web
5+
---
6+
### Parallel Execution using ThreadLocal Driver
7+
8+
```java title="ParallelThreadLocalSampleTest"
9+
public class ParallelThreadLocalTest {
10+
private ThreadLocal<SHAFT.GUI.WebDriver> driver = new ThreadLocal<>();
11+
private SHAFT.TestData.JSON testData;
12+
13+
@Test
14+
public void signOutTest() {
15+
new HomePage(driver.get())
16+
.signOut();
17+
}
18+
19+
@Test
20+
public void buttonClickTest() {
21+
new HomePage(driver.get())
22+
.clickMe();
23+
}
24+
25+
@BeforeMethod
26+
public void beforeMethodSetUp() {
27+
driver.set(new SHAFT.GUI.WebDriver());
28+
driver.get().browser().navigateToURL("url");
29+
}
30+
31+
@AfterMethod
32+
public void afterMethodTearDown() {
33+
driver.get().quit();
34+
}
35+
}
36+
```
37+
38+
:::info
39+
You can visit this Repository to for a Demo on how to set Parallel Execution in SHAFT_ENGINE
40+
### [ParallelExecution_Demo](https://github.com/MustafaAgamy/ShaftEngine-ParellelWithThreadLocal.git)
41+
:::

sidebars.js

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -121,6 +121,16 @@ const sidebars = {
121121
"Properties/PropertiesList",
122122
],
123123
},
124+
{
125+
type: 'category',
126+
label: 'Demos',
127+
collapsible: true,
128+
collapsed: true,
129+
items: [
130+
"Demos/web",
131+
"Demos/mobile",
132+
],
133+
},
124134
],
125135
};
126136

0 commit comments

Comments
 (0)