mirror of
https://github.com/appium/appium.git
synced 2026-10-29 12:41:58 +08:00
Merge pull request #31 from appium/isaac-driver
Add command to get driver for a session
This commit is contained in:
@@ -79,6 +79,12 @@ class BaseDriver extends MobileJsonWireProtocol {
|
||||
return sessionId === this.sessionId;
|
||||
}
|
||||
|
||||
// method required by MJSONWP in order to determine if the command should
|
||||
// be proxied directly to the driver
|
||||
driverForSession (/*sessionId*/) {
|
||||
return this;
|
||||
}
|
||||
|
||||
logExtraCaps (caps) {
|
||||
let extraCaps = _.difference(_.keys(caps),
|
||||
_.keys(this._constraints));
|
||||
|
||||
@@ -103,6 +103,11 @@ function baseDriverUnitTests (DriverClass, defaultCaps = {}) {
|
||||
await d.deleteSession();
|
||||
});
|
||||
|
||||
it('should have a method to get driver for a session', async () => {
|
||||
let [sessId] = await d.createSession(defaultCaps);
|
||||
d.driverForSession(sessId).should.eql(d);
|
||||
});
|
||||
|
||||
describe('command queue', () => {
|
||||
let d = new DriverClass();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user