Skip to content

Commit

Permalink
Add Demo Projects to the User Guide (#266)
Browse files Browse the repository at this point in the history
* 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 <soskaagamy1995@gmail.com>
Co-authored-by: MustafaAgamy <mostafagamy1995@gmail.com>
  • Loading branch information
3 people authored Feb 10, 2025
1 parent 680545e commit e4954d8
Show file tree
Hide file tree
Showing 3 changed files with 62 additions and 0 deletions.
11 changes: 11 additions & 0 deletions docs/Demos/mobile.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
---
id: mobile
title: Demo Projects For Mobile GUI
sidebar_label: Mobile
---
### Basic Mobile GUI Automation Project

:::info
You can visit this Repository to for a Demo on how to set Mobile GUI in SHAFT_ENGINE
### [BasicMobile_Demo](https://github.com/MustafaAgamy/ShaftEngine-ParellelWithThreadLocal.git)
:::
41 changes: 41 additions & 0 deletions docs/Demos/web.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
---
id: web
title: Demo Projects For Web GUI
sidebar_label: Web
---
### Parallel Execution using ThreadLocal Driver

```java title="ParallelThreadLocalSampleTest"
public class ParallelThreadLocalTest {
private ThreadLocal<SHAFT.GUI.WebDriver> driver = new ThreadLocal<>();
private SHAFT.TestData.JSON testData;

@Test
public void signOutTest() {
new HomePage(driver.get())
.signOut();
}

@Test
public void buttonClickTest() {
new HomePage(driver.get())
.clickMe();
}

@BeforeMethod
public void beforeMethodSetUp() {
driver.set(new SHAFT.GUI.WebDriver());
driver.get().browser().navigateToURL("url");
}

@AfterMethod
public void afterMethodTearDown() {
driver.get().quit();
}
}
```

:::info
You can visit this Repository to for a Demo on how to set Parallel Execution in SHAFT_ENGINE
### [ParallelExecution_Demo](https://github.com/MustafaAgamy/ShaftEngine-ParellelWithThreadLocal.git)
:::
10 changes: 10 additions & 0 deletions sidebars.js
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,16 @@ const sidebars = {
"Properties/PropertiesList",
],
},
{
type: 'category',
label: 'Demos',
collapsible: true,
collapsed: true,
items: [
"Demos/web",
"Demos/mobile",
],
},
],
};

Expand Down

0 comments on commit e4954d8

Please sign in to comment.