Appium web element

1,317 views
Skip to first unread message

Prabhjeet Bains

unread,
Apr 25, 2014, 7:17:31 AM4/25/14
to appium-...@googlegroups.com
Hi,

I am new Appium I have run a sample code of google and test it with appium and for google its working fine and testing the google site with tag name, So I start testing the URL with tag names but the URL which  I am testing doesn't have any tag name it only has xpaths and ids. Now my problem is I tried with xpath like this   WebElement enterLogin = driver.findElement(By.xpath("//input[@name='_NNext']")); but its not working its simple through exception and said that element is not found.


Please some one help me I am stuck here and its almost a week that I trying it and searching for the sloutions.

Rameshwar Juptimath

unread,
Apr 25, 2014, 7:23:11 AM4/25/14
to appium-...@googlegroups.com
Post the code of HTML Page

Prabhjeet Bains

unread,
Apr 25, 2014, 8:28:36 AM4/25/14
to appium-...@googlegroups.com

enterLogin.click();
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html lang="en-US">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/><meta http-equiv="Content-Language" content="en-US"/><meta http-equiv="Expires" content="-1"/><meta http-equiv="Pragma" content="no-cache"/><meta name="Robots" content="noindex, nofollow"/><meta name="Generator" content="Interviewer Server HTML Player 1.0.23..33"/><meta name="Template" content="templates/base.htm"/><title>QINFO1_INFO</title>
<!--
<link rel="stylesheet" type="text/css" title="Style" href="css/shell.css"/>
<script type="text/javascript" src="js/jquery-1.9.0.min.js">//JQuery Standard File</script>
<script type="text/javascript" src="js/jdpa.js">JQuery Standard File</script>
-->
<meta name="viewport" content="width=device-width, minimum-scale=0.5, maximum-scale=2.6, initial-scale=0.75, user-scalable=yes"/>
<meta name="HandheldFriendly" content="True"/>
<meta name="MobileOptimized" content="width"/>
<meta name="apple-mobile-web-app-capable" content="yes"/>
<meta http-equiv="X-UA-Compatible" content="IE=edge"/>
<link rel="stylesheet" type="text/css" title="Style" href="http://scripting.jdpoweronline.com/SPSSMR/ImageCache/ImageCache.aspx?Project=T1_QTYPE&amp;File=en-US/templates/css/jdpa.css"/><script type="text/javascript" src="http://scripting.jdpoweronline.com/SPSSMR/ImageCache/ImageCache.aspx?Project=T1_QTYPE&amp;File=en-US/templates/js/jquery-1.9.0.min.js">//jQuery Toolkit</script><script type="text/javascript" src="http://scripting.jdpoweronline.com/SPSSMR/ImageCache/ImageCache.aspx?Project=T1_QTYPE&amp;File=en-US/templates/js/jdpa.js">//Base JS file</script><script type="text/javascript" src="http://scripting.jdpoweronline.com/SPSSMR/ImageCache/ImageCache.aspx?Project=T1_QTYPE&amp;File=en-US/templates/js/jdpa_browser.js">//Base JS file</script><script type="text/javascript" src="http://scripting.jdpoweronline.com/SPSSMR/ImageCache/ImageCache.aspx?Project=T1_QTYPE&amp;File=en-US/templates/js/jdpa_gridclick.js">//Base JS file</script><script type="text/javascript" src="http://scripting.jdpoweronline.com/SPSSMR/ImageCache/ImageCache.aspx?Project=T1_QTYPE&amp;File=en-US/templates/js/subosat_blank_row.js">//Subosat JS file</script></head>
<body id="body">
<form name="mrForm" id="mrForm" action="/mrIWeb/mrIWeb.dll" method="post"><input type="hidden" name="I.Engine" value="engine1"/><input type="hidden" name="I.Project" value="T1_QTYPE"/><input type="hidden" name="I.Session" value="klhy5fhk3yoezkykxtdalf61m24agaaa"/><input type="hidden" name="I.SavePoint" value="QINFO1_INFO"/><input type="hidden" name="I.Renderer" value="HTMLPlayer"/><input type="hidden" name="I.ShowOnly" value="true"/><div id="container">
<div id="header">
<div class="header_r1">
<div class="header_r2"></div>
</div>
<div class="header_r3">
<div class="header_r4">
</div>
<div class="header_r5">
<div id="studytitle"><div></div>
<span class="mrBannerText" style="">2014 U.S. Dealer Financing Study</span>
<br/>
</div>
</div>
</div>
</div>
<div id="content">
<div id="survey_content">
<div id="sectiontitle">
<div class="sectiontitle_r1">
<div></div>
<span class="mrBannerText" style="">PRIME RETAIL CREDIT</span>
<br/>
</div>
<div class="progressbar_r1">
<div id="progressbar"><table style="height: 100%; width: 100%"><tr><td class="mrProgressText">0%</td></tr></table></div>
</div>
</div>
<div id="surveyquescontent">
<div></div>
<span class="mrQuestionText" style="">This questionnaire is to be completed by the <span style="font-weight: bold;">owner/partner/dealer principal/general manager</span> of this dealership. If you are the <span style="font-weight: bold;">owner/partner/dealer principal/general manager</span> for more than one dealership, please complete this questionnaire for <span style="font-weight: bold;">all</span> of your dealerships; do not complete multiple questionnaires. If this is a publicly held dealership, please route this questionnaire to the person with <span style="font-weight: bold;">dealer principal</span> responsibilities at this location.<BR/><BR/>You have the opportunity to rate finance providers in the following four areas: Prime Retail Credit, Non-Prime Retail Credit, Retail Leasing, and Floor Planning.<BR/><BR/>Please complete this survey at your earliest opportunity. Thank you!</span>
<div><br/></div>
<div></div>
<span style=""></span>
<div><br/></div>
<div></div>
<span class="mrBannerText" style="">
</span>
<br/>
</div>
<p/>
<div id="navigation">
<div class="navigation_r1">
 
</div>
<div class="navigation_r2">
<span onclick="addHistory();"><input type="image" name="_NNext" class="mrNext" style="" src="http://scripting.jdpoweronline.com/SPSSMR/ImageCache/ImageCache.aspx?Project=T1_QTYPE&amp;File=en-US/templates/images/next.png" alt="Continue"/>
</span>
</div>
<div class="navigation_r3">
</div>
</div>
<p/> <div></div>
<span class="mrBannerText" style=""><noscript><center><br/><span style="font-weight:bold;font-size:13pt;color:red;">This survey requires JavaScript. Please enable JavaScript in your browser before proceeding. For instructions on how to enable JavaScript, <a HREF="http://scripting.jdpoweronline.com/SPSSMR/ImageCache/ImageCache.aspx?Project=T1_QTYPE&amp;File=en-US/templates/Enable JavaScript.html" TARGET="_blank"><font color="red"><u>click here</u></font></a>.</span></center></noscript></span>
<br/>
</div>
</div>
<div id="footer">
<div style="display:inline-block;"><div></div>
<span class="mrBannerText" style=""><a href="mailto:surveys...@jdpa.com" style="text-decoration:none; color:white;">Survey Support</a> | </span>
<br/>
</div><div style="display:inline-block;"><div></div>
<span class="mrBannerText" style=""><span id="privacypolicy"><a href="http://www.jdpower.com/privacy/index.htm" target="_blank" style="text-decoration:none; color:white;">Privacy &amp; Cookie Notice</a> |</span> </span>
<br/>
</div><div style="display:inline-block;"><div></div>
<span class="mrBannerText" style=""><a href="http://www.jdpower.com" target="_blank" style="text-decoration:none; color:white;">© 2014 J.D. Power and Associates, McGraw Hill Financial. All Rights Reserved.</a></span>
<br/>
</div>
</div>
</div>
</form></body>
<div class="hide">
<div></div>
<span class="mrBannerText" style=""><script></script></span>
<br/>
<div></div>
<span class="mrBannerText" style=""></span>
<br/>
<div></div>
<span class="mrBannerText" style=""></span>
<br/>
</div>
</html>


