Skip to content
This repository
Browse code

Pyccuracy console and fix of action namespace.

  • Loading branch information...
commit 7c7bc299a916e5dab7c12b7cfac6322a798c0a47 1 parent dc2e589
Bernardo Heynemann authored March 10, 2009

Showing 37 changed files with 253 additions and 143 deletions. Show diff stats Hide diff stats

  1. 1  pyccuracy/__init__.py
  2. 6  pyccuracy/actions/__init__.py
  3. 2  pyccuracy/actions/action_base.py
  4. 8  pyccuracy/actions/button_click_action.py
  5. 8  pyccuracy/actions/button_is_disabled_action.py
  6. 12  pyccuracy/actions/button_is_enabled_action.py
  7. 12  pyccuracy/actions/button_is_not_visible_action.py
  8. 10  pyccuracy/actions/button_is_visible_action.py
  9. 12  pyccuracy/actions/checkbox_check_action.py
  10. 10  pyccuracy/actions/checkbox_is_checked_action.py
  11. 8  pyccuracy/actions/checkbox_is_not_checked_action.py
  12. 11  pyccuracy/actions/checkbox_is_not_visible_action.py
  13. 12  pyccuracy/actions/checkbox_is_visible_action.py
  14. 8  pyccuracy/actions/checkbox_uncheck_action.py
  15. 12  pyccuracy/actions/div_is_not_visible_action.py
  16. 12  pyccuracy/actions/div_is_visible_action.py
  17. 8  pyccuracy/actions/element_is_visible_base.py
  18. 8  pyccuracy/actions/image_click_action.py
  19. 8  pyccuracy/actions/link_click_action.py
  20. 9  pyccuracy/actions/link_is_disabled_action.py
  21. 11  pyccuracy/actions/link_is_enabled_action.py
  22. 12  pyccuracy/actions/link_is_not_visible_action.py
  23. 12  pyccuracy/actions/link_is_visible_action.py
  24. 11  pyccuracy/actions/page_go_to_action.py
  25. 7  pyccuracy/actions/page_see_title_action.py
  26. 11  pyccuracy/actions/page_wait_for_page_to_load.py
  27. 12  pyccuracy/actions/select_has_selected_index_action.py
  28. 12  pyccuracy/actions/select_is_disabled_action.py
  29. 12  pyccuracy/actions/select_is_enabled_action.py
  30. 12  pyccuracy/actions/select_is_not_visible_action.py
  31. 12  pyccuracy/actions/select_is_visible_action.py
  32. 12  pyccuracy/actions/select_option_by_index_action.py
  33. 12  pyccuracy/actions/textbox_contains_text_action.py
  34. 12  pyccuracy/actions/textbox_is_visible_action.py
  35. 12  pyccuracy/actions/textbox_matches_text_action.py
  36. 9  pyccuracy/actions/textbox_type_action.py
  37. 38  pyccuracy/pyccuracy_console.py
1  pyccuracy/__init__.py
... ...
@@ -0,0 +1 @@
  1
+
6  pyccuracy/actions/__init__.py
... ...
@@ -1 +1,5 @@
1  
-
  1
+import os
  2
+import sys
  3
+sys.path.insert(0,os.path.abspath(__file__+"/../../../"))
  4
+from pyccuracy.page import Page
  5
+from pyccuracy.errors import ActionFailedError
2  pyccuracy/actions/action_base.py
... ...
@@ -1,5 +1,3 @@
1  
-from pyccuracy.errors import *
2  
-
3 1
 class ActionBase(object):
4 2
     def __init__(self, browser_driver, language):
5 3
         self.browser_driver = browser_driver
8  pyccuracy/actions/button_click_action.py
... ...
@@ -1,6 +1,8 @@
1  
-from pyccuracy.errors import *
2  
-from pyccuracy.page import Page
3  
-from pyccuracy.actions.action_base import *
  1
+import os
  2
+import sys
  3
+sys.path.insert(0,os.path.abspath(__file__+"/../../../"))
  4
+from pyccuracy.page import Page
  5
