当前位置: 首页>>代码示例>>Python>>正文


Python Page.__init__方法代码示例

本文整理汇总了Python中page.Page.__init__方法的典型用法代码示例。如果您正苦于以下问题:Python Page.__init__方法的具体用法?Python Page.__init__怎么用?Python Page.__init__使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在page.Page的用法示例。


在下文中一共展示了Page.__init__方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: __init__

# 需要导入模块: from page import Page [as 别名]
# 或者: from page.Page import __init__ [as 别名]
    def __init__(self, testsetup):
        Page.__init__(self, testsetup)

        handles = self.selenium.window_handles
        for i in handles:
            self.selenium.switch_to_window(i)
            if self.selenium.title == "BrowserID": break
开发者ID:gerv,项目名称:FlightDeck-selenium,代码行数:9,代码来源:browser_id.py

示例2: __init__

# 需要导入模块: from page import Page [as 别名]
# 或者: from page.Page import __init__ [as 别名]
 def __init__(self, testsetup, lookup):
     Page.__init__(self, testsetup)
     self.lookup = lookup
     if type(lookup) is int:
         self._root_locator = (self._base_locator[0], "%s[%i]" % (self._base_locator[1], lookup))
     elif type(lookup) is unicode:
         self._root_locator = (self._base_locator[0], "%s[h3[normalize-space(text()) = '%s']]" % (self._base_locator[1], lookup))
开发者ID:AlexLakatos,项目名称:FlightDeck-selenium,代码行数:9,代码来源:dashboard_page.py

示例3: __init__

# 需要导入模块: from page import Page [as 别名]
# 或者: from page.Page import __init__ [as 别名]
    def __init__(self):
        self.model = gtk.ListStore(object,str,str,str)
        Page.__init__(self)

        self.cfg = PythmConfig()

        self.btn_connect = ImageButton(gtk.STOCK_CONNECT)
        self.btnbox.add(self.btn_connect)
        self.btn_connect.connect("clicked",self.btn_connect_clicked)

        self.btn_start = ImageButton(gtk.STOCK_EXECUTE)
        self.btnbox.add(self.btn_start)
        self.btn_start.connect("clicked",self.btn_start_clicked)

        self.btn_stop = ImageButton(gtk.STOCK_STOP)
        self.btnbox.add(self.btn_stop)
        self.btn_stop.connect("clicked",self.btn_stop_clicked)

        self.btn_refresh = ImageButton(gtk.STOCK_REFRESH)
        self.btnbox.add(self.btn_refresh)
        self.btn_refresh.connect("clicked",self.btn_refresh_clicked)

        self.mgr = BackendManager()

        if self.cfg.get_backend() != None:
            self.start_backend(self.cfg.get_backend())

        self.refresh()
        self.row_selected(None)
        self.set_sensitive(True)
开发者ID:frownmonkey,项目名称:pythm,代码行数:32,代码来源:pagebackend.py

示例4: __init__

# 需要导入模块: from page import Page [as 别名]
# 或者: from page.Page import __init__ [as 别名]
    def __init__(self):
        self.duration = 0.0       # Druation of current song.
        self.posBarPressed = False  # Set song position from backend in slider.
        self.posBarDownVal = -1

        Page.__init__(self);
        self.cfg.get_backend().connect(Signals.VOLUME_CHANGED,self.volume_changed)
        self.cfg.get_backend().connect(Signals.RANDOM_CHANGED,self.random_changed)
        self.cfg.get_backend().connect(Signals.REPEAT_CHANGED,self.repeat_changed)
        self.cfg.get_backend().connect(Signals.SONG_CHANGED,self.song_changed)
        self.cfg.get_backend().connect(Signals.POS_CHANGED,self.pos_changed)
        self.cfg.get_backend().connect(Signals.STATE_CHANGED,self.state_changed)

        self.btn_prev = ImageButton(gtk.STOCK_MEDIA_PREVIOUS)
        self.btnbox.add(self.btn_prev)
        self.btn_stop = ImageButton(gtk.STOCK_MEDIA_STOP)
        self.btnbox.add(self.btn_stop)
        self.btn_pause = ImageButton(gtk.STOCK_MEDIA_PAUSE)
        self.btnbox.add(self.btn_pause)
        self.btn_play = ImageButton(gtk.STOCK_MEDIA_PLAY)
        self.btnbox.add(self.btn_play)
        self.btn_next = ImageButton(gtk.STOCK_MEDIA_NEXT)
        self.btnbox.add(self.btn_next)


        self.btn_play.connect("clicked", self.btn_clicked)
        self.btn_stop.connect("clicked", self.btn_clicked)
        self.btn_prev.connect("clicked", self.btn_clicked)
        self.btn_next.connect("clicked", self.btn_clicked)
        self.btn_pause.connect("clicked", self.btn_clicked)

        self.volevent = False
