I want to set a value in editbox of android app using appium. And I am using python script to automate it. But I am always getting some errors.
My python script is
import os
import unittest
import time
from appium import webdriver
from time import sleep
from selenium import webdriver
from selenium.webdriver.common.keys import Keys
from selenium.webdriver.common.by import By
import uiautomator
import math
element = self.driver.find_element_by_class_name('android.widget.EditText')
element.set_value('qwerty')
element = self.driver.find_element_by_name("Let's get started!")
element.click()
time.sleep(5)
When ever I am running it, I am always getting an error:
AttributeError: 'WebElement' object has no attribute 'set_value'
To type a value into a WebElement, use the Selenium WebDriver method send_keys:
element = self.driver.find_element_by_class_name('android.widget.EditText')
element.send_keys('qwerty')
See the Selenium Python Bindings documentation for more details.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With