Rameshwar Juptimath

unread,
Apr 25, 2014, 9:05:16 AM4/25/14
to appium-...@googlegroups.com
try using WebElement enterLogin = driver.findElement(By.xpath("//input[contains(@name'_NNext')]"));
Message has been deleted

Prabhjeet Bains

unread,
Apr 25, 2014, 9:31:34 AM4/25/14
to appium-...@googlegroups.com
HI,
I have tried with this WebElement enterLogin = driver.findElement(By.xpath("//input[contains(@name'_NNext')]"));
but now its throughing this exception:

org.openqa.selenium.WebDriverException: An unknown server-side error occurred while processing the command. (Original error: XPath parse error) (WARNING: The server did not provide any stacktrace information)

Isaac Murchie

unread,
Apr 25, 2014, 12:36:51 PM4/25/14
to Prabhjeet Bains, appium-...@googlegroups.com
The org.openqa.selenium.SessionNotCreatedException means you need to use Selendroid to access your web view, as your Android API level is too low (below 17). See https://github.com/appium/appium/blob/7e767239ebaa9bd2446b978d909807f4d34378a7/docs/en/hybrid.md#automating-hybrid-android-apps

For the second error, could you provide the Appium server logs for this error? 

Cheers,
Isaac.


--
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.
For more options, visit https://groups.google.com/d/optout.

Prabhjeet Bains

unread,
Apr 28, 2014, 2:56:58 AM4/28/14
to appium-...@googlegroups.com

Hi,

My device target is  is 4.3  now 

org.openqa.selenium.WebDriverException: An unknown server-side error occurred while processing the command. (Original error: XPath parse error) (WARNING: The server did not provide any stacktrace information)

Command duration or timeout: 20.49 seconds

Build info: version: 'unknown', revision: 'unknown', time: 'unknown'

System info: host: 'ATMECSADMIN', ip: '127.0.1.1', os.name: 'Linux', os.arch: 'i386', os.version: '3.8.0-29-generic', java.version: '1.7.0_51'

Session ID: 3eb9248e-20c7-4668-8d67-1db4bb2e513a

Driver info: com.example.webexample.test.TestScript$SwipeableWebDriver

Capabilities [{platform=UNIX, app=/home/prabhjeet/workspace/WebExample/bin/WebExample.apk, javascriptEnabled=true, acceptSslCerts=true, browserName=Android, appActivity=.MainAcivtiy, desired={platform=Ubuntu, app=/home/prabhjeet/workspace/WebExample/bin/WebExample.apk, acceptSslCerts=true, browserName=Android, appActivity=.MainAcivtiy, device=Android, appPackage=com.example.webexample, version=4.2.2}, appPackage=com.example.webexample, version=4.2.2, platformVersion=4.1, databaseEnabled=false, webStorageEnabled=false, device=Android, warnings={}, takesScreenshot=true}]

at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)

at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)

at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)

at java.lang.reflect.Constructor.newInstance(Constructor.java:526)

at org.openqa.selenium.remote.ErrorHandler.createThrowable(ErrorHandler.java:193)

at org.openqa.selenium.remote.ErrorHandler.throwIfResponseFailed(ErrorHandler.java:145)

at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:554)

at org.openqa.selenium.remote.RemoteWebDriver.findElement(RemoteWebDriver.java:307)

at org.openqa.selenium.remote.RemoteWebDriver.findElementByXPath(RemoteWebDriver.java:404)

at org.openqa.selenium.By$ByXPath.findElement(By.java:363)

at org.openqa.selenium.remote.RemoteWebDriver.findElement(RemoteWebDriver.java:299)

at com.example.webexample.test.TestScript.apiDemo(TestScript.java:80)

at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)

at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)

at java.lang.reflect.Method.invoke(Method.java:606)

at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:45)

at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15)

at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:42)

at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:20)

at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:28)

at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:30)

at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:263)

at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:68)

at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:47)

at org.junit.runners.ParentRunner$3.run(ParentRunner.java:231)

at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:60)

at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:229)

at org.junit.runners.ParentRunner.access$000(ParentRunner.java:50)

at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:222)

at org.junit.runners.ParentRunner.run(ParentRunner.java:300)

at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:50)

at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)

at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:467)

at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:683)

at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:390)

at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:197)


On Friday, April 25, 2014 4:47:31 PM UTC+5:30, Prabhjeet Bains wrote:

Rameshwar Juptimath

unread,
Apr 28, 2014, 6:11:50 AM4/28/14
to appium-...@googlegroups.com
Post you desired capabilities.


Prabhjeet Bains

unread,
Apr 28, 2014, 6:13:58 AM4/28/14
to appium-...@googlegroups.com

Hi,
this are my capabilites....

File app = new File( "/home/prabhjeet/workspace/WebExample/bin/WebExample.apk");
DesiredCapabilities capabilities = new DesiredCapabilities();
capabilities.setCapability(CapabilityType.ACCEPT_SSL_CERTS, true);
capabilities.setCapability("device", "Android");
capabilities.setCapability(CapabilityType.BROWSER_NAME, "Android");
// capabilities.setCapability("device ID", "5554:avd1");
capabilities.setCapability(CapabilityType.VERSION, "4.2.2");
capabilities.setCapability(CapabilityType.PLATFORM, "Ubuntu");
capabilities.setCapability("app", app.getAbsolutePath());
capabilities.setCapability("appPackage", "com.example.webexample");
capabilities.setCapability("appActivity", ".MainAcivtiy");
driver = new SwipeableWebDriver(
new URL("http://0.0.0.0:4723/wd/hub"), capabilities);
// Implicitly wait for 30 seconds for application to open
driver.manage().timeouts().implicitlyWait(20, TimeUnit.SECONDS);

}

On Friday, April 25, 2014 4:47:31 PM UTC+5:30, Prabhjeet Bains wrote:

Rameshwar Juptimath

unread,
Apr 28, 2014, 6:22:31 AM4/28/14
to appium-...@googlegroups.com
change the device to selendroid and not android

Rameshwar Juptimath

unread,
Apr 28, 2014, 6:25:01 AM4/28/14
to appium-...@googlegroups.com
Are you using a native android app or a an Hybrid app(phone gap)

Prabhjeet Bains

unread,
Apr 28, 2014, 6:31:18 AM4/28/14
to appium-...@googlegroups.com

Hi, 
I am testing a web site  with a simple web view and loading a URL into a web view and I have change the device to selendroid but its through a error

org.openqa.selenium.WebDriverException: An unknown server-side error occurred while processing the command. (Original error: XPath parse error) (WARNING: The server did not provide any stacktrace information)

Command duration or timeout: 20.41 seconds

Build info: version: 'unknown', revision: 'unknown', time: 'unknown'

System info: host: 'ATMECSADMIN', ip: '127.0.1.1', os.name: 'Linux', os.arch: 'i386', os.version: '3.8.0-29-generic', java.version: '1.7.0_51'

Session ID: 38efd72a-f007-4f38-ad57-87a5ec8af2f7

Driver info: com.example.webexample.test.TestScript$SwipeableWebDriver

Capabilities [{platform=UNIX, app=/home/prabhjeet/workspace/WebExample/bin/WebExample.apk, javascriptEnabled=true, acceptSslCerts=true, browserName=Selendroid, appActivity=.MainAcivtiy, desired={platform=Ubuntu, app=/home/prabhjeet/workspace/WebExample/bin/WebExample.apk, acceptSslCerts=true, browserName=Selendroid, appActivity=.MainAcivtiy, device=Android, appPackage=com.example.webexample, version=4.2.2}, appPackage=com.example.webexample, version=4.2.2, platformVersion=4.1, databaseEnabled=false, webStorageEnabled=false, device=Android, warnings={}, takesScreenshot=true}]


