def test_dynamiccontent(web_fixture, dynamiccontent_scenario): fixture = dynamiccontent_scenario browser = web_fixture.driver_browser fixture.start_example_app() browser.open('/') browser.capture_cropped_screenshot(fixture.new_screenshot_path('dynamiccontent_1.png')) browser.type(XPath.input_labelled('Total amount'), '3000') percentage_input = XPath.input().inside_of(XPath.table_cell_aligned_to('Percentage', 'Fund', 'Fund A')) browser.type(percentage_input, '80') browser.capture_cropped_screenshot(fixture.new_screenshot_path('dynamiccontent_2.png')) browser.set_selected(XPath.input_labelled('Amount')) browser.capture_cropped_screenshot(fixture.new_screenshot_path('dynamiccontent_3.png'))
def percentage_input_for(self, fund_name): return XPath.input().inside_of(self.percentage_cell_for(fund_name))