+from pyccuracy.actions.action_base import ActionBase
4 6
 from pyccuracy.actions.element_is_visible_base import *
5 7
 
6 8
 class ButtonClickAction(ActionBase):
8  pyccuracy/actions/button_is_disabled_action.py
... ...
@@ -1,6 +1,8 @@
1  
-from pyccuracy.errors import *
2  
-from pyccuracy.page import Page
3  
-from pyccuracy.actions.action_base import *
  1
+import os
  2
+import sys
  3
+sys.path.insert(0,os.path.abspath(__file__+"/../../../"))
  4
+from pyccuracy.page import Page
  5
+from pyccuracy.actions.action_base import ActionBase
4 6
 from pyccuracy.actions.element_is_visible_base import *
5 7
 
6 8
 class ButtonIsDisabledAction(ActionBase):
12  pyccuracy/actions/button_is_enabled_action.py
... ...
@@ -1,8 +1,10 @@
1  
-from pyccuracy.errors import *
2  
-from pyccuracy.page import Page
3  
-from pyccuracy.actions.action_base import *
4  
-from pyccuracy.actions.element_is_visible_base import *
5  
-
  1
+import os
  2
+import sys
  3
+sys.path.insert(0,os.path.abspath(__file__+"/../../../"))
  4
+from pyccuracy.page import Page
  5
+from pyccuracy.actions.action_base import ActionBase
  6
+from pyccuracy.actions.element_is_visible_base import *
  7
+
6 8
 class ButtonIsEnabledAction(ActionBase):
7 9
     def __init__(self, browser_driver, language):
8 10
         super(ButtonIsEnabledAction, self).__init__(browser_driver, language)
12  pyccuracy/actions/button_is_not_visible_action.py
... ...
@@ -1,8 +1,10 @@
1  
-from pyccuracy.errors import *
2  
-from pyccuracy.page import Page
3  
-from pyccuracy.actions.action_base import *
4  
-from pyccuracy.actions.element_is_visible_base import *
5  
-
  1
+import os
  2
+import sys
  3
+sys.path.insert(0,os.path.abspath(__file__+"/../../../"))
  4
+from pyccuracy.page import Page
  5
+from pyccuracy.actions.action_base import ActionBase
  6
+from pyccuracy.actions.element_is_visible_base import *
  7
+
6 8
 class ButtonIsNotVisibleAction(ElementIsVisibleBase):
7 9
     def __init__(self, browser_driver, language):
8 10
         super(ButtonIsNotVisibleAction, self).__init__(browser_driver, language)
10  pyccuracy/actions/button_is_visible_action.py
... ...
@@ -1,8 +1,10 @@
1  
-from pyccuracy.errors import *
2  
-from pyccuracy.actions.action_base import *
  1
+import os
  2
+import sys
  3
+sys.path.insert(0,os.path.abspath(__file__+"/../../../"))
3 4
 from pyccuracy.page import Page
4  
-from pyccuracy.actions.element_is_visible_base import *
5  
-
  5
+from pyccuracy.actions.action_base import ActionBase
  6
+from pyccuracy.actions.element_is_visible_base import *
  7
+
6 8
 class ButtonIsVisibleAction(ElementIsVisibleBase):
7 9
     def __init__(self, browser_driver, language):
8 10
         super(ButtonIsVisibleAction, self).__init__(browser_driver, language)

12  pyccuracy/actions/checkbox_check_action.py
... ...
@@ -1,8 +1,10 @@
1  
-from pyccuracy.errors import *
2  
-from pyccuracy.page import Page
3  
-from pyccuracy.actions.action_base import *
4  
-from pyccuracy.actions.element_is_visible_base import *
5  
-
  1
+import os
  2
+import sys
  3
+sys.path.insert(0,os.path.abspath(__file__+"/../../../"))
  4
+from pyccuracy.page import Page
  5
+from pyccuracy.actions.action_base import ActionBase
  6
+from pyccuracy.actions.element_is_visible_base import *
  7
+
6 8
 class CheckboxCheckAction(ActionBase):