On Friday, April 25, 2014 4:47:31 PM UTC+5:30, Prabhjeet Bains wrote:

Rameshwar Juptimath

unread,
Apr 28, 2014, 6:37:20 AM4/28/14
to appium-...@googlegroups.com
ok. so here is the thing. When working with web views you should first switch to web views before trying to locate any element. That is the reason you are getting that error.

after the driver is created, switch to web views. here is the code to switch to web views:

Android:
driver.SwitchTo ().Window ("WEBVIEW");

IOS:
foreach (String window in driver.WindowHandles){
   driver.SwitchTo ().Window (window);
  
}
Message has been deleted
Message has been deleted

Prabhjeet Bains

unread,
Apr 28, 2014, 7:10:12 AM4/28/14
to appium-...@googlegroups.com

Hi,
this is my class. even it is throwing  exception


public class TestScript {
public static WebDriver driver;
public static Runtime rt = Runtime.getRuntime();
public static Process proc;
static File filename;
static PrintWriter fw;
private static Properties p;
static InputStream is;

public void loadData() throws IOException {
if (filename == null)
filename = new File("Report.txt");
fw = new PrintWriter(filename);
is = new FileInputStream("pageFile.properties");
p = new Properties();
p.load(is);
}

@Before
public void setUp() throws Exception {
loadData();
File app = new File(
"/home/prabhjeet/workspace/WebExample/bin/WebExample.apk");
DesiredCapabilities capabilities = new DesiredCapabilities();
capabilities.setCapability(CapabilityType.ACCEPT_SSL_CERTS, true);
capabilities.setCapability("device", "Selendroid");
capabilities.setCapability(CapabilityType.BROWSER_NAME, "Android");
capabilities.setCapability(CapabilityType.VERSION, "4.2.2");
capabilities.setCapability(CapabilityType.PLATFORM, "Ubuntu");
capabilities.setCapability("app", app.getAbsolutePath());
capabilities.setCapability("appPackage", "com.example.webexample");
capabilities.setCapability("appActivity", ".MainAcivtiy");
driver = new SwipeableWebDriver(new URL("http://0.0.0.0:4723/wd/hub"),
capabilities);
driver.manage().timeouts().implicitlyWait(20, TimeUnit.SECONDS);

}

@After
public void tearDown() throws Exception {
driver.quit();
}

@Test
public void apiDemo() throws InterruptedException {

Thread.sleep(5000);

driver.switchTo().window("WEBVIEW");
WebElement enterLogin = driver.findElement(By
.xpath("//input[contains(@name'_NNext')]"));
enterLogin.click();

}

@SuppressWarnings("deprecation")
public class SwipeableWebDriver extends RemoteWebDriver implements
HasTouchScreen {
private RemoteTouchScreen touch;

public SwipeableWebDriver(URL remoteAddress,
Capabilities desiredCapabilities) {
super(remoteAddress, desiredCapabilities);
touch = new RemoteTouchScreen(getExecuteMethod());
}

public TouchScreen getTouch() {
return touch;
}
}


Exception:

org.openqa.selenium.WebDriverException: Not yet implemented. Please help us: http://appium.io/get-involved.html (WARNING: The server did not provide any stacktrace information)
Command duration or timeout: 7 milliseconds
Build info: version: 'unknown', revision: 'unknown', time: 'unknown'
System info: host: 'Admin', ip: '127.0.1.1', os.name: 'Linux', os.arch: 'i386', os.version: '3.8.0-29-generic', java.version: '1.7.0_51'
Session ID: 396b14af-8038-42d4-97c5-da23384c2a75
Driver info: com.example.webexample.test.TestScript$SwipeableWebDriver
Capabilities [{platform=UNIX, app=/home/prabhjeet/workspace/WebExample/bin/WebExample.apk, javascriptEnabled=true, acceptSslCerts=true, browserName=Android, appActivity=.MainAcivtiy, desired={platform=Ubuntu, app=/home/prabhjeet/workspace/WebExample/bin/WebExample.apk, acceptSslCerts=true, browserName=Android, appActivity=.MainAcivtiy, device=Android, appPackage=com.example.webexample, version=4.2.2}, appPackage=com.example.webexample, version=4.2.2, platformVersion=4.1, databaseEnabled=false, webStorageEnabled=false, device=Android, warnings={}, takesScreenshot=true}]
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:526)
at org.openqa.selenium.remote.ErrorHandler.createThrowable(ErrorHandler.java:193)
at org.openqa.selenium.remote.ErrorHandler.throwIfResponseFailed(ErrorHandler.java:145)
at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:554)
at org.openqa.selenium.remote.RemoteWebDriver$RemoteTargetLocator.window(RemoteWebDriver.java:831)
On Friday, April 25, 2014 4:47:31 PM UTC+5:30, Prabhjeet Bains wrote:

Rameshwar Juptimath

unread,
Apr 28, 2014, 7:10:54 AM4/28/14
to appium-...@googlegroups.com
Change this capability:

capabilities.setCapability("device", "Selendroid");

On Monday, April 28, 2014 4:27:09 PM UTC+5:30, Prabhjeet Bains wrote:
Hi,
this is my class. even it is throwing  exception


public class TestScript {
public static WebDriver driver;
public static Runtime rt = Runtime.getRuntime();
public static Process proc;
static File filename;
static PrintWriter fw;
private static Properties p;
static InputStream is;

public void loadData() throws IOException {
if (filename == null)
filename = new File("Report.txt");
fw = new PrintWriter(filename);
is = new FileInputStream("pageFile.properties");
p = new Properties();
p.load(is);
}

@Before
public void setUp() throws Exception {
loadData();
File app = new File(
"/home/prabhjeet/workspace/WebExample/bin/WebExample.apk");
DesiredCapabilities capabilities = new DesiredCapabilities();
capabilities.setCapability(CapabilityType.ACCEPT_SSL_CERTS, true);
capabilities.setCapability("device", "Android");
On Friday, April 25, 2014 4:47:31 PM UTC+5:30, Prabhjeet Bains wrote:

Prabhjeet Bains

unread,
Apr 28, 2014, 7:15:31 AM4/28/14
to appium-...@googlegroups.com
even i am getting same problem. 

org.openqa.selenium.WebDriverException: Not yet implemented. Please help us: http://appium.io/get-involved.html (WARNING: The server did not provide any stacktrace information)
Command duration or timeout: 7 milliseconds
Build info: version: 'unknown', revision: 'unknown', time: 'unknown'
System info: host: 'ATMECSADMIN', ip: '127.0.1.1', os.name: 'Linux', os.arch: 'i386', os.version: '3.8.0-29-generic', java.version: '1.7.0_51'
Session ID: ec1a3d6b-d3a9-40c8-971d-b20bd86cd303
Driver info: com.example.webexample.test.TestScript$SwipeableWebDriver
Capabilities [{platform=UNIX, app=/home/prabhjeet/workspace/WebExample/bin/WebExample.apk, javascriptEnabled=true, acceptSslCerts=true, browserName=Android, appActivity=.MainAcivtiy, desired={platform=Ubuntu, app=/home/prabhjeet/workspace/WebExample/bin/WebExample.apk, acceptSslCerts=true, browserName=Android, appActivity=.MainAcivtiy, device=selendroid, appPackage=com.example.webexample, version=4.2.2}, appPackage=com.example.webexample, version=4.2.2, platformVersion=4.1, databaseEnabled=false, webStorageEnabled=false, device=selendroid, warnings={}, takesScreenshot=true}]
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:526)
at org.openqa.selenium.remote.ErrorHandler.createThrowable(ErrorHandler.java:193)
at org.openqa.selenium.remote.ErrorHandler.throwIfResponseFailed(ErrorHandler.java:145)
at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:554)
at org.openqa.selenium.remote.RemoteWebDriver$RemoteTargetLocator.window(RemoteWebDriver.java:831)
at com.example.webexample.test.TestScript.apiDemo(TestScript.java:75)