开发者ID:frownmonkey,项目名称:pythm,代码行数:34,代码来源:pageplay.py

示例5: __init__

# 需要导入模块: from page import Page [as 别名]
# 或者: from page.Page import __init__ [as 别名]
 def __init__(self):
     Page.__init__(self)
     self._current_line = 0
     self._tail = False
     self._content = ""
     with open("/tmp/clazy.json", 'r') as f:
         self._parse_lines(f.read())
         f.close()
开发者ID:Elv13,项目名称:Config_Files,代码行数:10,代码来源:pager.py

示例6: __init__

# 需要导入模块: from page import Page [as 别名]
# 或者: from page.Page import __init__ [as 别名]
	def __init__(self, path):
		Page.__init__(self)

		module,name=path.rsplit('.', 1)

		app=__import__(module, fromlist=[ name ])

		self.app=getattr(app, name)()
开发者ID:sthomen,项目名称:pymdcms,代码行数:10,代码来源:apps.py

示例7: __init__

# 需要导入模块: from page import Page [as 别名]
# 或者: from page.Page import __init__ [as 别名]
 def __init__(self):
     Page.__init__(self)
     self._current_line = 0
     self._code = [
         "NumberWrapper* wrap3 = nullptr;",
         "",
         "//Check if the URI is complete or short",
         "const bool hasAtSign = uri.hasHostname();",
         "",
         "// Append the account hostname, this should always reach the same destination",
         "// as long as the server implementation isn't buggy.",
         "const auto extendedUri = (hasAtSign || !account) ? uri : URI(QStringLiteral(\"%[email protected]%2\")",
         "    .arg(uri)",
         "    .arg(account->hostname()));",
         "",
         "//Try to see if there is a better candidate with a suffix (LAN only)",
         "if ( !hasAtSign && account ) {",
         "",
         "    // Attempt an early candidate using the extended URI. The later",
         "    // `confirmedCandidate2` will attempt a similar, but less likely case.",
         "    if ((wrap2 = d_ptr->m_hDirectory.value(extendedUri))) {",
         "        if (auto cm = d_ptr->fillDetails(wrap2, extendedUri, account, contact, type))",
         "        return cm;",
         "    }",
         "}",
         "",
         "//Check",
         "ContactMethod* confirmedCandidate = d_ptr->fillDetails(wrap,uri,account,contact,type);",
         "",
         "//URIs can be represented in multiple way, check if a more verbose version",
         "//already exist",
         "ContactMethod* confirmedCandidate2 = nullptr;",
         "",
         "//Try to use a ContactMethod with a contact when possible, work only after the",
         "//contact are loaded",
         "if (confirmedCandidate && confirmedCandidate->contact())",
         "    confirmedCandidate2 = d_ptr->fillDetails(wrap2,uri,account,contact,type);",
         "",
         "ContactMethod* confirmedCandidate3 = nullptr;",
         "",
         "//Else, try to see if the hostname correspond to the account and flush it",
         "//This have to be done after the parent if as the above give \"better\"",
         "//results. It cannot be merged with wrap2 as this check only work if the",
         "//candidate has an account.",
         "if (hasAtSign && account && uri.hostname() == account->hostname()) {",
         "    if ((wrap3 = d_ptr->m_hDirectory.value(uri.userinfo()))) {",
         "        foreach(ContactMethod* number, wrap3->numbers) {",
         "        if (number->account() == account) {",
         "            if (contact && ((!number->contact()) || (contact->uid() == number->contact()->uid())))",
         "                number->setPerson(contact); //TODO Check all cases from fillDetails()",
         "            //TODO add alternate URI",
         "            confirmedCandidate3 = number;",
         "            break;",
         "        }",
         "        }",
         "    }",
         "}",
     ]
开发者ID:Elv13,项目名称:Config_Files,代码行数:60,代码来源:codeview.py

示例8: __init__

# 需要导入模块: from page import Page [as 别名]
# 或者: from page.Page import __init__ [as 别名]
 def __init__(self, driver):
     Page.__init__(self, driver)
     self.altom_logo = Element(self.driver, (By.XPATH, ".//*[@id='site-title']/a/img"))
     self.sidebar = Element(self.driver, (By.CLASS_NAME, "sidebar"))
     self.main_content = Element(self.driver, (By.ID, "mainContent"))
     self.main_menu = Element(self.driver, (By.ID, "mainMenu"))
     self.video = Element(self.driver, (By.ID, "presentation"))
     self.phone_number = Element(self.driver, (By.CLASS_NAME, "mainPhone"))
     self.blocks = Element(self.driver, (By.CLASS_NAME, "blocks"))
开发者ID:rucindrea,项目名称:altom-ro-tests,代码行数:11,代码来源:home.py

