for product_name in self.mydriverOne.product_container.product_name:
rt=product_name.text[:-1]
print rt
I need to validate the variable rt is an integer value
. How can I do it in selenium web driver
using Python?
for product_name in self.mydriverOne.product_container.product_name:
rt=product_name.text[:-1]
print rt
I need to validate the variable rt is an integer value
. How can I do it in selenium web driver
using Python?
You have to use some python related coding for this. As you already have value in 'rt' which is probably is a string. Now you just have to check whether it contains numeric values. I mean whether string is like '1234'. Refer this : How do I check if a string is a number (float) in Python?
Also,