Open gao2q opened 6 years ago
调试了源代码,真机ios下没有openURL方法。
IOS.prototype.get = function * (url) {
if (this.isSafari || this.proxy) {
yield this.device.openURL(url);
yield _.sleep(2000);
if (!this.remote) {
this.remote = new RemoteDebugger({
deviceId: this.udid
});
yield this.remote.start();
}
const availablePages = yield this.remote.getPages();
const latestPage = _.last(availablePages);
if (latestPage) {
const pageId = latestPage.id;
yield this.remote.connect(pageId);
this.context = pageId;
}
this.frame = null;
return null;
} else {
this.frame = null;
return yield this.remote.navigateTo(url);
}
};
请问macaca是否支持ios真机的safari浏览器?
Macaca Version: 2.0.13
Macaca Doctor Logs:
macaca-doctor version: 2.0.4
Node.js checklist:
node env: /usr/local/bin/node node version: v8.9.3
iOS checklist:
Xcode Command Line Tools is ready, version: 2349. xcodebuild version: 9.2 iproxy[usbmuxd] is installed at:
/usr/local/bin/iproxy
ios_webkit_debug_proxy is installed at:/usr/local/bin/ios_webkit_debug_proxy
carthage is installed, version: 0.28.0Android checklist:
JAVA version is
1.8.0_101
JAVA_HOME is set to/Library/Java/JavaVirtualMachines/jdk1.8.0_101.jdk/Contents/Home
ANDROID_HOME is not set Command Line Tools: gradle is uninstalledInstalled driver list:
ios: 2.0.30
Operate System: macOS 10.13.3 iphone 6 ios 11.2.5
Programming Language: node.js
脚本:
var remoteConfig = { host: 'localhost', port: 4444 };
var driver = wd.promiseChainRemote(remoteConfig);
describe('Test', function () {
before(function () { return driver.init({ platformName: 'iOS', // iOS, Android, Desktop udid: '****', bundleId: 'com.apple.mobilesafari', }); });
after(function () { return driver .sleep(1000) .quit(); });
it('url: https://www.baidu.com', async function () { await driver.get('https://www.baidu.com'); });
});