I have this code:
tcost = driver.find_element_by_id("MainContent_txtTotalCost").text
total = int(tcost)
driver.find_element_by_id("MainContent_txtVisa").send_keys(total/2)
driver.find_element_by_id("MainContent_txtCash").send_keys(total/2)
It throws this error:
ValueError: invalid literal for int() with base 10: ''
I need to convert text
in text box to int
to do some calculations over it and sure, If you have any suggestions to enhance the code please do.