Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
seleniumhq
GitHub Repository: seleniumhq/selenium
Path: blob/trunk/cpp/iedriver/ActionSimulators/ActionSimulator.h
2868 views
1
// Licensed to the Software Freedom Conservancy (SFC) under one
2
// or more contributor license agreements. See the NOTICE file
3
// distributed with this work for additional information
4
// regarding copyright ownership. The SFC licenses this file
5
// to you under the Apache License, Version 2.0 (the "License");
6
// you may not use this file except in compliance with the License.
7
// You may obtain a copy of the License at
8
//
9
// http://www.apache.org/licenses/LICENSE-2.0
10
//
11
// Unless required by applicable law or agreed to in writing, software
12
// distributed under the License is distributed on an "AS IS" BASIS,
13
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
// See the License for the specific language governing permissions and
15
// limitations under the License.
16
17
#ifndef WEBDRIVER_IE_ACTIONSIMULATOR_H_
18
#define WEBDRIVER_IE_ACTIONSIMULATOR_H_
19
20
#include <string>
21
#include <vector>
22
23
#include "../CustomTypes.h"
24
#include "../InputState.h"
25
26
namespace webdriver {
27
28
struct MouseExtraInfo {
29
bool offset_specified;
30
int offset_x;
31
int offset_y;
32
std::wstring element_id;
33
IHTMLElement* element;
34
};
35
36
struct KeyboardExtraInfo {
37
std::wstring character;
38
};
39
40
class ActionSimulator {
41
42
public:
43
ActionSimulator(void);
44
virtual ~ActionSimulator();
45
46
virtual bool UseExtraInfo(void) const { return false; }
47
48
virtual int SimulateActions(BrowserHandle browser_wrapper,
49
std::vector<INPUT> inputs,
50
InputState* input_state) = 0;
51
void UpdateInputState(INPUT current_input,
52
InputState* input_state);
53
54
};
55
56
} // namespace webdriver
57
58
#endif // WEBDRIVER_IE_ACTIONSIMULATOR_H_
59
60