Prabhjeet Bains

unread,
Apr 28, 2014, 7:25:05 AM4/28/14
to appium-...@googlegroups.com
these are my logs in appium server from where i am running it on cmd

info: Welcome to Appium v1.0.0-beta.1 (REV 6fcf54391fb06bb5fb03dfcf1582c84a1d9838b6)
info: Appium REST http interface listener started on 0.0.0.0:4723
info: socket.io started
debug: Appium request initiated at /wd/hub/session
debug: Request received with params: {"desiredCapabilities":{"platform":"Ubuntu","app":"/home/prabhjeet/workspace/WebExample/bin/WebExample.apk","acceptSslCerts":true,"browserName":"Android","appActivity":".MainAcivtiy","device":"selendroid","appPackage":"com.example.webexample","version":"4.2.2"}}
info: Using local app from desired caps: /home/prabhjeet/workspace/WebExample/bin/WebExample.apk
info: Creating new appium session df654ffa-ed34-443a-8948-59b3a18d1cc9
info: Starting android appium
debug: Using fast reset? true
info: Preparing device for session
info: Checking whether app is actually present
info: Checking whether adb is present
info: [ADB] Using adb from /home/prabhjeet/Documents/adt-bundle-linux-x86-20131030/sdk/platform-tools/adb
info: Trying to find a connected android device
info: [ADB] Getting connected devices...
debug: executing: "/home/prabhjeet/Documents/adt-bundle-linux-x86-20131030/sdk/platform-tools/adb" devices
info: [ADB] 1 device(s) connected
info: Setting device id to 015d4a5ed7640210
info: [ADB] Waiting for device to be ready and to respond to shell commands (timeout = 5)
debug: executing: "/home/prabhjeet/Documents/adt-bundle-linux-x86-20131030/sdk/platform-tools/adb" -s 015d4a5ed7640210 wait-for-device
debug: executing: "/home/prabhjeet/Documents/adt-bundle-linux-x86-20131030/sdk/platform-tools/adb" -s 015d4a5ed7640210 shell "echo 'ready'"
info: Starting logcat capture
info: Getting device API level
debug: executing: "/home/prabhjeet/Documents/adt-bundle-linux-x86-20131030/sdk/platform-tools/adb" -s 015d4a5ed7640210 shell "getprop ro.build.version.sdk"
info: Device is at API Level 18
debug: java -jar "/home/prabhjeet/node_modules/appium/lib/devices/android/helpers/strings_from_apk.jar" "/home/prabhjeet/workspace/WebExample/bin/WebExample.apk" "/tmp/com.example.webexample"
debug: executing: "/home/prabhjeet/Documents/adt-bundle-linux-x86-20131030/sdk/platform-tools/adb" -s 015d4a5ed7640210 push "/tmp/com.example.webexample/strings.json" /data/local/tmp
info: Checking whether aapt is present
info: [ADB] Using aapt from /home/prabhjeet/Documents/adt-bundle-linux-x86-20131030/sdk/build-tools/android-4.4/aapt
debug: processFromManifest: "/home/prabhjeet/Documents/adt-bundle-linux-x86-20131030/sdk/build-tools/android-4.4/aapt" dump xmltree /home/prabhjeet/workspace/WebExample/bin/WebExample.apk AndroidManifest.xml
debug: Set app process to: mple.webexample
debug: Not uninstalling app since server not started with --full-reset
debug: Checking app cert for /home/prabhjeet/workspace/WebExample/bin/WebExample.apk: java -jar "/home/prabhjeet/node_modules/appium/lib/devices/android/helpers/verify.jar" "/home/prabhjeet/workspace/WebExample/bin/WebExample.apk"
debug: App already signed.
info: Zip-aligning /home/prabhjeet/workspace/WebExample/bin/WebExample.apk
info: Checking whether zipalign is present
info: [ADB] Using zipalign from /home/prabhjeet/Documents/adt-bundle-linux-x86-20131030/sdk/tools/zipalign
debug: zipAlignApk: "/home/prabhjeet/Documents/adt-bundle-linux-x86-20131030/sdk/tools/zipalign" -f 4 "/home/prabhjeet/workspace/WebExample/bin/WebExample.apk" "/tmp/appium114328-12976-1ja6c35.tmp"
info: MD5 for app is 63c90391de8fc4e6e0e8d1897671a1c6
debug: executing: "/home/prabhjeet/Documents/adt-bundle-linux-x86-20131030/sdk/platform-tools/adb" -s 015d4a5ed7640210 shell "ls /data/local/tmp/63c90391de8fc4e6e0e8d1897671a1c6.apk"
debug: Getting install status for com.example.webexample
debug: executing: "/home/prabhjeet/Documents/adt-bundle-linux-x86-20131030/sdk/platform-tools/adb" -s 015d4a5ed7640210 shell "pm list packages -3 com.example.webexample"
info: [ADB] App is installed
info: Running fast reset (stop and clear)
debug: executing: "/home/prabhjeet/Documents/adt-bundle-linux-x86-20131030/sdk/platform-tools/adb" -s 015d4a5ed7640210 shell "am force-stop com.example.webexample"
debug: executing: "/home/prabhjeet/Documents/adt-bundle-linux-x86-20131030/sdk/platform-tools/adb" -s 015d4a5ed7640210 shell "pm clear com.example.webexample"
info: [ADB] Forwarding system:4724 to device:4724
debug: executing: "/home/prabhjeet/Documents/adt-bundle-linux-x86-20131030/sdk/platform-tools/adb" -s 015d4a5ed7640210 forward tcp:4724 tcp:4724
debug: Pushing appium bootstrap to device...
debug: executing: "/home/prabhjeet/Documents/adt-bundle-linux-x86-20131030/sdk/platform-tools/adb" -s 015d4a5ed7640210 push "/home/prabhjeet/node_modules/appium/build/android_bootstrap/AppiumBootstrap.jar" /data/local/tmp/
debug: Pushing unlock helper app to device...
debug: executing: "/home/prabhjeet/Documents/adt-bundle-linux-x86-20131030/sdk/platform-tools/adb" -s 015d4a5ed7640210 install "/home/prabhjeet/node_modules/appium/build/unlock_apk/unlock_apk-debug.apk"
info: Attempting to kill all 'uiautomator' processes
info: Getting all processes with 'uiautomator'
debug: executing: "/home/prabhjeet/Documents/adt-bundle-linux-x86-20131030/sdk/platform-tools/adb" -s 015d4a5ed7640210 shell "ps 'uiautomator'"
info: No matching processes found
info: Running bootstrap
debug: spawning: /home/prabhjeet/Documents/adt-bundle-linux-x86-20131030/sdk/platform-tools/adb -s 015d4a5ed7640210 shell uiautomator runtest AppiumBootstrap.jar -c io.appium.android.bootstrap.Bootstrap
info: [UIAUTOMATOR STDOUT] INSTRUMENTATION_STATUS: current=1
info: [UIAUTOMATOR STDOUT] INSTRUMENTATION_STATUS: id=UiAutomatorTestRunner
info: [UIAUTOMATOR STDOUT] INSTRUMENTATION_STATUS: class=io.appium.android.bootstrap.Bootstrap
info: [UIAUTOMATOR STDOUT] INSTRUMENTATION_STATUS: stream=
info: [UIAUTOMATOR STDOUT] io.appium.android.bootstrap.Bootstrap:
info: [UIAUTOMATOR STDOUT] INSTRUMENTATION_STATUS: numtests=1
info: [UIAUTOMATOR STDOUT] INSTRUMENTATION_STATUS: test=testRunServer
info: [UIAUTOMATOR STDOUT] INSTRUMENTATION_STATUS_CODE: 1
info: [BOOTSTRAP] [info] Socket opened on port 4724
info: [BOOTSTRAP] [info] Appium Socket Server Ready
info: [BOOTSTRAP] [info] Loading json...
info: [BOOTSTRAP] [info] json loading complete.
info: [BOOTSTRAP] [info] Registered crash watchers.
debug: Waking up device if it's not alive
info: Pushing command to appium work queue: ["wake",{}]
info: [BOOTSTRAP] [info] Client connected
info: [BOOTSTRAP] [info] Got data from client: {"cmd":"action","action":"wake","params":{}}
info: [BOOTSTRAP] [info] Got command of type ACTION
info: [BOOTSTRAP] [debug] Got command action: wake
debug: executing: "/home/prabhjeet/Documents/adt-bundle-linux-x86-20131030/sdk/platform-tools/adb" -s 015d4a5ed7640210 shell "dumpsys window"
info: [BOOTSTRAP] [info] Returning result: {"value":true,"status":0}
info: Writing dumpsys output to /home/prabhjeet/node_modules/appium/.dumpsys.log
debug: Screen already unlocked, continuing.
info: Pushing command to appium work queue: ["getDataDir",{}]
info: [BOOTSTRAP] [info] Got data from client: {"cmd":"action","action":"getDataDir","params":{}}
info: [BOOTSTRAP] [info] Got command of type ACTION
info: [BOOTSTRAP] [debug] Got command action: getDataDir
info: [BOOTSTRAP] [info] Returning result: {"value":"\/data\/local\/tmp","status":0}
debug: dataDir set to: /data/local/tmp
debug: executing: "/home/prabhjeet/Documents/adt-bundle-linux-x86-20131030/sdk/platform-tools/adb" -s 015d4a5ed7640210 shell "am start -S -a android.intent.action.MAIN -c android.intent.category.LAUNCHER -f 0x10200000 -n com.example.webexample/.MainAcivtiy"
info: Waiting for activity to  be focused
info: Getting focused package and activity
debug: executing: "/home/prabhjeet/Documents/adt-bundle-linux-x86-20131030/sdk/platform-tools/adb" -s 015d4a5ed7640210 shell "dumpsys window windows"
info: Device launched! Ready for commands
info: Setting command timeout to the default of 60 secs
info: Appium session started with sessionId df654ffa-ed34-443a-8948-59b3a18d1cc9
POST /wd/hub/session 303 6244ms - 9b
debug: Appium request initiated at /wd/hub/session/df654ffa-ed34-443a-8948-59b3a18d1cc9
debug: Request received with params: {}
info: Responding to client with success: {"status":0,"value":{"platform":"Ubuntu","browserName":"Android","platformVersion":"4.1","webStorageEnabled":false,"takesScreenshot":true,"javascriptEnabled":true,"databaseEnabled":false,"warnings":{},"desired":{"platform":"Ubuntu","app":"/home/prabhjeet/workspace/WebExample/bin/WebExample.apk","acceptSslCerts":true,"browserName":"Android","appActivity":".MainAcivtiy","device":"selendroid","appPackage":"com.example.webexample","version":"4.2.2"},"app":"/home/prabhjeet/workspace/WebExample/bin/WebExample.apk","acceptSslCerts":true,"appActivity":".MainAcivtiy","device":"selendroid","appPackage":"com.example.webexample","version":"4.2.2"},"sessionId":"df654ffa-ed34-443a-8948-59b3a18d1cc9"}
GET /wd/hub/session/df654ffa-ed34-443a-8948-59b3a18d1cc9 200 3ms - 870b
debug: Appium request initiated at /wd/hub/session/df654ffa-ed34-443a-8948-59b3a18d1cc9/timeouts/implicit_wait
debug: Request received with params: {"ms":20000}
info: Set Android implicit wait to 20000ms
info: Responding to client with success: {"status":0,"value":null,"sessionId":"df654ffa-ed34-443a-8948-59b3a18d1cc9"}
POST /wd/hub/session/df654ffa-ed34-443a-8948-59b3a18d1cc9/timeouts/implicit_wait 200 2ms - 89b
debug: Appium request initiated at /wd/hub/session/df654ffa-ed34-443a-8948-59b3a18d1cc9/window
debug: Request received with params: {"name":"WebView"}
info: Responding to client that a method is not implemented
POST /wd/hub/session/df654ffa-ed34-443a-8948-59b3a18d1cc9/window 501 3ms - 180b
debug: Appium request initiated at /wd/hub/session/df654ffa-ed34-443a-8948-59b3a18d1cc9
debug: Request received with params: {}
info: Shutting down appium session...
info: [ADB] Pressing the HOME button
debug: executing: "/home/prabhjeet/Documents/adt-bundle-linux-x86-20131030/sdk/platform-tools/adb" -s 015d4a5ed7640210 shell "input keyevent 3"
info: Stopping logcat capture
debug: Logcat terminated with code null, signal SIGTERM
info: [BOOTSTRAP] [info] Got data from client: {"cmd":"shutdown"}
info: [BOOTSTRAP] [info] Got command of type SHUTDOWN
info: [BOOTSTRAP] [info] Returning result: {"value":"OK, shutting down","status":0}
info: Sent shutdown command, waiting for UiAutomator to stop...
info: [BOOTSTRAP] [info] Closed client connection
info: [UIAUTOMATOR STDOUT] INSTRUMENTATION_STATUS: current=1
info: [UIAUTOMATOR STDOUT] INSTRUMENTATION_STATUS: id=UiAutomatorTestRunner
info: [UIAUTOMATOR STDOUT] INSTRUMENTATION_STATUS: class=io.appium.android.bootstrap.Bootstrap
info: [UIAUTOMATOR STDOUT] INSTRUMENTATION_STATUS: stream=.
info: [UIAUTOMATOR STDOUT] INSTRUMENTATION_STATUS: numtests=1
info: [UIAUTOMATOR STDOUT] INSTRUMENTATION_STATUS: test=testRunServer
info: [UIAUTOMATOR STDOUT] INSTRUMENTATION_STATUS_CODE: 0
info: [UIAUTOMATOR STDOUT] INSTRUMENTATION_STATUS: stream=
info: [UIAUTOMATOR STDOUT] Test results for WatcherResultPrinter=.
info: [UIAUTOMATOR STDOUT] Time: 7.379
info: [UIAUTOMATOR STDOUT] OK (1 test)
info: [UIAUTOMATOR STDOUT] INSTRUMENTATION_STATUS_CODE: -1
info: UiAutomator shut down normally
info: Cleaning up android objects
info: Cleaning up appium session
info: Responding to client with success: {"status":0,"value":null,"sessionId":"df654ffa-ed34-443a-8948-59b3a18d1cc9"}
DELETE /wd/hub/session/df654ffa-ed34-443a-8948-59b3a18d1cc9 200 823ms - 89b


