Not able to enter the data with SendKeys Method in appium - android

I am trying to enter my email address in the field, but when I inspect the element I see a very big rectangle for the edit box. Though I am able to find that through class name. but when I try to enter the value through SendKeys method, My test gets passed, but I am not able to see the text entered in the field. Take a look at the screenshot of the mobile view. Mobile View
PS: I am testing the flutter application. So does it make any difference?
Thanks in advance.

Your definition for Email_input is by class name and not an xpath, so you don't need the forward slashes. It should be:
private By Email_input = By.className("android.widget.EditText");
Don't know what your Parent_Signin_pageObject class does but ultimately you would need something like this to enter the text:
driver.findElement(Email_input).sendKeys("user#gmail.com");

Related

How to create mention edit text like facebook

I want to create a edit text where user suggestions will be shown when user typed "#" keyword.
For eg. If the selected user is: "James test user".
And if user press delete character(back space in android keyboard.) then it should delete the word by word instead of characters. just like first user will be deleted then test and then james.
Any lead will be great for me.
I've tried the https://github.com/linkedin/Spyglass and https://github.com/hendraanggrian/socialview. But they won't fulfill my requirements.

Unable to enter data on edittext fields of appium

I am entering data on these checkboxes. The script runs fine but data does not enters. Check the code below:
List<WebElement>pincode = driver.findElements(By.id("com.theentertainerme.entertainer:id/pin_code_round)"));
pincode.get(0).sendKeys("0");
pincode.get(1).sendKeys("0");
pincode.get(2).sendKeys("0");
pincode.get(3).sendKeys("0");
Check UI of screen
Image added is of UiAutomatorViewer
Please help me out on this.
Instead of doing like that you can enter the four digits by using android keycodes.
driver.pressKeyCode(AndroidKeyCode.KEYCODE_1);
driver.pressKeyCode(AndroidKeyCode.KEYCODE_1);
driver.pressKeyCode(AndroidKeyCode.KEYCODE_1);
driver.pressKeyCode(AndroidKeyCode.KEYCODE_1);
This will enter all 1's in the four fields.

How to set a part of validation in saripaar?

When I use android-saripaar I want to use only some of the validation. I used the ViewPager and had a dozen of EditText. Each page had some inputs. And I want to validate the inputs at every step.
For example, I had username and password at first step, and phone, email at the second. If user type in the invalid data at first step, validation worked.
Finally I find the answer in the ISSUE : https://github.com/ragunathjawahar/android-saripaar/issues/104#issuecomment-133822417

Android - how to create custom word dictionary for only my application?

I have successfully added a word to Android's predefined user dictionary, but i want to create a custom dictionary which can only be accessed by my application.
For example: When i type "lol", the suggestions show me "laugh out loud" but when I want another meaning of "lol" then I can manually add another meaning of "lol" (eg, "xxxxxx" - so the next time the user writes "lol" in an EditText, the suggestions will show him "xxxxxx").
No other application should have access my dictionary data.
I have worked with spell checker class but it gives me only correct word and I can't my own word meanings.
Please give me some suggestions or links.
There is an Androids inbuilt class UserDictionary so that you can add your spells programmatically into that, Here is a link you can go through with , and which may relates to your problem .(In this solution nidhi has manged programmatically to retrieve data back)
Add word to user dictionary and retrieve them back from dictionary
In addition you can go through following links to :
http://developer.android.com/reference/android/provider/UserDictionary.html
http://developer.android.com/reference/android/provider/UserDictionary.Words.html
Moreover if you want a custom personal dictionary then manually you have to store words and retrieve them back .
Hope that helps !!!

Retrieving entered text in field (android help)

I have this code for a username field for an Android app. I would like to validate the field to see if it is empty. Here is my code:
View a = findViewById(R.id.authentication);
(a.toString().equals(""))
I am guessing that you cannot use view to get the data entered by the user. What would be the best way to see if these fields are empty?
a.toString() does not do what you think it does.
Use TextView a = (TextView)findViewById(R.id.authentication); (a.getText().equals(""))

Categories

Resources