7 9
     def __init__(self, browser_driver, language):
8 10
         super(CheckboxCheckAction, self).__init__(browser_driver, language)

10  pyccuracy/actions/checkbox_is_checked_action.py
... ...
@@ -1,8 +1,10 @@
1  
-from pyccuracy.errors import *
2  
-from pyccuracy.page import Page
3  
-from pyccuracy.actions.action_base import *
  1
+import os
  2
+import sys
  3
+sys.path.insert(0,os.path.abspath(__file__+"/../../../"))
  4
+from pyccuracy.page import Page
  5
+from pyccuracy.actions.action_base import ActionBase
4 6
 from pyccuracy.actions.element_is_visible_base import *
5  
-
  7
+
6 8
 class CheckboxIsCheckedAction(ActionBase):
7 9
     def __init__(self, browser_driver, language):
8 10
         super(CheckboxIsCheckedAction, self).__init__(browser_driver, language)
8  pyccuracy/actions/checkbox_is_not_checked_action.py
... ...
@@ -1,6 +1,8 @@
1  
-from pyccuracy.errors import *
2  
-from pyccuracy.page import Page
3  
-from pyccuracy.actions.action_base import *
  1
+import os
  2
+import sys
  3
+sys.path.insert(0,os.path.abspath(__file__+"/../../../"))
  4
+from pyccuracy.page import Page
  5
+from pyccuracy.actions.action_base import ActionBase
4 6
 from pyccuracy.actions.element_is_visible_base import *
5 7
 
6 8
 class CheckboxIsNotCheckedAction(ActionBase):
11  pyccuracy/actions/checkbox_is_not_visible_action.py
... ...
@@ -1,7 +1,10 @@
1  
-from pyccuracy.errors import *
2  
-from pyccuracy.actions.action_base import *
3  
-from pyccuracy.actions.element_is_visible_base import *
4  
-
  1
+import os
  2
+import sys
  3
+sys.path.insert(0,os.path.abspath(__file__+"/../../../"))
  4
+from pyccuracy.page import Page
  5
+from pyccuracy.actions.action_base import ActionBase
  6
+from pyccuracy.actions.element_is_visible_base import *
  7
+
5 8
 class CheckboxIsNotVisibleAction(ElementIsVisibleBase):
6 9
     def __init__(self, browser_driver, language):
7 10
         super(CheckboxIsNotVisibleAction, self).__init__(browser_driver, language)
12  pyccuracy/actions/checkbox_is_visible_action.py
... ...
@@ -1,8 +1,10 @@
1  
-from pyccuracy.errors import *
2  
-from pyccuracy.page import Page
3  
-from pyccuracy.actions.action_base import *
4  
-from pyccuracy.actions.element_is_visible_base import *
5  
-
  1
+import os
  2
+import sys
  3
+sys.path.insert(0,os.path.abspath(__file__+"/../../../"))
  4
+from pyccuracy.page import Page
  5
+from pyccuracy.actions.action_base import ActionBase
  6
+from pyccuracy.actions.element_is_visible_base import *
  7
+
6 8
 class CheckboxIsVisibleAction(ElementIsVisibleBase):
7 9
     def __init__(self, browser_driver, language):
8 10
         super(CheckboxIsVisibleAction, self).__init__(browser_driver, language)
8  pyccuracy/actions/checkbox_uncheck_action.py
... ...
@@ -1,6 +1,8 @@
1  
-from pyccuracy.errors import *
2  
-from pyccuracy.page import Page
3  
-from pyccuracy.actions.action_base import *
  1
+import os
  2
+import sys
  3
+sys.path.insert(0,os.path.abspath(__file__+"/../../../"))
  4
+from pyccuracy.page import Page
  5
+from pyccuracy.actions.action_base import ActionBase
4 6
 from pyccuracy.actions.element_is_visible_base import *
5 7
 
6 8
 class CheckboxUncheckAction(ActionBase):