On Friday, April 25, 2014 4:47:31 PM UTC+5:30, Prabhjeet Bains wrote:

Rameshwar Juptimath

unread,
Apr 28, 2014, 9:22:21 AM4/28/14
to appium-...@googlegroups.com
WebElement enterLogin = driver.findElement(By
.xpath("//input[contains(@name'_NNext')]")); //There is comma missing  between @name and '_NNext'

WebElement enterLogin = driver.findElement(By
.xpath("//input[contains(@name,'_NNext')]"));

Prabhjeet Bains

unread,
Apr 28, 2014, 9:29:47 AM4/28/14
to appium-...@googlegroups.com
after changinging WebElement enterLogin = driver.findElement(By.xpath("//input[@name,'_NNext']"))  even i commented //driver.switchTo().window("WebView"); are else i am getting error at this line


exception:
org.openqa.selenium.NoSuchElementException: An element could not be located on the page using the given search parameters. (WARNING: The server did not provide any stacktrace information)
Command duration or timeout: 20.52 seconds
For documentation on this error, please visit: http://seleniumhq.org/exceptions/no_such_element.html
Build info: version: 'unknown', revision: 'unknown', time: 'unknown'
System info: host: 'ATMECSADMIN', ip: '127.0.1.1', os.name: 'Linux', os.arch: 'i386', os.version: '3.8.0-29-generic', java.version: '1.7.0_51'
Session ID: af8e3d54-fe7b-4733-881b-5c3ba549f448
Driver info: com.example.webexample.test.TestScript$SwipeableWebDriver
Capabilities [{platform=UNIX, app=/home/prabhjeet/workspace/WebExample/bin/WebExample.apk, javascriptEnabled=true, acceptSslCerts=true, browserName=Android, appActivity=.MainAcivtiy, desired={platform=Ubuntu, app=/home/prabhjeet/workspace/WebExample/bin/WebExample.apk, acceptSslCerts=true, browserName=Android, appActivity=.MainAcivtiy, device=selendroid, appPackage=com.example.webexample, version=4.2.2}, appPackage=com.example.webexample, version=4.2.2, platformVersion=4.1, databaseEnabled=false, webStorageEnabled=false, device=selendroid, warnings={}, takesScreenshot=true}]
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:526)
at org.openqa.selenium.remote.ErrorHandler.createThrowable(ErrorHandler.java:193)
at org.openqa.selenium.remote.ErrorHandler.throwIfResponseFailed(ErrorHandler.java:145)
at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:554)
at org.openqa.selenium.remote.RemoteWebDriver.findElement(RemoteWebDriver.java:307)
at org.openqa.selenium.remote.RemoteWebDriver.findElementByXPath(RemoteWebDriver.java:404)
at org.openqa.selenium.By$ByXPath.findElement(By.java:363)
at org.openqa.selenium.remote.RemoteWebDriver.findElement(RemoteWebDriver.java:299)
at com.example.webexample.test.TestScript.apiDemo(TestScript.java:76)

