Path: blob/trunk/cpp/iedriver/CommandHandlers/ClickElementCommandHandler.h
2868 views
// Licensed to the Software Freedom Conservancy (SFC) under one1// or more contributor license agreements. See the NOTICE file2// distributed with this work for additional information3// regarding copyright ownership. The SFC licenses this file4// to you under the Apache License, Version 2.0 (the "License");5// you may not use this file except in compliance with the License.6// You may obtain a copy of the License at7//8// http://www.apache.org/licenses/LICENSE-2.09//10// Unless required by applicable law or agreed to in writing, software11// distributed under the License is distributed on an "AS IS" BASIS,12// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.13// See the License for the specific language governing permissions and14// limitations under the License.1516#ifndef WEBDRIVER_IE_CLICKELEMENTCOMMANDHANDLER_H_17#define WEBDRIVER_IE_CLICKELEMENTCOMMANDHANDLER_H_1819// TODO: Revisit this include20#include "../DocumentHost.h"21#include "../IECommandHandler.h"2223namespace webdriver {2425class IElementManager;2627class ClickElementCommandHandler : public IECommandHandler {28public:29ClickElementCommandHandler(void);30virtual ~ClickElementCommandHandler(void);3132protected:33void ExecuteInternal(const IECommandExecutor& executor,34const ParametersMap& command_parameters,35Response* response);3637private:38bool IsFileUploadElement(ElementHandle element_wrapper);39bool IsOptionElement(ElementHandle element_wrapper);40bool IsPossibleNavigation(ElementHandle element_wrapper,41std::string* url);42std::wstring GetSyntheticClickAtom();43std::wstring GetClickAtom();44int ExecuteAtom(const IECommandExecutor& executor,45const std::wstring& atom_script_source,46BrowserHandle browser_wrapper,47ElementHandle element_wrapper,48std::string* error_msg);49};5051} // namespace webdriver5253#endif // WEBDRIVER_IE_CLICKELEMENTCOMMANDHANDLER_H_545556