12  pyccuracy/actions/div_is_not_visible_action.py
... ...
@@ -1,8 +1,10 @@
1  
-from pyccuracy.errors import *
2  
-from pyccuracy.page import Page
3  
-from pyccuracy.actions.action_base import *
4  
-from pyccuracy.actions.element_is_visible_base import *
5  
-
  1
+import os
  2
+import sys
  3
+sys.path.insert(0,os.path.abspath(__file__+"/../../../"))
  4
+from pyccuracy.page import Page
  5
+from pyccuracy.actions.action_base import ActionBase
  6
+from pyccuracy.actions.element_is_visible_base import *
  7
+
6 8
 class DivIsNotVisibleAction(ElementIsVisibleBase):
7 9
     def __init__(self, browser_driver, language):
8 10
         super(DivIsNotVisibleAction, self).__init__(browser_driver, language)
12  pyccuracy/actions/div_is_visible_action.py
... ...
@@ -1,8 +1,10 @@
1  
-from pyccuracy.errors import *
2  
-from pyccuracy.page import Page
3  
-from pyccuracy.actions.action_base import *
4  
-from pyccuracy.actions.element_is_visible_base import *
5  
-
  1
+import os
  2
+import sys
  3
+sys.path.insert(0,os.path.abspath(__file__+"/../../../"))
  4
+from pyccuracy.page import Page
  5
+from pyccuracy.actions.action_base import ActionBase
  6
+from pyccuracy.actions.element_is_visible_base import *
  7
+
6 8
 class DivIsVisibleAction(ElementIsVisibleBase):
7 9
     def __init__(self, browser_driver, language):
8 10
         super(DivIsVisibleAction, self).__init__(browser_driver, language)
8  pyccuracy/actions/element_is_visible_base.py
... ...
@@ -1,6 +1,8 @@
1  
-from pyccuracy.errors import *
2  
-from pyccuracy.page import Page
3  
-from pyccuracy.actions.action_base import *
  1
+import os
  2
+import sys
  3
+sys.path.insert(0,os.path.abspath(__file__+"/../../../"))
  4
+from pyccuracy.page import Page
  5
+from pyccuracy.actions.action_base import ActionBase
4 6
 from pyccuracy.actions.element_is_visible_base import *
5 7
 
6 8
 class ElementIsVisibleBase(ActionBase):
8  pyccuracy/actions/image_click_action.py
... ...
@@ -1,6 +1,8 @@
1  
-from pyccuracy.errors import *
2  
-from pyccuracy.page import Page
3  
-from pyccuracy.actions.action_base import *
  1
+import os
  2
+import sys
  3
+sys.path.insert(0,os.path.abspath(__file__+"/../../../"))
  4
+from pyccuracy.page import Page
  5
+from pyccuracy.actions.action_base import ActionBase
4 6
 from pyccuracy.actions.element_is_visible_base import *
5 7
 
6 8
 class ImageClickAction(ActionBase):
8  pyccuracy/actions/link_click_action.py
... ...
@@ -1,6 +1,8 @@
9  pyccuracy/actions/link_is_disabled_action.py
... ...
@@ -1,8 +1,9 @@
11  pyccuracy/actions/link_is_enabled_action.py
... ...
@@ -1,8 +1,10 @@
@@ -23,3 +25,4 @@ def execute(self, values, context):
12  pyccuracy/actions/link_is_not_visible_action.py
... ...
@@ -1,8 +1,10 @@
12  pyccuracy/actions/link_is_visible_action.py
... ...
@@ -1,8 +1,10 @@
11  pyccuracy/actions/page_go_to_action.py
... ...
@@ -1,8 +1,11 @@
1  
-from pyccuracy.errors import *
2  
-from pyccuracy.actions.action_base import *
3  
-from pyccuracy.actions.element_is_visible_base import *
4  
-import re
5 1
 import os
  2
+import sys
  3
+sys.path.insert(0,os.path.abspath(__file__+"/../../../"))
  4
+from pyccuracy.page import Page
  5
+from pyccuracy.actions.action_base import ActionBase
  6
+from pyccuracy.actions.element_is_visible_base import *
  7
+
  8