On Friday, April 25, 2014 4:47:31 PM UTC+5:30, Prabhjeet Bains wrote:

Rameshwar Juptimath

unread,
Apr 28, 2014, 9:31:16 AM4/28/14
to appium-...@googlegroups.com
do not comment 

driver.switchTo().window("WEBVIEW");

KEEP WEBVIEW AS CAPITAL

Prabhjeet Bains

unread,
Apr 28, 2014, 9:34:34 AM4/28/14
to appium-...@googlegroups.com
when I uncommet driver.switchTo().window("WEBVIEW"); but its throw exception
org.openqa.selenium.WebDriv erException: Not yet implemented. Please help us: http://appium.io/get-involved.html (WARNING: The server did not provide any stacktrace information)
Command duration or timeout: 8 milliseconds
Build info: version: 'unknown', revision: 'unknown', time: 'unknown'
System info: host: 'ATMECSADMIN', ip: '127.0.1.1', os.name: 'Linux', os.arch: 'i386', os.version: '3.8.0-29-generic', java.version: '1.7.0_51'
Session ID: 7f5e8b78-569e-4c76-a3ea-605f4b862723
Driver info: com.example.webexample.test.TestScript$SwipeableWebDriver
Capabilities [{platform=UNIX, app=/home/prabhjeet/workspace/WebExample/bin/WebExample.apk, javascriptEnabled=true, acceptSslCerts=true, browserName=Android, appActivity=.MainAcivtiy, desired={platform=Ubuntu, app=/home/prabhjeet/workspace/WebExample/bin/WebExample.apk, acceptSslCerts=true, browserName=Android, appActivity=.MainAcivtiy, device=selendroid, appPackage=com.example.webexample, version=4.2.2}, appPackage=com.example.webexample, version=4.2.2, platformVersion=4.1, databaseEnabled=false, webStorageEnabled=false, device=selendroid, warnings={}, takesScreenshot=true}]
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:526)
at org.openqa.selenium.remote.ErrorHandler.createThrowable(ErrorHandler.java:193)
at org.openqa.selenium.remote.ErrorHandler.throwIfResponseFailed(ErrorHandler.java:145)
at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:554)
at org.openqa.selenium.remote.RemoteWebDriver$RemoteTargetLocator.window(RemoteWebDriver.java:831)
at com.example.webexample.test.TestScript.apiDemo(TestScript.java:75)
error on terminal 
o: Sent shutdown command, waiting for UiAutomator to stop...
info: UiAutomator shut down normally
info: Cleaning up android objects
info: Cleaning up appium session
info: Responding to client with success: {"status":0,"value":null,"sessionId":"7f5e8b78-569e-4c76-a3ea-605f4b862723"}



On Friday, April 25, 2014 4:47:31 PM UTC+5:30, Prabhjeet Bains wrote:

bootstrap online

unread,
Apr 28, 2014, 9:36:27 AM4/28/14
to Prabhjeet Bains, appium-...@googlegroups.com
What version of appium are you using?

Rameshwar Juptimath

unread,
Apr 28, 2014, 9:36:33 AM4/28/14
to appium-...@googlegroups.com
driver = new SwipeableWebDriver(new URL("http://0.0.0.0:4723/wd/hub"),
capabilities);

Prabhjeet Bains

unread,
Apr 28, 2014, 9:39:41 AM4/28/14
to appium-...@googlegroups.com
I am using the Appium v1.0.0-beta.1 (REV 6fcf54391fb06bb5fb03dfcf1582c84a1d9838b6)

bootstrap online

unread,
Apr 28, 2014, 9:47:54 AM4/28/14
to Prabhjeet Bains, appium-...@googlegroups.com
In 1.0, you have to change the context:

// example from Appium's java bindings
https://github.com/appium/java-client/blob/a75e06ddd3dd9e1463cbb48578ae60a4089b99a6/src/test/java/io/appium/java_client/ContextTest.java#L68
driver.getContextHandles();
driver.context("WEBVIEW_1");

Rameshwar Juptimath

unread,
Apr 28, 2014, 9:51:19 AM4/28/14
to appium-...@googlegroups.com, Prabhjeet Bains
@bootstraponline

does the case in the capabilities matter.

I mean

capabilities.SetCapability ("device", "Selendroid");

and

capabilities.SetCapability ("device", "selendroid");

are they both same?

bootstrap online

unread,
Apr 28, 2014, 9:58:09 AM4/28/14
to Rameshwar Juptimath, appium-...@googlegroups.com, Prabhjeet Bains

Rameshwar Juptimath

unread,
Apr 28, 2014, 10:03:16 AM4/28/14
to appium-...@googlegroups.com, Rameshwar Juptimath, Prabhjeet Bains
but I was using 'Selendroid' till date and its working fine.

Prabhjeet Bains

unread,
Apr 28, 2014, 10:06:15 AM4/28/14
to appium-...@googlegroups.com
but i have tried both ways lower case and upper case also its not working

Prabhjeet Bains

unread,
Apr 28, 2014, 10:21:21 AM4/28/14
to appium-...@googlegroups.com
@bootstraponline 
Sir the link which u provide me in that they have used appium server   private AppiumDriver driver; and also this is for IOS but I am running it for android adn the suggestion on that page is related to ios not to andorid

bootstrap online

unread,
Apr 28, 2014, 10:21:52 AM4/28/14
to Prabhjeet Bains, appium-...@googlegroups.com
The code calls .toLowerCase() so it should be case insensitive.

bootstrap online

unread,
Apr 28, 2014, 10:22:20 AM4/28/14
to Prabhjeet Bains, appium-...@googlegroups.com
The Java appium bindings work on iOS as well.

Rameshwar Juptimath

unread,
Apr 28, 2014, 10:36:42 AM4/28/14
to appium-...@googlegroups.com, Prabhjeet Bains

bootstrap online

