Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
seleniumhq
GitHub Repository: seleniumhq/selenium
Path: blob/trunk/cpp/iedriver/CommandHandlers/ClickElementCommandHandler.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_CLICKELEMENTCOMMANDHANDLER_H_
18
#define WEBDRIVER_IE_CLICKELEMENTCOMMANDHANDLER_H_
19
20
// TODO: Revisit this include
21
#include "../DocumentHost.h"
22
#include "../IECommandHandler.h"
23
24
namespace webdriver {
25
26
class IElementManager;
27
28
class ClickElementCommandHandler : public IECommandHandler {
29
public:
30
ClickElementCommandHandler(void);
31
virtual ~ClickElementCommandHandler(void);
32
33
protected:
34
void ExecuteInternal(const IECommandExecutor& executor,
35
const ParametersMap& command_parameters,
36
Response* response);
37
38
private:
39
bool IsFileUploadElement(ElementHandle element_wrapper);
40
bool IsOptionElement(ElementHandle element_wrapper);
41
bool IsPossibleNavigation(ElementHandle element_wrapper,
42
std::string* url);
43
std::wstring GetSyntheticClickAtom();
44
std::wstring GetClickAtom();
45
int ExecuteAtom(const IECommandExecutor& executor,
46
const std::wstring& atom_script_source,
47
BrowserHandle browser_wrapper,
48
ElementHandle element_wrapper,
49
std::string* error_msg);
50
};
51
52
} // namespace webdriver
53
54
#endif // WEBDRIVER_IE_CLICKELEMENTCOMMANDHANDLER_H_
55
56