Skip to content

Commit

Permalink
Removing Microsoft IE driver implmentation
Browse files Browse the repository at this point in the history
The Micorosft IE driver implementation has been abandoned in favor of the
Edge driver implementation. It has received no updates in over two years,
and will likely not be updated in the future. The open-source
implementation is still supported and will continue to be used.
  • Loading branch information
jimevans committed Feb 22, 2017
1 parent 0e12e8e commit 26765be
Show file tree
Hide file tree
Showing 11 changed files with 2 additions and 456 deletions.
2 changes: 0 additions & 2 deletions cpp/iedriver/IEDriver.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -243,7 +243,6 @@
<ClCompile Include="IECommandHandler.cpp" />
<ClCompile Include="IEServer.cpp" />
<ClCompile Include="IESession.cpp" />
<ClCompile Include="IEWebDriverManagerCommandExecutor.cpp" />
<ClCompile Include="InputManager.cpp" />
<ClCompile Include="InteractionsManager.cpp" />
<ClCompile Include="ProxyManager.cpp" />
Expand Down Expand Up @@ -346,7 +345,6 @@
<ClInclude Include="IECommandHandler.h" />
<ClInclude Include="IEServer.h" />
<ClInclude Include="IESession.h" />
<ClInclude Include="IEWebDriverManagerCommandExecutor.h" />
<ClInclude Include="InputManager.h" />
<ClInclude Include="InteractionsManager.h" />
<ClInclude Include="LocationInfo.h" />
Expand Down
6 changes: 0 additions & 6 deletions cpp/iedriver/IEDriver.vcxproj.filters
Original file line number Diff line number Diff line change
Expand Up @@ -74,9 +74,6 @@
<ClCompile Include="IESession.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="IEWebDriverManagerCommandExecutor.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="InputManager.cpp">
<Filter>Source Files</Filter>
</ClCompile>
Expand Down Expand Up @@ -352,9 +349,6 @@
<ClInclude Include="IESession.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="IEWebDriverManagerCommandExecutor.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="InputManager.h">
<Filter>Header Files</Filter>
</ClInclude>
Expand Down
3 changes: 0 additions & 3 deletions cpp/iedriver/IEServer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,10 @@ IEServer::IEServer(int port,
const std::string& log_level,
const std::string& log_file,
const std::string& version,
const std::string& driver_implementation,
const std::string& acl) : Server(port, host, log_level, log_file, acl) {
LOG(TRACE) << "Entering IEServer::IEServer";
LOG(INFO) << "Driver version: " << version;
this->version_ = version;
this->driver_implementation_ = driver_implementation;
}

IEServer::~IEServer(void) {
Expand All @@ -44,7 +42,6 @@ SessionHandle IEServer::InitializeSession() {
SessionHandle session_handle(new IESession());
SessionParameters params;
params.port = this->port();
params.implementation = IESession::ConvertDriverEngine(this->driver_implementation_);
session_handle->Initialize(reinterpret_cast<void*>(&params));
return session_handle;
}
Expand Down
2 changes: 0 additions & 2 deletions cpp/iedriver/IEServer.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ class IEServer : public Server {
const std::string& log_level,
const std::string& log_file,
const std::string& version,
const std::string& driver_implementation,
const std::string& acl);
virtual ~IEServer(void);

Expand All @@ -40,7 +39,6 @@ class IEServer : public Server {
virtual void ShutDown(void);
private:
std::string version_;
std::string driver_implementation_;
};

} // namespace webdriver
Expand Down
34 changes: 0 additions & 34 deletions cpp/iedriver/IESession.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@
#include "BrowserFactory.h"
#include "CommandExecutor.h"
#include "IECommandExecutor.h"
#include "IEWebDriverManagerCommandExecutor.h"
#include "messages.h"
#include "StringUtilities.h"

Expand Down Expand Up @@ -62,7 +61,6 @@ void IESession::Initialize(void* init_params) {

SessionParameters* params = reinterpret_cast<SessionParameters*>(init_params);
int port = params->port;
this->driver_implementation_ = params->implementation;

IECommandExecutorThreadContext thread_context;
thread_context.port = port;
Expand All @@ -76,28 +74,6 @@ void IESession::Initialize(void* init_params) {
}

ThreadProcedure thread_proc = &IECommandExecutor::ThreadProc;
if (this->driver_implementation_ != LegacyImplementation) {
BrowserFactory factory;
int browser_version = factory.browser_version();
bool is_component_registered = IEWebDriverManagerCommandExecutor::IsComponentRegistered();
if (this->driver_implementation_ == VendorImplementation) {
LOG(DEBUG) << "Attempting to use vendor-provided driver implementation per user request";
thread_proc = &IEWebDriverManagerCommandExecutor::ThreadProc;
} else if (this->driver_implementation_ == AutoDetectImplementation &&
browser_version >= 11 &&
is_component_registered) {
LOG(DEBUG) << "Using vendor-provided driver implementation per autodetection";
thread_proc = &IEWebDriverManagerCommandExecutor::ThreadProc;
} else {
LOG(DEBUG) << "Falling back to legacy driver implementation per autodetection ("
<< "detected IE version: " << browser_version
<< ", vendor driver install is "
<< (is_component_registered ? "" : "not")
<< " registered).";
}
} else {
LOG(DEBUG) << "Using legacy driver implementation per user request";
}
HANDLE thread_handle = reinterpret_cast<HANDLE>(_beginthreadex(NULL,
0,
thread_proc,
Expand Down Expand Up @@ -258,14 +234,4 @@ bool IESession::ExecuteCommand(const std::string& serialized_command,
return session_is_valid;
}

DriverImplementation IESession::ConvertDriverEngine(const std::string& engine) {
if (engine == "VENDOR") {
return VendorImplementation;
}
if (engine == "AUTODETECT") {
return AutoDetectImplementation;
}
return LegacyImplementation;
}

} // namespace webdriver
10 changes: 0 additions & 10 deletions cpp/iedriver/IESession.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,33 +27,23 @@

namespace webdriver {

enum DriverImplementation {
LegacyImplementation = 0,
AutoDetectImplementation,
VendorImplementation
};

// Structure to be used for storing session initialization parameters
struct SessionParameters {
int port;
DriverImplementation implementation;
};

class IESession : public Session {
public:
IESession();
virtual ~IESession(void);

static DriverImplementation ConvertDriverEngine(const std::string& engine);

void Initialize(void* init_params);
void ShutDown(void);
bool ExecuteCommand(const std::string& serialized_command,
std::string* serialized_response);

private:
bool WaitForCommandExecutorExit(int timeout_in_milliseconds);
DriverImplementation driver_implementation_;
HWND executor_window_handle_;
};

Expand Down
Loading

0 comments on commit 26765be

Please sign in to comment.