unread,
Apr 28, 2014, 10:57:20 AM4/28/14
to Rameshwar Juptimath, appium-...@googlegroups.com, Prabhjeet Bains
To fix "Error: Instruments crashed on startup", I suggest updating OS
X, Xcode, and appium. Instruments crashing isn't something that appium
controls. The newer versions of the related software are more stable.

Rameshwar Juptimath

unread,
Apr 28, 2014, 11:00:43 AM4/28/14
to appium-...@googlegroups.com, Rameshwar Juptimath, Prabhjeet Bains
@bootstraponline
I have 
OS X 10.9.2

Xcode : 5.1.1

are there anything latest than this?

bootstrap online

unread,
Apr 28, 2014, 11:01:45 AM4/28/14
to Rameshwar Juptimath, appium-...@googlegroups.com, Prabhjeet Bains
No, that's what I'm using and it works. Are you able to run any of the
same code successfully on iOS?
https://github.com/appium/appium/tree/1.0-beta/sample-code

On Mon, Apr 28, 2014 at 11:00 AM, Rameshwar Juptimath

Jonathan Lipps

unread,
Apr 28, 2014, 12:33:31 PM4/28/14
to Prabhjeet Bains, appium-...@googlegroups.com
In 1.0 you have to use automationName: 'Selendroid' instead of device: 'Selendroid'. 

Selendroid is not a mobile device, it's an automation backend. That's why we changed it.

Rameshwar Juptimath

unread,
Apr 28, 2014, 12:38:08 PM4/28/14
to appium-...@googlegroups.com, Prabhjeet Bains
@bootstraponline
@jonathan

I will try the code tomorrow and let you know.

Thanks for the reply guys

Jonathan Lipps

unread,
Apr 28, 2014, 12:44:56 PM4/28/14
to Prabhjeet Bains, appium-...@googlegroups.com
'device': 'selendroid' capabilities are not supported in appium 1.0. instead you need to use 'automationName': 'selendroid'

Prabhjeet Bains

unread,
Apr 29, 2014, 12:58:44 AM4/29/14
to appium-...@googlegroups.com
@Jpnathan Lipps thanks for that code now its working.
@Rameshwar Juptimath
@bootstraponline 
thanks guys now its working. 

Rameshwar Juptimath

unread,
Apr 29, 2014, 2:33:03 AM4/29/14
to appium-...@googlegroups.com
Your Welcome :)

Rameshwar Juptimath

unread,
Apr 29, 2014, 2:53:57 AM4/29/14
to appium-...@googlegroups.com, Prabhjeet Bains
@Jonathan
What could be the possible problem?

info: Responding to client with error: {"status":33,"value":{"message":"A new session could not be created. (Original error: Bad app: /LN/Softwares/APP_Files/Builds_26_04_14/myApp_26_04_14.ipa. App paths need to be absolute, or relative to the appium server install dir, or a URL to compressed file, or a special app name. cause: App zip unzipped OK, but we couldn't find a .app bundle in it. Make sure your archive contains the .app package and nothing else)","origValue":"Bad app: /LN/Softwares/APP_Files/Builds_26_04_14/myApp_26_04_14.ipa. App paths need to be absolute, or relative to the appium server install dir, or a URL to compressed file, or a special app name. cause: App zip unzipped OK, but we couldn't find a .app bundle in it. Make sure your archive contains the .app package and nothing else"},"sessionId":null}

POST /wd/hub/session 500 122ms - 844b


I tried the following:

  • changed my .ipa file to .zip. 
  • passed --ipa flag with the same path as in the desired caps
  • passed --ipa with .zip file
I still get the same error.



On Monday, April 28, 2014 10:03:31 PM UTC+5:30, Jonathan Lipps wrote:

Rameshwar Juptimath

unread,
Apr 29, 2014, 4:10:13 AM4/29/14
to appium-...@googlegroups.com, Rameshwar Juptimath, Prabhjeet Bains
@bootstraponline

I ran the sample that you told.

Simulator opened but the app was not automated.

Here are my appium logs:

^CFWWMACs-Mac-mini:~ FWWMAC$ appium -a 127.0.0.1 -p 4723

info: Welcome to Appium v0.18.2 (REV 42bf11ab933185316a57ffa7f283f184ea4635b8)

info: Appium REST http interface listener started on 127.0.0.1:4723

info: socket.io started

info: Non-default server args: {"address":"127.0.0.1","merciful":true}

debug: Appium request initiated at /wd/hub/session

debug: Request received with params: {"desiredCapabilities":{"deviceName":"iPhone Retina (4-inch 64-bit)","platformName":"iOS","platformVersion":"7.1","app":"/TestApp.app"}}

info: Using local app from desired caps: /TestApp.app

info: Creating new appium session 95cfbe67-2f3f-4424-9695-fa6043e066dc

info: Removing any remaining instruments sockets

info: Cleaned up instruments socket /tmp/instruments_sock

info: Cleaning up any tracedirs

info: Cleaned up /usr/local/lib/node_modules/appium/instrumentscli0.trace

info: Setting Xcode folder

info: Setting Xcode version

info: Setting iOS SDK Version

info: iOS SDK Version set to 7.1

info: Detecting automation tracetemplate

info: Not auto-detecting udid, running on sim

warn: Could not parse plist file at /TestApp.app/en.lproj/Localizable.strings

info: Not setting locale

debug: Creating instruments

info: No iOS / app preferences to set

info: Starting iOS 7.* simulator log capture

info: Killing the simulator process

info: Killing any other simulator daemons

debug: Checking whether instruments supports our device string

info: Getting list of devices instruments supports

info: Instruments is at: /Applications/Xcode.app/Contents/Developer/usr/bin/instruments

info: Cleaning app state.

info: No folders found to remove

debug: No device id or app, not installing to real device.

debug: Starting instruments

info: Instruments is at: /Applications/Xcode.app/Contents/Developer/usr/bin/instruments

info: [INSTSERVER] Instruments socket server started at /tmp/instruments_sock

info: Attempting to run app on iPhone Retina (4-inch 64-bit) - Simulator - iOS 7.1

info: Spawning instruments with command: /Applications/Xcode.app/Contents/Developer/usr/bin/instruments -t /Applications/Xcode.app/Contents/Applications/Instruments.app/Contents/PlugIns/AutomationInstrument.bundle/Contents/Resources/Automation.tracetemplate -w iPhone Retina (4-inch 64-bit) - Simulator - iOS 7.1 /TestApp.app -e UIASCRIPT /usr/local/lib/node_modules/appium/node_modules/appium-uiauto/uiauto/bootstrap.js -e UIARESULTSPATH /tmp/appium-instruments

info: And extra without-delay env: {"DYLD_INSERT_LIBRARIES":"/usr/local/lib/node_modules/appium/node_modules/appium-instruments/thirdparty/iwd/InstrumentsShim.dylib","LIB_PATH":"/usr/local/lib/node_modules/appium/node_modules/appium-instruments/thirdparty/iwd"}

info: And launch timeouts (in ms): {"global":90000}

info: [INST STDERR] 2014-04-29 13:38:29.130 ScriptAgent[1350:3007] CLTilesManagerClient: initialize, sSharedTilesManagerClient


info: [INST STDERR] 2014-04-29 13:38:29.131 ScriptAgent[1350:3007] CLTilesManagerClient: init


info: [INST STDERR] 2014-04-29 13:38:29.131 ScriptAgent[1350:3007] CLTilesManagerClient: reconnecting, 0x10a427610


info: [INST STDERR] 2014-04-29 13:38:29.980 ScriptAgent[1350:3007] AX Lookup problem! 1102 com.apple.iphone.axserver:1339


info: [INST] 2014-04-29 08:08:30 +0000 Start: Bootstrapping uiauto

       

info: [INST] 2014-04-29 08:08:31 +0000 Start: Got user: FWWMAC

       

info: [INST] 2014-04-29 08:08:31 +0000 Start: Not using settings file.

       

