I'm trying to get the text from a text input. I understand from Stackoverflow that I should use getAttribute('value')
. This is what I'm trying but it's not working (below). I get the error:
AttributeError: 'WebElement' object has no attribute 'getAttribute'
audience_panel = self.browser.find_element_by_id('input-panel')
network_text = audience_panel.find_element_by_id('network-code')
self.assertEqual(network_text.getAttribute("value"), "ABC")