0 votes
1 view
in Devops and Agile by (19.8k points)

I am trying to extract the text in an input box,

<input type="text" name="inputbox" value="name" class="box">

I started with

input = driver.find_element_by_name("inputbox")

I tried input.getText() but I got

AttributeError: 'WebElement' object has no attribute 'getText'

1 Answer

0 votes
by (63.4k points)

You may need to use .get_attribute("value"). instead of .text.

Hope this helps!

Welcome to Intellipaat Community. Get your technical queries answered by top developers !