Common Issues
This guide covers common issues you may encounter when using TestFlowKit and their solutions.
Installation Issues
macOS: "App can't be opened because it is from an unidentified developer"
Symptom: macOS blocks TestFlowKit from running.
Solution:
- Open System Preferences → Security & Privacy
- Click General tab
- Click Allow Anyway next to the TestFlowKit message
- Try running again and click Open when prompted
Or via terminal:
xattr -d com.apple.quarantine ./tkit
Linux: Permission denied
Symptom: Cannot execute the binary.
Solution:
chmod +x ./tkit
Windows: Windows Defender blocks execution
Symptom: Windows shows a security warning.
Solution:
- Click More info
- Click Run anyway
Or add an exclusion in Windows Defender settings.
Configuration Issues
"Configuration file not found"
Symptom: TestFlowKit can't find config.yml.
Solutions:
- Ensure you're running from the correct directory
- Specify config path explicitly:
tkit run --config path/to/config.yml - Verify file name is exactly
config.yml(notconfig.yaml)
"Invalid YAML syntax"
Symptom: Configuration file fails to parse.
Solutions:
- Check for indentation errors (use spaces, not tabs)
- Validate YAML syntax online (e.g., yamllint.com)
- Ensure quotes are balanced
- Check for special characters that need escaping
# Bad: Missing quotes for special characters
baseUrl: https://example.com?param=value
# Good: Quoted string
baseUrl: "https://example.com?param=value"
"Element not found in configuration"
Symptom: Step refers to undefined element.
Solutions:
- Verify element name matches exactly (case-sensitive)
- Add element to configuration:
frontend: elements: my_element: "#my-element" - Check for typos in feature file
Element Detection Issues
"Element not found"
Symptom: TestFlowKit can't locate an element on the page.
Solutions:
- Verify selector in browser DevTools:
document.querySelector('#my-selector') - Check if element is in iframe:
When the user switches to the "iframe_name" iframe And the user clicks the "element" button - Wait for element to appear:
When the user waits for the "element" to be visible And the user clicks the "element" button - Add multiple fallback selectors:
elements: submit_btn: - "#submit" - "[data-testid='submit']" - "button[type='submit']" - Increase timeout:
frontend: timeout: 60000 # 60 seconds
"Element is not clickable"
Symptom: Element exists but click fails.
Solutions:
- Scroll element into view:
When the user scrolls to the "element" element And the user clicks the "element" button - Wait for overlay to disappear:
When the user waits for the "loading_overlay" to disappear And the user clicks the "element" button - Use slower motion:
tkit run --slow-motion 200
"Stale element reference"
Symptom: Element reference becomes invalid during test.
Solutions:
- Add a wait after page changes
- Re-query the element after navigation
- Avoid storing element references across page loads
Browser Issues
"Browser failed to launch"
Symptom: Browser doesn't start.
Solutions:
- Check browser installation:
- Ensure Chrome/Edge is installed
- Update to latest browser version
- Try different browser:
frontend: browser: firefox - Run in headless mode:
tkit run --headless - Check system resources:
- Close other applications
- Increase available RAM
"Connection refused" in headless mode
Symptom: Browser starts but can't connect.
Solutions:
- Try non-headless mode to debug
- Check if port is available
- Restart your machine
API Testing Issues
"Connection refused"
Symptom: API requests fail to connect.
Solutions:
- Verify API server is running
- Check baseUrl in configuration
- Ensure correct port number
- Check firewall settings
"401 Unauthorized"
Symptom: API returns authentication error.
Solutions:
- Verify token is set:
And I set the request header "Authorization" to "Bearer {{token}}" - Check token hasn't expired:
- Refresh token in BeforeAll hook
- Use shorter test sessions
- Verify token format:
# Debug: Print token value Then the response should contain "{{auth_token}}"
"Timeout waiting for response"
Symptom: API calls time out.
Solutions:
- Increase timeout:
backend: timeout: 30000 - Check API server performance
- Verify endpoint path is correct
Test Execution Issues
Tests are too slow
Solutions:
- Run in headless mode:
tkit run --headless - Reduce slow motion:
frontend: slowMotion: 0 - Use parallel execution:
tkit run --parallel 4 - Optimize waits:
# Bad: Fixed wait When the user waits for 5 seconds # Good: Wait for condition When the user waits for the "element" to be visible
Tests pass locally but fail in CI
Solutions:
- Use headless mode in CI:
tkit run --headless - Add explicit waits:
When the user waits for the "page_loaded" to be visible - Increase timeouts for CI:
frontend: timeout: 60000 - Check viewport size:
frontend: viewport: width: 1920 height: 1080
"Variable not found"
Symptom: Variable substitution fails.
Solutions:
- Verify variable was stored before use
- Check spelling matches exactly
- Ensure variable scope (scenario vs global)
- Verify BeforeAll hook succeeded
Getting Help
If you can't resolve an issue:
- Check verbose output:
tkit run --verbose - Enable screenshots:
reports: screenshotOnFailure: true - Search GitHub Issues:TestFlowKit Issues
- Open a new issue with:
- TestFlowKit version
- Operating system
- Minimal reproduction steps
- Error messages and logs
Next Steps
- Platform Issues — OS-specific problems
- CLI Reference — Command options
- Configuration — Configuration reference