1- /**
2- * http://surenpi.com
3- */
1+ /*
2+ * Copyright 2002-2007 the original author or authors.
3+ *
4+ * Licensed 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 at
7+ *
8+ * http://www.apache.org/licenses/LICENSE-2.0
9+ *
10+ * Unless required by applicable law or agreed to in writing, software
11+ * 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 and
14+ * limitations under the License.
15+ */
16+
417package org .suren .autotest .web .framework .invoker ;
518
619import java .util .ArrayList ;
1528import org .suren .autotest .web .framework .selenium .SeleniumEngine ;
1629
1730/**
31+ * 验证码外部执行器
1832 * @author suren
1933 * @date 2017年1月7日 下午9:21:14
2034 */
@@ -25,7 +39,8 @@ public class KaptchaInvoker {
2539 * @param param 例如:data,http://localhost:8080/G2/captcha!getLastCode.do
2640 * @return
2741 */
28- public static String execute (SeleniumEngine engine , String param ) {
42+ public static String execute (SeleniumEngine engine , String param )
43+ {
2944 WebDriver driver = engine .getDriver ();
3045 Options manage = driver .manage ();
3146
@@ -41,7 +56,8 @@ public static String execute(SeleniumEngine engine, String param) {
4156
4257 Set <Cookie > cookies = manage .getCookies ();
4358 List <AtCookie > atCookieList = new ArrayList <AtCookie >();
44- for (Cookie cookie : cookies ) {
59+ for (Cookie cookie : cookies )
60+ {
4561 String name = cookie .getName ();
4662 String value = cookie .getValue ();
4763
0 commit comments