+import re
6 9
 
7 10
 class PageGoToAction(ActionBase):
8 11
     def __init__(self, browser_driver, language):
7  pyccuracy/actions/page_see_title_action.py
... ...
@@ -1,5 +1,8 @@
1  
-from pyccuracy.errors import *
2  
-from pyccuracy.actions.action_base import *
  1
+import os
  2
+import sys
  3
+sys.path.insert(0,os.path.abspath(__file__+"/../../../"))
  4
+from pyccuracy.page import Page
  5
+from pyccuracy.actions.action_base import ActionBase
3 6
 from pyccuracy.actions.element_is_visible_base import *
4 7
 
5 8
 class PageSeeTitleAction(ActionBase):
11  pyccuracy/actions/page_wait_for_page_to_load.py
... ...
@@ -1,7 +1,10 @@
1  
-from pyccuracy.errors import *
2  
-from pyccuracy.actions.action_base import *
3  
-from pyccuracy.actions.element_is_visible_base import *
4  
-
  1
+import os
  2
+import sys
  3
+sys.path.insert(0,os.path.abspath(__file__+"/../../../"))
  4
+from pyccuracy.page import Page
  5
+from pyccuracy.actions.action_base import ActionBase
  6
+from pyccuracy.actions.element_is_visible_base import *
  7
+
5 8
 class PageWaitForPageToLoadAction(ActionBase):
6 9
     def __init__(self, browser_driver, language):
7 10
         super(PageWaitForPageToLoadAction, self).__init__(browser_driver, language)
12  pyccuracy/actions/select_has_selected_index_action.py
... ...
@@ -1,8 +1,10 @@
1  
-from pyccuracy.errors import *
2  
-from pyccuracy.page import Page
3  
-from pyccuracy.actions.action_base import *
4  
-from pyccuracy.actions.element_is_visible_base import *
5  
-
  1
+import os
  2
+import sys
  3
+sys.path.insert(0,os.path.abspath(__file__+"/../../../"))
  4
+from pyccuracy.page import Page
  5
+from pyccuracy.actions.action_base import ActionBase
  6
+from pyccuracy.actions.element_is_visible_base import *
  7
+
6 8
 class SelectHasSelectedIndexAction(ActionBase):
7 9
     def __init__(self, browser_driver, language):
8 10
         super(SelectHasSelectedIndexAction, self).__init__(browser_driver, language)
12  pyccuracy/actions/select_is_disabled_action.py
... ...
@@ -1,8 +1,10 @@
1  
-from pyccuracy.errors import *
2  
-from pyccuracy.page import Page
3  
-from pyccuracy.actions.action_base import *
4  
-from pyccuracy.actions.element_is_visible_base import *
5  
-
  1
+import os
  2
+import sys
  3
+sys.path.insert(0,os.path.abspath(__file__+"/../../../"))
  4
+from pyccuracy.page import Page
  5
+from pyccuracy.actions.action_base import ActionBase
  6
+from pyccuracy.actions.element_is_visible_base import *
  7
+
6 8
 class SelectIsDisabledAction(ActionBase):
7 9
     def __init__(self, browser_driver, language):
8 10
         super(SelectIsDisabledAction, self).__init__(browser_driver, language)
12  pyccuracy/actions/select_is_enabled_action.py
... ...
@@ -1,8 +1,10 @@
1  
-from pyccuracy.errors import *
2  
-from pyccuracy.page import Page
3  
-from pyccuracy.actions.action_base import *
4  
-from pyccuracy.actions.element_is_visible_base import *
5  
-
  1
+import os
  2
+import sys
  3
+sys.path.insert(0,os.path.abspath(__file__+"/../../../"))
  4
+from pyccuracy.page import Page
  5
+from pyccuracy.actions.action_base import ActionBase
  6
+from pyccuracy.actions.element_is_visible_base import *
  7
+
6 8
 class SelectIsEnabledAction(ActionBase):
7 9
     def __init__(self, browser_driver, language):
8 10
         super(SelectIsEnabledAction, self).__init__(browser_driver, language)
