Skip to content

Commit a489bad

Browse files
author
Sentience Dev
committed
Merge pull request #41 from SentienceAPI/fix_test
fix no selector issue
2 parents aa3fdf9 + d165b85 commit a489bad

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

tests/test_generator.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,11 @@ def test_generator_without_selector():
114114
with record(browser) as rec:
115115
rec.record_click(1) # No selector
116116

117+
# Explicitly remove selector to test the no-selector case
118+
# (The recorder automatically infers selectors, so we need to clear it)
119+
if rec.trace.steps:
120+
rec.trace.steps[-1].selector = None
121+
117122
generator = ScriptGenerator(rec.trace)
118123
code = generator.generate_python()
119124

0 commit comments

Comments
 (0)