I am struggling to get the text from a textbox, convert it to an integer, multiply by 1.2 and then re-insert it back into the textbox.
I originally got an error saying I couldn't convert it to an integer (even though the string just said '2000') so I tried converting it to float and then to an integer, but now I'm getting 'ValueError: could not convert string to float'.
Any ideas what's going wrong? I'll attach the HTML of the textbox and my python.
HTML:
<input id="radius" ng-model="geoCtrl.lineRadius"
type="text" placeholder="Desired radius from each point of the list"
maxlength="100" name="targeting[geolocation][radius]"
ng-class="{'val-ignore': geoCtrl.options !== 'geo'}"
class="col-lg-12 attr-input ng-pristine ng-valid">
Python:
#code to find radius, multiply it by 1.2, then enter new radius into textbox
browser.find_element_by_id('radius')
first_radius_20percent = browser.find_element_by_id('radius')
current_radius = float(first_radius_20percent.get_attribute('value'))
current_radius = int(first_radius_20percent.get_attribute('value'))
new_radius = int(current_radius*1.2)
first_radius_20percent.clear()
first_radius_20percent.send_keys(new_radius)

There might be some unicode characters mixed in the returned value, you can get rid of them with
encode('ascii', 'ignore')