Hi there,
I have managed to get the simplest.js test running on my Mac.
I then went into my current project's folder and installed appium and wd.
Now when I run the following in the terminal:
node src/GiaTestSuite.java
I get the following error:
/Users/cseligman/Documents/ios-automation/Appium_GIA/src/GiaTestSuite.java:3
import general.LogDriver;
^^^^^^
SyntaxError: Unexpected reserved word
at Module._compile (module.js:439:25)
at Object.Module._extensions..js (module.js:474:10)
at Module.load (module.js:356:32)
at Function.Module._load (module.js:312:12)
at Function.Module.runMain (module.js:497:10)
at startup (node.js:119:16)
at node.js:901:3
It seems to be picking up the first import in my GiaTestSuite.java file and not liking it. Here is the start of that file:
import general.LogDriver;
import java.util.List;
import java.util.concurrent.TimeUnit;
import java.net.URL;
import org.junit.After;
import org.junit.Before;
import org.junit.Test;
import org.openqa.selenium.remote.CapabilityType;
import org.openqa.selenium.remote.DesiredCapabilities;
import org.openqa.selenium.remote.RemoteWebDriver;
import org.openqa.selenium.*;
import pageObjects.ArticlePage;
import pageObjects.EditHomePage;
import pageObjects.EditSectionsPage;
import pageObjects.HomePage;
import pageObjects.SettingsPage;
import static org.junit.Assert.*;
public class GiaTestSuite {
private WebDriver driver;
@Before
public void setUp() throws Exception {
LogDriver.logMessage("@Before");
// Setup Appium
DesiredCapabilities capabilities = new DesiredCapabilities();
capabilities.setCapability(CapabilityType.BROWSER_NAME, "iOS");
capabilities.setCapability(CapabilityType.VERSION, "6.1");
capabilities.setCapability(CapabilityType.PLATFORM, "Mac");
capabilities.setCapability("app", "/Users/cseligman/Library/Developer/Xcode/DerivedData/Guardian-ddqdbljqpdchfbbtnziuwncvseou/Build/Products/Debug-iphonesimulator/Guardian-ROW.app");
// capabilities.setCapability("app", "/Users/cseligman/Library/Developer/Xcode/DerivedData/TestApp-fimydakgvyetqdbzwumaodihsbiy/Build/Products/Debug-iphonesimulator/TestApp.app");
driver = new RemoteWebDriver(new URL("http://0.0.0.0:4723/wd/hub"), capabilities);
driver.manage().timeouts().implicitlyWait(10, TimeUnit.SECONDS);
// Ensure users is subscribed
HomePage homepage = new HomePage(driver);
if (homepage.isUserSubscribed() == false) {
LogDriver.logMessage("TESTS WILL FAIL - USER NOT LOGGED IN");
}
}
Has anyone come across this issue before or knows a way to resolve it?
Cheers,
Charlie--
http://appium.io
---
You received this message because you are subscribed to the Google Groups "Appium-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to appium-discus...@googlegroups.com.
Visit this group at http://groups.google.com/group/appium-discuss?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.
Hi everyone,
So managed to get "mvn clean test" to run all my appium iOS tests using Terminal. However, for these tests to run I need to have Appium open on the Mac and 'Launched'. Is there anyway to automate the launching of Appium via Terminal as well?
Cheers,
Charlie
On Thursday, June 13, 2013 3:13:46 PM UTC+1, Charlie Seligman wrote:Perfect - thanks guys for the replies.
Just in case anyone else has a similar issue with this, I would recommend looking at this website - great explanation on setting up Maven with Selenium WebDriver: http://www.wunderkraut.com/blog/creating-and-running-a-simple-selenium-webdriver-test/2011-09-15
Cheers, Charlie
Visit this group at http://groups.google.com/group/appium-discuss.