12  pyccuracy/actions/select_is_not_visible_action.py
... ...
@@ -1,8 +1,10 @@
1  
-from pyccuracy.errors import *
2  
-from pyccuracy.page import Page
3  
-from pyccuracy.actions.action_base import *
4  
-from pyccuracy.actions.element_is_visible_base import *
5  
-
  1
+import os
  2
+import sys
  3
+sys.path.insert(0,os.path.abspath(__file__+"/../../../"))
  4
+from pyccuracy.page import Page
  5
+from pyccuracy.actions.action_base import ActionBase
  6
+from pyccuracy.actions.element_is_visible_base import *
  7
+
6 8
 class SelectIsNotVisibleAction(ElementIsVisibleBase):
7 9
     def __init__(self, browser_driver, language):
8 10
         super(SelectIsNotVisibleAction, self).__init__(browser_driver, language)
12  pyccuracy/actions/select_is_visible_action.py
... ...
@@ -1,8 +1,10 @@
1  
-from pyccuracy.errors import *
2  
-from pyccuracy.page import Page
3  
-from pyccuracy.actions.action_base import *
4  
-from pyccuracy.actions.element_is_visible_base import *
5  
-
  1
+import os
  2
+import sys
  3
+sys.path.insert(0,os.path.abspath(__file__+"/../../../"))
  4
+from pyccuracy.page import Page
  5
+from pyccuracy.actions.action_base import ActionBase
  6
+from pyccuracy.actions.element_is_visible_base import *
  7
+
6 8
 class SelectIsVisibleAction(ElementIsVisibleBase):
7 9
     def __init__(self, browser_driver, language):
8 10
         super(SelectIsVisibleAction, self).__init__(browser_driver, language)
12  pyccuracy/actions/select_option_by_index_action.py
... ...
@@ -1,8 +1,10 @@
1  
-from pyccuracy.errors import *
2  
-from pyccuracy.page import Page
3  
-from pyccuracy.actions.action_base import *
4  
-from pyccuracy.actions.element_is_visible_base import *
5  
-
  1
+import os
  2
+import sys
  3
+sys.path.insert(0,os.path.abspath(__file__+"/../../../"))
  4
+from pyccuracy.page import Page
  5
+from pyccuracy.actions.action_base import ActionBase
  6
+from pyccuracy.actions.element_is_visible_base import *
  7
+
6 8
 class SelectOptionByIndexAction(ActionBase):
7 9
     def __init__(self, browser_driver, language):
8 10
         super(SelectOptionByIndexAction, self).__init__(browser_driver, language)
12  pyccuracy/actions/textbox_contains_text_action.py
... ...
@@ -1,8 +1,10 @@
1  
-from pyccuracy.errors import *
2  
-from pyccuracy.page import Page
3  
-from pyccuracy.actions.action_base import *
4  
-from pyccuracy.actions.element_is_visible_base import *
5  
-
  1
+import os
  2
+import sys
  3
+sys.path.insert(0,os.path.abspath(__file__+"/../../../"))
  4
+from pyccuracy.page import Page
  5
+from pyccuracy.actions.action_base import ActionBase
  6
+from pyccuracy.actions.element_is_visible_base import *
  7
+
6 8
 class TextboxContainsTextAction(ActionBase):
7 9
     def __init__(self, browser_driver, language):
8 10
         super(TextboxContainsTextAction, self).__init__(browser_driver, language)
12  pyccuracy/actions/textbox_is_visible_action.py
... ...
@@ -1,8 +1,10 @@
1  
-from pyccuracy.errors import *
2  
-from pyccuracy.page import Page
3  
-from pyccuracy.actions.action_base import *
4  
-from pyccuracy.actions.element_is_visible_base import *
5  
-
  1
+import os
  2
+import sys
  3
+sys.path.insert(0,os.path.abspath(__file__+"/../../../"))
  4
+from pyccuracy.page import Page
  5
+from pyccuracy.actions.action_base import ActionBase
  6
+from pyccuracy.actions.element_is_visible_base import *
  7
