Re: import error for application base page when placed under tailored folder

9 views
Skip to first unread message

Adam Goucher

unread,
May 16, 2013, 8:43:38 AM5/16/13
to sau...@googlegroups.com
I haven't had any coffee yet so bear with me...
- The 'tailored' package isn't likely where you want that; move it to modules/pages/base_page.py. The tailored stuff is all layer[s] between your code and Saunter's
- I suspect too what BasePage has is an import to BasePage so what happens is that in order to create BasePage it needs to first create BasePage but in order to that it needs to import BasePage, etc...

Can you send the code to BasePage? (if not to the list, just to me off it)

-adam
Hi,

Am facing an issue with importing BasePage. Below is the details. Would appreciate if someone can tell me what's going wrong. Would be helpful to know how/where to create a BasePage in saunter.

I created an application level BasePage.py to write some common functions to be used in test scripts/pages and placed it under tailored folder.
All the page objects now inherits basePage which in turn inherits from page.

When I import BasePage in testscripts which is under scripts folder,


from tailored.BasePage import BasePage


class CheckTestScript(SaunterTestCase):

       

    @pytest.marks('appID')

    def test_addNewAppID(self):

        membercenterpage = MemberCenterPage(self.driver)

        membercenterpage.open()

        pg = BasePage(self.driver)


At pg = BasePage(self.driver) , it is throwing an error. Here is the output - 


-----------------------------------------------------------------------------------------------------------------

Traceback (most recent call last):

  File "/Users/Thirumal/workspace/QA/pySaunter/conftest.py", line 32, in pytest_runtest_call

    raise(e)

RuntimeError: maximum recursion depth exceeded while calling a Python object

-- generated xml file: /Users/Thirumal/workspace/QA/pySaunter/logs/2013-05-16-11-30-23/2013-05-16-11-30-23.xml --

====================================== 8 tests deselected by "-m 'thiru'" =======================================

==================================== 1 failed, 8 deselected in 21.63 seconds ====================================


Thanks

Thirumal



--
You received this message because you are subscribed to the Google Groups "Saunter" group.
To unsubscribe from this group and stop receiving emails from it, send an email to saunter+u...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Reply all
Reply to author
Forward
0 new messages