-
Notifications
You must be signed in to change notification settings - Fork 50
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
AttributeError: 'WebElement' object has no attribute 'get_screenshot' #73
Comments
I switched to Needle Driver: But now I'm getting:
This command line: From this link I can see that I need to download and install PerceptualDiff: that's require:
But these aren't regular installations, the FreeImage for example is a dll... I have a feeling that am going in a wrong direction. |
calling from my Test class: I still have one question regarding saving the base-line image....
I order to come over it, I had overridden the save_base_line in my test class: Isn't there an option to pass it as parameter? the --with-save-baseline was suppose to deal with it, no?! |
I had a similar problem at first but I believe I figured out what I was doing wrong. You need to use the driver object that has the NeedleWebDriverMixin. You're using regular chrome when you do
To do use the one with the Needle mixin, I overrode get_web_driver.
That came mostly from https://needle.readthedocs.io/en/latest/#selecting-a-webdriver |
Hi,
I started looking into needle (instead of ApliTools) and trying to create a test but facing an issue with this command:
element.get_screenshot().save(baseline_file)
In compareScreenshot() method cases.py file
My guess that the driver that am referring to is the selenium web driver, but the one used in cases.py is the needle driver!
My code:
from selenium import webdriver
from selenium.webdriver.common.by import By
from selenium.webdriver.support.ui import WebDriverWait
from selenium.webdriver.support import expected_conditions as EC
from time import sleep
class NebulaTest(NeedleTestCase):
def init(self):
self.output_directory = "C:\screenshots"
self.baseline_directory = "C:\screenshots\baseline"
#self.engine_class = 'needle.engines.perceptualdiff_engine.Engine'
#engine_class = 'needle.engines.imagemagick_engine.Engine'
NebulaTest()
Thanks in advance.
The text was updated successfully, but these errors were encountered: