Open hinok opened 9 years ago
This looks like an appium issue. It may be quicker to isolate the issue and just try to run a scenario using appium alone. Can you try running a simple selenium test (say load a page, and print its title) using appium without browser-perf ?
I see that @scnymc had exactly very similiar issue like me with appium, more on https://github.com/appium/appium/issues/4198#issuecomment-65179542
Especially this fragment and fact that he also wanted run tests on iPad.
the page always stay on "Apple.com" which launched by SafariLauncher
I will try today evening run only appium with bypassing browser-perf.
Hey, appium works perfectly with this simple test. At the beginning SafariLauncher opens apple.com but after few seconds it opens also my defined page in test, in this case: http://github.com.
"use strict";
var wd = require('wd');
var chai = require('chai');
var chaiAsPromised = require('chai-as-promised');
var colors = require('colors');
chai.use(chaiAsPromised);
chai.should();
chaiAsPromised.transferPromiseness = wd.transferPromiseness;
var desired = {
deviceName: 'Milosz\'s iPad',
platformName: 'iOS',
browserName: 'Safari',
newCommandTimeout: 60
};
var browser = wd.promiseChainRemote('localhost' , 4723);
browser.on('status', function(info) {
console.log('status:' + info.cyan);
});
browser.on('command', function(meth, path, data) {
console.log('command > ' + meth.yellow, path.grey, data || '');
});
// Run the test
browser.chain()
.then(function () {
return browser.init(desired);
})
.get('http://github.com')
.title()
.should.become('GitHub · Build software better, together.')
.sleep(5000)
.quit()
.catch(function (err) {
console.log(err);
throw err;
})
.done();
Output
command > CALL noop()
command > RESPONSE noop()
command > CALL init({"deviceName":"Milosz's iPad","platformName":"iOS","browserName":"Safari","newCommandTimeout":60})
status:
Driving the web on session: <myudid>
command > RESPONSE init({"deviceName":"Milosz's iPad","platformName":"iOS","browserName":"Safari","newCommandTimeout":60}) "<myudid>",null
command > CALL get("http://github.com")
command > RESPONSE get("http://github.com")
command > CALL title()
command > RESPONSE title() "GitHub · Build software better, together."
command > CALL sleep(5000)
command > RESPONSE sleep(5000)
command > CALL quit()
status:
Ending your web drivage..
command > RESPONSE quit()
hey guys, i need a small help in here ....My script is given below.Can someone help me out cos I'm facing the same issue where the page stay in "apple.com"....I am not able to open "m.ebay.in"
CODE: public class CSmartWeb{
public static RemoteWebDriver driver = null;
private static Utils utils =null;
@Test
public void testCaseDefaultScnTsts() throws Exception {
try{
System.out.println("testing....");
driver.get("https://m.ebay.in/");
WebElement webElmt = null;
//Iteration 0
utils.createIteration();
try{
}catch(Exception e){
System.out.println("Exception: " + e.getLocalizedMessage());
}
@BeforeClass public static void beforeMethod() throws MalformedURLException,InterruptedException{ try{ DesiredCapabilities capabilities = new DesiredCapabilities();
capabilities.setCapability(MobileCapabilityType.DEVICE_NAME, "iPhone 5s");
capabilities.setCapability(MobileCapabilityType.UDID,"5dd18b4aa36d4e295211af4c63403b959aed0547");
capabilities.setCapability("browserName", "safari");
capabilities.setCapability(MobileCapabilityType.VERSION, "8.2");
capabilities.setCapability(MobileCapabilityType.PLATFORM_NAME, "iOS");
try{
driver = new IOSDriver(
new URL("http://127.0.0.1:4723/wd/hub"), capabilities);
}catch(Exception e){
e.printStackTrace();
}
}catch(Exception e){
e.printStackTrace();
}
}
@Techies15 Could this be an issue with appium ?
@axemclion I have tried this with appium version 1.4.8 Any solution or workaround for this??
@Techies15 You mean this works with Appium ?
How to kill all the opened safari windows before launching safari browser on iPhone devices using appium
Hey, I would like to test my web application on iPad - real device not simulator. I followed instructions on appium.io.
ideviceinstaller
SafariLauncher
is built and successfuly deployed to the deviceSafariLauncher
always opens default homepage (http://apple.com)? It doesn't matter what url I pass to the browser-perf command, it always open apple.com...Before running browser-perf:
ios-webkit-debug-proxy is launched
appium is launched
Safari on the device is opened. Safari has enabled
Web inspector
and iniOS - Settings - Developer - Enable UI Automation
is turned on.Trying to run browser-perf (config based on ios-safari-appiun.config.json)
I see that safarilauncher opens default starting page in Safari on iPad instead a page provided in command.
Logs of browser-perf
Logs of appium
Additional information
I upgraded to browser-perf 1.1.2 - still have the same issue.
I feel that I am so close to run tests on real device but to be honest I don't know what I could do now.