Skip to content

Commit a569c5f

Browse files
author
SentienceDEV
committed
Merge pull request #2 from SentienceAPI/week2.5
Fix tests
2 parents 5723545 + 5b2c68b commit a569c5f

32 files changed

+1973
-71
lines changed

.gitignore

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,12 @@
11
# Python
2+
# Ignore __pycache__ directories at any level
23
__pycache__/
4+
**/__pycache__/
5+
# Ignore Python cache files
36
*.py[cod]
7+
*.pyc
8+
*.pyo
9+
*.pyd
410
*$py.class
511
*.so
612
.Python

pyproject.toml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,13 @@ dependencies = [
1212
"playwright>=1.40.0",
1313
"pydantic>=2.0.0",
1414
"jsonschema>=4.0.0",
15+
"requests>=2.31.0", # For server-side API calls
16+
"playwright-stealth>=1.0.6", # Bot evasion and stealth mode
1517
]
1618

19+
[project.scripts]
20+
sentience = "sentience.cli:main"
21+
1722
[project.optional-dependencies]
1823
dev = [
1924
"pytest>=7.0.0",

pytest.ini

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,5 @@ testpaths = tests
33
python_files = test_*.py
44
python_classes = Test*
55
python_functions = test_*
6-
asyncio_mode = auto
6+
asyncio_mode = strict
77

screenshot.png

124 KB
Loading

sentience/__init__.py

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,14 @@
44

55
from .browser import SentienceBrowser
66
from .models import Snapshot, Element, BBox, Viewport, ActionResult, WaitResult
7+
from .snapshot import snapshot
78
from .query import query, find
89
from .actions import click, type_text, press
910
from .wait import wait_for
1011
from .expect import expect
12+
from .inspector import Inspector, inspect
13+
from .recorder import Recorder, Trace, TraceStep, record
14+
from .generator import ScriptGenerator, generate
1115

1216
__version__ = "0.1.0"
1317

@@ -19,12 +23,21 @@
1923
"Viewport",
2024
"ActionResult",
2125
"WaitResult",
26+
"snapshot",
2227
"query",
2328
"find",
2429
"click",
2530
"type_text",
2631
"press",
2732
"wait_for",
2833
"expect",
34+
"Inspector",
35+
"inspect",
36+
"Recorder",
37+
"Trace",
38+
"TraceStep",
39+
"record",
40+
"ScriptGenerator",
41+
"generate",
2942
]
3043

-903 Bytes
Binary file not shown.
-5.07 KB
Binary file not shown.
-7.46 KB
Binary file not shown.
-4.59 KB
Binary file not shown.
-4.66 KB
Binary file not shown.

0 commit comments

Comments
 (0)