本文整理汇总了Python中myLib.miro_app.MiroApp.get_sources_region方法的典型用法代码示例。如果您正苦于以下问题:Python MiroApp.get_sources_region方法的具体用法?Python MiroApp.get_sources_region怎么用?Python MiroApp.get_sources_region使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类myLib.miro_app.MiroApp
的用法示例。
在下文中一共展示了MiroApp.get_sources_region方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: test_29
# 需要导入模块: from myLib.miro_app import MiroApp [as 别名]
# 或者: from myLib.miro_app.MiroApp import get_sources_region [as 别名]
def test_29(self):
"""http://litmus.pculture.org/show_test.cgi?id=29 add site from miro site.
1. Open Awesome website
2. click one-click subscribe link for revver
3. Verify site added
4. Cleanup
"""
reg = MiroRegions()
miro = MiroApp()
site_url = "http://pculture.org/feeds_test/subscription-test-guide.html"
site = "Awesome"
site2 = "Revver"
miro.add_source_from_tab(reg, site_url)
miro.click_last_source(reg)
reg.t.find("Subscribe")
reg.t.click("Subscribe")
time.sleep(4)
p = miro.get_sources_region(reg)
if p.exists("http://rev",3) or \
p.exists("revver",3):
print "revver site added"
else:
self.fail("revver site not added to sidebar")
miro.delete_site(reg, site)
miro.delete_site(reg, "revver")
示例2: test_143
# 需要导入模块: from myLib.miro_app import MiroApp [as 别名]
# 或者: from myLib.miro_app.MiroApp import get_sources_region [as 别名]
def test_143(self):
"""http://litmus.pculture.org/show_test.cgi?id=143 multiple delete and cancel.
1. Add clearbits and archive.org
2. select bogh and delete, the cancel
3. verify sites not deleted.
4. Cleanup
"""
site_url = "http://clearbits.net"
site_url2 = "http://archive.org"
site = "ClearBits"
site2 = "Internet"
setAutoWaitTimeout(60)
reg = MiroRegions()
miro = MiroApp()
miro.add_source(reg, site_url,site)
miro.add_source(reg, site_url2,site2)
p = miro.get_sources_region(reg)
p.click(site)
keyDown(Key.SHIFT)
p.click(site2)
keyUp(Key.SHIFT)
if reg.m.exists("Delete All",5) or \
reg.m.exists(Pattern("button_mv_delete_all.png"),5):
click(reg.m.getLastMatch())
else:
self.fail("Delete All button for multi-select not found")
miro.remove_confirm(reg, "cancel")
time.sleep(3)
p = miro.get_sources_region(reg)
time.sleep(3)
self.assertTrue(p.exists(site))
self.assertTrue(p.exists(site2))
#Cleanup
miro.delete_site(reg, site)
miro.delete_site(reg, site2)