info: [INST] 2014-04-29 08:08:31 +0000 Start: isVerbose:false

       

info: [INST] 2014-04-29 08:08:35 +0000 Start: Using node at: /usr/local/Cellar/node/0.10.26/bin/node

       

info: [INSTSERVER] Instruments is ready to receive commands

info: Instruments launched. Starting poll loop for new commands.

info: Pushing command to appium work queue: "au.bundleId()"

debug: Sending command to instruments: au.bundleId()

info: [INSTSERVER] Socket data received (15 bytes)

info: [INSTSERVER] Socket data being routed for 'cmd' event

info: [INSTSERVER] Sending command to instruments: au.bundleId()

info: [INSTSERVER] Socket data received (57 bytes)

info: [INSTSERVER] Socket data being routed for 'cmd' event

info: [INSTSERVER] Got result from instruments: {"status":0,"value":"D.TestApp"}

info: Bundle ID for open app is D.TestApp

info: Setting bootstrap config keys/values

info: Pushing command to appium work queue: "setBootstrapConfig: autoAcceptAlerts=false"

debug: Sending command to instruments: setBootstrapConfig: autoAcceptAlerts=false

info: [INSTSERVER] Sending command to instruments: setBootstrapConfig: autoAcceptAlerts=false

info: [INSTSERVER] Socket data received (57 bytes)

info: [INSTSERVER] Socket data being routed for 'cmd' event

info: [INSTSERVER] Got result from instruments: {"status":0,"value":"D.TestApp"}

info: Setting initial orientation to PORTRAIT

info: Pushing command to appium work queue: "au.setScreenOrientation('PORTRAIT')"

debug: Sending command to instruments: au.setScreenOrientation('PORTRAIT')

info: [INSTSERVER] Sending command to instruments: au.setScreenOrientation('PORTRAIT')

info: [INST] 2014-04-29 08:08:35 +0000 Debug: target.setDeviceOrientation("1")

       

info: [INSTSERVER] Socket data received (56 bytes)

info: [INSTSERVER] Socket data being routed for 'cmd' event

info: [INSTSERVER] Got result from instruments: {"status":0,"value":"PORTRAIT"}

info: Device launched! Ready for commands

info: Setting command timeout to the default of 60 secs

info: Appium session started with sessionId 95cfbe67-2f3f-4424-9695-fa6043e066dc

POST /wd/hub/session 303 21841ms - 9b

debug: Appium request initiated at /wd/hub/session/95cfbe67-2f3f-4424-9695-fa6043e066dc

debug: Request received with params: {"desiredCapabilities":{"deviceName":"iPhone Retina (4-inch 64-bit)","platformName":"iOS","platformVersion":"7.1","app":"/TestApp.app"}}

info: Responding to client with success: {"status":0,"value":{"webStorageEnabled":false,"locationContextEnabled":false,"browserName":"iOS","platform":"MAC","javascriptEnabled":true,"databaseEnabled":false,"takesScreenshot":true,"warnings":{},"desired":{"deviceName":"iPhone Retina (4-inch 64-bit)","platformName":"iOS","platformVersion":"7.1","app":"/TestApp.app"},"deviceName":"iPhone Retina (4-inch 64-bit)","platformName":"iOS","platformVersion":"7.1","app":"/TestApp.app"},"sessionId":"95cfbe67-2f3f-4424-9695-fa6043e066dc"}

GET /wd/hub/session/95cfbe67-2f3f-4424-9695-fa6043e066dc 200 3ms - 618b

debug: Appium request initiated at /wd/hub/session/95cfbe67-2f3f-4424-9695-fa6043e066dc/element

debug: Request received with params: {"using":"-ios uiautomation","value":".textFields()[\"TextField1\"];"}

info: Pushing command to appium work queue: "au.getElementByUIAutomation('.textFields()[\\\"TextField1\\\"];')"

debug: Sending command to instruments: au.getElementByUIAutomation('.textFields()[\"TextField1\"];')

info: [INSTSERVER] Sending command to instruments: au.getElementByUIAutomation('.textFields()[\"TextField1\"];')

info: [INSTSERVER] Socket data received (61 bytes)

info: [INSTSERVER] Socket data being routed for 'cmd' event

info: [INSTSERVER] Got result from instruments: {"status":0,"value":{"ELEMENT":"0"}}

info: Responding to client with success: {"status":0,"value":{"ELEMENT":"0"},"sessionId":"95cfbe67-2f3f-4424-9695-fa6043e066dc"}

POST /wd/hub/session/95cfbe67-2f3f-4424-9695-fa6043e066dc/element 200 1131ms - 109b

debug: Appium request initiated at /wd/hub/session/95cfbe67-2f3f-4424-9695-fa6043e066dc/element/0/value

debug: Request received with params: {"value":["9"]}

info: Pushing command to appium work queue: "au.getElement('0').setValueByType('9')"

debug: Sending command to instruments: au.getElement('0').setValueByType('9')

info: [INSTSERVER] Sending command to instruments: au.getElement('0').setValueByType('9')

info: [INST STDERR] 2014-04-29 13:38:37.418 ScriptAgent[1350:3007] Log written to /Users/FWWMAC/Library/Application Support/iPhone Simulator/7.1-64/Library/Logs/CrashReporter/UIALogs/ScriptError-2014-04-29-133837.plist


info: [INSTSERVER] Socket data received (51 bytes)

info: [INSTSERVER] Socket data being routed for 'cmd' event

info: [INSTSERVER] Got result from instruments: {"status":17,"value":"10"}

info: Responding to client with error: {"status":17,"value":{"message":"An error occurred while executing user supplied JavaScript.","origValue":"10"},"sessionId":"95cfbe67-2f3f-4424-9695-fa6043e066dc"}

POST /wd/hub/session/95cfbe67-2f3f-4424-9695-fa6043e066dc/element/0/value 500 117ms - 191b

debug: Appium request initiated at /wd/hub/session/95cfbe67-2f3f-4424-9695-fa6043e066dc

debug: Request received with params: {}

info: Shutting down appium session...

info: Stopping ios

info: Sending sigterm to instruments

info: [INST] 2014-04-29 08:08:37 +0000 Stopped: Script was stopped by the user

       

info: [INST] Instruments Trace Complete (Duration : 17.669607s; Output : /usr/local/lib/node_modules/appium/instrumentscli0.trace)

       

info: [INSTSERVER] Instruments exited with code 0

info: Cleaning up after instruments exit

info: [INSTSERVER] Closing instruments client socket due to exit

info: Stopping iOS log capture

info: Killing the simulator process

info: [INSTSERVER] Instruments socket server was closed

info: Killing any other simulator daemons

info: Cleaning app state.

info: Deleted /Users/FWWMAC/Library/Application Support/iPhone Simulator/7.1-64/Applications

info: Deleted /Users/FWWMAC/Library/Application Support/iPhone Simulator/7.1-64/Library/TCC

info: Deleted /Users/FWWMAC/Library/Application Support/iPhone Simulator/7.1-64/Library/Caches/locationd

info: Deleted /Users/FWWMAC/Library/Application Support/iPhone Simulator/7.1-64/Media

info: Deleted /Users/FWWMAC/Library/Application Support/iPhone Simulator/7.1-64/Library/Keychains

info: Cleaning up appium session

info: Responding to client with success: {"status":0,"value":null,"sessionId":"95cfbe67-2f3f-4424-9695-fa6043e066dc"}

DELETE /wd/hub/session/95cfbe67-2f3f-4424-9695-fa6043e066dc 200 404ms - 89b


Jonathan Lipps

unread,
May 12, 2014, 3:56:31 AM5/12/14
to Rameshwar Juptimath, appium-...@googlegroups.com, Prabhjeet Bains
What's inside the .ipa file when you unzip it?
Reply all
Reply to author
Forward
0 new messages