Skip to content
pCloudy – Question and Answers
Menu
    • Appium Tips and Tricks
    • Ask Question
    • Questions
    • search-results
    • test page

Category: Opearation on Elements using Appium

Opearation on Elements using Appium

How to find X and Y co-ordinate of a particular element?

WebElement acceptButton= driver.findElement(By.xpath(“//android.widget.Button[@resource-id=’com.pcloudy.appiumdemo:id/accept’]”)); By this below script we can get the xcordinate of the particular element acceptButton.getLocation().getX(); By this below script we can get the Ycordinate of the particular element …

Opearation on Elements using Appium

How to check if the element is displayed in Appium?

//Selecting Element MobileElement pElement = (MobileElement) driver.findElementByAccessibilityId(“SomeAccessibilityID”); //Checking if it displayed on screen. boolean isDisplayed = pElement.isDisplayed(); .

Opearation on Elements using Appium

How to check if an element is selected in Appium?

MobileElement pElement = (MobileElement) driver.findElementByAccessibilityId(“Any Access Id”); //Check if element is selected. boolean isSelected = pElement.isSelected();

Opearation on Elements using Appium

How to go to forward page using Appium?

driver.forward();

Opearation on Elements using Appium

How to send Emoji to a text box in android device using appium?

For this we have to add two capabilities : capabilities.setCapability(“unicodeKeyboard”, true); capabilities.setCapability(“resetKeybord”, true); /***code for sending emoji***/ String ballEmoji = “\u26BD”; driver.findElement(By.xpath(“//android.widget.EditText[@resource-id=’com.pcloudy.pcloudykeystroke:id/txtrat’]”)).sendKeys(ballEmoji);

Opearation on Elements using Appium

How to click an element in a text view?

List list = driver.findElements(By.id(“com.sample:id/list”)); list.get(0).click();

Opearation on Elements using Appium

How to select all text using Appium?

//Here q is the textbox from which you want to select text. driver.findElement(By.name(“q”)).sendKeys(Keys.chord(Keys.CONTROL, “a”));

Opearation on Elements using Appium

How to clear text from any texbox using appium?

//Clear the text using .clear(); method. driver.findElement(By.name(“”q””)).clear(); //Checking is the text is cleared to pass the test. report.addStep(“”Removed the text'””, null, null, takeScreenShot(myContext), ExecutionResult.Pass);

pCloudy PORTAL

  • Appium Tips and Tricks
  • Ask Question
  • Sample Code
  • Documentation
  • Videos
  • Blog
  • Training

POPULAR QUESTIONS

  • How to automate pull down refresh functionality ?
  • Can I use pCloudy to test web application on iOS device through automation?
  • How many devices can I connect in each plan?
  • How we can do interrupt testing?
  • Is it possible to run Automation on Android and iOS devices at the same time?
Copyright © 2025 pCloudy - Question and Answers – All Rights Reserved