Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- '''
- Test selenium actions
- '''
- import time
- from bl.facade import AccountPoolInitializer
- from bl.facade import TelcoTestCase
- from bl.facade import TestCaseId
- from bl.facade import TestMethod
- from bl.facade import log
- from bl.infra.selenium.api import CallRecord
- @TestCaseId('selenium_sample')
- class MediaProcessorSample(TelcoTestCase):
- @AccountPoolInitializer
- def accountpool(self):
- pass
- @TestMethod
- def selenium_sample(self):
- with self.new_step('Init selenium...'):
- selenium = CallRecord()
- selenium.open('http://test_sip_service.net')
- selenium.type_login('1111111111')
- selenium.type_password('55555555')
- selenium.click_submit_login()
- selenium.try_accept_alert('Attempting to login as system extension')
- selenium.open('http://test_sip_service.net/company/index.html')
- selenium.click_users_button()
- selenium.click_extension_button('101')
- selenium.click_call_screening_button()
- selenium._click_by_xpath('//*[text()="Custom"]')
- #/mobile/api/proxy.html?cmd=rules.downloadGreeting&gid=96511008
- aaa = selenium.wait_element('//*[@id="wigRecorder-downloadButton"]/a').get_attribute("href")
- log.info('........................................%s'%aaa)
- # bbb = '/mobile/api/proxy.html?cmd=rules.downloadGreeting&gid=96511008'
- path = selenium.download_file(cookies=selenium.get_cookies(), file_name='aaa')
- log.info('path to file: %s'%path)
- time.sleep(5)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement