Cannot run a class which contents copy code from Appium Studio in Intellij

Hello,

I followed the link below to run a class which contents copy code from Appium Studio in Intellij but cannot find button Run on this class. Did I do something wrong?

Free live tutorial - Appium testing made easy

Start from 35’09

Any help would be appreciated.

Thanks

Hi,

The screenshot you provided shows that IntelliJ is error-highlighting the imported libs. Note that the class name is also highlighted. I am not sure whether these are error that relate to IntelliJ’s inability to resolve them or whether it’s just intellisense. Same goes for Junit annotations, they are also highlighted in error.

Make sure that your gradle file contains all dependencies and in the correct format.

In addition, since you are running a test, place the test class inside test/java.

Another thing, I can see that you are using SeeTestAndroidDriver when creating an instance of the driver. If you are using Appium Studio 10.9, you should use Appium’s Default driver classes.

https://docs.experitest.com/display/public/AS/Updating+Appium+Studio+from+10.8+to+10.9+and+Higher

Once you resolve dependencies and errors and relocate the test class to test/java, you should be able to run the test.

1 Like

Hi,

Thanks nivi for your quick replies. I added jar file and everything works well now, updated appium studio to 10.9.82 as well.

I also tried on Eclipse and error message was displayed. Could you please help me?

For your information, I added jar file but don’t know reason why it has still error at “until” and when I run the test, build failed.

Gradle Distribution: Gradle wrapper from target build
Gradle Version: 3.0
Java Home: C:\Program Files\Java\jre1.8.0_121
JVM Arguments: None
Program Arguments: None
Tests: appiumStudio.AndroidTest#setUp

:compileJava
FAILURE: Build failed with an exception.

What went wrong:
Could not resolve all dependencies for configuration ‘:compileClasspath’.

Could not resolve com.experitest:seetest-appium:10.6.
Required by:
:Demo:unspecified
Could not resolve com.experitest:seetest-appium:10.6.
Could not get resource ‘http://repo.experitest.com:8010/Maven2/com/experitest/seetest-appium/10.6/seetest-appium-10.6.pom’.
Could not GET ‘http://repo.experitest.com:8010/Maven2/com/experitest/seetest-appium/10.6/seetest-appium-10.6.pom’.
Connect to repo.experitest.com:8010 [repo.experitest.com/207.232.40.121] failed: Connection timed out: connect

  • Try:
    Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.

BUILD FAILED

Total time: 23.004 secs

Hi
I have the same problem in eclips.
Could anyone help me?

Thanks.