示例9: __init__

# 需要导入模块: from page import Page [as 别名]
# 或者: from page.Page import __init__ [as 别名]
    def __init__(self, testsetup):
        Page.__init__(self, testsetup)

        self.selenium.wait_for_pop_up("", self.timeout)

        handles = self.selenium.get_all_window_titles()

        for i in handles:
            self.selenium.select_window(i)
            if self.selenium.get_title == self._pop_up_title:
                self.selenium.window_focus()
                break
开发者ID:tallowen,项目名称:mozillians-tests,代码行数:14,代码来源:browser_id.py

示例10: __init__

# 需要导入模块: from page import Page [as 别名]
# 或者: from page.Page import __init__ [as 别名]
    def __init__(self):
        #id, artist, title, album, ('>' when playing)
        self.model = gtk.ListStore(object,str,str,str,str)
        Page.__init__(self)
        self.cfg.get_backend().connect(Signals.PL_CHANGED,self.load_list)
        self.cfg.get_backend().connect(Signals.SONG_CHANGED,self.song_changed)

        self.btn_up = ImageButton(gtk.STOCK_GO_UP)
        self.btnbox.add(self.btn_up)
        self.btn_down = ImageButton(gtk.STOCK_GO_DOWN)
        self.btnbox.add(self.btn_down)
        self.btn_play = ImageButton(gtk.STOCK_MEDIA_PLAY)
        self.btnbox.add(self.btn_play)
        #self.btn_del = ImageButton(gtk.STOCK_REMOVE)
        #self.btnbox.add(self.btn_del)
        self.btn_clear = ImageButton(gtk.STOCK_CLEAR)
        self.btnbox.add(self.btn_clear)
        self.btn_up.connect("clicked",self.clicked_up)
        self.btn_down.connect("clicked",self.clicked_down)
        self.btn_play.connect("clicked",self.clicked_play)
        #self.btn_del.connect("clicked",self.clicked_del)
        self.btn_clear.connect("clicked",self.clicked_clear)
开发者ID:frownmonkey,项目名称:pythm,代码行数:24,代码来源:pagelist.py

示例11: __init__

# 需要导入模块: from page import Page [as 别名]
# 或者: from page.Page import __init__ [as 别名]
    def __init__(self):
        self.model = gtk.ListStore(object, str)
        Page.__init__(self)

        self.btn_up = ImageButton(gtk.STOCK_GO_UP)
        self.btnbox.add(self.btn_up)
        self.btn_up.connect("clicked", self.btn_up_clicked)

        self.btn_open = ImageButton(gtk.STOCK_OPEN)
        self.btnbox.add(self.btn_open)
        self.btn_open.connect("clicked", self.btn_open_clicked)

        self.btn_play = ImageButton(gtk.STOCK_MEDIA_PLAY)
        self.btnbox.add(self.btn_play)
        self.btn_play.connect("clicked", self.btn_play_clicked)
        self.path = None

        self.btn_adddir = ImageButton(gtk.STOCK_ADD)
        self.btnbox.add(self.btn_adddir)
        self.btn_adddir.connect("clicked", self.btn_adddir_clicked)
        self.path = None

        self.cfg.get_backend().connect(Signals.BROWSER_CHANGED, self.browser_changed)
开发者ID:frownmonkey,项目名称:pythm,代码行数:25,代码来源:pagebrowse.py

示例12: __init__

# 需要导入模块: from page import Page [as 别名]
# 或者: from page.Page import __init__ [as 别名]
 def __init__(self):
     Page.__init__(self)
开发者ID:Elv13,项目名称:Config_Files,代码行数:4,代码来源:basicpage.py

示例13: __init__

# 需要导入模块: from page import Page [as 别名]
# 或者: from page.Page import __init__ [as 别名]
 def __init__(self, testsetup, open_url=True):
     ''' Creates a new instance of the class and gets the page ready for testing '''
     Page.__init__(self, testsetup)
     if open_url:
         self.selenium.get(self.base_url)
开发者ID:codemaverick84,项目名称:Affiliates-Tests,代码行数:7,代码来源:start_page.py

示例14: __init__

# 需要导入模块: from page import Page [as 别名]
# 或者: from page.Page import __init__ [as 别名]
 def __init__(self):
     Page.__init__(self)
     self.height = 8
     self._entry = None
开发者ID:Elv13,项目名称:Config_Files,代码行数:6,代码来源:monitor.py

示例15: __init__

# 需要导入模块: from page import Page [as 别名]
# 或者: from page.Page import __init__ [as 别名]
 def __init__(self, testsetup, banner):
     Page.__init__(self, testsetup)
     self._root_element = banner
开发者ID:GruLab,项目名称:Affiliates-Tests,代码行数:5,代码来源:home.py


注:本文中的page.Page.__init__方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。