← Back to team overview

sikuli-driver team mailing list archive

Re: [Question #662065]: Failed test cases are displayed under Error on HTML test Report

 

Question #662065 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/662065

    Status: Answered => Open

Hina is still having a problem:
Thanks RaiMan, 
It solves bit of problem but now the assertion failed is printing traceback in the HTML report. 

from sikuli import * 
import IL #importing  image library 
import Env_Var #importing environment variable 
try:
    wait("Login",15)#wait for login screen
    #enter email ID
    type(find("Email").below(25), "Test ID") 
    #enter password
    type(find("Password").below(30),"TestPassword") 
    click(find("//ogin")) #FindFailed exception should occur
 #catch exception and print error. 
except FindFailed, err:
    print err
    assert False

************The output is *************

ft1.2: FindFailed: //ogin as text
  Line 2759, in file Region.java

Traceback (most recent call last):
  File "D:\Testing_Tools\Sikuli\Works\Login_Main.sikuli\Login_Main.py", line 10, in Login
    import Login
  File "D:\Testing_Tools\Sikuli\sikulix.jar\Lib\sikuli\SikuliImporter.py", line 45, in load_module
    return self._load_module(module_name)
  File "D:\Testing_Tools\Sikuli\sikulix.jar\Lib\sikuli\SikuliImporter.py", line 34, in _load_module
    return imp.load_module(fullname, file, pathname, desc)
  File "D:\Testing_Tools\Sikuli\Works\Login.sikuli\Login.py", line 22, in <module>
    assert False
AssertionError: !!WHILE IMPORTING!! 


I want to skip Traceback and only display  FindFailed: //ogin as text with line number. 
How can we achieve this?

-- 
You received this question notification because your team Sikuli Drivers
is an answer contact for Sikuli.