Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
seleniumhq
GitHub Repository: seleniumhq/selenium
Path: blob/trunk/cpp/iedriver/ElementFinder.h
2867 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_ELEMENTFINDER_H_
18
#define WEBDRIVER_IE_ELEMENTFINDER_H_
19
20
#include <string>
21
#include <vector>
22
23
#include "CustomTypes.h"
24
25
namespace Json {
26
class Value;
27
}
28
29
namespace webdriver {
30
31
// Forward declaration of classes.
32
class IECommandExecutor;
33
34
class ElementFinder {
35
public:
36
ElementFinder();
37
virtual ~ElementFinder(void);
38
virtual int FindElement(const IECommandExecutor& executor,
39
ElementHandle parent_wrapper,
40
const std::wstring& mechanism,
41
const std::wstring& criteria,
42
Json::Value* found_element);
43
virtual int FindElements(const IECommandExecutor& executor,
44
ElementHandle parent_wrapper,
45
const std::wstring& mechanism,
46
const std::wstring& criteria,
47
Json::Value* found_elements);
48
49
private:
50
int FindElementUsingSizzle(const IECommandExecutor& executor,
51
const ElementHandle parent_wrapper,
52
const std::wstring& criteria,
53
Json::Value* found_element);
54
int FindElementsUsingSizzle(const IECommandExecutor& executor,
55
const ElementHandle parent_wrapper,
56
const std::wstring& criteria,
57
Json::Value* found_elements);
58
bool HasNativeCssSelectorEngine(const IECommandExecutor& executor);
59
};
60
61
} // namespace webdriver
62
63
#endif // WEBDRIVER_IE_ELEMENTFINDER_H_
64
65