+
6 8
 class TextboxIsVisibleAction(ElementIsVisibleBase):
7 9
     def __init__(self, browser_driver, language):
8 10
         super(TextboxIsVisibleAction, self).__init__(browser_driver, language)
12  pyccuracy/actions/textbox_matches_text_action.py
... ...
@@ -1,8 +1,10 @@
1  
-from pyccuracy.errors import *
2  
-from pyccuracy.page import Page
3  
-from pyccuracy.actions.action_base import *
4  
-from pyccuracy.actions.element_is_visible_base import *
5  
-
  1
+import os
  2
+import sys
  3
+sys.path.insert(0,os.path.abspath(__file__+"/../../../"))
  4
+from pyccuracy.page import Page
  5
+from pyccuracy.actions.action_base import ActionBase
  6
+from pyccuracy.actions.element_is_visible_base import *
  7
+
6 8
 class TextboxMatchesTextAction(ActionBase):
7 9
     def __init__(self, browser_driver, language):
8 10
         super(TextboxMatchesTextAction, self).__init__(browser_driver, language)
9  pyccuracy/actions/textbox_type_action.py
... ...
@@ -1,7 +1,8 @@
1  
-from pyccuracy.selenium_browser_driver import *
2  
-from pyccuracy.errors import *
3  
-from pyccuracy.page import Page
4  
-from pyccuracy.actions.action_base import *
  1
+import os
  2
+import sys
  3
+sys.path.insert(0,os.path.abspath(__file__+"/../../../"))
  4
+from pyccuracy.page import Page
  5
+from pyccuracy.actions.action_base import ActionBase
5 6
 from pyccuracy.actions.element_is_visible_base import *
6 7
 
7 8
 class TextboxTypeAction(ActionBase):
38  pyccuracy/pyccuracy_console.py
... ...
@@ -0,0 +1,38 @@
  1
+#!/usr/bin/env python
  2
+# -*- coding: utf-8 -*
  3
+ 
  4
+u"""Pyccuracy - BDD Acceptance testing
  5
+
  6
+Example usage
  7
+=============
  8
+ 
  9
+    python pyccuracy.py
  10
+ 
  11
+:author: `Bernardo Heynemann <mailto:heynemann@gmail.com>`__
  12
+"""
  13
+ 
  14
+# Pylint checks
  15
+# "line to long" pylint: disable-msg=C0301
  16
+# "Used * or ** magic" pylint: disable-msg=W0142
  17
+ 
  18
+__revision__ = "$Id$"
  19
+__docformat__ = 'restructuredtext en'
  20
+ 
  21
+import os, sys, optparse 
  22
+from pyccuracy_core import PyccuracyCore
  23
+ 
  24
+def main():
  25
+    """ Main function - parses args and runs action """
  26
+    parser = optparse.OptionParser(usage="%prog or type %prog -h (--help) for help", description=__doc__, version="%prog" + __revision__)
  27
+    parser.add_option("-p", "--pattern", dest="pattern", default="*.acc", help="File pattern. Defines which files will get executed [default: %%default].")
  28
+    parser.add_option("-d", "--dir", dest="dir", default=os.curdir, help="Tests directory. Defines where the tests to be executed are [default: %%default]. Note: this is recursive, so all the tests under the current directory get executed.")
  29
+    #parser.add_option("-v", action="count", dest="verbosity", default = DEFAULT_VERBOSITY, help = "Verbosity. Add more -v to be more verbose (%s) [default: %%default]" % LOG_HELP)
  30
+    #parser.add_option("-l", "--logfile", dest="logfile",    default = None, help = "Log to file instead off console [default: %default]" )
  31
+ 
  32
+    (options, args) = parser.parse_args()
  33
+
  34
+    pyc = PyccuracyCore()
  35
+    pyc.run_tests(file_pattern=options.pattern, tests_path=options.dir)
  36
+ 
  37
+if __name__ == "__main__":
  38
+    main()

0 notes on commit 7c7bc29

Please sign in to comment.
Something went wrong with that request. Please try again.