test_reconcile.py 文件源码

python
阅读 25 收藏 0 点赞 0 评论 0

项目:biweeklybudget 作者: jantman 项目源码 文件源码
def test_09_wrong_amount(self, base_url, selenium):
        self.baseurl = base_url
        self.get(selenium, base_url + '/reconcile')
        src = selenium.find_element_by_id('ofx-1-OFXT4')
        tgt = selenium.find_element_by_id(
            'trans-1').find_element_by_class_name('reconcile-drop-target')
        # get the innerHTML of both columns
        trans_div = selenium.find_element_by_id('trans-panel').get_attribute(
            'innerHTML')
        ofxtrans_div = selenium.find_element_by_id('ofx-panel').get_attribute(
            'innerHTML')
        # drag and drop
        chain = ActionChains(selenium)
        chain.drag_and_drop(src, tgt).perform()
        # sleep a bit for the drag to stop
        sleep(1)
        # ensure both columns are still the same
        assert selenium.find_element_by_id('trans-panel').get_attribute(
            'innerHTML') == trans_div
        assert selenium.find_element_by_id('ofx-panel').get_attribute(
            'innerHTML') == ofxtrans_div
        # ensure reconciled JS var is still the same
        assert self.get_reconciled(selenium) == {}
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号