{"id":23349,"library":"behavex-images","title":"BehaveX Images","description":"BehaveX extension library to attach images (screenshots) to BehaveX test execution reports. Current version 3.3.1, requires Python >=3.8. Released on PyPI with moderate cadence.","status":"active","version":"3.3.1","language":"python","source_language":"en","source_url":"https://github.com/abmercado19/behavex-images","tags":["behave","behavex","testing","screenshots","reporting"],"install":[{"cmd":"pip install behavex-images","lang":"bash","label":"Install from PyPI"}],"dependencies":[{"reason":"Core testing framework; behavex-images is an extension.","package":"behavex","optional":false}],"imports":[{"note":"Wrong package path; the correct module is 'behavex_images'","wrong":"from behavex.images import BehavexImages","symbol":"BehavexImages","correct":"from behavex_images import BehavexImages"}],"quickstart":{"code":"from behave import *\nfrom behavex_images import BehavexImages\n\n@given('I take a screenshot')\ndef step_take_screenshot(context):\n    driver = context.driver  # assume WebDriver\n    context.embed(driver.get_screenshot_as_png(), 'image/png')\n","lang":"python","description":"Basic usage: import BehavexImages and use context.embed to attach screenshots in Behave steps."},"warnings":[{"fix":"Do not initialize BehavexImages manually; simply import and use context.embed.","message":"BehavexImages does not need to be instantiated; it's automatically loaded via behave entrypoint.","severity":"gotcha","affected_versions":"all"},{"fix":"Use 'from behavex_images import BehavexImages'.","message":"The old import path 'from behavex.images' has been removed.","severity":"deprecated","affected_versions":">=3.0.0"},{"fix":"Use open('screenshot.png', 'rb').read() to get bytes.","message":"context.embed expects bytes, not file path. Passing a string will raise AttributeError.","severity":"gotcha","affected_versions":"all"}],"env_vars":null,"last_verified":"2026-05-01T00:00:00.000Z","next_check":"2026-07-30T00:00:00.000Z","problems":[{"fix":"Install behavex-images and import as: from behavex_images import BehavexImages","cause":"Wrong import path; the module is 'behavex_images'.","error":"ModuleNotFoundError: No module named 'behavex.images'"},{"fix":"Use context.embed(open('screenshot.png', 'rb').read(), 'image/png')","cause":"Passing a file path string to context.embed instead of bytes.","error":"AttributeError: 'str' object has no attribute 'read'"}],"ecosystem":"pypi","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}