Atribute error

G

gtb

In file Test1.py below I get a attribute error on the line
"self.logon()". It worked earlier when Test1 was derived from class
newLogon but that does not seem logical to me. Any suggestions?

Thanks,

john

#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#File Test1.py

# Generated by MaxQ [com.bitmechanic.maxq.generator.CompactGenerator]
#Test1.py

from CompactTest import CompactTest
from newLogon import newLogon

class Test1(CompactTest):
# Recorded test actions.
def runTest(self):
self.msg('Test started')

self.logon()

# ^^^ Insert new recordings here. (Do not remove this line.)


# Code to load and run the test
if __name__ == 'main':
Test1('Test1').Run()


#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

#File newLogon.py
# Generated by MaxQ [com.bitmechanic.maxq.generator.CompactGenerator]
from CompactTest import CompactTest

class newLogon(CompactTest):
# Recorded test actions.
def logon(self):
self.msg('Test started')


# ^^^ Insert new recordings here. (Do not remove this line.)


# Code to load and run the test
if __name__ == 'main':
newLogon('newLogon').Run()
 
B

Bjoern Schliessmann

gtb said:
In file Test1.py below I get a attribute error on the line
"self.logon()".

Seems like the class doesn't have this attribute.
It worked earlier when Test1 was derived from
class newLogon but that does not seem logical to me.

What's the definition of CompactTest?

Regards,


Björn
 
G

gtb

Thanks for posting.

CompactTest is a class provided by MaxQ and inheritance generally
works as the files below worked OK. I was trying to re-arrange things
as newLogin() should be just one of many functions called by Test1.
The way the inheritance is setup below seems like the tail wagging the
dog especially since at some point I may no longer want to run the
logon function.

Thanks again,

john

#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# File Test1.py
# Generated by MaxQ [com.bitmechanic.maxq.generator.CompactGenerator]
from newLogon import newLogon

class Test1(newLogon):
# Recorded test actions.
def runTest(self):
self.msg('Test started')

self.logon
# ^^^ Insert new recordings here. (Do not remove this line.)


# Code to load and run the test
if __name__ == 'main':
Test1('Test1').Run()

#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# File newLogon.py
# Generated by MaxQ [com.bitmechanic.maxq.generator.CompactGenerator]
from CompactTest import CompactTest

class newLogon(CompactTest):
# Recorded test actions.
def logon(self):
self.msg('Test started')


# ^^^ Insert new recordings here. (Do not remove this line.)


# Code to load and run the test
if __name__ == 'main':
newLogon('newLogon').Run()
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,764
Messages
2,569,565
Members
45,041
Latest member
RomeoFarnh

Latest Threads

Top