You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A Domain Specific Language that compiles into valid python code!
3
+
A Domain Specific Language (DSL) that compiles into valid python code!
4
+
5
+
---
4
6
5
7
### Supported Browsers
6
8
7
9
-**Brave**
8
10
-**Chrome**
9
11
-**Firefox**
10
12
13
+
---
14
+
11
15
### Supported Python Versions
12
16
13
17
-**3.9.x**
@@ -17,27 +21,34 @@ A Domain Specific Language that compiles into valid python code!
17
21
-**3.13.x**
18
22
-**3.14.x**
19
23
24
+
---
25
+
20
26
### Supported Operating Systems
21
27
22
28
- Linux **(x64)**
23
29
- MacOS 11.0+ **(x64)**
24
-
- Windows 10 **(ARM64, x64, x86)**
30
+
- Windows 10 **(ARM64, x64, x86)**
25
31
- Windows 11 **(ARM64, x64, x86)**
26
32
33
+
---
27
34
28
35
### Supported Platforms
29
36
30
37
-**x86**
31
38
-**x64**
32
39
-**ARM64**
33
40
41
+
---
42
+
34
43
### System Requirements (Minimum)
35
44
36
45
- 2+ Core CPU
37
46
- 4GB DDR3 RAM (The application itself uses under 200MB of RAM)
38
47
- Any Supported Browser
39
48
- Any Supported Python Version
40
49
50
+
---
51
+
41
52
### Tested On
42
53
43
54
- AMD Athlon Gold 3150U
@@ -50,100 +61,264 @@ A Domain Specific Language that compiles into valid python code!
50
61
- Intel I7 7700
51
62
- Intel I5 8500
52
63
64
+
---
65
+
53
66
## BAMC Documentation
54
67
55
68
### Actions
56
69
57
70
The following actions can be used in your BAMC scripts:
58
71
59
-
60
72
-`browser`: This MUST be the first valid line of the file. If not supplied, defaults to a Firefox instance or user agent (depending on the other defined features).
61
-
-**Syntax:**
62
-
-`browser "brave"`
63
-
-`browser "chrome"`
64
-
-`browser "firefox"`
65
-
73
+
-**Syntax:**
74
+
-`browser "brave"`
75
+
-`browser "chrome"`
76
+
-`browser "firefox"`
66
77
-`click`: Clicks the specified button element.
67
78
-**Syntax:**`click "selector" \\ Supports ID, NAME, TAG NAME, and XPATH`
68
-
69
79
-`click-exp`: Alternative to `click`; use this if `click` is causing issues.
-`end-javascript`: Instructs the parser that the end of a javascript code block was reached. An error will be thrown if end-javascript is not found within the file (when a "start-javascript" is present)
81
+
-`end-javascript`: Instructs the parser that the end of a javascript code block was reached. An error will be thrown if end-javascript is not found within the file (when a "start-javascript" is present)
73
82
-**Syntax:**`end-javascript`
74
-
75
83
-`fill-text`: Assigns the specified value to the selected element.
76
84
-**Syntax:**`fill-text "selector" "Value you want to include"`
77
-
78
85
-`get-text`: Gets the text for a specified element.
79
86
-**Syntax:**`get-text "selector" \\ Supports ID, NAME, TAG NAME, and XPATH`
80
-
81
87
-`save-as-html`: Saves the current page's HTML to a file with the specified name.
82
88
-**Syntax:**`save-as-html "filename.html"`
83
-
84
89
-`save-as-html-exp`: Saves the current page's HTML to a file with the specified name but uses different logic; use this if `save-as-html` doesn't fit your needs.
85
90
-**Syntax:**`save-as-html-exp "filename.html"`
86
-
87
91
-`select-option`: Selects an `<option>` from a `<select>` dropdown menu. Currently only supports `<select><option></option></select>`.
88
92
-**Syntax:**`select-option "selector" 2 // 2 is the option number so the 2nd item in the list would be selected.`
89
-
90
93
-`select-element`: Selects the element associated with the provided selector (if found).
91
94
-**Syntax:**`select-element "selector" \\ This currently works but, theres no logic to access the selected element, this should only be done if youre manually editing the compiled python script.'`
92
-
93
-
-`start-javascript`: Instructs the parser to read all following lines as a .js code block, until end-javascript is found; Will throw an error if end-javascript is not found within the file.,
95
+
-`start-javascript`: Instructs the parser to read all following lines as a .js code block, until end-javascript is found; Will throw an error if end-javascript is not found within the file.
94
96
-**Syntax:**`start-javascript`
95
-
96
97
-`take-screenshot`: Takes a screenshot of the browser after executing the previous line.
97
98
-**Syntax:**`take-screenshot "filename.png" \\ It's recommended to add a "wait-for-seconds" command before executing this.`
-`delete`: Adds a local `.bamc` file to the `userScripts` directory.
116
113
-**Syntax:**`bamm delete 'filename.bamc'`
117
-
118
114
-`help`: Adds a local `.bamc` file to the `userScripts` directory.
119
115
-**Syntax:**
120
116
-`bamm help --all` -> This displays information for all available commands.
121
117
-`bamm help wait-for-seconds` -> This displays information about the selected command
122
-
123
118
-`--set-timeout`: Sets the default timeout in seconds for all Selenium-based browser actions.
124
-
-**Syntax:**`bamm --set-timeout==5`
119
+
-**Syntax:**`bamm --set-timeout==5`
125
120
126
121
### Features
127
122
128
123
These features can be enabled or configured in your BAMC scripts:
129
124
130
125
-`async`: This indicates to the compiler you want to create an asynchronous script. This should not be done unless you have experience using async functions in Python.
131
126
-**Syntax:**`feature "async" // Currently not supported, will throw an error if you use.`
132
-
133
127
-`bypass-cloudflare`: Instructs the browser to use a more advanced approach to bypass Cloudflare.
134
128
-**Syntax:**`feature "bypass-cloudflare" // Currently not supported, will throw an error if you use.`
135
-
136
129
-`disable-pycache`: Instructs the compiler to disable the writing of the `__pycache__` directory. This directory is written by Visual Studio Code and contains `.pyc` files.
137
130
-**Syntax:**`feature "disable-pycache"`
138
-
139
131
-`use-http-proxy`: Uses the entered HTTP proxy for the session.
140
132
-**Syntax:**`feature "use-http-proxy" "USER:PASS@IP:PORT"` -> Use `NULL:NULL@IP:PORT" if no user:pass authentication is required.
141
-
142
133
-`use-https-proxy`: Uses the entered HTTPS proxy for the session.
143
134
-**Syntax:**`feature "use-https-proxy" "USER:PASS@IP:PORT"` -> Use `NULL:NULL@IP:PORT" if no user:pass authentication is required.
144
-
145
135
-`use-socks4-proxy`: Uses the entered SOCKS4 proxy for the session.
146
136
-**Syntax:**`feature "use-socks4-proxy" "USER:PASS@IP:PORT"` -> Use `NULL:NULL@IP:PORT" if no user:pass authentication is required.
147
-
148
137
-`use-socks5-proxy`: Uses the entered SOCKS5 proxy for the session.
149
138
-**Syntax:**`feature "use-socks5-proxy" "USER:PASS@IP:PORT"` -> Use `NULL:NULL@IP:PORT" if no user:pass authentication is required.
139
+
140
+
---
141
+
142
+
## Supported Selectors
143
+
144
+
### Basic
145
+
146
+
-**ID:**`#main-content`
147
+
-**Class:**`.btn-primary`
148
+
-**Type / Tag:**`div`
149
+
-**Custom Element:**`my-custom-element`
150
+
-**Name Attribute:**`[name="elementName"]` (Note this is NOT the same as Tag)
- For complex/nested selectors like `:not(div > .item)`, it will capture `div > .item` as a single string but will not parse further.
168
+
- This handles attributes with quoted strings quite well, but it doesn't fully support **all** CSS escaping rules Example: `"id="foo.bar""` would require the selector `"#foo\.bar"`.
169
+
- This is **not** full CSS/XPATH parsing and will not catch all invalid selectors, however most rules are currently supported.
170
+
- The CSS parsing currently doesn't support the following characters: ">", "+", "~", " ", etc.
171
+
172
+
---
173
+
174
+
# Compile BrowserAutomationMaster (BAM) from Source
175
+
176
+
This guide provides instructions on how to compile BrowserAutomationMaster Manager (BAMM) from its source code for various operating systems.
177
+
178
+
## Prerequisites
179
+
180
+
Before you begin, ensure you have the following installed on your system:
181
+
182
+
1.**.NET 8.x SDK:** The most recent 8.x SDK as of writing this, is 8.0.17. [Download Link](https://dotnet.microsoft.com/en-us/download/dotnet/8.0).
183
+
2.**Git (Optional but Recommended):** For cloning the repo, you can also use the source code provided with each release.
184
+
185
+
## General Compilation Steps
186
+
187
+
1.**Download and Extract the Source Code:**
188
+
189
+
- Go to the latest release page: `https://github.com/Static-Codes/BrowserAutomationMaster/releases/latest/`
190
+
- Download the `source.zip` file.
191
+
- Extract/Unzip the source.
192
+
193
+
2.**Navigate to the Source Directory:**
194
+
195
+
```bash
196
+
cd BrowserAutomationMaster
197
+
```
198
+
199
+
3. **Restore .NET Dependencies:**
200
+
This step is usually handled automatically by the build/publish commands, but it's good practice to run it manually if you encounter issues:
201
+
```bash
202
+
dotnet restore
203
+
```
204
+
205
+
## Platform-Specific Compilation Instructions
206
+
207
+
Choose the instructions relevant to your target operating system. All commands should be run from within the `BrowserAutomationMaster` source directory.
This will create a `.deb` package for easy installation.
214
+
215
+
1. **Install `dotnet-deb` tool (if not already installed):**
216
+
217
+
```bash
218
+
dotnet tool install --global dotnet-deb
219
+
# Ensure the .dotnet/tools directory is in your PATH
220
+
# export PATH="$PATH:$HOME/.dotnet/tools" (add to your .bashrc or .zshrc for permanency)
221
+
```
222
+
223
+
2. **Compile and Package:**
224
+
```bash
225
+
dotnet deb --runtime linux-x64 --configuration Release
226
+
```
227
+
The resulting `.deb` package will typically be found in the project's root directory or a sub-directory like `bin/Release/`. Check the command output for the exact location.
228
+
229
+
#### Generic Linux Publish (Self-Contained Application)
230
+
231
+
If you don't want a `.deb` package or are on a non-Debian-based Linux distribution, you can create a self-contained application.
Ensure "Associate Inno Setup with the .iss file extension" is checked during setup.
288
+
289
+
5. **Create an installer**
290
+
Navigate to `BrowserAutomationMaster\src\Installer Files\Windows`
291
+
Right click on the .iss file corresponding to your published build (ARM64, x64, x86)
292
+
Click compile
293
+
294
+
The installer will be in `BrowserAutomationMaster\src\Published Builds\{Your architecture}\`
295
+
296
+
## Installation
297
+
298
+
- **Linux `.deb` package**
299
+
You can install the package by double clicking the .deb file, or by using:
300
+
```bash
301
+
sudo dpkg -i <package_name>.deb
302
+
# If there are dependency issues, fix them with:
303
+
sudo apt-get install -f
304
+
```
305
+
- **MacOS**
306
+
The compiled application will be in `bin/Release/netX.Y/osx-arm64/publish/`.
307
+
Place it on your Desktop for easy access!
308
+
use chmod +x Desktop/bamm to make it an executable!
309
+
- **Windows**
310
+
Simply double click the installer in `BrowserAutomationMaster\src\Published Builds\{Your architecture}\`
311
+
312
+
## Opening BAMM
313
+
314
+
- **MacOS**
315
+
Desktop/bamm
316
+
317
+
- **Linux and Windows**
318
+
bamm
319
+
320
+
## Troubleshooting
321
+
322
+
- **.NET SDK Not Found:** Ensure the .NET SDK is installed correctly and that the `dotnet` command is available in your system's PATH.
323
+
- **Permission Issues:** On Linux/macOS, you might need to use `sudo`for global tool installation or for installing `.deb` packages. For compilation itself, `sudo` is generally not required or recommended.
324
+
- **Incorrect Runtime Identifier:** Ensure you're using a valid runtime identifier (RID) for your target platform. You can find a list of RIDs [here](https://docs.microsoft.com/en-us/dotnet/core/rid-catalog).
0 commit comments