Hot answers tagged

4

If you look at the Appium Dotnet Driver changelog (https://github.com/appium/appium-dotnet-driver/releases) you can see the 4.x version is nearly 2 years in beta. It contains a lot of breaking changes, around 2-3 years of them. What you are getting is normal with major version upgrades. The programming interface (API) changes in major version to handle new ...


3

The issue seems to be with the JDK version you have installed. From your Mac: Install JDK 8. After installing it, update the JAVA_HOME with your JDK version: JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk[version].jdk/Contents/Home export JAVA_HOME Start a new terminal window Attempt to launch the uiautomatorviewer This worked for me.


3

The answer to this question is pretty simple, Selenium is used for Browser automation whereas Appium is used for Mobile app automation. Obviously, we can combine both of these frameworks too. So, it depends on your testing scenario, whether you are targetting mobile app or a web browser. If your target is testing a mobile app then you should go with Appium ...


3

In the test you use a property driver which has not been instantiated, because you create the driver into local a variable called Driver. See the case-difference? The class property driver has a default value of NULL and that is why you get a nullpointer exception when you try to use it. You cannot use objects that are NULL. This is a foundational Java ...


2

Straight forward Answer: As Appium is a cross-language tool for mobile automation & it's independent of product language developed. you can use any language listed below. Ruby Python Java JavaScript PHP C# I am not able to decide which language should I use with Appium to automate this app. But the answer to this question is not straight forward: ...


2

By default, as per the Mocha documentation on reporters, there is no Excel reporter. There are some CLI reporters (Spec, Dot, etc) and there are HTML and JSON reporters. A quick Google search shows there is an NPM package called Mocha-Insights-Reporter that can generate Excel files. Since Mocha is open-source and has documentation, your other option is to ...


2

When querying Android apps with Xpath there is no id attribute. There is a resource-id attribute instead. Appium is doing work behind the scenes to still provide By.id as a locator despite this. By.xpath("//*[contains(@resource-id, 'read_indicator')]"); If you don't use contains here, you'll need to put in the full resource-id, which is very long. Your ...


1

When you use xpath that is to locate nested elements you have to start your query from .. Like String query = ".//*[contains(@resource-id, 'delivered_indicator')]"; https://selenium.dev/selenium/docs/api/java/org/openqa/selenium/support/ui/ExpectedConditions.html#presenceOfNestedElementLocatedBy-org.openqa.selenium.By-org.openqa.selenium.By-


1

Try something like this: WebElement outerElement = driver.findElement(By.xpath("OTER_ELEMENT_XPATH")); WebDriverWait waiter = new WebDriverWait(driver, 100); WebElement innerElement = waiter.until(ExpectedConditions.elementToBeClickable(outerElement.findElement(By.xpath("./INNER_ELEMENT_XPATH"))));


1

Make your tests independent of each other. Jest has the concept of beforeEach and afterEach functions. Use these to start and quit your Appium session for each test. When the app opens for each test it will be in the same place, and you can work forward from there. It adds a little overhead to each test, but it will let you avoid major headaches trying ...


1

I had some problems connecting Appium with iOS devices using Appuim Desktop. My solution was to change Appium Desktop to Appium Studio. Appium Studio makes is easier to work with Apple devices.


1

Yes, you need apple developer ID , to build and deploy your project using Xcode on your real iOS device.


1

Use a service like https://www.twilio.com/ to recieve the SMS by your code. They provide phonenumbers, API's, etc...


1

I suspect your problem lies with the errors: java.lang.SecurityException: You need the android.permission.INSTALL_GRANT_RUNTIME_PERMISSIONS permission to use the PackageManager.INSTALL_GRANT_RUNTIME_PERMISSIONS This is saying that the phone does not have permission to run your software. Because your code is setting the capability "noReset" to true, you ...


1

Instead of running the click straight away you can iterate over the results and see if they are suitable before clicking them. foreach (button in self.driver.find_elements_by_name("button_name")) if button.property == 'what i want' button.click() You can add other constraints on the button by adjusting the if statements. Nothing inside the ...


1

I learn Appium using multiple resources, I found online stuff and experimental project for android & iOS App. Just google "Appium tutorial", I will suggest don't stick with any programing language(like python), it's just a medium to express code. In my case, I learn Appium using JAVA but I implemented using C#, You can cover up if you have good command ...


1

Your solution is good. But if it's only different from locators but same steps. I usually use only xpath and separate string of locators from each page. public class aLogin{ string str_username = 'xpath to username text box of page A'; string str_password = 'xpath to password text box of page A'; } public class bLogin{ string str_username = 'xpath to ...


1

(c) clearly breaks the Single Responsibility Principle (SRP) (a) would result in duplicated code, which is solved by (b). A few other things you can do would depend on how you control the environment. You can have different login page objects for each user type, which implement the method login returning the user-specific main page. This way, you replace a ...


1

If the steps are really the same you could create an abstraction for all the Selenium commands and implement them also for the Appium implementation. But I guess the mobile version will probably will not be a 100% workflow match with the desktop browser version. Most mobile apps I use are a subset and slimmed down compared to their desktop/browser ...


1

I'm going to be perfectly honest and say in my 30 years of manual and automated testing I find automating manual test cases for mobile devices a waste of time. The time and $$ involved in creating and maintaining the test suites, considering their relatively short shelf life, is better spent buying a few of the most popular devices and writing comprehensive ...


1

The element you've highlighted in the inspector is a WebView. A developer would have to provide a build of the app with WebView debugging enabled in order to view and interact with the elements inside the WebView using automation. I haven't enabled it personally, but I've asked developers to do this in the past, and they're generally happy to do it for a ...


1

Hope you are using Pom.xml to add dependencies.if that is the case check you have added bellow dependencies apart from appium dependencies. <dependency> <groupId>org.seleniumhq.selenium</groupId> <artifactId>selenium-remote-driver</artifactId> <version>2.44.0</version> </dependency> if you still ...


1

You are getting errors from your Appium backend that are causing the http requests that your Selenium drivers are trying to make. I would check the Appium backend is running and allows connections from your client. Possible reasons for it not running : driver versions don't match - the Android Driver might need updating device is not connected/visible - ...


1

caps.setCapability(MobileCapabilityType.AUTOMATION_NAME, 'uiAutomator2'); Added the capability and it works now


1

Runtime.getRuntime().exec("idevicediagnostics restart -u "+udid).waitFor(); Thread.sleep(60000);


1

Added this in BeforeClass: Runtime.getRuntime().exec("/usr/local/bin/idevicediagnostics restart -u "+udid).waitFor(); Thread.sleep(60000); capabilities.setCapability("newCommandTimeout", 2000); capabilities.setCapability("wdaConnectionTimeout", 500000); capabilities.setCapability("wdaLaunchTimeout", 120000); capabilities.setCapability("wdaStartupRetries", ...


Only top voted, non community-wiki answers of a minimum length are eligible