PK{D>META-INF/MANIFEST.MFMLK-. K-*ϳR03 NMIMR()*MPKw9)'PK $^D> A?org/openqa/selenium/support/ui/UnexpectedTagNameException.class19org/openqa/selenium/support/ui/UnexpectedTagNameException&org/openqa/selenium/WebDriverException'(Ljava/lang/String;Ljava/lang/String;)VCode *Element should have been "%s" but was "%s" java/lang/Object java/lang/String format9(Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/String;  (Ljava/lang/String;)VLineNumberTableLocalVariableTablethis;Lorg/openqa/selenium/support/ui/UnexpectedTagNameException;expectedTagNameLjava/lang/String; actualTagName SourceFileUnexpectedTagNameException.java!\* Y+SY,S  PK $^D>!~cc6org/openqa/selenium/support/ui/LoadableComponent.class1"0org/openqa/selenium/support/ui/LoadableComponentjava/lang/Object()VCode  LineNumberTableLocalVariableTablethis2Lorg/openqa/selenium/support/ui/LoadableComponent;LocalVariableTypeTable7Lorg/openqa/selenium/support/ui/LoadableComponent;get4()Lorg/openqa/selenium/support/ui/LoadableComponent; Signature()TT;  isLoaded  loadjava/lang/ErroreLjava/lang/Error; Exceptions SourceFileLoadableComponent.javaM;>Ljava/lang/Object;!A* $    s**L*** ./01 46     !PK $^D><:org/openqa/selenium/support/ui/SlowLoadableComponent.class1`4org/openqa/selenium/support/ui/SlowLoadableComponent0org/openqa/selenium/support/ui/LoadableComponentclock&Lorg/openqa/selenium/support/ui/Clock;timeOutInSecondsJ*(Lorg/openqa/selenium/support/ui/Clock;I)VCode  ()V    LineNumberTableLocalVariableTablethis6Lorg/openqa/selenium/support/ui/SlowLoadableComponent;ILocalVariableTypeTable;Lorg/openqa/selenium/support/ui/SlowLoadableComponent;get4()Lorg/openqa/selenium/support/ui/LoadableComponent; Signature()TT;  isLoaded " #load %'&java/util/concurrent/TimeUnit ()SECONDSLjava/util/concurrent/TimeUnit; %+ ,-toMillis(J)J /10$org/openqa/selenium/support/ui/Clock 2-laterBy 4 5isError 7 89sleepFor()J ; <=waitFor(J)V /? @A isNowBefore(J)ZCjava/lang/ErroreLjava/lang/Error;end Exceptions KMLjava/lang/Thread N=sleep PRQjava/lang/InterruptedException ST getMessage()Ljava/lang/String; VXWjunit/framework/Assert YZfail(Ljava/lang/String;)VtimeoutInMillis Ljava/lang/InterruptedException; SourceFileSlowLoadableComponent.javar;>Lorg/openqa/selenium/support/ui/LoadableComponent;!  l* *+*() *+   H**L*!*$**.@**N*3**6:*>**B"'(B:1234 79";&<(=)A-C59BFFG HDE)F H5GB =S  89 @HW  <= w*6J N-OU P\ ] ^` [ D\ ]^_PK $^D>g+org/openqa/selenium/support/ui/Select.class1%org/openqa/selenium/support/ui/Selectjava/lang/Objectelement Lorg/openqa/selenium/WebElement;isMultiZ#(Lorg/openqa/selenium/WebElement;)VCode  ()V org/openqa/selenium/WebElement  getTagName()Ljava/lang/String;select java/lang/String  toLowerCase  equals(Ljava/lang/Object;)Z!9org/openqa/selenium/support/ui/UnexpectedTagNameException # $'(Ljava/lang/String;Ljava/lang/String;)V & (multiple * +, getAttribute&(Ljava/lang/String;)Ljava/lang/String; . LineNumberTableLocalVariableTablethis'Lorg/openqa/selenium/support/ui/Select;tagNameLjava/lang/String;value isMultiple()Z getOptions()Ljava/util/List; Signature4()Ljava/util/List;=option ?A@org/openqa/selenium/By 3B,(Ljava/lang/String;)Lorg/openqa/selenium/By; D EF findElements*(Lorg/openqa/selenium/By;)Ljava/util/List;getAllSelectedOptionsIjava/util/ArrayList H L 89 NPOjava/util/List QRiterator()Ljava/util/Iterator; TVUjava/util/Iterator WXnext()Ljava/lang/Object; Z [7 isSelected N] ^add T` a7hasNexttoReturnLjava/util/List;LocalVariableTypeTable2Ljava/util/List;getFirstSelectedOption"()Lorg/openqa/selenium/WebElement;i*org/openqa/selenium/NoSuchElementExceptionkNo options are selected hm n(Ljava/lang/String;)VselectByVisibleTextqjava/lang/StringBuilders.//option[. = pm v w, escapeQuotes py z{append-(Ljava/lang/String;)Ljava/lang/StringBuilder;}] p toString ? Bxpath   setSelected  67 N size()I  contains(Ljava/lang/CharSequence;)Z  ,getLongestSubstringWithoutSpace.//option[contains(., )]  getTexttextoptionssubStringWithoutSpace candidatesjava/util/StringTokenizer #  nextToken  length 7 hasMoreTokenssresultstLjava/util/StringTokenizer;t selectByIndex(I)V  valueOf(I)Ljava/lang/String;indexImatch selectByValue.//option[@value = builderLjava/lang/StringBuilder; deselectAll'java/lang/UnsupportedOperationException3You may only deselect all options of a multi-select m  7toggledeselectByValuedeselectByIndexdeselectByVisibleText"  indexOf(Ljava/lang/String;)I'  split'(Ljava/lang/String;)[Ljava/lang/String;concat(, '"')), '"', '%s'  format9(Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/String;"%s"toEscape quoteIsLast substrings[Ljava/lang/String;quotedi SourceFile Select.java!  N* +M,, Y,"*+%+')N*-'--/")* ,-&0+243M50*N12N C3445467 /*-/<0 1289:; 9*%<>C/C0 12G9:; ;HYJL*KMN-SM,Y +,\W-_+/JLM(N0L9R0 ;123bc=d 3befg y5*KMM,SL+Y+,_hYjl/Z[ \"Z+`0512 =on *%pYrt*+ux|x~CM,M:SN-*_,+*+N-*%<>C:**%pYt*-uxx~C:M:,S:+*_б/Bm&n<oBpJnTrfsluuwz|}~|0R124&c<=l4c?c=d &ee?e, /MY+N-:,M-,/"#&-04/12/4,4!4 FM*KM:+SN,-)-*_ѱ/-3;E0*F12FA4=n ]pYtM,*+uxW,|xW*%,~CN-M:S:*_ޱ/& ,CJR\04]12]54 S,1cC=d ,1e B* YƷȿ*KMM,SL+Y +W,_/&  (18A0B12(=n `pYtM,*+uxW,|xW*%,~CN-M:!S:Y W_۱/& ,CMU_04`12`54 V,4cC=d ,4e HM*KM:-SN,-)-Y -W_ϱ/6=G0*H12HC4=n `pYrtM,*+uxW,|xW*%,~CN-M:!S:Y W_۱/& ,CMU_04`12`4 V,4cC=d ,4ew, 8+϶{+նq=+϶+d=+϶NpY۷t:69϶x-2x϶xW-dݧ ߧxW-~+϶Y+SY+S/:%'.9 ? S r | 0>124l.T9I<@PK $^D>l';g*org/openqa/selenium/support/ui/Clock.class1 $org/openqa/selenium/support/ui/Clockjava/lang/Objectnow()JlaterBy(J)J isNowBefore(J)Z SourceFile Clock.java   PK $^D>RW2org/openqa/selenium/support/ui/WebDriverWait.class1,org/openqa/selenium/support/ui/WebDriverWaitjava/lang/Object#org/openqa/selenium/support/ui/Waitclock&Lorg/openqa/selenium/support/ui/Clock;driverLorg/openqa/selenium/WebDriver;timeOutInMillisJ sleepTimeOutDEFAULT_SLEEP_TIMEOUT ConstantValue#(Lorg/openqa/selenium/WebDriver;J)VCode*org/openqa/selenium/support/ui/SystemClock  ()V  J(Lorg/openqa/selenium/support/ui/Clock;Lorg/openqa/selenium/WebDriver;JJ)VLineNumberTableLocalVariableTablethis.Lorg/openqa/selenium/support/ui/WebDriverWait;timeOutInSeconds$(Lorg/openqa/selenium/WebDriver;JJ)V sleepInMillis  &  ( *,+java/util/concurrent/TimeUnit -.SECONDSLjava/util/concurrent/TimeUnit; *0 12toMillis(J)J 4 6 until5(Lcom/google/common/base/Function;)Ljava/lang/Object; Signature`(Lcom/google/common/base/Function;)TT; <>=$org/openqa/selenium/support/ui/Clock ?2laterBy ACBcom/google/common/base/Function DEapply&(Ljava/lang/Object;)Ljava/lang/Object;Gjava/lang/Boolean I JKgetClass()Ljava/lang/Class; M NOequals(Ljava/lang/Object;)Z FQ RSTRUELjava/lang/Boolean; FM V Wsleep <Y Z[ isNowBefore(J)Z]Timed out after %d seconds *_ `. MILLISECONDS *b cdconvert#(JLjava/util/concurrent/TimeUnit;)J fhgjava/lang/Long ijvalueOf(J)Ljava/lang/Long; lnmjava/lang/String opformat9(Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/String; r stthrowTimeoutException*(Ljava/lang/String;Ljava/lang/Exception;)Vvjava/lang/IllegalStateExceptionx8'throwTimeoutException' should have thrown an exception! uz {(Ljava/lang/String;)V}%org/openqa/selenium/NotFoundExceptionisTrue!Lcom/google/common/base/Function;end lastException'Lorg/openqa/selenium/NotFoundException;valueLjava/lang/Object;eLocalVariableTypeTableELcom/google/common/base/Function;TT;/org/openqa/selenium/support/ui/TimeoutException *(Ljava/lang/String;Ljava/lang/Throwable;)VmessageLjava/lang/String;Ljava/lang/Exception; java/lang/Thread W(J)V  currentThread()Ljava/lang/Thread;  interrupt&org/openqa/selenium/WebDriverException (Ljava/lang/Throwable;)Vjava/lang/InterruptedException Ljava/lang/InterruptedException; SourceFileWebDriverWait.javaXLjava/lang/Object;Lorg/openqa/selenium/support/ui/Wait;!    S*Y+  01   ! "\*Y+  :;*  ! #  *$*+%*,'*)!/3*5DF GHIJ4    !  789:c *%*3;A:A+*'@:FHLPT ::*U*% X*\Y)*3^aeSkquYwy?H|@GH|VPQSU W2X=Y@[E\H^JaNcRS_fhgyf|g~fiji> ~} z (J~ (stH Y+,r    Wg*5LY+ w x yz| 9PK $^D> iSS5org/openqa/selenium/support/ui/TimeoutException.class1/org/openqa/selenium/support/ui/TimeoutException&org/openqa/selenium/WebDriverException(Ljava/lang/String;)VCode  LineNumberTableLocalVariableTablethis1Lorg/openqa/selenium/support/ui/TimeoutException;messageLjava/lang/String;*(Ljava/lang/String;Ljava/lang/Throwable;)V  causeLjava/lang/Throwable; SourceFileTimeoutException.java!>*+  !  I*+, '(  PK $^D>K0org/openqa/selenium/support/ui/SystemClock.class1 *org/openqa/selenium/support/ui/SystemClockjava/lang/Object$org/openqa/selenium/support/ui/Clock()VCode  LineNumberTableLocalVariableTablethis,Lorg/openqa/selenium/support/ui/SystemClock;laterBy(J)J java/lang/System currentTimeMillis()JdurationInMillisJ isNowBefore(J)Z endInMillisnow SourceFileSystemClock.java! /*    :a   @      .  PK $^D>FNN)org/openqa/selenium/support/ui/Wait.class1 #org/openqa/selenium/support/ui/Waitjava/lang/Objectuntil5(Lcom/google/common/base/Function;)Ljava/lang/Object; SignatureD(Lcom/google/common/base/Function;)TT; SourceFile Wait.java(Ljava/lang/Object;   PK $^D> N==6org/openqa/selenium/support/ui/ExpectedCondition.class1 0org/openqa/selenium/support/ui/ExpectedConditionjava/lang/Objectcom/google/common/base/Function SourceFileExpectedCondition.java SignaturemLjava/lang/Object;Lcom/google/common/base/Function;  PK lC>u%n/org/openqa/selenium/support/ui/.svn/all-wcpropsK 25 svn:wc:ra_dav:version-url V 72 /svn/!svn/ver/11226/trunk/java/client/src/org/openqa/selenium/support/ui END Select.java K 25 svn:wc:ra_dav:version-url V 84 /svn/!svn/ver/11224/trunk/java/client/src/org/openqa/selenium/support/ui/Select.java END UnexpectedTagNameException.java K 25 svn:wc:ra_dav:version-url V 104 /svn/!svn/ver/11224/trunk/java/client/src/org/openqa/selenium/support/ui/UnexpectedTagNameException.java END SystemClock.java K 25 svn:wc:ra_dav:version-url V 89 /svn/!svn/ver/11224/trunk/java/client/src/org/openqa/selenium/support/ui/SystemClock.java END Wait.java K 25 svn:wc:ra_dav:version-url V 82 /svn/!svn/ver/11224/trunk/java/client/src/org/openqa/selenium/support/ui/Wait.java END TimeoutException.java K 25 svn:wc:ra_dav:version-url V 94 /svn/!svn/ver/11224/trunk/java/client/src/org/openqa/selenium/support/ui/TimeoutException.java END LoadableComponent.java K 25 svn:wc:ra_dav:version-url V 95 /svn/!svn/ver/11224/trunk/java/client/src/org/openqa/selenium/support/ui/LoadableComponent.java END ExpectedCondition.java K 25 svn:wc:ra_dav:version-url V 95 /svn/!svn/ver/11224/trunk/java/client/src/org/openqa/selenium/support/ui/ExpectedCondition.java END SlowLoadableComponent.java K 25 svn:wc:ra_dav:version-url V 99 /svn/!svn/ver/11224/trunk/java/client/src/org/openqa/selenium/support/ui/SlowLoadableComponent.java END Clock.java K 25 svn:wc:ra_dav:version-url V 83 /svn/!svn/ver/11224/trunk/java/client/src/org/openqa/selenium/support/ui/Clock.java END build.desc K 25 svn:wc:ra_dav:version-url V 83 /svn/!svn/ver/11226/trunk/java/client/src/org/openqa/selenium/support/ui/build.desc END WebDriverWait.java K 25 svn:wc:ra_dav:version-url V 91 /svn/!svn/ver/11224/trunk/java/client/src/org/openqa/selenium/support/ui/WebDriverWait.java END PK lC>B+org/openqa/selenium/support/ui/.svn/entries8 dir 11264 http://selenium.googlecode.com/svn/trunk/java/client/src/org/openqa/selenium/support/ui http://selenium.googlecode.com/svn 2011-02-01T13:59:17.176547Z 11226 simon.m.stewart svn:special svn:externals svn:needs-lock 07704840-8298-11de-bf8c-fd130f914ac9 Select.java file 2011-02-03T12:01:18.000000Z 47e008cc67c8a23cf8f1f7833b58d76e 2010-04-04T15:47:07.259771Z 8621 dawagner UnexpectedTagNameException.java file 2011-02-03T12:01:18.000000Z 579bb6aaf5c2d743c2386ea5c8333655 2009-01-19T14:57:08.262648Z 6126 simon.m.stewart SystemClock.java file 2011-02-03T12:01:18.000000Z 793857ca8a260bd6963520d0e80f49ce 2009-03-24T17:03:13.689495Z 6445 rchatley@gmail.com Wait.java file 2011-02-03T12:01:18.000000Z 872eac857daebfee59ddc8064ebd5c98 2009-11-04T16:43:13.184004Z 7530 simon.m.stewart TimeoutException.java file 2011-02-03T12:01:18.000000Z 5214d9d8e34377f8db6ca7cc2cc13c08 2009-11-04T16:43:13.184004Z 7530 simon.m.stewart LoadableComponent.java file 2011-02-03T12:01:18.000000Z d48ec0329975d68a35673225553a8eb9 2009-01-19T17:00:28.741416Z 6129 simon.m.stewart ExpectedCondition.java file 2011-02-03T12:01:18.000000Z 7eae132947dcaa955d6fcb3acc6df5ab 2009-11-04T16:43:13.184004Z 7530 simon.m.stewart SlowLoadableComponent.java file 2011-02-03T12:01:18.000000Z f3bfa1c6ee094348b89231baae10d507 2009-01-19T17:00:28.741416Z 6129 simon.m.stewart Clock.java file 2011-02-03T12:01:18.000000Z e89afd29aa0b957c02ce502bf4a8d116 2009-03-24T17:03:13.689495Z 6445 rchatley@gmail.com build.desc file 2011-02-03T12:01:18.000000Z 4f144868c9feaec9edd43ace984f7de1 2011-02-01T13:59:17.176547Z 11226 simon.m.stewart WebDriverWait.java file 2011-02-03T12:01:18.000000Z ad5194c5e6530848241eb1e0349d89d8 2011-01-20T16:08:57.181282Z 11029 simon.m.stewart PK lC>G*org/openqa/selenium/support/ui/.svn/format8 PK lC>'::Aorg/openqa/selenium/support/ui/.svn/text-base/Clock.java.svn-base/* Copyright 2007-2009 WebDriver committers Copyright 2007-2009 Google Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package org.openqa.selenium.support.ui; /** * A simple encapsulation to allowing timing */ public interface Clock { long now(); long laterBy(long durationInMillis); boolean isNowBefore(long endInMillis); } PK lC>x"Morg/openqa/selenium/support/ui/.svn/text-base/ExpectedCondition.java.svn-base/* Copyright 2007-2009 WebDriver committers Copyright 2007-2009 Google Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package org.openqa.selenium.support.ui; import org.openqa.selenium.WebDriver; import com.google.common.base.Function; /** * Models a condition that might reasonably be expected to eventually evaluate * to something that is neither null nor false. Examples would include * determining if a web page has loaded or that an element is visible. *

* Note that it is expected that ExpectedConditions are idempotent. They will * be called in a loop by the {@link WebDriverWait} and any modification of the * state of the application under test may have unexpected side-effects. * * @param The return type */ public interface ExpectedCondition extends Function { } PK lC>0IA;I I Morg/openqa/selenium/support/ui/.svn/text-base/LoadableComponent.java.svn-base/* Copyright 2007-2009 WebDriver committers Copyright 2007-2009 Google Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package org.openqa.selenium.support.ui; /** * Represents any abstraction of something that can be loaded. This may be an * entire web page, or simply a component within that page (such as a * login box or menu) or even a service. The expected usage is: * *

 * new HypotheticalComponent().get();
 * 
* *

* After the {@link LoadableComponent#get()} method is called, the component * will be loaded and ready for use. This is verified using Assert.assertTrue so * expect to catch an Error rather than an Exception when errors occur. * * * @param The type to be returned (normally the subclass' type) */ public abstract class LoadableComponent> { /** * Ensure that the component is currently loaded. * * @return The component. * @throws Error when the component cannot be loaded. */ @SuppressWarnings("unchecked") public T get() { try { isLoaded(); return (T) this; } catch (Error e) { load(); } isLoaded(); return (T) this; } /** * When this method returns, the component modeled by the subclass should be * fully loaded. This subclass is expected to navigate to an appropriate page * should this be necessary. */ protected abstract void load(); /** * Determine whether or not the component is loaded. When the component is * loaded, this method will return, but when it is not loaded, an Error should * be thrown. This also allows for complex checking and error reporting when * loading a page, which in turn supports better error reporting when a page * fails to load. * *

This behaviour makes it readily visible when a page has not been loaded * successfully, and because an error and not an exception is thrown tests * should fail as expected. By using Error, we also allow the use of junit's * "Assert.assert*" methods * * @throws Error when the page is not loaded. */ protected abstract void isLoaded() throws Error; } PK lC>aם""Borg/openqa/selenium/support/ui/.svn/text-base/Select.java.svn-base/* Copyright 2007-2009 WebDriver committers Copyright 2007-2009 Google Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package org.openqa.selenium.support.ui; import org.openqa.selenium.By; import org.openqa.selenium.NoSuchElementException; import org.openqa.selenium.WebElement; import java.util.*; /** * Models a SELECT tag, providing helper methods to select and deselect options. */ public class Select { private final WebElement element; private boolean isMulti; /** * Constructor. A check is made that the given element is, indeed, a SELECT tag. If it is not, * then an UnexpectedTagNameException is thrown. * * @param element SELECT element to wrap * @throws UnexpectedTagNameException when element is not a SELECT */ public Select(WebElement element) { String tagName = element.getTagName(); if (null == tagName || !"select".equals(tagName.toLowerCase())) { throw new UnexpectedTagNameException("select", tagName); } this.element = element; String value = element.getAttribute("multiple"); isMulti = value != null && "multiple".equals(value.toLowerCase()); } /** * @return Whether this select element support selecting multiple options at the same time? This * is done by checking the value of the "multiple" attribute. */ public boolean isMultiple() { return isMulti; } /** * @return All options belonging to this select tag */ public List getOptions() { return element.findElements(By.tagName("option")); } /** * @return All selected options belonging to this select tag */ public List getAllSelectedOptions() { List toReturn = new ArrayList(); for (WebElement option : getOptions()) { if (option.isSelected()) { toReturn.add(option); } } return toReturn; } /** * @return The first selected option in this select tag (or the currently selected option in a * normal select) */ public WebElement getFirstSelectedOption() { for (WebElement option : getOptions()) { if (option.isSelected()) { return option; } } throw new NoSuchElementException("No options are selected"); } /** * Select all options that display text matching the argument. That is, when given "Bar" this * would select an option like: * * <option value="foo">Bar</option> * * @param text The visible text to match against */ public void selectByVisibleText(String text) { // try to find the option via XPATH ... List options = element.findElements(By.xpath(".//option[. = " + escapeQuotes(text) + "]")); for (WebElement option : options) { option.setSelected(); if (!isMultiple()) { return; } } if (options.size() == 0 && text.contains(" ")) { String subStringWithoutSpace = getLongestSubstringWithoutSpace(text); List candidates; if ("".equals(subStringWithoutSpace)) { // hmm, text is either empty or contains only spaces - get all options ... candidates = element.findElements(By.tagName("option")); } else { // get candidates via XPATH ... candidates = element.findElements(By.xpath(".//option[contains(., " + escapeQuotes(subStringWithoutSpace) + ")]")); } for (WebElement option : candidates) { if (text.equals(option.getText())) { option.setSelected(); if (!isMultiple()) { return; } } } } } private String getLongestSubstringWithoutSpace(String s) { String result = ""; StringTokenizer st = new StringTokenizer(s, " "); while (st.hasMoreTokens()) { String t = st.nextToken(); if (t.length() > result.length()) { result = t; } } return result; } /** * Select the option at the given index. This is done by examing the "index" attribute of an * element, and not merely by counting. * * @param index The option at this index will be selected */ public void selectByIndex(int index) { String match = String.valueOf(index); for (WebElement option : getOptions()) { if (match.equals(option.getAttribute("index"))) { option.setSelected(); if (!isMultiple()) { return; } } } } /** * Select all options that have a value matching the argument. That is, when given "foo" this * would select an option like: * * <option value="foo">Bar</option> * * @param value The value to match against */ public void selectByValue(String value) { StringBuilder builder = new StringBuilder(".//option[@value = "); builder.append(escapeQuotes(value)); builder.append("]"); List options = element.findElements(By.xpath(builder.toString())); for (WebElement option : options) { option.setSelected(); if (!isMultiple()) { return; } } } /** * Clear all selected entries. This is only valid when the SELECT supports multiple selections. * * @throws UnsupportedOperationException If the SELECT does not support multiple selections */ public void deselectAll() { if (!isMultiple()) { throw new UnsupportedOperationException( "You may only deselect all options of a multi-select"); } for (WebElement option : getOptions()) { if (option.isSelected()) { option.toggle(); } } } /** * Deselect all options that have a value matching the argument. That is, when given "foo" this * would deselect an option like: * * <option value="foo">Bar</option> * * @param value The value to match against */ public void deselectByValue(String value) { StringBuilder builder = new StringBuilder(".//option[@value = "); builder.append(escapeQuotes(value)); builder.append("]"); List options = element.findElements(By.xpath(builder.toString())); for (WebElement option : options) { if (option.isSelected()) { option.toggle(); } } } /** * Deselect the option at the given index. This is done by examing the "index" attribute of an * element, and not merely by counting. * * @param index The option at this index will be deselected */ public void deselectByIndex(int index) { String match = String.valueOf(index); for (WebElement option : getOptions()) { if (match.equals(option.getAttribute("index")) && option.isSelected()) { option.toggle(); } } } /** * Deselect all options that display text matching the argument. That is, when given "Bar" this * would deselect an option like: * * <option value="foo">Bar</option> * * @param text The visible text to match against */ public void deselectByVisibleText(String text) { StringBuilder builder = new StringBuilder(".//option[. = "); builder.append(escapeQuotes(text)); builder.append("]"); List options = element.findElements(By.xpath(builder.toString())); for (WebElement option : options) { if (option.isSelected()) { option.toggle(); } } } protected String escapeQuotes(String toEscape) { // Convert strings with both quotes and ticks into: foo'"bar -> concat("foo'", '"', "bar") if (toEscape.indexOf("\"") > -1 && toEscape.indexOf("'") > -1) { boolean quoteIsLast = false; if (toEscape.indexOf("\"") == toEscape.length() -1) { quoteIsLast = true; } String[] substrings = toEscape.split("\""); StringBuilder quoted = new StringBuilder("concat("); for (int i = 0; i < substrings.length; i++) { quoted.append("\"").append(substrings[i]).append("\""); quoted.append(((i == substrings.length -1) ? (quoteIsLast ? ", '\"')" : ")") : ", '\"', ")); } return quoted.toString(); } // Escape string with just a quote into being single quoted: f"oo -> 'f"oo' if (toEscape.indexOf("\"") > -1) { return String.format("'%s'", toEscape); } // Otherwise return the quoted string return String.format("\"%s\"", toEscape); } } PK lC>ˀX Qorg/openqa/selenium/support/ui/.svn/text-base/SlowLoadableComponent.java.svn-base/* Copyright 2007-2009 WebDriver committers Copyright 2007-2009 Google Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package org.openqa.selenium.support.ui; import junit.framework.Assert; import static java.util.concurrent.TimeUnit.SECONDS; /** * A {@link LoadableComponent} which might not have finished loading when * load() returns. After a call to load(), the isLoaded() method should * continue to fail until the component has fully loaded. * *

 * new SlowHypotheticalComponent().get();
 * 
* * @param The type to be returned (normally the subclass' type) */ public abstract class SlowLoadableComponent> extends LoadableComponent { private final Clock clock; private final long timeOutInSeconds; public SlowLoadableComponent(Clock clock, int timeOutInSeconds) { this.clock = clock; this.timeOutInSeconds = timeOutInSeconds; } @Override @SuppressWarnings("unchecked") public T get() { try { isLoaded(); return (T) this; } catch (Error e) { load(); } long end = clock.laterBy(SECONDS.toMillis(timeOutInSeconds)); while (clock.isNowBefore(end)) { try { isLoaded(); return (T) this; } catch (Error e) { // Not a problem, we could still be loading } isError(); waitFor(sleepFor()); } isLoaded(); return (T) this; } /** * Check for well known error cases, which would mean that loading has * finished, but an error condition was seen. If an error has occured * throw an Error, possibly by using JUnit's Assert.assert* methods * * @throws Error When a well-known error condition has caused the load to fail */ protected void isError() throws Error { // no-op by default } protected long sleepFor() { return 200; } private void waitFor(long timeoutInMillis) { try { Thread.sleep(sleepFor()); } catch (InterruptedException e) { Assert.fail(e.getMessage()); } } } PK lC>G Gorg/openqa/selenium/support/ui/.svn/text-base/SystemClock.java.svn-base/* Copyright 2007-2009 WebDriver committers Copyright 2007-2009 Google Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package org.openqa.selenium.support.ui; public class SystemClock implements Clock { public long laterBy(long durationInMillis) { return System.currentTimeMillis() + durationInMillis; } public boolean isNowBefore(long endInMillis) { return System.currentTimeMillis() < endInMillis; } public long now() { return System.currentTimeMillis(); } } PK lC>DZLorg/openqa/selenium/support/ui/.svn/text-base/TimeoutException.java.svn-base/* Copyright 2007-2009 WebDriver committers Copyright 2007-2009 Google Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package org.openqa.selenium.support.ui; import org.openqa.selenium.WebDriverException; /** * A simple exception that is thrown if an {@link ExpectedCondition} is not met * met by a {@link Wait}. See the documentation in {@link WebDriverWait} for * more information. */ public class TimeoutException extends WebDriverException { /** * Time out a test, indicating why the timeout occurred. */ public TimeoutException(String message) { super(message); } /** * Time out a test, indicating why the timeout occurred and giving a cause. */ public TimeoutException(String message, Throwable cause) { super(message, cause); } } PK lC>yVorg/openqa/selenium/support/ui/.svn/text-base/UnexpectedTagNameException.java.svn-base/* Copyright 2007-2009 WebDriver committers Copyright 2007-2009 Google Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package org.openqa.selenium.support.ui; import org.openqa.selenium.WebDriverException; public class UnexpectedTagNameException extends WebDriverException { public UnexpectedTagNameException(String expectedTagName, String actualTagName) { super(String.format( "Element should have been \"%s\" but was \"%s\"", expectedTagName, actualTagName)); } } PK lC>KLYY@org/openqa/selenium/support/ui/.svn/text-base/Wait.java.svn-base/* Copyright 2007-2009 WebDriver committers Copyright 2007-2009 Google Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package org.openqa.selenium.support.ui; import com.google.common.base.Function; /** * A generic interface for waiting until a condition is true or not null. The * condition may take a single argument of type . * * @param the argument to pass to any function called */ public interface Wait { /** * Implementations should wait until the condition evaluates to a value that * is neither null nor false. Because of this contract, the return type must * not be Void. * *

If the condition does not become true within a certain time (as defined * by the implementing class), this method will throw a non-specified * {@link Throwable}. This is so that an implementor may throw whatever is * idiomatic for a given test infrastructure (e.g. JUnit4 would throw {@link * AssertionError}. * * @param the return type of the method, which must not be Void * @param isTrue the parameter to pass to the {@link ExpectedCondition} */ T until(Function isTrue); } PK lC>=>Iorg/openqa/selenium/support/ui/.svn/text-base/WebDriverWait.java.svn-base/* Copyright 2007-2009 WebDriver committers Copyright 2007-2009 Google Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package org.openqa.selenium.support.ui; import com.google.common.base.Function; import org.openqa.selenium.NotFoundException; import org.openqa.selenium.WebDriver; import org.openqa.selenium.WebDriverException; import static java.util.concurrent.TimeUnit.MILLISECONDS; import static java.util.concurrent.TimeUnit.SECONDS; /** * An implementation of the Wait interface that makes use of WebDriver. The * expected usage is in conjunction with the {@link ExpectedCondition} interface. *

* Because waiting for elements to appear on a page is such a common use-case, * this class will silently swallow NotFoundException whilst waiting. */ public class WebDriverWait implements Wait { private final Clock clock; private final WebDriver driver; private final long timeOutInMillis; private final long sleepTimeOut; public final static long DEFAULT_SLEEP_TIMEOUT = 500; /** * @param driver The WebDriver instance to pass to the expected conditions * @param timeOutInSeconds The timeout in seconds when an expectation is * called */ public WebDriverWait(WebDriver driver, long timeOutInSeconds) { this(new SystemClock(), driver, timeOutInSeconds, DEFAULT_SLEEP_TIMEOUT); } /** * @param driver The WebDriver instance to pass to the expected conditions * @param timeOutInSeconds The timeout in seconds when an expectation is * called * @param sleepInMillis The duration in milliseconds to sleep between polls. */ public WebDriverWait(WebDriver driver, long timeOutInSeconds, long sleepInMillis) { this(new SystemClock(), driver, timeOutInSeconds, sleepInMillis); } /** * @param clock The clock to use when measuring the timeout * @param driver The WebDriver instance to pass to the expected conditions * @param timeOutInSeconds The timeout in seconds when an expectation is * @param sleepTimeOut The timeout used whilst sleeping. Defaults to 500ms * called */ protected WebDriverWait(Clock clock, WebDriver driver, long timeOutInSeconds, long sleepTimeOut) { this.clock = clock; this.driver = driver; this.timeOutInMillis = SECONDS.toMillis(timeOutInSeconds); this.sleepTimeOut = sleepTimeOut; } /** * {@inheritDoc} */ public T until(Function isTrue) { long end = clock.laterBy(timeOutInMillis); NotFoundException lastException = null; while (clock.isNowBefore(end)) { try { T value = isTrue.apply(driver); if (value != null && Boolean.class.equals(value.getClass())) { if (Boolean.TRUE.equals(value)) { return value; } } else if (value != null) { return value; } } catch (NotFoundException e) { // Common case in many conditions, so swallow here, but be ready to // rethrow if it the element never appears. lastException = e; } sleep(); } throwTimeoutException(String.format("Timed out after %d seconds", SECONDS.convert(timeOutInMillis, MILLISECONDS)), lastException); throw new IllegalStateException( "'throwTimeoutException' should have thrown an exception!"); } /** * Override this method to throw an exception that is idiomatic for a given * test infrastructure. E.g. JUnit4 should throw an {@link AssertionError} */ protected void throwTimeoutException(String message, Exception lastException) { throw new TimeoutException(message, lastException); } private void sleep() { try { Thread.sleep(sleepTimeOut); } catch (InterruptedException e) { Thread.currentThread().interrupt(); throw new WebDriverException(e); } } } PK lC> m#  Aorg/openqa/selenium/support/ui/.svn/text-base/build.desc.svn-base java_library(name = "ui", deps = [ ":clock", ":components", ":elements", ":wait" ]) java_library(name = "base", srcs = [ "TimeoutException.java", ], deps = [ "//java/client/src/org/openqa/selenium:webdriver-api", ]) java_library(name = "clock", srcs = [ "Clock.java", "SystemClock.java", ]) java_library(name = "components", srcs = [ "LoadableComponent.java", "SlowLoadableComponent.java", ], deps = [ ":base", ":clock", "//java/client/src/org/openqa/selenium:webdriver-api", "//third_party/java/junit", ]) java_library(name = "elements", srcs = [ "Select.java", "UnexpectedTagNameException.java", ], deps = [ "//java/client/src/org/openqa/selenium:webdriver-api", ]) java_library(name = "wait", srcs = [ "ExpectedCondition.java", "Wait.java", "WebDriverWait.java", ], deps = [ ":base", ":clock", "//java/client/src/org/openqa/selenium:webdriver-api", "//third_party/java/guava-libraries", ]) PK )hC> m#  )org/openqa/selenium/support/ui/build.desc java_library(name = "ui", deps = [ ":clock", ":components", ":elements", ":wait" ]) java_library(name = "base", srcs = [ "TimeoutException.java", ], deps = [ "//java/client/src/org/openqa/selenium:webdriver-api", ]) java_library(name = "clock", srcs = [ "Clock.java", "SystemClock.java", ]) java_library(name = "components", srcs = [ "LoadableComponent.java", "SlowLoadableComponent.java", ], deps = [ ":base", ":clock", "//java/client/src/org/openqa/selenium:webdriver-api", "//third_party/java/junit", ]) java_library(name = "elements", srcs = [ "Select.java", "UnexpectedTagNameException.java", ], deps = [ "//java/client/src/org/openqa/selenium:webdriver-api", ]) java_library(name = "wait", srcs = [ "ExpectedCondition.java", "Wait.java", "WebDriverWait.java", ], deps = [ ":base", ":clock", "//java/client/src/org/openqa/selenium:webdriver-api", "//third_party/java/guava-libraries", ]) PK &^D>fj[*org/openqa/selenium/TimeoutException.class1$org/openqa/selenium/TimeoutException&org/openqa/selenium/WebDriverException()VCode  LineNumberTableLocalVariableTablethis&Lorg/openqa/selenium/TimeoutException;(Ljava/lang/String;)V  messageLjava/lang/String;(Ljava/lang/Throwable;)V  causeLjava/lang/Throwable;*(Ljava/lang/String;Ljava/lang/Throwable;)V   SourceFileTimeoutException.java!3*   >*+    >*+   I*+,   PK &^D>`s4org/openqa/selenium/UnableToSetCookieException.class1.org/openqa/selenium/UnableToSetCookieException&org/openqa/selenium/WebDriverException()VCode  LineNumberTableLocalVariableTablethis0Lorg/openqa/selenium/UnableToSetCookieException;(Ljava/lang/String;)V  messageLjava/lang/String;(Ljava/lang/Throwable;)V  causeLjava/lang/Throwable;*(Ljava/lang/String;Ljava/lang/Throwable;)V   SourceFileUnableToSetCookieException.java!3*   >*+   >*+ "#  I*+, &'  PK &^D>I1,org/openqa/selenium/JavascriptExecutor.class1 &org/openqa/selenium/JavascriptExecutorjava/lang/Object executeScript9(Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/Object;executeAsyncScriptisJavascriptEnabled()Z SourceFileJavascriptExecutor.java   PK &^D>org/openqa/selenium/Alert.class1org/openqa/selenium/Alertjava/lang/Objectdismiss()VacceptgetText()Ljava/lang/String;sendKeys(Ljava/lang/String;)V SourceFile Alert.java    PK &^D>LD&org/openqa/selenium/OutputType$1.class1 org/openqa/selenium/OutputType$1java/lang/Objectorg/openqa/selenium/OutputType()VCode  LineNumberTableLocalVariableTablethis"Lorg/openqa/selenium/OutputType$1;convertFromBase64Png&(Ljava/lang/String;)Ljava/lang/String; base64PngLjava/lang/String;&(Ljava/lang/String;)Ljava/lang/Object;   SourceFileOutputType.java SignatureFLjava/lang/Object;Lorg/openqa/selenium/OutputType;EnclosingMethod InnerClasses  3*  &  6+ ( A &*+   PK &^D>k++&org/openqa/selenium/OutputType$2.class1# org/openqa/selenium/OutputType$2java/lang/Objectorg/openqa/selenium/OutputType()VCode  LineNumberTableLocalVariableTablethis"Lorg/openqa/selenium/OutputType$2;convertFromBase64Png(Ljava/lang/String;)[B*org/openqa/selenium/internal/Base64Encoder   decode base64PngLjava/lang/String;&(Ljava/lang/String;)Ljava/lang/Object;   SourceFileOutputType.java Signature6Ljava/lang/Object;Lorg/openqa/selenium/OutputType<[B>;EnclosingMethod InnerClasses  3*  /  @ Y+ 1   A &*+   !" PK &^D>< &org/openqa/selenium/OutputType$3.class1L org/openqa/selenium/OutputType$3java/lang/Objectorg/openqa/selenium/OutputType()VCode  LineNumberTableLocalVariableTablethis"Lorg/openqa/selenium/OutputType$3;convertFromBase64Png"(Ljava/lang/String;)Ljava/io/File;  BYTES Lorg/openqa/selenium/OutputType;  &(Ljava/lang/String;)Ljava/lang/Object;[B screenshot.png "! java/io/File #$createTempFile4(Ljava/lang/String;Ljava/lang/String;)Ljava/io/File; & ' deleteOnExit)java/io/FileOutputStream (+ ,(Ljava/io/File;)V (. /0write([B)V (2 3close5&org/openqa/selenium/WebDriverException 47 8(Ljava/lang/Throwable;)V:java/io/IOException base64PngLjava/lang/String;fosLjava/io/FileOutputStream;datatmpFileLjava/io/File;eLjava/io/IOException; E  SourceFileOutputType.java SignatureBLjava/lang/Object;Lorg/openqa/selenium/OutputType;EnclosingMethod InnerClasses  3*  9  ,`M+N:%(Y*M,--,1:, ,1:N4Y-6:, ,1:8<?94D94NDNNTX[9 N;=>?@'A,B0C4G8I?JACDDEENFPGTI[J]N >``;<^=>)? @AE BCA &*+D  FGHIJK PK &^D>,Ȓ$org/openqa/selenium/OutputType.class1*org/openqa/selenium/OutputTypejava/lang/ObjectBASE64 Lorg/openqa/selenium/OutputType; Signature4Lorg/openqa/selenium/OutputType;BYTES$Lorg/openqa/selenium/OutputType<[B>;FILE0Lorg/openqa/selenium/OutputType;()VCode org/openqa/selenium/OutputType$1     org/openqa/selenium/OutputType$2    org/openqa/selenium/OutputType$3   LineNumberTableLocalVariableTableconvertFromBase64Png&(Ljava/lang/String;)Ljava/lang/Object;(Ljava/lang/String;)TT; SourceFileOutputType.java(Ljava/lang/Object; InnerClasses     KYYY!& /9""#$%&'()PK &^D>EM{}})org/openqa/selenium/Proxy$ProxyType.class1F#org/openqa/selenium/Proxy$ProxyTypejava/lang/EnumDIRECT%Lorg/openqa/selenium/Proxy$ProxyType;MANUALPAC RESERVED_1 AUTODETECTSYSTEM UNSPECIFIED ENUM$VALUES&[Lorg/openqa/selenium/Proxy$ProxyType;()VCode  (Ljava/lang/String;I)V       !  $  '  *  , LineNumberTableLocalVariableTable thisvalues(()[Lorg/openqa/selenium/Proxy$ProxyType; 465java/lang/System 78 arraycopy*(Ljava/lang/Object;ILjava/lang/Object;II)VvalueOf9(Ljava/lang/String;)Lorg/openqa/selenium/Proxy$ProxyType; < 9=5(Ljava/lang/Class;Ljava/lang/String;)Ljava/lang/Enum; SourceFile Proxy.java Signature7Ljava/lang/Enum; InnerClassesDorg/openqa/selenium/Proxy ProxyType@1@@@@ @ @ @  YYYY Y"#Y%&Y()YSYSYSY SY#SY&SY)S+-" '4AN\.1*+/-. 0 126+YK*Y<YM3,-. 9:* *;-.>?@AB CE@PK &^D>ͯX org/openqa/selenium/Proxy.class1org/openqa/selenium/Proxyjava/lang/Object proxyType%Lorg/openqa/selenium/Proxy$ProxyType; autodetectZftpProxyLjava/lang/String; httpProxynoProxyproxyAutoconfigUrlsslProxy()VCode   #org/openqa/selenium/Proxy$ProxyType  UNSPECIFIED    LineNumberTableLocalVariableTablethisLorg/openqa/selenium/Proxy;(Ljava/util/Map;)V Signature'(Ljava/util/Map;)V &(' java/util/Map )* containsKey(Ljava/lang/Object;)Z &, -.get&(Ljava/lang/Object;)Ljava/lang/Object;0java/lang/String 2 34valueOf9(Ljava/lang/String;)Lorg/openqa/selenium/Proxy$ProxyType; 6 78 setProxyTypeB(Lorg/openqa/selenium/Proxy$ProxyType;)Lorg/openqa/selenium/Proxy; ; <= setFtpProxy/(Ljava/lang/String;)Lorg/openqa/selenium/Proxy; @ A= setHttpProxy D E= setNoProxy H I=setProxyAutoconfigUrl L M= setSslProxyPjava/lang/Boolean OR ST booleanValue()Z V WX setAutodetect(Z)Lorg/openqa/selenium/Proxy;rawLjava/util/Map;LocalVariableTypeTable$Ljava/util/Map; getProxyType'()Lorg/openqa/selenium/Proxy$ProxyType; ` a AUTODETECT c deverifyProxyTypeCompatilibily((Lorg/openqa/selenium/Proxy$ProxyType;)V isAutodetect getFtpProxy()Ljava/lang/String; j l mMANUAL getHttpProxy p  getNoProxy s getProxyAutoconfigUrl v x yPAC getSslProxy |  ~java/lang/IllegalStateException5Proxy autodetect is incompatible with manual settings } (Ljava/lang/String;)VcompatibleProxy SourceFile Proxy.java InnerClasses ProxyType!     G***' )  !"#^***+$%*+$+/15W+9%*+9+/:W+>%*+>+/?W+B%*+B+/CW+F%*+F+/GW+J%*+J+/KW+N%*+N+OQUWJ+ ,-./90I2T3d5o689;<>?A YZ[ Y\]^/*D  78J*_b*+*MN O fT/*S  WXg***_b*_**WX Z[\] gh/*ia  <=U*kb*k*+i*efgh  nh/*ol  A=U*kb*k*+o*pqrs  qh/*rw  E=U*kb*k*+r*{|}~  th/*u  I=U*wb*w*+u*  zh/*{  M=U*kb*k*+{*  deY**+ }Y  @PK &^D>EOtt,org/openqa/selenium/RenderedWebElement.class1&org/openqa/selenium/RenderedWebElementjava/lang/Objectorg/openqa/selenium/WebElement isDisplayed()Z getLocation()Lorg/openqa/selenium/Point;getSize!()Lorg/openqa/selenium/Dimension;hover()V DeprecatedRuntimeVisibleAnnotationsLjava/lang/Deprecated; dragAndDropBy(II)V dragAndDropOn+(Lorg/openqa/selenium/RenderedWebElement;)VgetValueOfCssProperty&(Ljava/lang/String;)Ljava/lang/String; SourceFileRenderedWebElement.java   PK &^D>,org/openqa/selenium/Speed.class1=org/openqa/selenium/Speedjava/lang/EnumSLOWLorg/openqa/selenium/Speed;MEDIUMFASTtimeOutI ENUM$VALUES[Lorg/openqa/selenium/Speed;()VCode  (Ljava/lang/String;II)V        LineNumberTableLocalVariableTable " #(Ljava/lang/String;I)V % this getTimeOut()Ivalues()[Lorg/openqa/selenium/Speed; ,.-java/lang/System /0 arraycopy*(Ljava/lang/Object;ILjava/lang/Object;II)VvalueOf/(Ljava/lang/String;)Lorg/openqa/selenium/Speed; 4 155(Ljava/lang/Class;Ljava/lang/String;)Ljava/lang/Enum; SourceFile Speed.java Deprecated Signature-Ljava/lang/Enum;RuntimeVisibleAnnotationsLjava/lang/Deprecated;@1@@@   tHYYYYSYSYS . H *+!*$ ! "  & '(/*$% & )*6YK*Y<YM+,  12* *3 6789:;<PK &^D>?mEE1org/openqa/selenium/WebDriverBackedSelenium.class14+org/openqa/selenium/WebDriverBackedSelenium)com/thoughtworks/selenium/DefaultSelenium(org/openqa/selenium/internal/WrapsDriver6(Lcom/google/common/base/Supplier;Ljava/lang/String;)V SignatureW(Lcom/google/common/base/Supplier;Ljava/lang/String;)VCode -org/openqa/selenium/WebDriverCommandProcessor  6(Ljava/lang/String;Lcom/google/common/base/Supplier;)V  /(Lcom/thoughtworks/selenium/CommandProcessor;)VLineNumberTableLocalVariableTablethis-Lorg/openqa/selenium/WebDriverBackedSelenium;maker!Lcom/google/common/base/Supplier;baseUrlLjava/lang/String;LocalVariableTypeTableBLcom/google/common/base/Supplier;4(Lorg/openqa/selenium/WebDriver;Ljava/lang/String;)V !4(Ljava/lang/String;Lorg/openqa/selenium/WebDriver;)V baseDriverLorg/openqa/selenium/WebDriver;getUnderlyingWebDriver!()Lorg/openqa/selenium/WebDriver; DeprecatedRuntimeVisibleAnnotationsLjava/lang/Deprecated; * +%getWrappedDriver - ./commandProcessor,Lcom/thoughtworks/selenium/CommandProcessor; 1 $% SourceFileWebDriverBackedSelenium.java!  b* Y,+     P* Y,+   "#$%&'( /*)& +% 5 *, 0*  23PK &^D>_A"jjorg/openqa/selenium/Mouse.class1org/openqa/selenium/Mousejava/lang/Objectclick:(Lorg/openqa/selenium/interactions/internal/Coordinates;)V doubleClick mouseDownmouseUp mouseMove<(Lorg/openqa/selenium/interactions/internal/Coordinates;JJ)V contextClick SourceFile Mouse.java     PK %^D>$org/openqa/selenium/WebElement.class1 org/openqa/selenium/WebElementjava/lang/Object!org/openqa/selenium/SearchContextclick()VsubmitgetValue()Ljava/lang/String;sendKeys([Ljava/lang/CharSequence;)Vclear getTagName getAttribute&(Ljava/lang/String;)Ljava/lang/String;toggle()Z isSelected setSelected isEnabledgetText findElements*(Lorg/openqa/selenium/By;)Ljava/util/List; SignatureL(Lorg/openqa/selenium/By;)Ljava/util/List; findElement:(Lorg/openqa/selenium/By;)Lorg/openqa/selenium/WebElement; SourceFileWebElement.java     PK &^D>TA+org/openqa/selenium/SuppliesWebDriver.class1T%org/openqa/selenium/SuppliesWebDriverjava/lang/Objectcom/google/common/base/Supplier capabilities"Lorg/openqa/selenium/Capabilities;%(Lorg/openqa/selenium/Capabilities;)VCode  ()V  LineNumberTableLocalVariableTablethis'Lorg/openqa/selenium/SuppliesWebDriver;capsget!()Lorg/openqa/selenium/WebDriver;  org/openqa/selenium/Capabilities getBrowserName()Ljava/lang/String; ! .org/openqa/selenium/remote/DesiredCapabilities "#firefox2()Lorg/openqa/selenium/remote/DesiredCapabilities;  &('java/lang/String )*equals(Ljava/lang/Object;)Z,)org/openqa/selenium/firefox/FirefoxDriver + / 0#internetExplorer2-org/openqa/selenium/ie/InternetExplorerDriver 1 5 6#chrome8'org/openqa/selenium/chrome/ChromeDriver 7 ;+com/thoughtworks/selenium/SeleniumException=java/lang/StringBuilder?)Unable to determine which driver to use: <A B(Ljava/lang/String;)V <D EFappend-(Ljava/lang/Object;)Ljava/lang/StringBuilder; <H ItoString :AbrowserLjava/lang/String;()Ljava/lang/Object; O  SourceFileSuppliesWebDriver.java SignatureTLjava/lang/Object;Lcom/google/common/base/Supplier;   F * *+ !   d*L$+% +Y-.$+% 1Y34$+% 7Y9:Y@*CGJ"$ %&',(4)A*I-d ZKLAM %*NPQRSPK &^D>nk#org/openqa/selenium/Rotatable.class1 org/openqa/selenium/Rotatablejava/lang/Objectrotate*(Lorg/openqa/selenium/ScreenOrientation;)VgetOrientation)()Lorg/openqa/selenium/ScreenOrientation; SourceFileRotatable.java  PK &^D> 1org/openqa/selenium/UnhandledAlertException.class1+org/openqa/selenium/UnhandledAlertException&org/openqa/selenium/WebDriverException(Ljava/lang/String;)VCode  LineNumberTableLocalVariableTablethis-Lorg/openqa/selenium/UnhandledAlertException; commandNameLjava/lang/String; SourceFileUnhandledAlertException.java!>*+   PK &^D>qn-RR1org/openqa/selenium/IllegalLocatorException.class1+org/openqa/selenium/IllegalLocatorException&org/openqa/selenium/WebDriverException(Ljava/lang/String;)VCode  LineNumberTableLocalVariableTablethis-Lorg/openqa/selenium/IllegalLocatorException;messageLjava/lang/String;*(Ljava/lang/String;Ljava/lang/Throwable;)V  causeLjava/lang/Throwable; SourceFileIllegalLocatorException.java!>*+   I*+,   PK %^D>+=  .org/openqa/selenium/XPathLookupException.class1(org/openqa/selenium/XPathLookupException&org/openqa/selenium/WebDriverException()VCode  LineNumberTableLocalVariableTablethis*Lorg/openqa/selenium/XPathLookupException;(Ljava/lang/String;)V  messageLjava/lang/String;(Ljava/lang/Throwable;)V  causeLjava/lang/Throwable;*(Ljava/lang/String;Ljava/lang/Throwable;)V   SourceFileXPathLookupException.java!3*   >*+    >*+    I*+,   PK &^D>[8Aorg/openqa/selenium/SeleneseCommandExecutor$SelenseTimeouts.class14;org/openqa/selenium/SeleneseCommandExecutor$SelenseTimeoutsjava/lang/Object;this$0-Lorg/openqa/selenium/SeleneseCommandExecutor;o(Lorg/openqa/selenium/SeleneseCommandExecutor;[Lorg/openqa/selenium/internal/selenesedriver/SeleneseFunction;)VV([Lorg/openqa/selenium/internal/selenesedriver/SeleneseFunction;)VCode   ()V  LineNumberTableLocalVariableTablethis=Lorg/openqa/selenium/SeleneseCommandExecutor$SelenseTimeouts;applyE(Lcom/thoughtworks/selenium/Selenium;Ljava/util/Map;)Ljava/lang/Void;Z(Lcom/thoughtworks/selenium/Selenium;Ljava/util/Map;)Ljava/lang/Void;  !G(Lcom/thoughtworks/selenium/Selenium;Ljava/util/Map;)Ljava/lang/Object;selenium$Lcom/thoughtworks/selenium/Selenium;argsLjava/util/Map;function>Lorg/openqa/selenium/internal/selenesedriver/SeleneseFunction;LocalVariableTypeTable$Ljava/util/Map;RLorg/openqa/selenium/internal/selenesedriver/SeleneseFunction; ,  SourceFileSeleneseCommandExecutor.javabLjava/lang/Object;Lorg/openqa/selenium/internal/selenesedriver/SeleneseFunction; InnerClasses2+org/openqa/selenium/SeleneseCommandExecutorSelenseTimeouts      K*+**,  +*Y:662N-+,W)*++"#+$% &'(+$) &*A!'*+,+-. /0 13PK &^D>~ %%1org/openqa/selenium/SeleneseCommandExecutor.class1+org/openqa/selenium/SeleneseCommandExecutorjava/lang/Object*org/openqa/selenium/remote/CommandExecutor errorCodes'Lorg/openqa/selenium/remote/ErrorCodes;instance$Lcom/thoughtworks/selenium/Selenium; functionsLjava/util/Map; SignatureaLjava/util/Map;A(Ljava/net/URL;Ljava/net/URL;Lorg/openqa/selenium/Capabilities;)VCode.com/thoughtworks/selenium/HttpCommandProcessor  java/net/URL getHost()Ljava/lang/String;  getPort()I  ! startCommand6(Lorg/openqa/selenium/Capabilities;)Ljava/lang/String; # $toString & ':(Ljava/lang/String;ILjava/lang/String;Ljava/lang/String;)V ) */(Lcom/thoughtworks/selenium/CommandProcessor;)VLineNumberTableLocalVariableTablethis-Lorg/openqa/selenium/SeleneseCommandExecutor;seleniumServerLjava/net/URL; remoteAddress capabilities"Lorg/openqa/selenium/Capabilities;5)com/thoughtworks/selenium/DefaultSelenium 4) 8 9'(Lcom/thoughtworks/selenium/Selenium;)V processor,Lcom/thoughtworks/selenium/CommandProcessor; = >()V @BAcom/google/common/collect/Maps CD newHashMap()Ljava/util/HashMap; F H J%org/openqa/selenium/remote/ErrorCodes I= M  O P>prepareCommandsgetWrappedSelenium&()Lcom/thoughtworks/selenium/Selenium;executeK(Lorg/openqa/selenium/remote/Command;)Lorg/openqa/selenium/remote/Response; VXW"org/openqa/selenium/remote/Command YgetName []\ java/util/Map ^_get&(Ljava/lang/Object;)Ljava/lang/Object;aLorg/openqa/selenium/internal/selenesedriver/SeleneseFunction;response%Lorg/openqa/selenium/remote/Response;eLjava/lang/Exception;+com/thoughtworks/selenium/SeleniumException  getMessageERROR: Element .+ not found java/lang/String matches(Ljava/lang/String;)Z2org/openqa/selenium/StaleElementReferenceException *(Ljava/lang/String;Ljava/lang/Throwable;)V I  toStatusCode(Ljava/lang/Throwable;)I q  setStatus(I)V.org/openqa/selenium/remote/JsonToBeanConverter =.org/openqa/selenium/remote/BeanToJsonConverter = convert&(Ljava/lang/Object;)Ljava/lang/String; 7(Ljava/lang/Class;Ljava/lang/Object;)Ljava/lang/Object;toUserawLjava/lang/Object; addCommandS(Ljava/lang/String;Lorg/openqa/selenium/internal/selenesedriver/SeleneseFunction;)V [ put8(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object; methodNameLjava/lang/String;7org/openqa/selenium/internal/selenesedriver/FindElement =8org/openqa/selenium/internal/selenesedriver/FindElements =;org/openqa/selenium/SeleneseCommandExecutor$SelenseTimeouts implicitlyWaitR()Lorg/openqa/selenium/internal/selenesedriver/AbstractElementFinder$ImplicitWait; o(Lorg/openqa/selenium/SeleneseCommandExecutor;[Lorg/openqa/selenium/internal/selenesedriver/SeleneseFunction;)V>org/openqa/selenium/internal/selenesedriver/ExecuteAsyncScript = clearElement8org/openqa/selenium/internal/selenesedriver/ClearElement =   clickElement8org/openqa/selenium/internal/selenesedriver/ClickElement =close1org/openqa/selenium/internal/selenesedriver/Close = getCurrentUrl9org/openqa/selenium/internal/selenesedriver/GetCurrentUrl = executeScript9org/openqa/selenium/internal/selenesedriver/ExecuteScript =executeAsyncScriptsetScriptTimeout @()Lorg/openqa/selenium/internal/selenesedriver/SeleneseFunction;findChildElementfindChildElements findElement findElements^2org/openqa/selenium/internal/selenesedriver/GetUrl =getElementAttribute?org/openqa/selenium/internal/selenesedriver/GetElementAttribute =getElementText :org/openqa/selenium/internal/selenesedriver/GetElementText  = getElementValue;org/openqa/selenium/internal/selenesedriver/GetElementValue =getElementTagName6org/openqa/selenium/internal/selenesedriver/GetTagName =getTitle4org/openqa/selenium/internal/selenesedriver/GetTitle =isElementDisplayed>org/openqa/selenium/internal/selenesedriver/IsElementDisplayed =!isElementEnabled#org/openqa/selenium/internal/selenesedriver/SetElementSelected ;=? switchToFrameA9org/openqa/selenium/internal/selenesedriver/SwitchToFrame @=D submitElementF9org/openqa/selenium/internal/selenesedriver/SubmitElement E=I toggleElementK9org/openqa/selenium/internal/selenesedriver/ToggleElement J=NquitP8org/openqa/selenium/internal/selenesedriver/QuitSelenium O=9Lorg/openqa/selenium/internal/selenesedriver/FindElement;:Lorg/openqa/selenium/internal/selenesedriver/FindElements;timeouts=Lorg/openqa/selenium/SeleneseCommandExecutor$SelenseTimeouts;@Lorg/openqa/selenium/internal/selenesedriver/ExecuteAsyncScript; XZY org/openqa/selenium/Capabilities [getBrowserName ]_^.org/openqa/selenium/remote/DesiredCapabilities `afirefox2()Lorg/openqa/selenium/remote/DesiredCapabilities; ]Z d efequals(Ljava/lang/Object;)Zh*chromejsafari l m findSafario*safari ]q rachrometJ*googlechrome /Applications/Google Chrome.app/Contents/MacOS/Google Chromev"java/lang/IllegalArgumentExceptionx-Cannot determine which selenium type to use: uibrowserpath }~org/openqa/selenium/Platform  getCurrent ()Lorg/openqa/selenium/Platform; } WINDOWSLorg/openqa/selenium/Platform; } is!(Lorg/openqa/selenium/Platform;)Z java/io/File(C:\Program Files (x86)\Safari\safari.exe i"C:\Program Files\Safari\safari.exe  exists()Z  getAbsolutePath locations[Ljava/io/File;locationLjava/io/File; SourceFileSeleneseCommandExecutor.java InnerClassesSelenseTimeoutsNorg/openqa/selenium/internal/selenesedriver/AbstractElementFinder$ImplicitWaitAorg/openqa/selenium/internal/selenesedriver/AbstractElementFinder ImplicitWait!    t*Y++-,"%(+ggh ij,*-./01023*E *4Y+67+ m n, -. :;9h *<*?E*+G*IYKL*N+pd qrtu, -. QR/*G+x, -.STS*E+UZ`M,bYdYfh+UkopqYsN-,*G+tx|-N*-0KL+"|}~08JLM,4S-.SB8MWqYsM+N++Y++N,*L-Y[Y-:,|,+&  *6OU,4W-.WO MOO *E+,W+  ,  -.  P>wYLYMY*`Y+SY,SNY:*ӻY׶*ڻY޶*߻Y*Y*Y***+*,*+*,*-*Y*Y* Y * Y*Y*Y*Y* "Y$*%'Y)**,Y.*/1Y3*46Y8*9;Y=*>@YB*CEYG*HJYL*MOYQر+$&+4AN[hu} (6DR`n|,4-.RS+nTU4eV !g*WL\b+cgi+ckMdYnh,kopb+csuYdYwh*Wkoy+. "&8EIMc, g23`z&{ mS|FYYSYYSK*Y:>=2L+++* *+;BGO,+$; PK &^D>JB%%+org/openqa/selenium/ScreenOrientation.class19%org/openqa/selenium/ScreenOrientationjava/lang/Enum LANDSCAPE'Lorg/openqa/selenium/ScreenOrientation;PORTRAITvalueLjava/lang/String; ENUM$VALUES([Lorg/openqa/selenium/ScreenOrientation;()VCode landscape  ((Ljava/lang/String;ILjava/lang/String;)V  portrait    LineNumberTableLocalVariableTable " #(Ljava/lang/String;I)V %  this()Ljava/lang/String;values*()[Lorg/openqa/selenium/ScreenOrientation; +-,java/lang/System ./ arraycopy*(Ljava/lang/Object;ILjava/lang/Object;II)VvalueOf;(Ljava/lang/String;)Lorg/openqa/selenium/ScreenOrientation; 3 045(Ljava/lang/Class;Ljava/lang/String;)Ljava/lang/Enum; SourceFileScreenOrientation.java Signature9Ljava/lang/Enum;@1@@   Z2YYYSYS H *+!*-$   &  '/*$" & ()6YK*Y<YM*,  01* *2 5678PK &^D>:##6org/openqa/selenium/InvalidCookieDomainException.class10org/openqa/selenium/InvalidCookieDomainException&org/openqa/selenium/WebDriverException()VCode  LineNumberTableLocalVariableTablethis2Lorg/openqa/selenium/InvalidCookieDomainException;(Ljava/lang/String;)V  messageLjava/lang/String;(Ljava/lang/Throwable;)V  causeLjava/lang/Throwable;*(Ljava/lang/String;Ljava/lang/Throwable;)V   SourceFile!InvalidCookieDomainException.java!3*    >*+   >*+   I*+,   PK &^D> KEE)org/openqa/selenium/HasInputDevices.class1 #org/openqa/selenium/HasInputDevicesjava/lang/Object getKeyboard ()Lorg/openqa/selenium/Keyboard;getMouse()Lorg/openqa/selenium/Mouse;actionsBuilder:()Lorg/openqa/selenium/interactions/ActionChainsGenerator; SourceFileHasInputDevices.java   PK &^D>"org/openqa/selenium/Keyboard.class1 org/openqa/selenium/Keyboardjava/lang/ObjectsendKeys([Ljava/lang/CharSequence;)VpressKey(Lorg/openqa/selenium/Keys;)V releaseKey SourceFile Keyboard.java   PK &^D>6y&org/openqa/selenium/Capabilities.class1 org/openqa/selenium/Capabilitiesjava/lang/ObjectgetBrowserName()Ljava/lang/String; getPlatform ()Lorg/openqa/selenium/Platform; getVersionisJavascriptEnabled()ZasMap()Ljava/util/Map; Signature&()Ljava/util/Map; getCapability&(Ljava/lang/String;)Ljava/lang/Object;is(Ljava/lang/String;)Z SourceFileCapabilities.java   PK &^D>sɼ&KK.org/openqa/selenium/WebDriver$Navigation.class1(org/openqa/selenium/WebDriver$Navigationjava/lang/Objectback()Vforwardto(Ljava/lang/String;)V(Ljava/net/URL;)Vrefresh SourceFileWebDriver.java InnerClassesorg/openqa/selenium/WebDriver Navigation       PK &^D>gNtt+org/openqa/selenium/WebDriver$Options.class1$%org/openqa/selenium/WebDriver$Optionsjava/lang/Object addCookie(Lorg/openqa/selenium/Cookie;)VdeleteCookieNamed(Ljava/lang/String;)V deleteCookiedeleteAllCookies()V getCookies()Ljava/util/Set; Signature/()Ljava/util/Set;getCookieNamed0(Ljava/lang/String;)Lorg/openqa/selenium/Cookie;getSpeed()Lorg/openqa/selenium/Speed; DeprecatedRuntimeVisibleAnnotationsLjava/lang/Deprecated;setSpeed(Lorg/openqa/selenium/Speed;)Vtimeouts*()Lorg/openqa/selenium/WebDriver$Timeouts; SourceFileWebDriver.java InnerClassesorg/openqa/selenium/WebDriverOptions"&org/openqa/selenium/WebDriver$TimeoutsTimeouts      !# PK &^D>DQQ1org/openqa/selenium/WebDriver$TargetLocator.class1+org/openqa/selenium/WebDriver$TargetLocatorjava/lang/Objectframe"(I)Lorg/openqa/selenium/WebDriver;3(Ljava/lang/String;)Lorg/openqa/selenium/WebDriver;A(Lorg/openqa/selenium/WebElement;)Lorg/openqa/selenium/WebDriver;windowdefaultContent!()Lorg/openqa/selenium/WebDriver; activeElement"()Lorg/openqa/selenium/WebElement;alert()Lorg/openqa/selenium/Alert; SourceFileWebDriver.java InnerClassesorg/openqa/selenium/WebDriver TargetLocator     PK &^D>ONN,org/openqa/selenium/WebDriver$Timeouts.class1&org/openqa/selenium/WebDriver$Timeoutsjava/lang/ObjectimplicitlyWaitJ(JLjava/util/concurrent/TimeUnit;)Lorg/openqa/selenium/WebDriver$Timeouts;setScriptTimeout SourceFileWebDriver.java InnerClasses org/openqa/selenium/WebDriverTimeouts   PK &^D>2֛#org/openqa/selenium/WebDriver.class1/org/openqa/selenium/WebDriverjava/lang/Object!org/openqa/selenium/SearchContextget(Ljava/lang/String;)V getCurrentUrl()Ljava/lang/String;getTitle findElements*(Lorg/openqa/selenium/By;)Ljava/util/List; SignatureL(Lorg/openqa/selenium/By;)Ljava/util/List; findElement:(Lorg/openqa/selenium/By;)Lorg/openqa/selenium/WebElement; getPageSourceclose()VquitgetWindowHandles()Ljava/util/Set;%()Ljava/util/Set;getWindowHandleswitchTo/()Lorg/openqa/selenium/WebDriver$TargetLocator;navigate,()Lorg/openqa/selenium/WebDriver$Navigation;manage)()Lorg/openqa/selenium/WebDriver$Options; SourceFileWebDriver.java InnerClasses$(org/openqa/selenium/WebDriver$Navigation Navigation'%org/openqa/selenium/WebDriver$OptionsOptions*+org/openqa/selenium/WebDriver$TargetLocator TargetLocator-&org/openqa/selenium/WebDriver$TimeoutsTimeouts       !""#% &( )+ ,. PK &^D>ԫ yy'org/openqa/selenium/SearchContext.class1 !org/openqa/selenium/SearchContextjava/lang/Object findElements*(Lorg/openqa/selenium/By;)Ljava/util/List; SignatureL(Lorg/openqa/selenium/By;)Ljava/util/List; findElement:(Lorg/openqa/selenium/By;)Lorg/openqa/selenium/WebElement; SourceFileSearchContext.java   PK &^D>m88#org/openqa/selenium/Dimension.class1!org/openqa/selenium/Dimensionjava/lang/ObjectwidthIheight(II)VCode   ()V    LineNumberTableLocalVariableTablethisLorg/openqa/selenium/Dimension;getWidth()I getHeightequals(Ljava/lang/Object;)ZoLjava/lang/Object;otherhashCode SourceFileDimension.java!  Y* **    /*  /*  r(++M,*,*  (( 7 * *`x&   PK %^D>INv  ,org/openqa/selenium/WebDriverException.class1{&org/openqa/selenium/WebDriverExceptionjava/lang/RuntimeException()VCode  LineNumberTableLocalVariableTablethis(Lorg/openqa/selenium/WebDriverException;(Ljava/lang/String;)V  messageLjava/lang/String;(Ljava/lang/Throwable;)V  causeLjava/lang/Throwable;*(Ljava/lang/String;Ljava/lang/Throwable;)V   getMessage()Ljava/lang/String;    !" createMessage&(Ljava/lang/String;)Ljava/lang/String;$!%sSystem info: %s Driver info: %s&java/lang/Object(*java/lang/StringBuilder ,.-java/lang/String /0valueOf&(Ljava/lang/Object;)Ljava/lang/String; )3 )5 67append-(Ljava/lang/String;)Ljava/lang/StringBuilder; )9 :toString < =getSystemInformation ? @getDriverInformation ,B CDformat9(Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/String;originalMessageStringGBos.name: '%s', os.arch: '%s', os.version: '%s', java.version: '%s'Ios.name KMLjava/lang/System N" getPropertyPos.archR os.versionT java.versionVdriver.version: X YZ getStackTrace ()[Ljava/lang/StackTraceElement; \ ]^ getDriverName2([Ljava/lang/StackTraceElement;)Ljava/lang/String;`unknown bdcjava/lang/StackTraceElement e getClassNamegDriver ,i jkendsWith(Ljava/lang/String;)Zm\. ,o pqsplit'(Ljava/lang/String;)[Ljava/lang/String;stackTraceElements[Ljava/lang/StackTraceElement; driverNameeLjava/lang/StackTraceElement;bits[Ljava/lang/String; SourceFileWebDriverException.java! 3*   >*+   >*+   I*+, #$  3 ** (  !"{7#%Y+')Y++1248SY*;SY*>SA ,-'../3, 7 7E=h*F%YHJSYOJSYQJSYSJSA 3456 7&3 * @A)YU1*W[48 ;  ]^?_L*Y:6>+2M,afh,aln:d2L+ ?@A B+C4@=G *?rs<t uv+ wxyzPK &^D>GG.org/openqa/selenium/NoSuchFrameException.class1(org/openqa/selenium/NoSuchFrameException%org/openqa/selenium/NotFoundException(Ljava/lang/String;)VCode  LineNumberTableLocalVariableTablethis*Lorg/openqa/selenium/NoSuchFrameException;reasonLjava/lang/String;*(Ljava/lang/String;Ljava/lang/Throwable;)V  causeLjava/lang/Throwable; SourceFileNoSuchFrameException.java!>*+   I*+,   PK &^D>#@org/openqa/selenium/Keys.class1org/openqa/selenium/Keysjava/lang/Enumjava/lang/CharSequenceNULLLorg/openqa/selenium/Keys;CANCELHELP BACK_SPACETABCLEARRETURNENTERSHIFT LEFT_SHIFTCONTROL LEFT_CONTROLALTLEFT_ALTPAUSEESCAPESPACEPAGE_UP PAGE_DOWNENDHOMELEFT ARROW_LEFTUPARROW_UPRIGHT ARROW_RIGHTDOWN ARROW_DOWNINSERTDELETE SEMICOLONEQUALSNUMPAD0NUMPAD1NUMPAD2NUMPAD3NUMPAD4NUMPAD5NUMPAD6NUMPAD7NUMPAD8NUMPAD9MULTIPLYADD SEPARATORSUBTRACTDECIMALDIVIDEF1F2F3F4F5F6F7F8F9F10F11F12METACOMMANDkeyCodeC ENUM$VALUESorg/openqa/selenium/Keys;()VCode Q RS(Ljava/lang/String;IC)V U   Y   ]   a   e   i  m  q  u  x  |                             !  !"  "#  #$  $%  %&  &'  '(  ()  )*  *+  +,  ,-  -.  ./  /0!  01"  12#  23$  34%  45&  56'  67(  78)  891  9:2  :;3  ;<4  <=5 " =>6 & >?7 * ?@8 . @A9 2 AB: 6 BC; : CD< > DE= B EF E F G IJLineNumberTableLocalVariableTable K RL(Ljava/lang/String;I)V N GHthischord-([Ljava/lang/CharSequence;)Ljava/lang/String;Sjava/lang/StringBuilder RU RL RW XYappend3(Ljava/lang/CharSequence;)Ljava/lang/StringBuilder; R[ \]toString()Ljava/lang/String;value[Ljava/lang/CharSequence;builderLjava/lang/StringBuilder;seqLjava/lang/CharSequence;charAt(I)CindexIlength()I subSequence(II)Ljava/lang/CharSequence; monjava/lang/String pqvalueOf(C)Ljava/lang/String;s#java/lang/IndexOutOfBoundsException rUstartendvalues()[Lorg/openqa/selenium/Keys; z|{java/lang/System }~ arraycopy*(Ljava/lang/Object;ILjava/lang/Object;II)V.(Ljava/lang/String;)Lorg/openqa/selenium/Keys;  p5(Ljava/lang/Class;Ljava/lang/String;)Ljava/lang/Enum; SourceFile Keys.java SignatureDLjava/lang/Enum;Ljava/lang/CharSequence;@1A@@ @ @ @ @ @@@@@@@@@@@@@@@@@@@ @!@"@#@$@%@&@'@(@)@*@+@,@-@.@/@0@1@2@3@4@5@6@7@8@9@:@;@<@=@>@?@@@A@B@C@D@E@FGHIJ KLMɻYNOPTYVWPXYZ[P\Y^_P`YbcPdYfgPhYjkPlYnoPpYrsPtYv sPwYy zP{Y} zP~Y PY PYPYPYPYPYPYPYPYPYPYPYPYPYPYPYPYPYķPŻYȷPɻY ̷PͻY!зPѻY"ԷPջY#طPٻY$ܷPݻY%PY&PY'PY(PY)PY*PY+PY,PY-PY.PY/P Y 0 P Y1PY2PY3PY4PY5 P!Y#6$P%Y'7(P)Y+8,P-Y/90P1Y3:4P5Y7;8P9Y;<<P=Y?=@PAYC>@PD?YTSYXSY\SY`SYdSYhSYlSYpSYtSY wSY {SY ~SY SY SYSYSYSYSYSYSYSYSYSYSYSYSYSYSYSYSYSYSY SY!SY"SY#SY$SY%SY&SY'SY(SY)SY*SY+SY,SY-SY.SY/ SY0 SY1SY2SY3SY4SY5!SY6%SY7)SY8-SY91SY:5SY;9SY<=SY=ASY>DSFH@-<K Z!j"z#$%&'()*+ ,-*.:/J0Z1j2z3456789:; =>*?:@JAZBjCzDEFGHIJKLN#O5PGQYRkS}TUVWXY[\ IRSMH *+J*MH_` aI O GHPQM5RYTL*Y:6>2M+,VW+TVW+ZHnpqp(s0tI 5^_-`abcdeMG *MHxy zI O fghiM,H~I OjkM_ *MlrYtH I Ougvg\]M2*MlHI O wxM6FYK*Y<YMy,HI pM* *HIPK &^D>w\/org/openqa/selenium/NoSuchWindowException.class1)org/openqa/selenium/NoSuchWindowException%org/openqa/selenium/NotFoundException(Ljava/lang/String;)VCode  LineNumberTableLocalVariableTablethis+Lorg/openqa/selenium/NoSuchWindowException;reasonLjava/lang/String; SourceFileNoSuchWindowException.java!>*+   PK &^D>۪e+org/openqa/selenium/NotFoundException.class1%org/openqa/selenium/NotFoundException&org/openqa/selenium/WebDriverException()VCode  LineNumberTableLocalVariableTablethis'Lorg/openqa/selenium/NotFoundException;(Ljava/lang/String;)V  messageLjava/lang/String;*(Ljava/lang/String;Ljava/lang/Throwable;)V  causeLjava/lang/Throwable;(Ljava/lang/Throwable;)V   SourceFileNotFoundException.java!3*   >*+   I*+,   >*+ "#  PK &^D> gg8org/openqa/selenium/StaleElementReferenceException.class12org/openqa/selenium/StaleElementReferenceException&org/openqa/selenium/WebDriverException(Ljava/lang/String;)VCode  LineNumberTableLocalVariableTablethis4Lorg/openqa/selenium/StaleElementReferenceException;messageLjava/lang/String;*(Ljava/lang/String;Ljava/lang/Throwable;)V  causeLjava/lang/Throwable; SourceFile#StaleElementReferenceException.java!>*+   I*+,   PK &^D>Y%d(org/openqa/selenium/Cookie$Builder.class19"org/openqa/selenium/Cookie$Builderjava/lang/ObjectnameLjava/lang/String;valuepathdomainexpiryLjava/util/Date;secureZ'(Ljava/lang/String;Ljava/lang/String;)VCode  ()V    LineNumberTableLocalVariableTablethis$Lorg/openqa/selenium/Cookie$Builder;8(Ljava/lang/String;)Lorg/openqa/selenium/Cookie$Builder;  org/openqa/selenium/Cookie !"access$0&(Ljava/lang/String;)Ljava/lang/String; $ host '  expiresOn6(Ljava/util/Date;)Lorg/openqa/selenium/Cookie$Builder; + isSecure'(Z)Lorg/openqa/selenium/Cookie$Builder; / build()Lorg/openqa/selenium/Cookie; 3 4\(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/util/Date;Z)V SourceFile Cookie.java InnerClassesBuilder!   Y**+*,   B *+#*   %?*+&* ()?*+**  ,-?*.*  01J Y***#*&***.2  567 8 PK &^D>p Kll org/openqa/selenium/Cookie.class1org/openqa/selenium/Cookiejava/lang/ObjectnameLjava/lang/String;valuepathdomainexpiryLjava/util/Date;isSecureZI(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/util/Date;)VCode  [(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/util/Date;)VLineNumberTableLocalVariableTablethisLorg/openqa/selenium/Cookie;  \(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/util/Date;Z)V  ()V   ! # %'&java/lang/String ()equals(Ljava/lang/Object;)Z+/ -  / 01 stripPort&(Ljava/lang/String;)Ljava/lang/String; 3  5 7java/util/Date 69 :;getTime()J 6? @(J)V B D Evalidate'(Ljava/lang/String;Ljava/lang/String;)V H 9(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)VgetName()Ljava/lang/String;getValue getDomaingetPath()Z getExpiry()Ljava/util/Date;S: %U VWsplit'(Ljava/lang/String;)[Ljava/lang/String;Y"java/lang/IllegalArgumentException[ERequired attributes are not set or any non-null attribute set to null X] ^(Ljava/lang/String;)V %` abindexOf(I)Idjava/lang/StringBuilderf#Cookie names cannot contain a ';': c] ci jkappend-(Ljava/lang/String;)Ljava/lang/StringBuilder; cm nKtoString %p qrcontains(Ljava/lang/CharSequence;)Zt"Domain should not contain a port: %v wxvalueOf&(Ljava/lang/Object;)Ljava/lang/String;z=| ; expires=~java/text/SimpleDateFormatEEE, dd MMM yyyy hh:mm:ss z }] } format$(Ljava/util/Date;)Ljava/lang/String;; path= ; domain=;secure;oLjava/lang/Object;cookiehashCode()I % access$0 SourceFile Cookie.java InnerClasses"org/openqa/selenium/Cookie$BuilderBuilder!   a *+,- * +4     m *+,- 9 :>      `**+*, * "$*,*-.2*4*6Y8A*A*C. GI JK(M0N6P;RVT[W_XH```` `` ` FL *+,*G b c    IU *+,-G mn*    JK/*q LK/* u MK/*2y NK/*,}  O/*4 PQ/*A  01;* *RT2  E*"*$* *, XYZ\*;_XYcYeg*hl\*2**2RoXYcYsg*2hl\& !+8<OSf nKcY*ugyh* h*A""cY{g}Y*Ahlh"*,$"cYg*,hlh*2"cYg*2hlh*4"hl* &8BEHo ()J*+++M*,$* * , $ , "#% JJ52* 1%*.  PK &^D>{dd1org/openqa/selenium/NoAlertPresentException.class1+org/openqa/selenium/NoAlertPresentException&org/openqa/selenium/WebDriverException()VCode  LineNumberTableLocalVariableTablethis-Lorg/openqa/selenium/NoAlertPresentException; SourceFileNoAlertPresentException.java!/*   PK &^D>6`0e$org/openqa/selenium/Platform$1.class1"org/openqa/selenium/Platform$1org/openqa/selenium/Platform)(Ljava/lang/String;I[Ljava/lang/String;)VCode   G(Ljava/lang/String;I[Ljava/lang/String;Lorg/openqa/selenium/Platform;)VLineNumberTableLocalVariableTablethis Lorg/openqa/selenium/Platform$1; $anonymous0[Ljava/lang/String;is!(Lorg/openqa/selenium/Platform;)Z  WINDOWSLorg/openqa/selenium/Platform;  XP  VISTA compareWith SourceFile Platform.javaEnclosingMethod InnerClasses@ A *+- %   M++ + (   ! @PK &^D>-P$org/openqa/selenium/Platform$2.class1org/openqa/selenium/Platform$2org/openqa/selenium/Platform)(Ljava/lang/String;I[Ljava/lang/String;)VCode   G(Ljava/lang/String;I[Ljava/lang/String;Lorg/openqa/selenium/Platform;)VLineNumberTableLocalVariableTablethis Lorg/openqa/selenium/Platform$2; $anonymous0[Ljava/lang/String;is!(Lorg/openqa/selenium/Platform;)Z  WINDOWSLorg/openqa/selenium/Platform;  XP compareWith SourceFile Platform.javaEnclosingMethod InnerClasses@ A *+- 0   F+ + 3   @PK &^D>4 $org/openqa/selenium/Platform$3.class1org/openqa/selenium/Platform$3org/openqa/selenium/Platform)(Ljava/lang/String;I[Ljava/lang/String;)VCode   G(Ljava/lang/String;I[Ljava/lang/String;Lorg/openqa/selenium/Platform;)VLineNumberTableLocalVariableTablethis Lorg/openqa/selenium/Platform$3; $anonymous0[Ljava/lang/String;is!(Lorg/openqa/selenium/Platform;)Z  WINDOWSLorg/openqa/selenium/Platform;  VISTA compareWith SourceFile Platform.javaEnclosingMethod InnerClasses@ A *+- 9   F+ + <   @PK &^D>$org/openqa/selenium/Platform$4.class1org/openqa/selenium/Platform$4org/openqa/selenium/Platform)(Ljava/lang/String;I[Ljava/lang/String;)VCode   G(Ljava/lang/String;I[Ljava/lang/String;Lorg/openqa/selenium/Platform;)VLineNumberTableLocalVariableTablethis Lorg/openqa/selenium/Platform$4; $anonymous0[Ljava/lang/String; SourceFile Platform.javaEnclosingMethod InnerClasses@ A *+- ?    @PK &^D>y$org/openqa/selenium/Platform$5.class1org/openqa/selenium/Platform$5org/openqa/selenium/Platform)(Ljava/lang/String;I[Ljava/lang/String;)VCode   G(Ljava/lang/String;I[Ljava/lang/String;Lorg/openqa/selenium/Platform;)VLineNumberTableLocalVariableTablethis Lorg/openqa/selenium/Platform$5; $anonymous0[Ljava/lang/String; SourceFile Platform.javaEnclosingMethod InnerClasses@ A *+- @    @PK &^D>$org/openqa/selenium/Platform$6.class1org/openqa/selenium/Platform$6org/openqa/selenium/Platform)(Ljava/lang/String;I[Ljava/lang/String;)VCode   G(Ljava/lang/String;I[Ljava/lang/String;Lorg/openqa/selenium/Platform;)VLineNumberTableLocalVariableTablethis Lorg/openqa/selenium/Platform$6; $anonymous0[Ljava/lang/String;is!(Lorg/openqa/selenium/Platform;)Z  UNIXLorg/openqa/selenium/Platform;  LINUX compareWith SourceFile Platform.javaEnclosingMethod InnerClasses@ A *+- A   F+ + D   @PK &^D>֪MM$org/openqa/selenium/Platform$7.class1#org/openqa/selenium/Platform$7org/openqa/selenium/Platform)(Ljava/lang/String;I[Ljava/lang/String;)VCode   G(Ljava/lang/String;I[Ljava/lang/String;Lorg/openqa/selenium/Platform;)VLineNumberTableLocalVariableTablethis Lorg/openqa/selenium/Platform$7; $anonymous0[Ljava/lang/String; getLineEnding()Ljava/lang/String; is!(Lorg/openqa/selenium/Platform;)Z  LINUXLorg/openqa/selenium/Platform;  ANDROID compareWith SourceFile Platform.javaEnclosingMethod InnerClasses@ A *+- G   - I  F+ + N   !" @PK &^D>N"$org/openqa/selenium/Platform$8.class1org/openqa/selenium/Platform$8org/openqa/selenium/Platform)(Ljava/lang/String;I[Ljava/lang/String;)VCode   G(Ljava/lang/String;I[Ljava/lang/String;Lorg/openqa/selenium/Platform;)VLineNumberTableLocalVariableTablethis Lorg/openqa/selenium/Platform$8; $anonymous0[Ljava/lang/String;is!(Lorg/openqa/selenium/Platform;)Z compareWithLorg/openqa/selenium/Platform; SourceFile Platform.javaEnclosingMethod InnerClasses@ A *+- U   6 X   @PK &^D>4x"org/openqa/selenium/Platform.class1org/openqa/selenium/Platformjava/lang/EnumWINDOWSLorg/openqa/selenium/Platform;XPVISTAMACUNIXLINUXANDROIDANY partOfOsName[Ljava/lang/String; minorVersionI majorVersion ENUM$VALUES[Lorg/openqa/selenium/Platform;()VCodeorg/openqa/selenium/Platform$1java/lang/String  !")(Ljava/lang/String;I[Ljava/lang/String;)V $ &org/openqa/selenium/Platform$2)xp+windows-winnt % 0 2org/openqa/selenium/Platform$35 windows vista7Windows Server 20089 windows 7 1 < >org/openqa/selenium/Platform$4 AmacCdarwin = F Horg/openqa/selenium/Platform$5 KsolarisMbsd G P Rorg/openqa/selenium/Platform$6 Ulinux Q X Zorg/openqa/selenium/Platform$7 ]android_dalvik Y b dorg/openqa/selenium/Platform$8 c h  j LineNumberTableLocalVariableTable n !o(Ljava/lang/String;I)V q s os.versionu0.0.0 wyxjava/lang/System z{ getProperty8(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;}^(\d+)\.(\d+).* java/util/regex/Pattern compile-(Ljava/lang/String;)Ljava/util/regex/Pattern;  matcher3(Ljava/lang/CharSequence;)Ljava/util/regex/Matcher; java/util/regex/Matcher matches()Z group(I)Ljava/lang/String; java/lang/Integer parseInt(Ljava/lang/String;)I    java/lang/NumberFormatExceptionthisversionLjava/lang/String;majorminpatternLjava/util/regex/Pattern;Ljava/util/regex/Matcher; getCurrent ()Lorg/openqa/selenium/Platform;os.name w z&(Ljava/lang/String;)Ljava/lang/String;  extractFromSysProperty2(Ljava/lang/String;)Lorg/openqa/selenium/Platform;   toLowerCase()Ljava/lang/String; java.vm.name  equalsIgnoreCase(Ljava/lang/String;)Z  values!()[Lorg/openqa/selenium/Platform;  equals(Ljava/lang/Object;)Z   isExactMatch'(Ljava/lang/String;Ljava/lang/String;)Z  isCurrentPlatform   isBetterMatchosName mostLikely previousMatchos  length()Ipreviousis!(Lorg/openqa/selenium/Platform;)Z  compareWith  indexOf matchAgainstgetMajorVersiongetMinorVersion w  arraycopy*(Ljava/lang/Object;ILjava/lang/Object;II)VvalueOf  5(Ljava/lang/Class;Ljava/lang/String;)Ljava/lang/Enum;G(Ljava/lang/String;I[Ljava/lang/String;Lorg/openqa/selenium/Platform;)V   SourceFile Platform.java Signature0Ljava/lang/Enum; InnerClasses@! @@@@ @ @ @ @  PYYS#%Y'Y(SY*SY,S./1Y3Y4SY6SY8S:;=Y?Y@SYBSDEGYIYJSYLSNOQYSYTSVWYY[Y\SY^S`acYeYSfgY#SY/SY;SYESYOSYWSYaSYgSik& %069V?q@AGU l!" Z*+m*-prtv:66|~::66: **2HKk:`a cdeg!h*i2k=lKmMrSsYtlHZZFC@!9*0 ) kwl ! *K^aOLMY:66^2N-pY: 6 6> 2:'-*Ù--*Ǚ,ʙM-L +kF{}~1HRU_atwyl4us1RH1 Q*+*ѡkl:*+جklK +,kl    D,+kl /*kl /*kl  6iYK*Y<YM,kl * *kl!(*+-k`lB@%@1@=@G@Q@Y@c@PK &^D>xxm+org/openqa/selenium/ExplodingSupplier.class1 %org/openqa/selenium/ExplodingSupplierjava/lang/Objectcom/google/common/base/Supplier()VCode  LineNumberTableLocalVariableTablethis'Lorg/openqa/selenium/ExplodingSupplier;get!()Lorg/openqa/selenium/WebDriver;'java/lang/UnsupportedOperationException+Cowardly refusing to create a new WebDriver  (Ljava/lang/String;)V()Ljava/lang/Object;   SourceFileExplodingSupplier.java SignatureTLjava/lang/Object;Lcom/google/common/base/Supplier;  /*    4 Y   A %*  PK %^D>ozTT3org/openqa/selenium/WebDriverCommandProcessor.class16-org/openqa/selenium/WebDriverCommandProcessorjava/lang/Object*com/thoughtworks/selenium/CommandProcessor(org/openqa/selenium/internal/WrapsDriverseleneseMethodsLjava/util/Map; SignaturecLjava/util/Map;baseUrlLjava/lang/String;timer6Lorg/openqa/selenium/internal/seleniumemulation/Timer; scriptMutator@Lorg/openqa/selenium/internal/seleniumemulation/CompoundMutator;maker!Lcom/google/common/base/Supplier;BLcom/google/common/base/Supplier;driverLorg/openqa/selenium/WebDriver;(Ljava/lang/String;)VCode%org/openqa/selenium/SuppliesWebDriver  .org/openqa/selenium/remote/DesiredCapabilities !"firefox2()Lorg/openqa/selenium/remote/DesiredCapabilities; $ %%(Lorg/openqa/selenium/Capabilities;)V ' (6(Ljava/lang/String;Lcom/google/common/base/Supplier;)VLineNumberTableLocalVariableTablethis/Lorg/openqa/selenium/WebDriverCommandProcessor;7(Ljava/lang/String;Lorg/openqa/selenium/Capabilities;)VlikeThis"Lorg/openqa/selenium/Capabilities;4(Ljava/lang/String;Lorg/openqa/selenium/WebDriver;)V2%org/openqa/selenium/ExplodingSupplier 14 5()V 7  9 :;assertDriverSupportsJavascript"(Lorg/openqa/selenium/WebDriver;)V = >5setUpMethodMapW(Ljava/lang/String;Lcom/google/common/base/Supplier;)V 4 BDCcom/google/common/collect/Maps EF newHashMap()Ljava/util/HashMap; H J L/ NPOjava/lang/String QRendsWith(Ljava/lang/String;)Z NT UVlength()I NX YZ substring(II)Ljava/lang/String; \ ^4org/openqa/selenium/internal/seleniumemulation/Timeru0 ]b c(J)V e g>org/openqa/selenium/internal/seleniumemulation/CompoundMutator fi  k LocalVariableTypeTablegetUnderlyingWebDriver!()Lorg/openqa/selenium/WebDriver; DeprecatedRuntimeVisibleAnnotationsLjava/lang/Deprecated;getWrappedDrivergetRemoteControlServerLocation()Ljava/lang/String;v'java/lang/UnsupportedOperationException u4 doCommand9(Ljava/lang/String;[Ljava/lang/String;)Ljava/lang/String; { |}execute9(Ljava/lang/String;[Ljava/lang/String;)Ljava/lang/Object;  ttoString commandNameargs[Ljava/lang/String;valLjava/lang/Object;setExtensionJssstart  (Ljava/lang/Object;)Vjava/lang/StringBuilderUnsure how to process: i append-(Ljava/lang/String;)Ljava/lang/StringBuilder;  ui+com/thoughtworks/selenium/SeleniumException1You may not start more than one session at a time i com/google/common/base/Supplier get()Ljava/lang/Object;org/openqa/selenium/WebDriverostop ] 5 5quit getStringgetStringArray:(Ljava/lang/String;[Ljava/lang/String;)[Ljava/lang/String; getNumber9(Ljava/lang/String;[Ljava/lang/String;)Ljava/lang/Number;java/lang/NumbergetNumberArray:(Ljava/lang/String;[Ljava/lang/String;)[Ljava/lang/Number;strings getBoolean((Ljava/lang/String;[Ljava/lang/String;)Zjava/lang/Boolean  booleanValue()ZgetBooleanArray)(Ljava/lang/String;[Ljava/lang/String;)[Z  java/util/Map &(Ljava/lang/Object;)Ljava/lang/Object;>org/openqa/selenium/internal/seleniumemulation/SeleneseCommand ] run(Lorg/openqa/selenium/internal/seleniumemulation/SeleneseCommand;Lorg/openqa/selenium/WebDriver;[Ljava/lang/String;)Ljava/lang/Object;command@Lorg/openqa/selenium/internal/seleniumemulation/SeleneseCommand; addMutatorA(Lorg/openqa/selenium/internal/seleniumemulation/ScriptMutator;)V f mutator>Lorg/openqa/selenium/internal/seleniumemulation/ScriptMutator;isMethodAvailable  containsKey(Ljava/lang/Object;)Z methodName addMethodU(Ljava/lang/String;Lorg/openqa/selenium/internal/seleniumemulation/SeleneseCommand;)V put8(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object; getMethodT(Ljava/lang/String;)Lorg/openqa/selenium/internal/seleniumemulation/SeleneseCommand;&org/openqa/selenium/JavascriptExecutorjava/lang/IllegalStateException Driver instance must support JS. i isJavascriptEnabledJS support must be enabled.org/openqa/selenium/internal/seleniumemulation/GetConfirmation  getCookie8org/openqa/selenium/internal/seleniumemulation/GetCookie 4getCookieByName>org/openqa/selenium/internal/seleniumemulation/GetCookieByName 4getElementHeight?org/openqa/selenium/internal/seleniumemulation/GetElementHeight getElementIndex>org/openqa/selenium/internal/seleniumemulation/GetElementIndex tgetElementPositionLeftEorg/openqa/selenium/internal/seleniumemulation/GetElementPositionLeft getElementPositionTopDorg/openqa/selenium/internal/seleniumemulation/GetElementPositionTop getElementWidth>org/openqa/selenium/internal/seleniumemulation/GetElementWidth getEval6org/openqa/selenium/internal/seleniumemulation/GetEval   getExpressionorg/openqa/selenium/internal/seleniumemulation/IsCookiePresent P4T isEditableV9org/openqa/selenium/internal/seleniumemulation/IsEditable UYisElementPresent[?org/openqa/selenium/internal/seleniumemulation/IsElementPresent Z^ isOrdered`8org/openqa/selenium/internal/seleniumemulation/IsOrdered _tcisSomethingSelectedeBorg/openqa/selenium/internal/seleniumemulation/IsSomethingSelected dh isTextPresentjorg/openqa/selenium/internal/seleniumemulation/RemoveSelection   runScript8org/openqa/selenium/internal/seleniumemulation/RunScript select;org/openqa/selenium/internal/seleniumemulation/SelectOption  (Lorg/openqa/selenium/internal/seleniumemulation/AlertOverride;Lorg/openqa/selenium/internal/seleniumemulation/SeleniumSelect;)V selectFrame:org/openqa/selenium/internal/seleniumemulation/SelectFrame  ;(Lorg/openqa/selenium/internal/seleniumemulation/Windows;)V selectWindow;org/openqa/selenium/internal/seleniumemulation/SelectWindow setBrowserLogLevel setContextsetSpeed setTimeout9org/openqa/selenium/internal/seleniumemulation/SetTimeout  9(Lorg/openqa/selenium/internal/seleniumemulation/Timer;)V shiftKeyDown;org/openqa/selenium/internal/seleniumemulation/ShiftKeyDown  shiftKeyUp9org/openqa/selenium/internal/seleniumemulation/ShiftKeyUp submit5org/openqa/selenium/internal/seleniumemulation/Submit type3org/openqa/selenium/internal/seleniumemulation/Type  (Lorg/openqa/selenium/internal/seleniumemulation/AlertOverride;Lorg/openqa/selenium/internal/seleniumemulation/JavascriptLibrary;Lorg/openqa/selenium/internal/seleniumemulation/ElementFinder;Lorg/openqa/selenium/internal/seleniumemulation/KeyState;)VtypeKeysuncheck6org/openqa/selenium/internal/seleniumemulation/Uncheck 0 useXpathLibrary waitForCondition?org/openqa/selenium/internal/seleniumemulation/WaitForCondition waitForFrameToLoadwaitForPageToLoad@org/openqa/selenium/internal/seleniumemulation/WaitForPageToLoad 4 waitForPopUp;org/openqa/selenium/internal/seleniumemulation/WaitForPopup  windowFocus :org/openqa/selenium/internal/seleniumemulation/WindowFocus $#windowMaximize%=org/openqa/selenium/internal/seleniumemulation/WindowMaximize $$ elementFinder>Lorg/openqa/selenium/internal/seleniumemulation/ElementFinder;javascriptLibraryBLorg/openqa/selenium/internal/seleniumemulation/JavascriptLibrary;keyState9Lorg/openqa/selenium/internal/seleniumemulation/KeyState; alertOverride>Lorg/openqa/selenium/internal/seleniumemulation/AlertOverride;?Lorg/openqa/selenium/internal/seleniumemulation/SeleniumSelect;windows8Lorg/openqa/selenium/internal/seleniumemulation/Windows; SourceFileWebDriverCommandProcessor.java InnerClassesProperty!     H*+Y#&) *+, -P*+Y,#&)  * +, ./0i*+1Y3&*,6*,8*<) * +, ( ?K*@*AG*,I+KM*++SdW[*+[*]Y_ad*fY+hj)&  +0>J* K+,K Kl Kmnopq/*6)* +,rn/*6)* +,st2uYw)* +,xyf*+,zN--~) **+, <uYw)*+,54*) * +,LuYY+)*+,v.*6 Y**I6**68*<)!)-*.+,.5W*d*6 *6*6)* +,yH *+,zN)*  +,  H *+,z)*  +,  H *+,z)*  +,  FuYw)* +,K *+,z) *  +,  FuYw)* +,|}})*G+N- uY+*d-*6,ǰ)**)+,))A *j+ϱ) * +, R? *G+)* +, O *G+,W) # $*  +,  B*G+Ű)'*+,:;l(+ Y+ Y翱)-.12'4*(+,(>5  YLYMYNY:Y+:Y*6:*GY+W*G Y+ W*GY-W*GY-W*GY,+W*G!#Y+%W*G&(Y*W*G+-Y+/W*G24Y+6W*G79Y;W*G>9Y;W*G@BYDW*GEGYIW*GJLY-NW*GOQY-SW*GTVYXW*GY[Y]W*G^`Y+bW*GceY+gW*GheY+gW*GjlY+nW*GoqY+,sW*GvxY+,vzW*G}YW*GYW*GYW*GYW*GYW*GY+W*GYW*GYW*GYW*GYW*GYW*GY+W*GY+,W*GY+ĹW*GŻY+ɹW*GʻY+ιW*GϻY*jӹW*GջYٹW*GڻY޹W*G߻YW*GYW*GYW*GYW*GYW*GYW*GYW*GYW*G YW*G  YW*GYW*GY+,W*G!Y,#W*G&(Y*W*G+-Y+/W*G02Y4W*G57Y9W*G:W*G?AYCW*GDFY+HW*GIKYMW*GNPYRW*GSUY+WW*GXZY+\W*G]_Y+,aW*GbdYfW*GgiY,kW*GlnY+pW*GqsY+,-uwW*Gz|Y+~W*GsY+,-wW*GY-W*GY-W*GY+,W*GY+,W*GY+,W*GY+,W*GY+,W*GY+,W*GY+,W*GY+,W*GY*[W*GYY*jӷW*GYW*GY+¹W*GûY+ǹW*GȻY*j̹W*GͻYѹW*GԻYعW*GۻY߹W*GYW*GYW*GYW*GY*dW*GY-W*GY-W*GY+W*GY,+-W*G|Y+~W*GY+ W*G YW*G Y*jW*GYW*GYW*GYW*GY,!W*G"$Y,&W)v789;!<+=8@MAdByCDEFGHIJ%K9LMMbNwOPQRSTU V"W8XLY`Zt[\]^_`abc$d(c.eCfXgmhijklmn o%p>qWrpstuvwxy z{2|H}^~s7Nh}(AZr-BWl   7 L ` v  *H +, '( )* +,! -.+ v/8 i01234 5@PK &^D> nn)org/openqa/selenium/TakesScreenshot.class1#org/openqa/selenium/TakesScreenshotjava/lang/ObjectgetScreenshotAs4(Lorg/openqa/selenium/OutputType;)Ljava/lang/Object; Exceptions &org/openqa/selenium/WebDriverException Signature@(Lorg/openqa/selenium/OutputType;)TX; SourceFileTakesScreenshot.java    PK &^D>f[[4org/openqa/selenium/ElementNotVisibleException.class1.org/openqa/selenium/ElementNotVisibleException&org/openqa/selenium/WebDriverException(Ljava/lang/String;)VCode  LineNumberTableLocalVariableTablethis0Lorg/openqa/selenium/ElementNotVisibleException;messageLjava/lang/String;*(Ljava/lang/String;Ljava/lang/Throwable;)V  causeLjava/lang/Throwable; SourceFileElementNotVisibleException.java!>*+   I*+,   PK &^D>MM0org/openqa/selenium/NoSuchElementException.class1*org/openqa/selenium/NoSuchElementException%org/openqa/selenium/NotFoundException(Ljava/lang/String;)VCode  LineNumberTableLocalVariableTablethis,Lorg/openqa/selenium/NoSuchElementException;reasonLjava/lang/String;*(Ljava/lang/String;Ljava/lang/Throwable;)V  causeLjava/lang/Throwable; SourceFileNoSuchElementException.java!>*+   I*+,  !  PK &^D>,l77org/openqa/selenium/Point.class1*org/openqa/selenium/Pointjava/lang/ObjectxIy(II)VCode   ()V    LineNumberTableLocalVariableTablethisLorg/openqa/selenium/Point;getX()IgetYmoveBy(II)Lorg/openqa/selenium/Point;   xOffsetyOffsetequals(Ljava/lang/Object;)ZoLjava/lang/Object;otherhashCodemovenewXnewY SourceFile Point.java!  Y* **    /*  /*  RY*`*`   r(++M,*,* "# ((!"#$ 7 * *`x*  %  Q **./ 0   & '()PK &^D>7RRorg/openqa/selenium/By$1.class1Forg/openqa/selenium/By$1org/openqa/selenium/Byval$idLjava/lang/String;(Ljava/lang/String;)VCode    ()VLineNumberTableLocalVariableTablethisLorg/openqa/selenium/By$1; findElements5(Lorg/openqa/selenium/SearchContext;)Ljava/util/List; SignatureW(Lorg/openqa/selenium/SearchContext;)Ljava/util/List;&org/openqa/selenium/internal/FindsById  findElementsById$(Ljava/lang/String;)Ljava/util/List;)org/openqa/selenium/internal/FindsByXPath java/lang/StringBuilder" *[@id = ' $  & '(append-(Ljava/lang/String;)Ljava/lang/StringBuilder;*'] , -.toString()Ljava/lang/String; 0 1findElementsByXPathcontext#Lorg/openqa/selenium/SearchContext; findElementE(Lorg/openqa/selenium/SearchContext;)Lorg/openqa/selenium/WebElement; 7 89findElementById4(Ljava/lang/String;)Lorg/openqa/selenium/WebElement; ; <9findElementByXPath>By.id:  SourceFileBy.javaEnclosingMethod CDid,(Ljava/lang/String;)Lorg/openqa/selenium/By; InnerClasses  8 *+ *  7   s7++* +Y!#* %)%+/:;<772345 s7++* 6+Y!#* %)%+:ABC7723-. >Y=#* %+H ?@ABE PK &^D>scorg/openqa/selenium/By$2.class1:org/openqa/selenium/By$2org/openqa/selenium/By val$linkTextLjava/lang/String;(Ljava/lang/String;)VCode    ()VLineNumberTableLocalVariableTablethisLorg/openqa/selenium/By$2; findElements5(Lorg/openqa/selenium/SearchContext;)Ljava/util/List; SignatureW(Lorg/openqa/selenium/SearchContext;)Ljava/util/List;,org/openqa/selenium/internal/FindsByLinkText  findElementsByLinkText$(Ljava/lang/String;)Ljava/util/List;context#Lorg/openqa/selenium/SearchContext; findElementE(Lorg/openqa/selenium/SearchContext;)Lorg/openqa/selenium/WebElement; " #$findElementByLinkText4(Ljava/lang/String;)Lorg/openqa/selenium/WebElement;toString()Ljava/lang/String;(java/lang/StringBuilder* By.linkText: ',  '. /0append-(Ljava/lang/String;)Ljava/lang/StringBuilder; '2 %& SourceFileBy.javaEnclosingMethod 78linkText,(Ljava/lang/String;)Lorg/openqa/selenium/By; InnerClasses  8 *+ *  U   B+* X  B+* !]%& >'Y)+* -1b 34569 PK &^D>Goorg/openqa/selenium/By$3.class1:org/openqa/selenium/By$3org/openqa/selenium/By val$linkTextLjava/lang/String;(Ljava/lang/String;)VCode    ()VLineNumberTableLocalVariableTablethisLorg/openqa/selenium/By$3; findElements5(Lorg/openqa/selenium/SearchContext;)Ljava/util/List; SignatureW(Lorg/openqa/selenium/SearchContext;)Ljava/util/List;,org/openqa/selenium/internal/FindsByLinkText  findElementsByPartialLinkText$(Ljava/lang/String;)Ljava/util/List;context#Lorg/openqa/selenium/SearchContext; findElementE(Lorg/openqa/selenium/SearchContext;)Lorg/openqa/selenium/WebElement; " #$findElementByPartialLinkText4(Ljava/lang/String;)Lorg/openqa/selenium/WebElement;toString()Ljava/lang/String;(java/lang/StringBuilder*By.partialLinkText: ',  '. /0append-(Ljava/lang/String;)Ljava/lang/StringBuilder; '2 %& SourceFileBy.javaEnclosingMethod 78partialLinkText,(Ljava/lang/String;)Lorg/openqa/selenium/By; InnerClasses  8 *+ *  o   B+* r  B+* !w%& >'Y)+* -1| 34569 PK &^D> ccorg/openqa/selenium/By$4.class1Forg/openqa/selenium/By$4org/openqa/selenium/Byval$nameLjava/lang/String;(Ljava/lang/String;)VCode    ()VLineNumberTableLocalVariableTablethisLorg/openqa/selenium/By$4; findElements5(Lorg/openqa/selenium/SearchContext;)Ljava/util/List; SignatureW(Lorg/openqa/selenium/SearchContext;)Ljava/util/List;(org/openqa/selenium/internal/FindsByName  findElementsByName$(Ljava/lang/String;)Ljava/util/List;)org/openqa/selenium/internal/FindsByXPath java/lang/StringBuilder".//*[@name = ' $  & '(append-(Ljava/lang/String;)Ljava/lang/StringBuilder;*'] , -.toString()Ljava/lang/String; 0 1findElementsByXPathcontext#Lorg/openqa/selenium/SearchContext; findElementE(Lorg/openqa/selenium/SearchContext;)Lorg/openqa/selenium/WebElement; 7 89findElementByName4(Ljava/lang/String;)Lorg/openqa/selenium/WebElement; ; <9findElementByXPath> By.name:  SourceFileBy.javaEnclosingMethod CDname,(Ljava/lang/String;)Lorg/openqa/selenium/By; InnerClasses  8 *+ *     s7++* +Y!#* %)%+/772345 s7++* 6+Y!#* %)%+:7723-. >Y=#* %+ ?@ABE PK &^D>UUorg/openqa/selenium/By$5.class1Dorg/openqa/selenium/By$5org/openqa/selenium/Byval$nameLjava/lang/String;(Ljava/lang/String;)VCode    ()VLineNumberTableLocalVariableTablethisLorg/openqa/selenium/By$5; findElements5(Lorg/openqa/selenium/SearchContext;)Ljava/util/List; SignatureW(Lorg/openqa/selenium/SearchContext;)Ljava/util/List;+org/openqa/selenium/internal/FindsByTagName  findElementsByTagName$(Ljava/lang/String;)Ljava/util/List;)org/openqa/selenium/internal/FindsByXPath java/lang/StringBuilder".// $  & '(append-(Ljava/lang/String;)Ljava/lang/StringBuilder; * +,toString()Ljava/lang/String; . /findElementsByXPathcontext#Lorg/openqa/selenium/SearchContext; findElementE(Lorg/openqa/selenium/SearchContext;)Lorg/openqa/selenium/WebElement; 5 67findElementByTagName4(Ljava/lang/String;)Lorg/openqa/selenium/WebElement; 9 :7findElementByXPath< By.tagName:  SourceFileBy.javaEnclosingMethod ABtagName,(Ljava/lang/String;)Lorg/openqa/selenium/By; InnerClasses  8 *+ *     n2++* +Y!#* %)-220123 n2++* 4+Y!#* %)82201+, >Y;#* %) =>?@C PK &^D>8morg/openqa/selenium/By$6.class1:org/openqa/selenium/By$6org/openqa/selenium/Byval$xpathExpressionLjava/lang/String;(Ljava/lang/String;)VCode    ()VLineNumberTableLocalVariableTablethisLorg/openqa/selenium/By$6; findElements5(Lorg/openqa/selenium/SearchContext;)Ljava/util/List; SignatureW(Lorg/openqa/selenium/SearchContext;)Ljava/util/List;)org/openqa/selenium/internal/FindsByXPath  findElementsByXPath$(Ljava/lang/String;)Ljava/util/List;context#Lorg/openqa/selenium/SearchContext; findElementE(Lorg/openqa/selenium/SearchContext;)Lorg/openqa/selenium/WebElement; " #$findElementByXPath4(Ljava/lang/String;)Lorg/openqa/selenium/WebElement;toString()Ljava/lang/String;(java/lang/StringBuilder* By.xpath: ',  '. /0append-(Ljava/lang/String;)Ljava/lang/StringBuilder; '2 %& SourceFileBy.javaEnclosingMethod 78xpath,(Ljava/lang/String;)Lorg/openqa/selenium/By; InnerClasses  8 *+ *     B+*   B+* !%& >'Y)+* -1 34569 PK &^D>EXorg/openqa/selenium/By$7.class1Torg/openqa/selenium/By$7org/openqa/selenium/By val$classNameLjava/lang/String;(Ljava/lang/String;)VCode    ()VLineNumberTableLocalVariableTablethisLorg/openqa/selenium/By$7; findElements5(Lorg/openqa/selenium/SearchContext;)Ljava/util/List; SignatureW(Lorg/openqa/selenium/SearchContext;)Ljava/util/List;-org/openqa/selenium/internal/FindsByClassName  findElementsByClassName$(Ljava/lang/String;)Ljava/util/List;)org/openqa/selenium/internal/FindsByXPath java/lang/StringBuilder".//*[ $ &class ( )*containingWord8(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String; , -.append-(Ljava/lang/String;)Ljava/lang/StringBuilder;0] 2 34toString()Ljava/lang/String; 6 7findElementsByXPathcontext#Lorg/openqa/selenium/SearchContext; findElementE(Lorg/openqa/selenium/SearchContext;)Lorg/openqa/selenium/WebElement; = >?findElementByClassName4(Ljava/lang/String;)Lorg/openqa/selenium/WebElement; A B?findElementByXPathD%contains(concat(' ',normalize-space(@F ),' '),' H ') attributewordLBy.className:  SourceFileBy.javaEnclosingMethod QR className,(Ljava/lang/String;)Lorg/openqa/selenium/By; InnerClasses  8 *+ *     y=++* +Y!#*%* '+/+15==89:; y=++* <+Y!#*%* '+/+1@==89)* ]YC#++E+,+G+1 IJ34 >YK#* +1 MNOPS PK &^D>W*/org/openqa/selenium/By$8.class1Aorg/openqa/selenium/By$8org/openqa/selenium/By val$selectorLjava/lang/String;(Ljava/lang/String;)VCode    ()VLineNumberTableLocalVariableTablethisLorg/openqa/selenium/By$8; findElementE(Lorg/openqa/selenium/SearchContext;)Lorg/openqa/selenium/WebElement;/org/openqa/selenium/internal/FindsByCssSelector  findElementByCssSelector4(Ljava/lang/String;)Lorg/openqa/selenium/WebElement;&org/openqa/selenium/WebDriverExceptionjava/lang/StringBuilder 8Driver does not support finding an element by selector: "  $ %&append-(Ljava/lang/String;)Ljava/lang/StringBuilder; ( )*toString()Ljava/lang/String; "context#Lorg/openqa/selenium/SearchContext; findElements5(Lorg/openqa/selenium/SearchContext;)Ljava/util/List; SignatureW(Lorg/openqa/selenium/SearchContext;)Ljava/util/List; 3 45findElementsByCssSelector$(Ljava/lang/String;)Ljava/util/List;76Driver does not support finding elements by selector: 9 By.selector:  SourceFileBy.javaEnclosingMethod >? cssSelector,(Ljava/lang/String;)Lorg/openqa/selenium/By; InnerClasses  8 *+ *     t0++* YY!* #'+,00,-./01 t0++* 2YY6!* #'+"#&',&00,-)* >Y8!* #', :;<=@ PK &^D>F org/openqa/selenium/By.class1org/openqa/selenium/Byjava/lang/Object()VCode  LineNumberTableLocalVariableTablethisLorg/openqa/selenium/By;id,(Ljava/lang/String;)Lorg/openqa/selenium/By;"java/lang/IllegalArgumentException.Cannot find elements with a null id attribute.  (Ljava/lang/String;)Vorg/openqa/selenium/By$1 Ljava/lang/String;linkText,Cannot find elements when link text is null.org/openqa/selenium/By$2 partialLinkText#org/openqa/selenium/By$3 "name',Cannot find elements when name text is null.)org/openqa/selenium/By$4 (tagName-0Cannot find elements when name tag name is null./org/openqa/selenium/By$5 .xpath37Cannot find elements when the XPath expression is null.5org/openqa/selenium/By$6 4xpathExpression className:@?java/lang/String ABmatches(Ljava/lang/String;)ZD+org/openqa/selenium/IllegalLocatorExceptionFhCompound class names are not supported. Consider searching for one class name and filtering the results. CIorg/openqa/selenium/By$7 H cssSelectorM.Cannot find elements when the selector is nullOorg/openqa/selenium/By$8 Nselector findElementE(Lorg/openqa/selenium/SearchContext;)Lorg/openqa/selenium/WebElement; U VW findElements5(Lorg/openqa/selenium/SearchContext;)Ljava/util/List; Y[Zjava/util/List \]size()I_*org/openqa/selenium/NoSuchElementExceptionajava/lang/StringBuildercCannot locate an element using ` f ghtoString()Ljava/lang/String; `j klappend-(Ljava/lang/String;)Ljava/lang/StringBuilder; `f ^ Yp qrget(I)Ljava/lang/Object;torg/openqa/selenium/WebElementcontext#Lorg/openqa/selenium/SearchContext; allElementsLjava/util/List;LocalVariableTypeTable2Ljava/util/List; SignatureW(Lorg/openqa/selenium/SearchContext;)Ljava/util/List;equals(Ljava/lang/Object;)Z  getClass()Ljava/lang/Class; > }~oLjava/lang/Object;byhashCode > ] SourceFileBy.java InnerClasses! /* .  I* YY* 457  I* YY*  RSU  !I* Y"Y*$ lmo  %I* Y&(Y**  % +I* Y,.Y*0  % 1I* Y24Y*6  7 8l** Y9*;= CYEGHY*J ! *8 KI* YLNY*P  QRS9*+TM, ,X^Y`Ybd*eimn,os 9:;.< 9 9uv3wxy 3wzVW{|}~s)*++*++M*e,e IJLN ) ) ]2*e S  B"(.4HNPK lC>n($org/openqa/selenium/.svn/all-wcpropsK 25 svn:wc:ra_dav:version-url V 61 /svn/!svn/ver/11261/trunk/java/client/src/org/openqa/selenium END Keyboard.java K 25 svn:wc:ra_dav:version-url V 75 /svn/!svn/ver/11226/trunk/java/client/src/org/openqa/selenium/Keyboard.java END RenderedWebElement.java K 25 svn:wc:ra_dav:version-url V 85 /svn/!svn/ver/11226/trunk/java/client/src/org/openqa/selenium/RenderedWebElement.java END Speed.java K 25 svn:wc:ra_dav:version-url V 72 /svn/!svn/ver/11226/trunk/java/client/src/org/openqa/selenium/Speed.java END ElementNotVisibleException.java K 25 svn:wc:ra_dav:version-url V 93 /svn/!svn/ver/11226/trunk/java/client/src/org/openqa/selenium/ElementNotVisibleException.java END Alert.java K 25 svn:wc:ra_dav:version-url V 72 /svn/!svn/ver/11226/trunk/java/client/src/org/openqa/selenium/Alert.java END WebDriverException.java K 25 svn:wc:ra_dav:version-url V 85 /svn/!svn/ver/11226/trunk/java/client/src/org/openqa/selenium/WebDriverException.java END Cookie.java K 25 svn:wc:ra_dav:version-url V 73 /svn/!svn/ver/11226/trunk/java/client/src/org/openqa/selenium/Cookie.java END UnhandledAlertException.java K 25 svn:wc:ra_dav:version-url V 90 /svn/!svn/ver/11226/trunk/java/client/src/org/openqa/selenium/UnhandledAlertException.java END IllegalLocatorException.java K 25 svn:wc:ra_dav:version-url V 90 /svn/!svn/ver/11226/trunk/java/client/src/org/openqa/selenium/IllegalLocatorException.java END Rotatable.java K 25 svn:wc:ra_dav:version-url V 76 /svn/!svn/ver/11226/trunk/java/client/src/org/openqa/selenium/Rotatable.java END ExplodingSupplier.java K 25 svn:wc:ra_dav:version-url V 84 /svn/!svn/ver/11226/trunk/java/client/src/org/openqa/selenium/ExplodingSupplier.java END SuppliesWebDriver.java K 25 svn:wc:ra_dav:version-url V 84 /svn/!svn/ver/11226/trunk/java/client/src/org/openqa/selenium/SuppliesWebDriver.java END StaleElementReferenceException.java K 25 svn:wc:ra_dav:version-url V 97 /svn/!svn/ver/11226/trunk/java/client/src/org/openqa/selenium/StaleElementReferenceException.java END SeleneseCommandExecutor.java K 25 svn:wc:ra_dav:version-url V 90 /svn/!svn/ver/11226/trunk/java/client/src/org/openqa/selenium/SeleneseCommandExecutor.java END Platform.java K 25 svn:wc:ra_dav:version-url V 75 /svn/!svn/ver/11226/trunk/java/client/src/org/openqa/selenium/Platform.java END NoAlertPresentException.java K 25 svn:wc:ra_dav:version-url V 90 /svn/!svn/ver/11226/trunk/java/client/src/org/openqa/selenium/NoAlertPresentException.java END JavascriptExecutor.java K 25 svn:wc:ra_dav:version-url V 85 /svn/!svn/ver/11226/trunk/java/client/src/org/openqa/selenium/JavascriptExecutor.java END WebDriverCommandProcessor.java K 25 svn:wc:ra_dav:version-url V 92 /svn/!svn/ver/11226/trunk/java/client/src/org/openqa/selenium/WebDriverCommandProcessor.java END NoSuchElementException.java K 25 svn:wc:ra_dav:version-url V 89 /svn/!svn/ver/11226/trunk/java/client/src/org/openqa/selenium/NoSuchElementException.java END Capabilities.java K 25 svn:wc:ra_dav:version-url V 79 /svn/!svn/ver/11226/trunk/java/client/src/org/openqa/selenium/Capabilities.java END build.desc K 25 svn:wc:ra_dav:version-url V 72 /svn/!svn/ver/11261/trunk/java/client/src/org/openqa/selenium/build.desc END OutputType.java K 25 svn:wc:ra_dav:version-url V 77 /svn/!svn/ver/11226/trunk/java/client/src/org/openqa/selenium/OutputType.java END TimeoutException.java K 25 svn:wc:ra_dav:version-url V 83 /svn/!svn/ver/11226/trunk/java/client/src/org/openqa/selenium/TimeoutException.java END TakesScreenshot.java K 25 svn:wc:ra_dav:version-url V 82 /svn/!svn/ver/11226/trunk/java/client/src/org/openqa/selenium/TakesScreenshot.java END NoSuchWindowException.java K 25 svn:wc:ra_dav:version-url V 88 /svn/!svn/ver/11226/trunk/java/client/src/org/openqa/selenium/NoSuchWindowException.java END SearchContext.java K 25 svn:wc:ra_dav:version-url V 80 /svn/!svn/ver/11226/trunk/java/client/src/org/openqa/selenium/SearchContext.java END By.java K 25 svn:wc:ra_dav:version-url V 69 /svn/!svn/ver/11226/trunk/java/client/src/org/openqa/selenium/By.java END Keys.java K 25 svn:wc:ra_dav:version-url V 71 /svn/!svn/ver/11226/trunk/java/client/src/org/openqa/selenium/Keys.java END NotFoundException.java K 25 svn:wc:ra_dav:version-url V 84 /svn/!svn/ver/11226/trunk/java/client/src/org/openqa/selenium/NotFoundException.java END Proxy.java K 25 svn:wc:ra_dav:version-url V 72 /svn/!svn/ver/11226/trunk/java/client/src/org/openqa/selenium/Proxy.java END Dimension.java K 25 svn:wc:ra_dav:version-url V 76 /svn/!svn/ver/11226/trunk/java/client/src/org/openqa/selenium/Dimension.java END WebDriverBackedSelenium.java K 25 svn:wc:ra_dav:version-url V 90 /svn/!svn/ver/11226/trunk/java/client/src/org/openqa/selenium/WebDriverBackedSelenium.java END InvalidCookieDomainException.java K 25 svn:wc:ra_dav:version-url V 95 /svn/!svn/ver/11226/trunk/java/client/src/org/openqa/selenium/InvalidCookieDomainException.java END WebElement.java K 25 svn:wc:ra_dav:version-url V 77 /svn/!svn/ver/11226/trunk/java/client/src/org/openqa/selenium/WebElement.java END Mouse.java K 25 svn:wc:ra_dav:version-url V 72 /svn/!svn/ver/11226/trunk/java/client/src/org/openqa/selenium/Mouse.java END Point.java K 25 svn:wc:ra_dav:version-url V 72 /svn/!svn/ver/11226/trunk/java/client/src/org/openqa/selenium/Point.java END NoSuchFrameException.java K 25 svn:wc:ra_dav:version-url V 87 /svn/!svn/ver/11226/trunk/java/client/src/org/openqa/selenium/NoSuchFrameException.java END WebDriver.java K 25 svn:wc:ra_dav:version-url V 76 /svn/!svn/ver/11226/trunk/java/client/src/org/openqa/selenium/WebDriver.java END ScreenOrientation.java K 25 svn:wc:ra_dav:version-url V 84 /svn/!svn/ver/11226/trunk/java/client/src/org/openqa/selenium/ScreenOrientation.java END XPathLookupException.java K 25 svn:wc:ra_dav:version-url V 87 /svn/!svn/ver/11226/trunk/java/client/src/org/openqa/selenium/XPathLookupException.java END HasInputDevices.java K 25 svn:wc:ra_dav:version-url V 82 /svn/!svn/ver/11226/trunk/java/client/src/org/openqa/selenium/HasInputDevices.java END UnableToSetCookieException.java K 25 svn:wc:ra_dav:version-url V 93 /svn/!svn/ver/11226/trunk/java/client/src/org/openqa/selenium/UnableToSetCookieException.java END PK lC>i.A[[ org/openqa/selenium/.svn/entries8 dir 11264 http://selenium.googlecode.com/svn/trunk/java/client/src/org/openqa/selenium http://selenium.googlecode.com/svn 2011-02-02T20:36:39.437809Z 11261 simon.m.stewart svn:special svn:externals svn:needs-lock 07704840-8298-11de-bf8c-fd130f914ac9 Speed.java file 2011-02-03T12:01:18.000000Z e18078e8a9431a074d7e0df879d4d1fb 2011-02-01T13:59:17.176547Z 11226 simon.m.stewart RenderedWebElement.java file 2011-02-03T12:01:18.000000Z 2b46017405ea5d6f315561c5a52271de 2011-02-01T13:59:17.176547Z 11226 simon.m.stewart Keyboard.java file 2011-02-03T12:01:18.000000Z c2a8768da60b9619bfbb36e1fa95595f 2011-02-01T13:59:17.176547Z 11226 simon.m.stewart android dir os dir Alert.java file 2011-02-03T12:01:18.000000Z b8739cf6ce88c82e7a94dcb772859c9f 2011-02-01T13:59:17.176547Z 11226 simon.m.stewart ElementNotVisibleException.java file 2011-02-03T12:01:18.000000Z 5c1c2b26db7466171a66a235f236cc98 2011-02-01T13:59:17.176547Z 11226 simon.m.stewart WebDriverException.java file 2011-02-03T12:01:18.000000Z 5e386e9c519344023c7dc2d9a1abd494 2011-02-01T13:59:17.176547Z 11226 simon.m.stewart UnhandledAlertException.java file 2011-02-03T12:01:18.000000Z 71bf546321591175297c03883b3ae0ad 2011-02-01T13:59:17.176547Z 11226 simon.m.stewart Cookie.java file 2011-02-03T12:01:18.000000Z 52484220a56691361fbe17eea4e687ec 2011-02-01T13:59:17.176547Z 11226 simon.m.stewart IllegalLocatorException.java file 2011-02-03T12:01:18.000000Z 80a0e1fa39330930f8571a078cf4bcd5 2011-02-01T13:59:17.176547Z 11226 simon.m.stewart ExplodingSupplier.java file 2011-02-03T12:01:18.000000Z 442acc52868feb7530c110da5c4e84c8 2011-02-01T13:59:17.176547Z 11226 simon.m.stewart Rotatable.java file 2011-02-03T12:01:18.000000Z 658d604d299540d052868836047ad8c5 2011-02-01T13:59:17.176547Z 11226 simon.m.stewart SuppliesWebDriver.java file 2011-02-03T12:01:18.000000Z 6a7f39774a1f1b26783fa1dbfb38e7f2 2011-02-01T13:59:17.176547Z 11226 simon.m.stewart StaleElementReferenceException.java file 2011-02-03T12:01:18.000000Z 42f4869f167ed2358a1260d55d91d6fc 2011-02-01T13:59:17.176547Z 11226 simon.m.stewart SeleneseCommandExecutor.java file 2011-02-03T12:01:18.000000Z 640900125dff4a476d9723cd578c566f 2011-02-01T13:59:17.176547Z 11226 simon.m.stewart firefox dir Platform.java file 2011-02-03T12:01:18.000000Z 197d0ccc13cafdee062855ace9decc13 2011-02-01T13:59:17.176547Z 11226 simon.m.stewart htmlunit dir NoAlertPresentException.java file 2011-02-03T12:01:18.000000Z 54b675799e88bf6954f5b5385b8cf83f 2011-02-01T13:59:17.176547Z 11226 simon.m.stewart JavascriptExecutor.java file 2011-02-03T12:01:18.000000Z 33be9293908f4dc3e5dfd904cd53ba75 2011-02-01T13:59:17.176547Z 11226 simon.m.stewart NoSuchElementException.java file 2011-02-03T12:01:18.000000Z 55fe09910d7b05ed892d4d881aeb9952 2011-02-01T13:59:17.176547Z 11226 simon.m.stewart WebDriverCommandProcessor.java file 2011-02-03T12:01:18.000000Z 8d4f6e132753073dfa8873baa964f599 2011-02-01T13:59:17.176547Z 11226 simon.m.stewart Capabilities.java file 2011-02-03T12:01:18.000000Z 46f425481edcedc8fe81c215d16a91b3 2011-02-01T13:59:17.176547Z 11226 simon.m.stewart internal dir build.desc file 2011-02-03T12:01:18.000000Z ad0736042f2fecfebfe8854fa92422fd 2011-02-02T20:36:39.437809Z 11261 simon.m.stewart iphone dir OutputType.java file 2011-02-03T12:01:18.000000Z 82576705ce5857892d7c5a54a053a936 2011-02-01T13:59:17.176547Z 11226 simon.m.stewart TakesScreenshot.java file 2011-02-03T12:01:18.000000Z 73667c2a66a0aa73dbd981c3b370bb78 2011-02-01T13:59:17.176547Z 11226 simon.m.stewart TimeoutException.java file 2011-02-03T12:01:18.000000Z 4d0676a8095a99b9e33240da55b88fbd 2011-02-01T13:59:17.176547Z 11226 simon.m.stewart net dir NoSuchWindowException.java file 2011-02-03T12:01:18.000000Z 967c905f0cdc813a2459c054f922f90d 2011-02-01T13:59:17.176547Z 11226 simon.m.stewart browserlaunchers dir html5 dir By.java file 2011-02-03T12:01:18.000000Z 4d3c631f725169af958b63bd113af4c9 2011-02-01T13:59:17.176547Z 11226 simon.m.stewart SearchContext.java file 2011-02-03T12:01:18.000000Z 8a4f0840b19058b660adb7873ac2b733 2011-02-01T13:59:17.176547Z 11226 simon.m.stewart remote dir NotFoundException.java file 2011-02-03T12:01:18.000000Z d536f0362db2aa3f4009f258f46cc70a 2011-02-01T13:59:17.176547Z 11226 simon.m.stewart Keys.java file 2011-02-03T12:01:18.000000Z 5534f25e590198c1fa5dc41b33150dba 2011-02-01T13:59:17.176547Z 11226 simon.m.stewart ie dir lift dir Proxy.java file 2011-02-03T12:01:18.000000Z cc11dfd3b679e3772bf0a99d98b5d85c 2011-02-01T13:59:17.176547Z 11226 simon.m.stewart interactions dir WebDriverBackedSelenium.java file 2011-02-03T12:01:18.000000Z 084b3980c3ae7dcbe597590ae4200b66 2011-02-01T13:59:17.176547Z 11226 simon.m.stewart Dimension.java file 2011-02-03T12:01:18.000000Z 57a4c137728d95bcc52d65c82b6265b8 2011-02-01T13:59:17.176547Z 11226 simon.m.stewart io dir InvalidCookieDomainException.java file 2011-02-03T12:01:18.000000Z 5e6054aa642e3223dbee8848367f8cc9 2011-02-01T13:59:17.176547Z 11226 simon.m.stewart WebElement.java file 2011-02-03T12:01:18.000000Z 00a721670e83ff7111ec07049511f972 2011-02-01T13:59:17.176547Z 11226 simon.m.stewart Mouse.java file 2011-02-03T12:01:18.000000Z 9ae000671758c5f5a470fdfd548db2d8 2011-02-01T13:59:17.176547Z 11226 simon.m.stewart Point.java file 2011-02-03T12:01:18.000000Z c0d048e2f3b0e7bda9d9894d227cbe9b 2011-02-01T13:59:17.176547Z 11226 simon.m.stewart NoSuchFrameException.java file 2011-02-03T12:01:18.000000Z 38a23380dcd1ddcb607180843c967d04 2011-02-01T13:59:17.176547Z 11226 simon.m.stewart WebDriver.java file 2011-02-03T12:01:18.000000Z 61ab9af18ce85afd7e6ebf1a7b4c94d0 2011-02-01T13:59:17.176547Z 11226 simon.m.stewart ScreenOrientation.java file 2011-02-03T12:01:18.000000Z 2c4deb4f315ea6eb51b8462e3620b1a3 2011-02-01T13:59:17.176547Z 11226 simon.m.stewart support dir chrome dir XPathLookupException.java file 2011-02-03T12:01:18.000000Z c059922b8f8f364f634abe11df069709 2011-02-01T13:59:17.176547Z 11226 simon.m.stewart HasInputDevices.java file 2011-02-03T12:01:18.000000Z fd0be5919e9f85ba774e4583799f5cc5 2011-02-01T13:59:17.176547Z 11226 simon.m.stewart UnableToSetCookieException.java file 2011-02-03T12:01:18.000000Z c1695604cb99563f188dcc9a2889a3ec 2011-02-01T13:59:17.176547Z 11226 simon.m.stewart PK lC>Gorg/openqa/selenium/.svn/format8 PK lC>ύ''6org/openqa/selenium/.svn/text-base/Alert.java.svn-base/* Copyright 2007-2009 WebDriver committers Copyright 2007-2009 Google Inc. Portions copyright 2007 ThoughtWorks, Inc Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package org.openqa.selenium; public interface Alert { void dismiss(); void accept(); String getText(); void sendKeys(String keysToSend); } PK lC>;*/*/3org/openqa/selenium/.svn/text-base/By.java.svn-base/* Copyright 2007-2009 WebDriver committers Copyright 2007-2009 Google Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package org.openqa.selenium; import org.openqa.selenium.internal.FindsByClassName; import org.openqa.selenium.internal.FindsByCssSelector; import org.openqa.selenium.internal.FindsById; import org.openqa.selenium.internal.FindsByLinkText; import org.openqa.selenium.internal.FindsByName; import org.openqa.selenium.internal.FindsByTagName; import org.openqa.selenium.internal.FindsByXPath; import java.util.List; /** * Mechanism used to locate elements within a document. In order to create * your own locating mechanisms, it is possible to subclass this class and * override the protected methods as required, though it is expected that * that all subclasses rely on the basic finding mechanisms provided through * static methods of this class: * * * public WebElement findElement(WebDriver driver) { * WebElement element = driver.findElement(By.id(getSelector())); * if (element == null) * element = driver.findElement(By.name(getSelector()); * return element; * } * */ public abstract class By { /** * @param id The value of the "id" attribute to search for * @return a By which locates elements by the value of the "id" attribute. */ public static By id(final String id) { if (id == null) throw new IllegalArgumentException("Cannot find elements with a null id attribute."); return new By() { @Override public List findElements(SearchContext context) { if (context instanceof FindsById) return ((FindsById) context).findElementsById(id); return ((FindsByXPath) context).findElementsByXPath("*[@id = '" + id + "']"); } @Override public WebElement findElement(SearchContext context) { if (context instanceof FindsById) return ((FindsById) context).findElementById(id); return ((FindsByXPath) context).findElementByXPath("*[@id = '" + id + "']"); } @Override public String toString() { return "By.id: " + id; } }; } /** * @param linkText The exact text to match against * @return a By which locates A elements by the exact text it displays */ public static By linkText(final String linkText) { if (linkText == null) throw new IllegalArgumentException("Cannot find elements when link text is null."); return new By() { @Override public List findElements(SearchContext context) { return ((FindsByLinkText) context).findElementsByLinkText(linkText); } @Override public WebElement findElement(SearchContext context) { return ((FindsByLinkText) context).findElementByLinkText(linkText); } @Override public String toString() { return "By.linkText: " + linkText; } }; } /** * @param linkText The text to match against * @return a By which locates A elements that contain the given link text */ public static By partialLinkText(final String linkText) { if (linkText == null) throw new IllegalArgumentException("Cannot find elements when link text is null."); return new By() { @Override public List findElements(SearchContext context) { return ((FindsByLinkText) context).findElementsByPartialLinkText(linkText); } @Override public WebElement findElement(SearchContext context) { return ((FindsByLinkText) context).findElementByPartialLinkText(linkText); } @Override public String toString() { return "By.partialLinkText: " + linkText; } }; } /** * @param name The value of the "name" attribute to search for * @return a By which locates elements by the value of the "name" attribute. */ public static By name(final String name) { if (name == null) throw new IllegalArgumentException("Cannot find elements when name text is null."); return new By() { @Override public List findElements(SearchContext context) { if (context instanceof FindsByName) return ((FindsByName) context).findElementsByName(name); return ((FindsByXPath) context).findElementsByXPath(".//*[@name = '" + name + "']"); } @Override public WebElement findElement(SearchContext context) { if (context instanceof FindsByName) return ((FindsByName) context).findElementByName(name); return ((FindsByXPath) context).findElementByXPath(".//*[@name = '" + name + "']"); } @Override public String toString() { return "By.name: " + name; } }; } /** * @param name The element's tagName * @return a By which locates elements by their tag name */ public static By tagName(final String name) { if (name == null) throw new IllegalArgumentException("Cannot find elements when name tag name is null."); return new By() { @Override public List findElements(SearchContext context) { if (context instanceof FindsByTagName) return ((FindsByTagName) context).findElementsByTagName(name); return ((FindsByXPath) context).findElementsByXPath(".//" + name); } @Override public WebElement findElement(SearchContext context) { if (context instanceof FindsByTagName) return ((FindsByTagName) context).findElementByTagName(name); return ((FindsByXPath) context).findElementByXPath(".//" + name); } @Override public String toString() { return "By.tagName: " + name; } }; } /** * @param xpathExpression The xpath to use * @return a By which locates elements via XPath */ public static By xpath(final String xpathExpression) { if (xpathExpression == null) throw new IllegalArgumentException("Cannot find elements when the XPath expression is null."); return new By() { @Override public List findElements(SearchContext context) { return ((FindsByXPath) context).findElementsByXPath(xpathExpression); } @Override public WebElement findElement(SearchContext context) { return ((FindsByXPath) context).findElementByXPath(xpathExpression); } @Override public String toString() { return "By.xpath: " + xpathExpression; } }; } /** * Finds elements based on the value of the "class" attribute. If an element has many classes * then this will match against each of them. For example if the value is "one two onone", then the * following "className"s will match: "one" and "two" * * @param className The value of the "class" attribute to search for * @return a By which locates elements by the value of the "class" attribute. */ public static By className(final String className) { if (className == null) throw new IllegalArgumentException("Cannot find elements when the class name expression is null."); if (className.matches(".*\\s+.*")) { throw new IllegalLocatorException( "Compound class names are not supported. Consider searching for one class name and filtering the results."); } return new By() { @Override public List findElements(SearchContext context) { if (context instanceof FindsByClassName) return ((FindsByClassName) context).findElementsByClassName(className); return ((FindsByXPath) context).findElementsByXPath(".//*[" + containingWord("class", className) + "]"); } @Override public WebElement findElement(SearchContext context) { if (context instanceof FindsByClassName) return ((FindsByClassName) context).findElementByClassName(className); return ((FindsByXPath) context).findElementByXPath(".//*[" + containingWord("class", className) + "]"); } /** * Generates a partial xpath expression that matches an element whose specified attribute * contains the given CSS word. So to match <div class='foo bar'> you would * say "//div[" + containingWord("class", "foo") + "]". * * @param attribute name * @param word name * @return XPath fragment */ private String containingWord(String attribute, String word) { return "contains(concat(' ',normalize-space(@" + attribute + "),' '),' " + word + " ')"; } @Override public String toString() { return "By.className: " + className; } }; } /** * Finds elements via the driver's underlying W3 Selector engine. If the browser does not * implement the Selector API, a best effort is made to emulate the API. In this case, * we strive for at least CSS2 support, but offer no guarantees. */ public static By cssSelector(final String selector) { if (selector == null) throw new IllegalArgumentException("Cannot find elements when the selector is null"); return new By() { @Override public WebElement findElement(SearchContext context) { if (context instanceof FindsByCssSelector) { return ((FindsByCssSelector) context).findElementByCssSelector(selector); } throw new WebDriverException( "Driver does not support finding an element by selector: " + selector); } @Override public List findElements(SearchContext context) { if (context instanceof FindsByCssSelector) { return ((FindsByCssSelector) context).findElementsByCssSelector(selector); } throw new WebDriverException( "Driver does not support finding elements by selector: " + selector); } @Override public String toString() { return "By.selector: " + selector; } }; } /** * Find a single element. Override this method if necessary. * @param context A context to use to find the element * @return The WebElement that matches the selector */ public WebElement findElement(SearchContext context) { List allElements = findElements(context); if (allElements == null || allElements.size() == 0) throw new NoSuchElementException("Cannot locate an element using " + toString()); return allElements.get(0); } /** * Find many elements. * * @param context A context to use to find the element * @return A list of WebElements matching the selector */ public abstract List findElements(SearchContext context); @Override public boolean equals(Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; By by = (By) o; return toString().equals(by.toString()); } @Override public int hashCode() { return toString().hashCode(); } } PK lC>㞺=org/openqa/selenium/.svn/text-base/Capabilities.java.svn-base/* Copyright 2007-2009 WebDriver committers Copyright 2007-2009 Google Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package org.openqa.selenium; import java.util.Map; import org.openqa.selenium.Platform; /** * Describes a series of key/value pairs that encapsulate aspects of a browser. */ public interface Capabilities { String getBrowserName(); Platform getPlatform(); String getVersion(); boolean isJavascriptEnabled(); /** * @return The capabilities as a Map */ Map asMap(); /** * @see org.openqa.selenium.remote.CapabilityType * @param capabilityName The capability to return. * @return The value, or null if not set. */ Object getCapability(String capabilityName); /** * @see org.openqa.selenium.remote.CapabilityType * @param capabilityName The capability to check. * @return Whether or not the value is not null and not false. */ boolean is(String capabilityName); } PK lC>y@7org/openqa/selenium/.svn/text-base/Cookie.java.svn-base/* Copyright 2007-2009 WebDriver committers Copyright 2007-2009 Google Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package org.openqa.selenium; import java.util.Date; import java.text.SimpleDateFormat; public class Cookie { private final String name; private final String value; private final String path; private final String domain; private final Date expiry; private final boolean isSecure; /** * Creates an insecure cookie with no domain specified. * * @param name The name of the cookie; may not be null or an empty string. * @param value The cookie value; may not be null. * @param path The path the cookie is visible to. If left blank or set to * null, will be set to "/". * @param expiry The cookie's expiration date; may be null. * @see #Cookie(String, String, String, String, Date) */ public Cookie(String name, String value, String path, Date expiry) { this(name, value, null, path, expiry); } /** * Creates an insecure cookie. * * @param name The name of the cookie; may not be null or an empty string. * @param value The cookie value; may not be null. * @param domain The domain the cookie is visible to. * @param path The path the cookie is visible to. If left blank or set to * null, will be set to "/". * @param expiry The cookie's expiration date; may be null. * @see #Cookie(String, String, String, String, Date, boolean) */ public Cookie(String name, String value, String domain, String path, Date expiry) { this(name, value, domain, path, expiry, false); } /** * Creates a cookie. * * @param name The name of the cookie; may not be null or an empty string. * @param value The cookie value; may not be null. * @param domain The domain the cookie is visible to. * @param path The path the cookie is visible to. If left blank or set to * null, will be set to "/". * @param expiry The cookie's expiration date; may be null. * @param isSecure Whether this cookie requires a secure connection. */ public Cookie(String name, String value, String domain, String path, Date expiry, boolean isSecure) { this.name = name; this.value = value; this.path = path == null || "".equals(path) ? "/" : path; this.domain = stripPort(domain); this.isSecure = isSecure; if (expiry != null) { // Expiration date is specified in seconds since (UTC) epoch time, so truncate the date. this.expiry = new Date(expiry.getTime() / 1000 * 1000); } else { this.expiry = null; } validate(); } /** * Create a cookie for the default path with the given name and value with * no expiry set. * * @param name The cookie's name * @param value The cookie's value */ public Cookie(String name, String value) { this(name, value, "/", null); } /** * Create a cookie. * * @param name The cookie's name * @param value The cookie's value * @param path The path the cookie is for */ public Cookie(String name, String value, String path) { this(name, value, path, null); } public String getName() { return name; } public String getValue() { return value; } public String getDomain() { return domain; } public String getPath() { return path; } public boolean isSecure() { return isSecure; } public Date getExpiry() { return expiry; } private static String stripPort(String domain) { return (domain == null) ? null : domain.split(":")[0]; } protected void validate() { if (name == null || "".equals(name) || value == null || path == null) { throw new IllegalArgumentException("Required attributes are not set or " + "any non-null attribute set to null"); } if (name.indexOf(';') != -1) { throw new IllegalArgumentException( "Cookie names cannot contain a ';': " + name); } if (domain != null && domain.contains(":")) { throw new IllegalArgumentException("Domain should not contain a port: " + domain); } } @Override public String toString() { return name + "=" + value + (expiry == null ? "" : "; expires=" + new SimpleDateFormat("EEE, dd MMM yyyy hh:mm:ss z") .format(expiry)) + ("".equals(path) ? "" : "; path=" + path) + (domain == null ? "" : "; domain=" + domain) + (isSecure ? ";secure;" : ""); } /** * Two cookies are equal if the name and value match */ @Override public boolean equals(Object o) { if (this == o) { return true; } if (!(o instanceof Cookie)) { return false; } Cookie cookie = (Cookie) o; if (!name.equals(cookie.name)) { return false; } return !(value != null ? !value.equals(cookie.value) : cookie.value != null); } @Override public int hashCode() { return name.hashCode(); } public static class Builder { private final String name; private final String value; private String path; private String domain; private Date expiry; private boolean secure; public Builder(String name, String value) { this.name = name; this.value = value; } public Builder domain(String host) { this.domain = stripPort(host); return this; } public Builder path(String path) { this.path = path; return this; } public Builder expiresOn(Date expiry) { this.expiry = expiry; return this; } public Builder isSecure(boolean secure) { this.secure = secure; return this; } public Cookie build() { return new Cookie(name, value, domain, path, expiry, secure); } } } PK lC>NWFF:org/openqa/selenium/.svn/text-base/Dimension.java.svn-base// Copyright 2011 Google Inc. All Rights Reserved. package org.openqa.selenium; /** * Similar to Point - implement locally to avoid depending on GWT. */ public class Dimension { public final int width; public final int height; public Dimension(int width, int height) { this.width = width; this.height = height; } public int getWidth() { return width; } public int getHeight() { return height; } @Override public boolean equals(Object o) { if (!(o instanceof Dimension)) { return false; } Dimension other = (Dimension) o; return other.width == width && other.height == height; } @Override public int hashCode() { // Assuming height, width, rarely exceed 4096 pixels, shifting // by 12 should provide a good hash value. return width << 12 + height; } } PK lC>8;A  Korg/openqa/selenium/.svn/text-base/ElementNotVisibleException.java.svn-base/* Copyright 2007-2009 WebDriver committers Copyright 2007-2009 Google Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package org.openqa.selenium; /** * Thrown to indicate that although an element is present on the DOM, it is not visible, and so is * not able to be interacted with. */ public class ElementNotVisibleException extends WebDriverException { public ElementNotVisibleException(String message) { super(message); } public ElementNotVisibleException(String message, Throwable cause) { super(message, cause); } } PK lC>{ަBorg/openqa/selenium/.svn/text-base/ExplodingSupplier.java.svn-base/* Copyright 2007-2010 WebDriver committers Copyright 2007-2010 Google Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package org.openqa.selenium; import com.google.common.base.Supplier; // Visibility set to package level deliberately class ExplodingSupplier implements Supplier { public WebDriver get() { throw new UnsupportedOperationException("Cowardly refusing to create a new WebDriver"); } } PK lC>fs@org/openqa/selenium/.svn/text-base/HasInputDevices.java.svn-base/* Copyright 2007-2010 WebDriver committers Copyright 2007-2010 Google Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package org.openqa.selenium; import org.openqa.selenium.interactions.ActionChainsGenerator; /** * Interface implemented by each driver that allows access to the raw input devices. * */ public interface HasInputDevices { Keyboard getKeyboard(); Mouse getMouse(); ActionChainsGenerator actionsBuilder(); } PK lC>Q00Horg/openqa/selenium/.svn/text-base/IllegalLocatorException.java.svn-base/* Copyright 2007-2009 WebDriver committers Copyright 2007-2009 Google Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package org.openqa.selenium; /** * Thrown when a By cannot handle the arguments it is given. The most obvious case where * this excpetion would be thrown is when By.className() is used with a compound class * name. */ public class IllegalLocatorException extends WebDriverException { public IllegalLocatorException(String message) { super(message); } public IllegalLocatorException(String message, Throwable cause) { super(message, cause); } } PK lC>FFMorg/openqa/selenium/.svn/text-base/InvalidCookieDomainException.java.svn-basepackage org.openqa.selenium; /** * Thrown when attempting to add a cookie under a different domain than the * current URL. * * @see org.openqa.selenium.WebDriver.Options#addCookie(Cookie) */ public class InvalidCookieDomainException extends WebDriverException { public InvalidCookieDomainException() { } public InvalidCookieDomainException(String message) { super(message); } public InvalidCookieDomainException(Throwable cause) { super(cause); } public InvalidCookieDomainException(String message, Throwable cause) { super(message, cause); } } PK lC>C7jCorg/openqa/selenium/.svn/text-base/JavascriptExecutor.java.svn-base/* Copyright 2007-2009 WebDriver committers Copyright 2007-2009 Google Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package org.openqa.selenium; /** * Indicates that a driver can execute Javascript, providing access to the mechanism to do so. */ public interface JavascriptExecutor { /** * Execute javascript in the context of the currently selected frame or * window. This means that "document" will refer to the current document. * If the script has a return value, then the following steps will be taken: * *

  • For an HTML element, this method returns a WebElement
  • *
  • For a decimal, a Double is returned
  • *
  • For a non-decimal number, a Long is returned
  • *
  • For a boolean, a Boolean is returned
  • *
  • For all other cases, a String is returned.
  • *
  • For an array, return a List<Object> with each object * following the rules above. We support nested lists.
  • *
  • Unless the value is null or there is no return value, * in which null is returned
* *

Arguments must be a number, a boolean, a String, WebElement, * or a List of any combination of the above. An exception will be * thrown if the arguments do not meet these criteria. The arguments * will be made available to the javascript via the "arguments" magic * variable, as if the function were called via "Function.apply" * * @param script The javascript to execute * @param args The arguments to the script. May be empty * @return One of Boolean, Long, String, List or WebElement. Or null. */ Object executeScript(String script, Object... args); /** * Execute an asynchronous piece of JavaScript in the context of the * currently selected frame or window. Unlike executing * {@link #executeScript(String, Object...) synchronous JavaScript}, scripts * executed with this method must explicitly signal they are finished by * invoking the provided callback. This callback is always injected into the * executed function as the last argument. * *

The first argument passed to the callback function will be uesd as the * script's result. This value will be handled as follows: * *

  • For an HTML element, this method returns a WebElement
  • *
  • For a number, a Long is returned
  • *
  • For a boolean, a Boolean is returned
  • *
  • For all other cases, a String is returned.
  • *
  • For an array, return a List<Object> with each object * following the rules above. We support nested lists.
  • *
  • Unless the value is null or there is no return value, * in which null is returned
* *

Example #1: Performing a sleep in the browser under test. *

   *   long start = System.currentTimeMillis();
   *   ((JavascriptExecutor) driver).executeAsyncScript(
   *       "window.setTimeout(arguments[arguments.length - 1], 500);");
   *   System.out.println(
   *       "Elapsed time: " + System.currentTimeMillis() - start);
   * 
* *

Example #2: Synchronizing a test with an AJAX application: *

   *   WebElement composeButton = driver.findElement(By.id("compose-button"));
   *   composeButton.click();
   *   ((JavascriptExecutor) driver).executeAsyncScript(
   *       "var callback = arguments[arguments.length - 1];" +
   *       "mailClient.getComposeWindowWidget().onload(callback);");
   *   driver.switchTo().frame("composeWidget");
   *   driver.findElement(By.id("to")).sendKeys("bog@example.com");
   * 
* *

Example #3: Injecting a XMLHttpRequest and waiting for the result: *

   *   Object response = ((JavascriptExecutor) driver).executeAsyncScript(
   *       "var callback = arguments[arguments.length - 1];" +
   *       "var xhr = new XMLHttpRequest();" +
   *       "xhr.open('GET', '/resource/data.json', true);" +
   *       "xhr.onreadystatechange = function() {" +
   *       "  if (xhr.readyState == 4) {" +
   *       "    callback(xhr.responseText);" +
   *       "  }" +
   *       "}" +
   *       "xhr.send();");
   *   JSONObject json = new JSONObject((String) response);
   *   assertEquals("cheese", json.getString("food"));
   * 
* * @param script The javascript to execute. * @param args The arguments to the script. May be empty. * @return One of Boolean, Long, String, List, WebElement, or null. */ Object executeAsyncScript(String script, Object... args); /** * It's not enough to simply support javascript, it also needs to be enabled too. */ boolean isJavascriptEnabled(); } PK lC>9org/openqa/selenium/.svn/text-base/Keyboard.java.svn-base/* Copyright 2007-2010 WebDriver committers Copyright 2007-2010 Google Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package org.openqa.selenium; import org.openqa.selenium.Keys; import org.openqa.selenium.WebElement; /** * Interface representing basic keyboard operations. * */ public interface Keyboard { void sendKeys(CharSequence... keysToSend); void pressKey(Keys keyToPress); void releaseKey(Keys keyToRelease); } PK lC>sUU5org/openqa/selenium/.svn/text-base/Keys.java.svn-base/* Copyright 2007-2009 WebDriver committers Copyright 2007-2009 Google Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package org.openqa.selenium; /** * Representations of pressable keys that aren't text. These are stored in * the Unicode PUA (Private Use Area) code points, 0xE000-0xF8FF. Refer to * http://www.google.com.au/search?&q=unicode+pua&btnG=Search */ public enum Keys implements CharSequence { NULL ('\uE000'), CANCEL ('\uE001'), // ^break HELP ('\uE002'), BACK_SPACE ('\uE003'), TAB ('\uE004'), CLEAR ('\uE005'), RETURN ('\uE006'), ENTER ('\uE007'), SHIFT ('\uE008'), LEFT_SHIFT ('\uE008'), // alias CONTROL ('\uE009'), LEFT_CONTROL ('\uE009'), // alias ALT ('\uE00A'), LEFT_ALT ('\uE00A'), // alias PAUSE ('\uE00B'), ESCAPE ('\uE00C'), SPACE ('\uE00D'), PAGE_UP ('\uE00E'), PAGE_DOWN ('\uE00F'), END ('\uE010'), HOME ('\uE011'), LEFT ('\uE012'), ARROW_LEFT ('\uE012'), // alias UP ('\uE013'), ARROW_UP ('\uE013'), // alias RIGHT ('\uE014'), ARROW_RIGHT ('\uE014'), // alias DOWN ('\uE015'), ARROW_DOWN ('\uE015'), // alias INSERT ('\uE016'), DELETE ('\uE017'), SEMICOLON ('\uE018'), EQUALS ('\uE019'), NUMPAD0 ('\uE01A'), // number pad keys NUMPAD1 ('\uE01B'), NUMPAD2 ('\uE01C'), NUMPAD3 ('\uE01D'), NUMPAD4 ('\uE01E'), NUMPAD5 ('\uE01F'), NUMPAD6 ('\uE020'), NUMPAD7 ('\uE021'), NUMPAD8 ('\uE022'), NUMPAD9 ('\uE023'), MULTIPLY ('\uE024'), ADD ('\uE025'), SEPARATOR ('\uE026'), SUBTRACT ('\uE027'), DECIMAL ('\uE028'), DIVIDE ('\uE029'), F1 ('\uE031'), // function keys F2 ('\uE032'), F3 ('\uE033'), F4 ('\uE034'), F5 ('\uE035'), F6 ('\uE036'), F7 ('\uE037'), F8 ('\uE038'), F9 ('\uE039'), F10 ('\uE03A'), F11 ('\uE03B'), F12 ('\uE03C'), META ('\uE03D'), COMMAND ('\uE03D'), // Alias ; private Keys(char keyCode) { this.keyCode = keyCode; } /** * Simulate pressing many keys at once in a "chord". Takes a sequence of * Keys.XXXX or strings; appends each of the values to a string, and adds the * chord termination key (Keys.NULL) and returns the resultant string. * * Note: when the low-level webdriver key handlers see Keys.NULL, active * modifier keys (CTRL/ALT/SHIFT/etc) release via a keyup event. * * issue: http://code.google.com/p/webdriver/issues/detail?id=79 */ public static String chord(CharSequence... value) { StringBuilder builder = new StringBuilder(); for (CharSequence seq : value) builder.append(seq); builder.append(Keys.NULL); return builder.toString(); } public char charAt(int index) { if (index == 0) return keyCode; return 0; } public int length() { return 1; } public CharSequence subSequence(int start, int end) { if (start == 0 && end == 1) return String.valueOf(keyCode); throw new IndexOutOfBoundsException(); } @Override public String toString() { return String.valueOf(keyCode); } private char keyCode; } PK lC>7xi6org/openqa/selenium/.svn/text-base/Mouse.java.svn-base/* Copyright 2007-2010 WebDriver committers Copyright 2007-2010 Google Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package org.openqa.selenium; import org.openqa.selenium.interactions.internal.Coordinates; /** * Interface representing basic Mouse operations. * */ public interface Mouse { void click(Coordinates where); void doubleClick(Coordinates where); void mouseDown(Coordinates where); void mouseUp(Coordinates where); void mouseMove(Coordinates where); /* Offset from the current location of the mouse pointer. */ void mouseMove(Coordinates where, long xOffset, long yOffset); // Right-clicks an element. void contextClick(Coordinates where); // TODO: Scroll wheel support } PK lC>@Qn //Horg/openqa/selenium/.svn/text-base/NoAlertPresentException.java.svn-base/* Copyright 2007-2009 WebDriver committers Copyright 2007-2009 Google Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package org.openqa.selenium; /** * Indicates that a user has tried to access an alert when one is not present. */ public class NoAlertPresentException extends WebDriverException { } PK lC>˭|bddGorg/openqa/selenium/.svn/text-base/NoSuchElementException.java.svn-base/* Copyright 2007-2009 WebDriver committers Copyright 2007-2009 Google Inc. Portions copyright 2007 ThoughtWorks, Inc Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package org.openqa.selenium; /** * Thrown by {@link WebDriver#findElement(By) WebDriver.findElement(By by)} * and {@link WebElement#findElement(By by) WebElement.findElement(By by)}. */ public class NoSuchElementException extends NotFoundException { public NoSuchElementException(String reason) { super(reason); } public NoSuchElementException(String reason, Throwable cause) { super(reason, cause); } } PK lC>[AAEorg/openqa/selenium/.svn/text-base/NoSuchFrameException.java.svn-base/* Copyright 2007-2009 WebDriver committers Copyright 2007-2009 Google Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package org.openqa.selenium; /** * Thrown by {@link WebDriver.TargetLocator#frame(int) WebDriver.switchTo().frame(int frameIndex)} * and {@link WebDriver.TargetLocator#frame(String) WebDriver.switchTo().frame(String frameName)}. */ public class NoSuchFrameException extends NotFoundException { public NoSuchFrameException(String reason) { super(reason); } public NoSuchFrameException(String reason, Throwable cause) { super(reason, cause); } } PK lC>_4Forg/openqa/selenium/.svn/text-base/NoSuchWindowException.java.svn-base/* Copyright 2007-2009 WebDriver committers Copyright 2007-2009 Google Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package org.openqa.selenium; /** * Thrown by {@link WebDriver.TargetLocator#window(String) WebDriver.switchTo().window(String windowName)}. */ public class NoSuchWindowException extends NotFoundException { public NoSuchWindowException(String reason) { super(reason); } }PK lC>fcB  Borg/openqa/selenium/.svn/text-base/NotFoundException.java.svn-base/* Copyright 2007-2009 WebDriver committers Copyright 2007-2009 Google Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package org.openqa.selenium; public class NotFoundException extends WebDriverException { public NotFoundException() { } public NotFoundException(String message) { super(message); } public NotFoundException(String message, Throwable cause) { super(message, cause); } public NotFoundException(Throwable cause) { super(cause); } } PK lC>n)! ! ;org/openqa/selenium/.svn/text-base/OutputType.java.svn-base/* Copyright 2007-2009 WebDriver committers Copyright 2007-2009 Google Inc. Portions copyright 2007 ThoughtWorks, Inc Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package org.openqa.selenium; import java.io.File; import java.io.FileOutputStream; import java.io.IOException; import org.openqa.selenium.internal.Base64Encoder; /** * Defines the output type for a screenshot. See org.openqa.selenium.Screenshot * for usage and examples. * * @see TakesScreenshot * @param Type for the screenshot output. */ public interface OutputType { /** * Obtain the screenshot as base64 data. */ OutputType BASE64 = new OutputType() { public String convertFromBase64Png(String base64Png) { return base64Png; } }; /** * Obtain the screenshot as raw bytes. */ OutputType BYTES = new OutputType() { public byte[] convertFromBase64Png(String base64Png) { return new Base64Encoder().decode(base64Png); } }; /** * Obtain the screenshot into a temporary file that will be deleted once the * JVM exits. It is up to users to make a copy of this file. */ OutputType FILE = new OutputType() { public File convertFromBase64Png(String base64Png) { FileOutputStream fos = null; try { byte[] data = BYTES.convertFromBase64Png(base64Png); File tmpFile = File.createTempFile("screenshot", ".png"); tmpFile.deleteOnExit(); fos = new FileOutputStream(tmpFile); fos.write(data); fos.close(); return tmpFile; } catch (IOException e) { throw new WebDriverException(e); } finally { if (fos != null) { try { fos.close(); } catch (IOException e) { // Nothing sensible to do } } } } }; /** * Convert the given base64 png to a requested format. * * @param base64Png base64 encoded png. * @return png encoded into requested format. */ T convertFromBase64Png(String base64Png); } PK lC>Q  9org/openqa/selenium/.svn/text-base/Platform.java.svn-base/* Copyright 2007-2009 WebDriver committers Copyright 2007-2009 Google Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package org.openqa.selenium; import java.util.regex.Matcher; import java.util.regex.Pattern; /** * Represents the known and supported Platforms that WebDriver runs on. * This is pretty close to the Operating System, but differs slightly, * because this class is used to extract information such as program * locations and line endings. * */ // Useful URLs: // http://hg.openjdk.java.net/jdk7/modules/jdk/file/a37326fa7f95/src/windows/native/java/lang/java_props_md.c public enum Platform { /** * Never returned, but can be used to request a browser running on * any version of Windows. */ WINDOWS("") { @Override public boolean is(Platform compareWith) { return compareWith == WINDOWS || compareWith == XP || compareWith == VISTA; } }, /** * For versions of Windows that "feel like" Windows XP. These are * ones that store files in "\Program Files\" and documents under * "\\documents and settings\\username" */ XP("xp", "windows", "winnt") { @Override public boolean is(Platform compareWith) { return compareWith == WINDOWS || compareWith == XP; } }, /** * For versions of Windows that "feel like" Windows Vista. */ VISTA("windows vista", "Windows Server 2008", "windows 7") { @Override public boolean is(Platform compareWith) { return compareWith == WINDOWS || compareWith == VISTA; } }, MAC("mac", "darwin") {}, UNIX("solaris", "bsd") {}, LINUX("linux") { @Override public boolean is(Platform compareWith) { return compareWith == UNIX || compareWith == LINUX; } }, ANDROID("android", "dalvik") { public String getLineEnding() { return "\n"; } @Override public boolean is(Platform compareWith) { return compareWith == LINUX || compareWith == ANDROID; } }, /** * Never returned, but can be used to request a browser running on * any operating system */ ANY("") { @Override public boolean is(Platform compareWith) { return true; } }; private final String[] partOfOsName; private final int minorVersion; private final int majorVersion; private Platform(String... partOfOsName) { this.partOfOsName = partOfOsName; String version = System.getProperty("os.version", "0.0.0"); int major = 0; int min = 0; Pattern pattern = Pattern.compile("^(\\d+)\\.(\\d+).*"); Matcher matcher = pattern.matcher(version); if (matcher.matches()) { try { major = Integer.parseInt(matcher.group(1)); min = Integer.parseInt(matcher.group(2)); } catch (NumberFormatException e) { // These things happen } } majorVersion = major; minorVersion = min; } public static Platform getCurrent() { return extractFromSysProperty(System.getProperty("os.name")); } public static Platform extractFromSysProperty(String osName) { osName = osName.toLowerCase(); // os.name for android is linux if ("dalvik".equalsIgnoreCase(System.getProperty("java.vm.name"))){ return Platform.ANDROID; } Platform mostLikely = UNIX; String previousMatch = null; for (Platform os : Platform.values()) { for (String matcher : os.partOfOsName) { if ("".equals(matcher)) continue; if (os.isExactMatch(osName, matcher)) { return os; } if (os.isCurrentPlatform(osName, matcher) && isBetterMatch(previousMatch, matcher)) { previousMatch = matcher; mostLikely = os; } } } // Default to assuming we're on a unix variant (including linux) return mostLikely; } private static boolean isBetterMatch(String previous, String matcher) { if (previous == null) return true; return matcher.length() >= previous.length(); } public boolean is(Platform compareWith) { return this.equals(compareWith); } private boolean isCurrentPlatform(String osName, String matchAgainst) { return osName.indexOf(matchAgainst) != -1; } private boolean isExactMatch(String osName, String matchAgainst) { return matchAgainst.equals(osName); } public int getMajorVersion() { return majorVersion; } public int getMinorVersion() { return minorVersion; } } PK lC>rr6org/openqa/selenium/.svn/text-base/Point.java.svn-base// Copyright 2011 Google Inc. All Rights Reserved. package org.openqa.selenium; /** * A copy of java.awt.Point, to remove dependency on awt. */ public class Point { public int x; public int y; public Point(int x, int y) { this.x = x; this.y = y; } public int getX() { return x; } public int getY() { return y; } public Point moveBy(int xOffset, int yOffset) { return new Point(x + xOffset, y + yOffset); } @Override public boolean equals(Object o) { if (!(o instanceof Point)) { return false; } Point other = (Point) o; return other.x == x && other.y == y; } @Override public int hashCode() { // Assuming x,y rarely exceed 4096 pixels, shifting // by 12 should provide a good hash value. return x << 12 + y; } public void move(int newX, int newY) { x = newX; y = newY; } } PK lC>36org/openqa/selenium/.svn/text-base/Proxy.java.svn-base// Copyright 2007-2009 WebDriver committers package org.openqa.selenium; import java.util.Map; /** * Configuration parameters for using proxies in WebDriver. *

* Generally you should pass an object of this type to a WebDriver constructor, * or in some cases to the profile object used in the WebDriver construction. *

* For simplicity, setting values here commits the proxy to a certain * configuration. That is, it is an error to set an httpProxy manually and * then turn on proxy autodetect. */ public class Proxy { //TODO: SOCKS. public enum ProxyType { // Keep these in sync with the Firefox preferences numbers: // http://kb.mozillazine.org/Network.proxy.type DIRECT, // Direct connection, no proxy (default on Windows). MANUAL, // Manual proxy settings (e.g., for httpProxy). PAC, // Proxy autoconfiguration from URL. RESERVED_1, // Never used. AUTODETECT, // Proxy autodetection (presumably with WPAD). SYSTEM, // Use system settings (default on Linux). UNSPECIFIED } private ProxyType proxyType = ProxyType.UNSPECIFIED; private boolean autodetect = false; private String ftpProxy; private String httpProxy; private String noProxy; private String proxyAutoconfigUrl; private String sslProxy; public Proxy() { // Empty default constructor } public Proxy(Map raw) { if (raw.containsKey("proxyType")) { setProxyType(ProxyType.valueOf((String) raw.get("proxyType"))); } if (raw.containsKey("ftpProxy")) { setFtpProxy((String) raw.get("ftpProxy")); } if (raw.containsKey("httpProxy")) { setHttpProxy((String) raw.get("httpProxy")); } if (raw.containsKey("noProxy")) { setNoProxy((String) raw.get("noProxy")); } if (raw.containsKey("proxyAutoconfigUrl")) { setProxyAutoconfigUrl((String) raw.get("proxyAutoconfigUrl")); } if (raw.containsKey("sslProxy")) { setSslProxy((String) raw.get("sslProxy")); } if (raw.containsKey("autodetect")) { setAutodetect((Boolean) raw.get("autodetect")); } } public ProxyType getProxyType() { return this.proxyType; } /** * Explicitly sets the proxy type, useful for forcing direct connection on Linux. * * @return */ public Proxy setProxyType(ProxyType proxyType) { verifyProxyTypeCompatilibily(ProxyType.AUTODETECT); this.proxyType = proxyType; return this; } public boolean isAutodetect() { return autodetect; } public Proxy setAutodetect(boolean autodetect) { if (this.autodetect == autodetect) { return this; } verifyProxyTypeCompatilibily(ProxyType.AUTODETECT); this.proxyType = ProxyType.AUTODETECT; this.autodetect = autodetect; return this; } public String getFtpProxy() { return ftpProxy; } public Proxy setFtpProxy(String ftpProxy) { verifyProxyTypeCompatilibily(ProxyType.MANUAL); this.proxyType = ProxyType.MANUAL; this.ftpProxy = ftpProxy; return this; } public String getHttpProxy() { return httpProxy; } public Proxy setHttpProxy(String httpProxy) { verifyProxyTypeCompatilibily(ProxyType.MANUAL); this.proxyType = ProxyType.MANUAL; this.httpProxy = httpProxy; return this; } public String getNoProxy() { return noProxy; } public Proxy setNoProxy(String noProxy) { verifyProxyTypeCompatilibily(ProxyType.MANUAL); this.proxyType = ProxyType.MANUAL; this.noProxy = noProxy; return this; } public String getProxyAutoconfigUrl() { return proxyAutoconfigUrl; } public Proxy setProxyAutoconfigUrl(String proxyAutoconfigUrl) { verifyProxyTypeCompatilibily(ProxyType.PAC); this.proxyType = ProxyType.PAC; this.proxyAutoconfigUrl = proxyAutoconfigUrl; return this; } public String getSslProxy() { return sslProxy; } public Proxy setSslProxy(String sslProxy) { verifyProxyTypeCompatilibily(ProxyType.MANUAL); this.proxyType = ProxyType.MANUAL; this.sslProxy = sslProxy; return this; } private void verifyProxyTypeCompatilibily(ProxyType compatibleProxy) { if (this.proxyType != ProxyType.UNSPECIFIED && this.proxyType != compatibleProxy) { throw new IllegalStateException("Proxy autodetect is incompatible with manual settings"); } } } PK lC>'WՃ7 7 Corg/openqa/selenium/.svn/text-base/RenderedWebElement.java.svn-base/* Copyright 2007-2009 WebDriver committers Copyright 2007-2009 Google Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package org.openqa.selenium; public interface RenderedWebElement extends WebElement { /** * Is this element displayed or not? This method avoids the problem of * having to parse an element's "style" attribute. * * @return Whether or not the element is displayed */ boolean isDisplayed(); /** * Where on the page is the top left-hand corner of the rendered * element? * * @return A point, containing the location of the top left-hand corner * of the element */ Point getLocation(); /** * What is the width and height of the rendered element? * * @return The size of the element on the page. */ Dimension getSize(); /** * Simulate hovering the mouse over an element. Note that this method needs * native events in order to work as expected. * * @deprecated Use MoveToOffsetAction instead */ @Deprecated void hover(); /** * Drag and drop * * @param moveRightBy how much to move to the right (negative for moving * left) * @param moveDownBy how much to move to the bottom (negative for moving * up) * @deprecated Use ClickAndHoldAction, MoveMouseAction and * ButtonReleaseAction instead */ @Deprecated void dragAndDropBy(int moveRightBy, int moveDownBy); /** * Drag and drop this element on top of the specified element * * @param element element to be dropped on. Only RenderedElement is * supported * @deprecated Use ClickAndHoldAction, MoveMouseAction and * ButtonReleaseAction instead */ @Deprecated void dragAndDropOn(RenderedWebElement element); /** * Get the value of a given CSS property. This is probably not going to * return what you expect it to unless you've already had a look at the * element using something like firebug. Seriously, even then you'll be * lucky for this to work cross-browser. Colour values should be returned * as hex strings, so, for example if the "background-color" property is * set as "green" in the HTML source, the returned value will be * "#008000" * * @return The current, computed value of the property. */ String getValueOfCssProperty(String propertyName); } PK lC>6@':org/openqa/selenium/.svn/text-base/Rotatable.java.svn-base/* Copyright 2010 WebDriver committers Copyright 2010 Google Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package org.openqa.selenium; /** * Represents rotation of the browser view for orientation-sensitive devices. * * When using this with a real device, the device should not be moved so that the * built-in sensors do not interfere. */ public interface Rotatable { /** * Changes the orientation of the browser window. * * @param orientation the desired screen orientation */ void rotate(ScreenOrientation orientation); /** * @return the current screen orientation of the browser */ ScreenOrientation getOrientation(); } PK lC> Borg/openqa/selenium/.svn/text-base/ScreenOrientation.java.svn-base/* Copyright 2010 WebDriver committers Copyright 2010 Google Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package org.openqa.selenium; /** * Represents possible screen orientations. */ public enum ScreenOrientation { LANDSCAPE("landscape"), PORTRAIT("portrait"); private final String value; private ScreenOrientation(String value) { this.value = value; } public String value() { return value; } } PK lC>+P>org/openqa/selenium/.svn/text-base/SearchContext.java.svn-base/* Copyright 2007-2009 WebDriver committers Copyright 2007-2009 Google Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package org.openqa.selenium; import java.util.List; public interface SearchContext { /** * Find all elements within the current context using the given mechanism. * * @param by The locating mechanism to use * @return A list of all {@link WebElement}s, or an empty list if nothing matches * @see org.openqa.selenium.By */ List findElements(By by); /** * Find the first {@link WebElement} using the given method. * * @param by The locating mechanism * @return The first matching element on the current context * @throws NoSuchElementException If no matching elements are found */ WebElement findElement(By by); } PK lC>mbE*E*Horg/openqa/selenium/.svn/text-base/SeleneseCommandExecutor.java.svn-base/* Copyright 2007-2009 WebDriver committers Copyright 2007-2009 Google Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package org.openqa.selenium; import static org.openqa.selenium.remote.DriverCommand.CLEAR_ELEMENT; import static org.openqa.selenium.remote.DriverCommand.CLICK_ELEMENT; import static org.openqa.selenium.remote.DriverCommand.CLOSE; import static org.openqa.selenium.remote.DriverCommand.EXECUTE_ASYNC_SCRIPT; import static org.openqa.selenium.remote.DriverCommand.EXECUTE_SCRIPT; import static org.openqa.selenium.remote.DriverCommand.FIND_CHILD_ELEMENT; import static org.openqa.selenium.remote.DriverCommand.FIND_CHILD_ELEMENTS; import static org.openqa.selenium.remote.DriverCommand.FIND_ELEMENT; import static org.openqa.selenium.remote.DriverCommand.FIND_ELEMENTS; import static org.openqa.selenium.remote.DriverCommand.GET; import static org.openqa.selenium.remote.DriverCommand.GET_CURRENT_URL; import static org.openqa.selenium.remote.DriverCommand.GET_ELEMENT_ATTRIBUTE; import static org.openqa.selenium.remote.DriverCommand.GET_ELEMENT_TAG_NAME; import static org.openqa.selenium.remote.DriverCommand.GET_ELEMENT_TEXT; import static org.openqa.selenium.remote.DriverCommand.GET_ELEMENT_VALUE; import static org.openqa.selenium.remote.DriverCommand.GET_PAGE_SOURCE; import static org.openqa.selenium.remote.DriverCommand.GET_TITLE; import static org.openqa.selenium.remote.DriverCommand.IMPLICITLY_WAIT; import static org.openqa.selenium.remote.DriverCommand.IS_ELEMENT_DISPLAYED; import static org.openqa.selenium.remote.DriverCommand.IS_ELEMENT_ENABLED; import static org.openqa.selenium.remote.DriverCommand.IS_ELEMENT_SELECTED; import static org.openqa.selenium.remote.DriverCommand.NEW_SESSION; import static org.openqa.selenium.remote.DriverCommand.QUIT; import static org.openqa.selenium.remote.DriverCommand.SEND_KEYS_TO_ELEMENT; import static org.openqa.selenium.remote.DriverCommand.SET_ELEMENT_SELECTED; import static org.openqa.selenium.remote.DriverCommand.SET_SCRIPT_TIMEOUT; import static org.openqa.selenium.remote.DriverCommand.SUBMIT_ELEMENT; import static org.openqa.selenium.remote.DriverCommand.SWITCH_TO_FRAME; import static org.openqa.selenium.remote.DriverCommand.TOGGLE_ELEMENT; import com.google.common.collect.Maps; import com.thoughtworks.selenium.CommandProcessor; import com.thoughtworks.selenium.DefaultSelenium; import com.thoughtworks.selenium.HttpCommandProcessor; import com.thoughtworks.selenium.Selenium; import com.thoughtworks.selenium.SeleniumException; import org.openqa.selenium.firefox.internal.Executable; import org.openqa.selenium.internal.selenesedriver.ClearElement; import org.openqa.selenium.internal.selenesedriver.ClickElement; import org.openqa.selenium.internal.selenesedriver.Close; import org.openqa.selenium.internal.selenesedriver.ExecuteAsyncScript; import org.openqa.selenium.internal.selenesedriver.ExecuteScript; import org.openqa.selenium.internal.selenesedriver.FindElement; import org.openqa.selenium.internal.selenesedriver.FindElements; import org.openqa.selenium.internal.selenesedriver.GetCurrentUrl; import org.openqa.selenium.internal.selenesedriver.GetElementAttribute; import org.openqa.selenium.internal.selenesedriver.GetElementText; import org.openqa.selenium.internal.selenesedriver.GetElementValue; import org.openqa.selenium.internal.selenesedriver.GetPageSource; import org.openqa.selenium.internal.selenesedriver.GetTagName; import org.openqa.selenium.internal.selenesedriver.GetTitle; import org.openqa.selenium.internal.selenesedriver.GetUrl; import org.openqa.selenium.internal.selenesedriver.IsElementDisplayed; import org.openqa.selenium.internal.selenesedriver.IsElementEnabled; import org.openqa.selenium.internal.selenesedriver.IsElementSelected; import org.openqa.selenium.internal.selenesedriver.NewSession; import org.openqa.selenium.internal.selenesedriver.QuitSelenium; import org.openqa.selenium.internal.selenesedriver.SeleneseFunction; import org.openqa.selenium.internal.selenesedriver.SendKeys; import org.openqa.selenium.internal.selenesedriver.SetElementSelected; import org.openqa.selenium.internal.selenesedriver.SubmitElement; import org.openqa.selenium.internal.selenesedriver.SwitchToFrame; import org.openqa.selenium.internal.selenesedriver.ToggleElement; import org.openqa.selenium.remote.BeanToJsonConverter; import org.openqa.selenium.remote.Command; import org.openqa.selenium.remote.CommandExecutor; import org.openqa.selenium.remote.DesiredCapabilities; import org.openqa.selenium.remote.ErrorCodes; import org.openqa.selenium.remote.JsonToBeanConverter; import org.openqa.selenium.remote.Response; import java.io.File; import java.net.URL; import java.util.Map; public class SeleneseCommandExecutor implements CommandExecutor { private final ErrorCodes errorCodes; private final Selenium instance; private Map functions = Maps.newHashMap(); public SeleneseCommandExecutor(URL seleniumServer, URL remoteAddress, Capabilities capabilities) { this(new HttpCommandProcessor( seleniumServer.getHost(), seleniumServer.getPort(), startCommand(capabilities), remoteAddress.toString())); } public SeleneseCommandExecutor(CommandProcessor processor) { this(new DefaultSelenium(processor)); } public SeleneseCommandExecutor(Selenium instance) { this.instance = instance; errorCodes = new ErrorCodes(); prepareCommands(); } public Selenium getWrappedSelenium() { return instance; } public Response execute(Command command) { SeleneseFunction function = functions.get(command.getName()); if (function == null) { throw new UnsupportedOperationException("cannot execute: " + command.getName()); } try { Response response = new Response(); response.setValue(function.apply(instance, command.getParameters())); return response; } catch (Exception e) { return prepareExceptionResponse(e); } } private Response prepareExceptionResponse(Exception e) { Response response = new Response(); Exception toUse = e; if (e instanceof SeleniumException) { // World of fragility. *sigh* if (e.getMessage().matches("ERROR: Element .+ not found")) { toUse = new StaleElementReferenceException(e.getMessage(), e); } } response.setStatus(errorCodes.toStatusCode(toUse)); // It's like a lesson in inefficiency Object raw = new JsonToBeanConverter().convert(Map.class, new BeanToJsonConverter().convert(toUse)); response.setValue(raw); return response; } public void addCommand(String methodName, SeleneseFunction command) { functions.put(methodName, command); } private void prepareCommands() { FindElement findElement = new FindElement(); FindElements findElements = new FindElements(); SelenseTimeouts timeouts = new SelenseTimeouts( findElement.implicitlyWait(), findElements.implicitlyWait()); ExecuteAsyncScript executeAsyncScript = new ExecuteAsyncScript(); addCommand(CLEAR_ELEMENT, new ClearElement()); addCommand(CLICK_ELEMENT, new ClickElement()); addCommand(CLOSE, new Close()); addCommand(GET_CURRENT_URL, new GetCurrentUrl()); addCommand(EXECUTE_SCRIPT, new ExecuteScript()); addCommand(EXECUTE_ASYNC_SCRIPT, executeAsyncScript); addCommand(SET_SCRIPT_TIMEOUT, executeAsyncScript.setScriptTimeout()); addCommand(FIND_CHILD_ELEMENT, findElement); addCommand(FIND_CHILD_ELEMENTS, findElements); addCommand(FIND_ELEMENT, findElement); addCommand(FIND_ELEMENTS, findElements); addCommand(IMPLICITLY_WAIT, timeouts); addCommand(GET, new GetUrl()); addCommand(GET_ELEMENT_ATTRIBUTE, new GetElementAttribute()); addCommand(GET_ELEMENT_TEXT, new GetElementText()); addCommand(GET_ELEMENT_VALUE, new GetElementValue()); addCommand(GET_ELEMENT_TAG_NAME, new GetTagName()); addCommand(GET_TITLE, new GetTitle()); addCommand(IS_ELEMENT_DISPLAYED, new IsElementDisplayed()); addCommand(IS_ELEMENT_ENABLED, new IsElementEnabled()); addCommand(IS_ELEMENT_SELECTED, new IsElementSelected()); addCommand(NEW_SESSION, new NewSession()); addCommand(GET_PAGE_SOURCE, new GetPageSource()); addCommand(SEND_KEYS_TO_ELEMENT, new SendKeys()); addCommand(SET_ELEMENT_SELECTED, new SetElementSelected()); addCommand(SWITCH_TO_FRAME, new SwitchToFrame()); addCommand(SUBMIT_ELEMENT, new SubmitElement()); addCommand(TOGGLE_ELEMENT, new ToggleElement()); addCommand(QUIT, new QuitSelenium()); } private static String startCommand(Capabilities capabilities) { String browser = capabilities.getBrowserName(); if (DesiredCapabilities.firefox().getBrowserName().equals(browser)) { return "*chrome"; } else if ("safari".equals(browser)) { String path = findSafari(); return "*safari " + path; } else if (DesiredCapabilities.chrome().getBrowserName().equals(browser)) { return "*googlechrome /Applications/Google Chrome.app/Contents/MacOS/Google Chrome"; } throw new IllegalArgumentException( "Cannot determine which selenium type to use: " + capabilities.getBrowserName()); } private static String findSafari() { if (Platform.getCurrent().is(Platform.WINDOWS)) { File[] locations = new File[] { new File("C:\\Program Files (x86)\\Safari\\safari.exe"), new File("C:\\Program Files\\Safari\\safari.exe") }; for (File location : locations) { if (location.exists()) { return location.getAbsolutePath(); } } } return ""; } private class SelenseTimeouts implements SeleneseFunction { private final SeleneseFunction[] functions; public SelenseTimeouts(SeleneseFunction... functions) { this.functions = functions; } public Void apply(Selenium selenium, Map args) { for (SeleneseFunction function : functions) { function.apply(selenium, args); } return null; } } } PK lC>vB6org/openqa/selenium/.svn/text-base/Speed.java.svn-base/* Copyright 2007-2009 WebDriver committers Copyright 2007-2009 Google Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package org.openqa.selenium; /** * @deprecated This enum doesn't provide the necessary control */ @Deprecated public enum Speed { SLOW(1000), MEDIUM(500), FAST(0), ; protected int timeOut; private Speed(int timeOut) { this.timeOut = timeOut; } public int getTimeOut() { return timeOut; } } PK lC>fErOorg/openqa/selenium/.svn/text-base/StaleElementReferenceException.java.svn-base/* Copyright 2007-2009 WebDriver committers Copyright 2007-2009 Google Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package org.openqa.selenium; /** * Indicates that a reference to an element is now "stale" --- the element no longer appears on the * DOM of the page. */ public class StaleElementReferenceException extends WebDriverException { public StaleElementReferenceException(String message) { super(message); } public StaleElementReferenceException(String message, Throwable cause) { super(message, cause); } } PK lC>\bBorg/openqa/selenium/.svn/text-base/SuppliesWebDriver.java.svn-base/* Copyright 2007-2010 WebDriver committers Copyright 2007-2010 Google Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package org.openqa.selenium; import com.google.common.base.Supplier; import com.thoughtworks.selenium.SeleniumException; import org.openqa.selenium.chrome.ChromeDriver; import org.openqa.selenium.firefox.FirefoxDriver; import org.openqa.selenium.ie.InternetExplorerDriver; import org.openqa.selenium.remote.DesiredCapabilities; // In two minds about whether to make this class part of the public API class SuppliesWebDriver implements Supplier { private final Capabilities capabilities; SuppliesWebDriver(Capabilities caps) { capabilities = caps; } public WebDriver get() { String browser = capabilities.getBrowserName(); if (DesiredCapabilities.firefox().getBrowserName().equals(browser)) { return new FirefoxDriver(); } else if (DesiredCapabilities.internetExplorer().getBrowserName().equals(browser)) { return new InternetExplorerDriver(); } else if (DesiredCapabilities.chrome().getBrowserName().equals(browser)) { return new ChromeDriver(); } throw new SeleniumException("Unable to determine which driver to use: " + capabilities); } } PK lC>@org/openqa/selenium/.svn/text-base/TakesScreenshot.java.svn-base/* Copyright 2007-2009 WebDriver committers Copyright 2007-2009 Google Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package org.openqa.selenium; /** * Indicates a driver that can capture a screenshot and store it in different * ways. *

* Example usage: *

 * import static openqa.selenium.OutputType.*;
 * 
 * File screenshotFile = ((Screenshot)driver).getScreenshotAs(file);
 * String screenshotBase64 = ((Screenshot)driver).getScreenshotAs(base64);
 * 
* * @see OutputType */ public interface TakesScreenshot { /** * Capture the screenshot and store it in the specified location. * * @param Return type for getScreenshotAs. * @param target target type, @see OutputType * @return Object in which is stored information about the screenshot. * @throws WebDriverException on failure. */ X getScreenshotAs(OutputType target) throws WebDriverException; } PK lC>Aorg/openqa/selenium/.svn/text-base/TimeoutException.java.svn-basepackage org.openqa.selenium; /** * Thrown when a command does not complete in enough time. */ public class TimeoutException extends WebDriverException { public TimeoutException() { } public TimeoutException(String message) { super(message); } public TimeoutException(Throwable cause) { super(cause); } public TimeoutException(String message, Throwable cause) { super(message, cause); } } PK lC>3RottKorg/openqa/selenium/.svn/text-base/UnableToSetCookieException.java.svn-base/* Copyright 2007-2010 WebDriver committers Copyright 2007-2010 Google Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package org.openqa.selenium; /** * Thrown when a driver fails to set a cookie. * * @see org.openqa.selenium.WebDriver.Options#addCookie(Cookie) */ public class UnableToSetCookieException extends WebDriverException { public UnableToSetCookieException() { } public UnableToSetCookieException(String message) { super(message); } public UnableToSetCookieException(Throwable cause) { super(cause); } public UnableToSetCookieException(String message, Throwable cause) { super(message, cause); } } PK lC>~<==Horg/openqa/selenium/.svn/text-base/UnhandledAlertException.java.svn-base/* Copyright 2007-2009 WebDriver committers Copyright 2007-2009 Google Inc. Portions copyright 2007 ThoughtWorks, Inc Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package org.openqa.selenium; public class UnhandledAlertException extends WebDriverException { public UnhandledAlertException(String commandName) { super(commandName); } } PK lC>%A44:org/openqa/selenium/.svn/text-base/WebDriver.java.svn-base/* Copyright 2007-2009 WebDriver committers Copyright 2007-2009 Google Inc. Portions copyright 2007 ThoughtWorks, Inc Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package org.openqa.selenium; import java.net.URL; import java.util.List; import java.util.Set; import java.util.concurrent.TimeUnit; /** * The main interface to use for testing, which represents an idealised web * browser. The methods in this class fall into three categories: *

*

    *
  • Control of the browser itself
  • *
  • Selection of {@link WebElement}s
  • *
  • Debugging aids
  • *
*

* Key methods are {@link WebDriver#get(String)}, which is used to load a new * web page, and the various methods similar to * {@link WebDriver#findElement(By)}, which is used to find * {@link WebElement}s. *

* Currently, you will need to instantiate implementations of this class * directly. It is hoped that you write your tests against this interface so * that you may "swap in" a more fully featured browser when there is a * requirement for one. Given this approach to testing, it is best to start * writing your tests using the {@link org.openqa.selenium.htmlunit.HtmlUnitDriver} implementation. *

* Note that all methods that use XPath to locate elements will throw a * {@link RuntimeException} should there be an error thrown by the underlying * XPath engine. * * @see org.openqa.selenium.ie.InternetExplorerDriver * @see org.openqa.selenium.htmlunit.HtmlUnitDriver */ public interface WebDriver extends SearchContext { // Navigation /** * Load a new web page in the current browser window. This is done using an * HTTP GET operation, and the method will block until the load is complete. * This will follow redirects issued either by the server or as a * meta-redirect from within the returned HTML. Should a meta-redirect * "rest" for any duration of time, it is best to wait until this timeout is * over, since should the underlying page change whilst your test is * executing the results of future calls against this interface will be * against the freshly loaded page. Synonym for * {@link org.openqa.selenium.WebDriver.Navigation#to(String)}. * * @param url The URL to load. It is best to use a fully qualified URL */ void get(String url); /** * Get a string representing the current URL that the browser is looking at. * * @return The URL of the page currently loaded in the browser */ String getCurrentUrl(); // General properties /** * The title of the current page. * * @return The title of the current page, * with leading and trailing whitespace stripped, * or null if one is not already set */ String getTitle(); /** * Find all elements within the current page using the given mechanism. * * @param by The locating mechanism to use * @return A list of all {@link WebElement}s, or an empty list if nothing matches * @see org.openqa.selenium.By */ List findElements(By by); /** * Find the first {@link WebElement} using the given method. * * @param by The locating mechanism * @return The first matching element on the current page * @throws NoSuchElementException If no matching elements are found */ WebElement findElement(By by); // Misc /** * Get the source of the last loaded page. If the page has been modified * after loading (for example, by Javascript) there is no guarentee that the * returned text is that of the modified page. Please consult the * documentation of the particular driver being used to determine whether * the returned text reflects the current state of the page or the text last * sent by the web server. The page source returned is a representation of * the underlying DOM: do not expect it to be formatted or escaped in the same * way as the response sent from the web server. * * @return The source of the current page */ String getPageSource(); /** * Close the current window, quitting the browser if it's the last window * currently open. */ void close(); /** * Quits this driver, closing every associated window. */ void quit(); /** * Return a set of window handles which can be used to iterate over all open windows of * this webdriver instance by passing them to {@link #switchTo().window(String)} * * @return A set of window handles which can be used to iterate over all open windows. */ Set getWindowHandles(); /** * Return an opaque handle to this window that uniquely identifies it within this driver * instance. This can be used to switch to this window at a later date */ String getWindowHandle(); /** * Send future commands to a different frame or window. * * @return A TargetLocator which can be used to select a frame or window * @see org.openqa.selenium.WebDriver.TargetLocator */ TargetLocator switchTo(); /** * An abstraction allowing the driver to access the browser's history and to * navigate to a given URL. * * @return A {@link org.openqa.selenium.WebDriver.Navigation} that allows * the selection of what to do next */ Navigation navigate(); /** * Gets the Option interface * * @return An option interface * @see org.openqa.selenium.WebDriver.Options */ Options manage(); /** * An interface for managing stuff you would do in a browser menu */ interface Options { /** * Add a specific cookie. If the cookie's domain name is left blank, it * is assumed that the cookie is meant for the domain of the current * document. * * @param cookie The cookie to add. */ void addCookie(Cookie cookie); /** * Delete the named cookie from the current domain. This is equivalent * to setting the named cookie's expiry date to some time in the past. * * @param name The name of the cookie to delete */ void deleteCookieNamed(String name); /** * Delete a cookie from the browser's "cookie jar". The domain of the * cookie will be ignored. * * @param cookie */ void deleteCookie(Cookie cookie); /** * Delete all the cookies for the current domain. */ void deleteAllCookies(); /** * Get all the cookies for the current domain. This is the equivalent of * calling "document.cookie" and parsing the result * * @return A Set of cookies for the current domain. */ Set getCookies(); /** * Get a cookie with a given name. * * @param name the name of the cookie * @return the cookie, or null if no cookie with the given name is present */ Cookie getCookieNamed(String name); /** * Gets the mouse speed for drag and drop. * * @deprecated This method is being reviewed. */ @Deprecated Speed getSpeed(); /** * Sets the speed for user input * * @param speed * @deprecated This method is being reviewed. */ @Deprecated void setSpeed(Speed speed); /** * Returns the interface for managing driver timeouts. */ Timeouts timeouts(); } /** * An interface for managing timeout behavior for WebDriver instances. */ interface Timeouts { /** * Specifies the amount of time the driver should wait when searching for an * element if it is not immediately present. *

* When searching for a single element, the driver should poll the page * until the element has been found, or this timeout expires before throwing * a {@link NoSuchElementException}. When searching for multiple elements, * the driver should poll the page until at least one element has been found * or this timeout has expired. *

* Increasing the implicit wait timeout should be used judiciously as it * will have an adverse effect on test run time, especially when used with * slower location strategies like XPath. * * @param time The amount of time to wait. * @param unit The unit of measure for {@code time}. * @return A self reference. */ Timeouts implicitlyWait(long time, TimeUnit unit); /** * Sets the amount of time to wait for an asynchronous script to finish * execution before throwing an error. If the timeout is negative, then the * script will be allowed to run indefinitely. * * @param time The timeout value. * @param unit The unit of time. * @return A self reference. * @see JavascriptExecutor#executeAsyncScript(String, Object...) */ Timeouts setScriptTimeout(long time, TimeUnit unit); } /** * Used to locate a given frame or window. */ interface TargetLocator { /** * Select a frame by its (zero-based) index. That is, if a page has * three frames, the first frame would be at index "0", the second at * index "1" and the third at index "2". Once the frame has been * selected, all subsequent calls on the WebDriver interface are made to * that frame. * * @param index (zero-based) index * @return This driver focused on the given frame * @throws NoSuchFrameException If the frame cannot be found */ WebDriver frame(int index); /** * Select a frame by its name or ID. Frames located by matching name * attributes are always given precedence over those matched by ID. * * @param nameOrId the name of the frame window, the id of the * <frame> or <iframe> element, or the (zero-based) index * @return This driver focused on the given frame * @throws NoSuchFrameException If the frame cannot be found */ WebDriver frame(String nameOrId); /** * Select a frame using its previously located {@link WebElement}. * * @param frameElement The frame element to switch to. * @return This driver focused on the given frame. * @throws NoSuchFrameException If the given element is neither an IFRAME * nor a FRAME element. * @throws StaleElementReferenceException If the WebElement has gone stale. * @see WebDriver#findElement(By) */ WebDriver frame(WebElement frameElement); /** * Switch the focus of future commands for this driver to the window with the given name/handle. * * @param nameOrHandle The name of the window or the handle as returned by {@link WebDriver#getWindowHandle()} * @return This driver focused on the given window * @throws NoSuchWindowException If the window cannot be found */ WebDriver window(String nameOrHandle); /** * Selects either the first frame on the page, or the main document when a page contains iframes. * * @return This driver focused on the top window/first frame. */ WebDriver defaultContent(); /** * Switches to the element that currently has focus, or the body element if this cannot be detected. * * @return The WebElement with focus, or the body element if no element with focus can be detected. */ WebElement activeElement(); /** * Switches to the currently active modal dialog for this particular driver instance. * * @return A handle to the dialog. */ Alert alert(); } interface Navigation { /** * Move back a single "item" in the browser's history. */ void back(); /** * Move a single "item" forward in the browser's history. Does nothing if * we are on the latest page viewed. */ void forward(); /** * Load a new web page in the current browser window. This is done using an * HTTP GET operation, and the method will block until the load is complete. * This will follow redirects issued either by the server or as a * meta-redirect from within the returned HTML. Should a meta-redirect * "rest" for any duration of time, it is best to wait until this timeout is * over, since should the underlying page change whilst your test is * executing the results of future calls against this interface will be * against the freshly loaded page. * * @param url The URL to load. It is best to use a fully qualified URL */ void to(String url); /** * Overloaded version of {@link #to(String)} that makes it easy to pass in a URL. * * @param url */ void to(URL url); /** * Refresh the current page */ void refresh(); } } PK lC>1.Horg/openqa/selenium/.svn/text-base/WebDriverBackedSelenium.java.svn-base/* Copyright 2007-2009 WebDriver committers Copyright 2007-2009 Google Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package org.openqa.selenium; import com.google.common.base.Supplier; import com.thoughtworks.selenium.DefaultSelenium; import org.openqa.selenium.internal.WrapsDriver; public class WebDriverBackedSelenium extends DefaultSelenium implements WrapsDriver { public WebDriverBackedSelenium(Supplier maker, String baseUrl) { super(new WebDriverCommandProcessor(baseUrl, maker)); } public WebDriverBackedSelenium(WebDriver baseDriver, String baseUrl) { super(new WebDriverCommandProcessor(baseUrl, baseDriver)); } /** * @deprecated Use {@link #getWrappedDriver()} instead. */ @Deprecated public WebDriver getUnderlyingWebDriver() { return getWrappedDriver(); } public WebDriver getWrappedDriver() { return ((WebDriverCommandProcessor) commandProcessor).getUnderlyingWebDriver(); } } PK lC>eX#VVJorg/openqa/selenium/.svn/text-base/WebDriverCommandProcessor.java.svn-base/* Copyright 2007-2009 WebDriver committers Copyright 2007-2009 Google Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package org.openqa.selenium; import com.google.common.base.Supplier; import com.google.common.collect.Maps; import com.thoughtworks.selenium.CommandProcessor; import com.thoughtworks.selenium.SeleniumException; import org.openqa.selenium.internal.WrapsDriver; import org.openqa.selenium.internal.seleniumemulation.AddLocationStrategy; import org.openqa.selenium.internal.seleniumemulation.AddSelection; import org.openqa.selenium.internal.seleniumemulation.AlertOverride; import org.openqa.selenium.internal.seleniumemulation.AltKeyDown; import org.openqa.selenium.internal.seleniumemulation.AltKeyUp; import org.openqa.selenium.internal.seleniumemulation.AssignId; import org.openqa.selenium.internal.seleniumemulation.AttachFile; import org.openqa.selenium.internal.seleniumemulation.CaptureScreenshotToString; import org.openqa.selenium.internal.seleniumemulation.Check; import org.openqa.selenium.internal.seleniumemulation.Click; import org.openqa.selenium.internal.seleniumemulation.Close; import org.openqa.selenium.internal.seleniumemulation.CompoundMutator; import org.openqa.selenium.internal.seleniumemulation.ControlKeyDown; import org.openqa.selenium.internal.seleniumemulation.ControlKeyUp; import org.openqa.selenium.internal.seleniumemulation.CreateCookie; import org.openqa.selenium.internal.seleniumemulation.DeleteAllVisibleCookies; import org.openqa.selenium.internal.seleniumemulation.DeleteCookie; import org.openqa.selenium.internal.seleniumemulation.DoubleClick; import org.openqa.selenium.internal.seleniumemulation.DragAndDrop; import org.openqa.selenium.internal.seleniumemulation.DragAndDropToObject; import org.openqa.selenium.internal.seleniumemulation.ElementFinder; import org.openqa.selenium.internal.seleniumemulation.FindFirstSelectedOptionProperty; import org.openqa.selenium.internal.seleniumemulation.FindSelectedOptionProperties; import org.openqa.selenium.internal.seleniumemulation.FireEvent; import org.openqa.selenium.internal.seleniumemulation.FireNamedEvent; import org.openqa.selenium.internal.seleniumemulation.GetAlert; import org.openqa.selenium.internal.seleniumemulation.GetAllButtons; import org.openqa.selenium.internal.seleniumemulation.GetAllFields; import org.openqa.selenium.internal.seleniumemulation.GetAllLinks; import org.openqa.selenium.internal.seleniumemulation.GetAllWindowTitles; import org.openqa.selenium.internal.seleniumemulation.GetAttribute; import org.openqa.selenium.internal.seleniumemulation.GetAttributeFromAllWindows; import org.openqa.selenium.internal.seleniumemulation.GetBodyText; import org.openqa.selenium.internal.seleniumemulation.GetConfirmation; import org.openqa.selenium.internal.seleniumemulation.GetCookie; import org.openqa.selenium.internal.seleniumemulation.GetCookieByName; import org.openqa.selenium.internal.seleniumemulation.GetElementHeight; import org.openqa.selenium.internal.seleniumemulation.GetElementIndex; import org.openqa.selenium.internal.seleniumemulation.GetElementPositionLeft; import org.openqa.selenium.internal.seleniumemulation.GetElementPositionTop; import org.openqa.selenium.internal.seleniumemulation.GetElementWidth; import org.openqa.selenium.internal.seleniumemulation.GetEval; import org.openqa.selenium.internal.seleniumemulation.GetExpression; import org.openqa.selenium.internal.seleniumemulation.GetHtmlSource; import org.openqa.selenium.internal.seleniumemulation.GetLocation; import org.openqa.selenium.internal.seleniumemulation.GetSelectOptions; import org.openqa.selenium.internal.seleniumemulation.GetTable; import org.openqa.selenium.internal.seleniumemulation.GetText; import org.openqa.selenium.internal.seleniumemulation.GetTitle; import org.openqa.selenium.internal.seleniumemulation.GetValue; import org.openqa.selenium.internal.seleniumemulation.GetXpathCount; import org.openqa.selenium.internal.seleniumemulation.GoBack; import org.openqa.selenium.internal.seleniumemulation.Highlight; import org.openqa.selenium.internal.seleniumemulation.IsAlertPresent; import org.openqa.selenium.internal.seleniumemulation.IsChecked; import org.openqa.selenium.internal.seleniumemulation.IsConfirmationPresent; import org.openqa.selenium.internal.seleniumemulation.IsCookiePresent; import org.openqa.selenium.internal.seleniumemulation.IsEditable; import org.openqa.selenium.internal.seleniumemulation.IsElementPresent; import org.openqa.selenium.internal.seleniumemulation.IsOrdered; import org.openqa.selenium.internal.seleniumemulation.IsSomethingSelected; import org.openqa.selenium.internal.seleniumemulation.IsTextPresent; import org.openqa.selenium.internal.seleniumemulation.IsVisible; import org.openqa.selenium.internal.seleniumemulation.JavascriptLibrary; import org.openqa.selenium.internal.seleniumemulation.KeyEvent; import org.openqa.selenium.internal.seleniumemulation.KeyState; import org.openqa.selenium.internal.seleniumemulation.MetaKeyDown; import org.openqa.selenium.internal.seleniumemulation.MetaKeyUp; import org.openqa.selenium.internal.seleniumemulation.MouseEvent; import org.openqa.selenium.internal.seleniumemulation.MouseEventAt; import org.openqa.selenium.internal.seleniumemulation.NoOp; import org.openqa.selenium.internal.seleniumemulation.Open; import org.openqa.selenium.internal.seleniumemulation.OpenWindow; import org.openqa.selenium.internal.seleniumemulation.Refresh; import org.openqa.selenium.internal.seleniumemulation.RemoveAllSelections; import org.openqa.selenium.internal.seleniumemulation.RemoveSelection; import org.openqa.selenium.internal.seleniumemulation.RunScript; import org.openqa.selenium.internal.seleniumemulation.ScriptMutator; import org.openqa.selenium.internal.seleniumemulation.SelectFrame; import org.openqa.selenium.internal.seleniumemulation.SelectOption; import org.openqa.selenium.internal.seleniumemulation.SelectWindow; import org.openqa.selenium.internal.seleniumemulation.SeleneseCommand; import org.openqa.selenium.internal.seleniumemulation.SeleniumSelect; import org.openqa.selenium.internal.seleniumemulation.SetNextConfirmationState; import org.openqa.selenium.internal.seleniumemulation.SetTimeout; import org.openqa.selenium.internal.seleniumemulation.ShiftKeyDown; import org.openqa.selenium.internal.seleniumemulation.ShiftKeyUp; import org.openqa.selenium.internal.seleniumemulation.Submit; import org.openqa.selenium.internal.seleniumemulation.Timer; import org.openqa.selenium.internal.seleniumemulation.Type; import org.openqa.selenium.internal.seleniumemulation.TypeKeys; import org.openqa.selenium.internal.seleniumemulation.Uncheck; import org.openqa.selenium.internal.seleniumemulation.WaitForCondition; import org.openqa.selenium.internal.seleniumemulation.WaitForPageToLoad; import org.openqa.selenium.internal.seleniumemulation.WaitForPopup; import org.openqa.selenium.internal.seleniumemulation.WindowFocus; import org.openqa.selenium.internal.seleniumemulation.WindowMaximize; import org.openqa.selenium.internal.seleniumemulation.Windows; import org.openqa.selenium.remote.DesiredCapabilities; import java.util.Map; import static org.openqa.selenium.internal.seleniumemulation.SeleniumSelect.Property.ID; import static org.openqa.selenium.internal.seleniumemulation.SeleniumSelect.Property.INDEX; import static org.openqa.selenium.internal.seleniumemulation.SeleniumSelect.Property.TEXT; import static org.openqa.selenium.internal.seleniumemulation.SeleniumSelect.Property.VALUE; /** * A CommandProcessor which delegates commands down to an underlying webdriver * instance. */ public class WebDriverCommandProcessor implements CommandProcessor, WrapsDriver { private final Map seleneseMethods = Maps.newHashMap(); private final String baseUrl; private final Timer timer; private final CompoundMutator scriptMutator; private Supplier maker; private WebDriver driver; /** * Create an instance that will later be configured by calling * {@link #start(Object)} with a {@link Capabilities} * instance. * * @param baseUrl The URL from which relative URLs should be based on */ public WebDriverCommandProcessor(String baseUrl) { // Firefox seems like a reasonable default this(baseUrl, new SuppliesWebDriver(DesiredCapabilities.firefox())); } /** * Create an instance that will later be started by calling * {@link #start()} * * @param baseUrl The URL from which relative URLs should be based on * @param likeThis Typically a {@link org.openqa.selenium.remote.DesiredCapabilities} instance */ public WebDriverCommandProcessor(String baseUrl, Capabilities likeThis) { this(baseUrl, new SuppliesWebDriver(likeThis)); } public WebDriverCommandProcessor(String baseUrl, WebDriver driver) { this(baseUrl, new ExplodingSupplier()); this.driver = driver; assertDriverSupportsJavascript(driver); setUpMethodMap(); } public WebDriverCommandProcessor(String baseUrl, Supplier maker) { this.maker = maker; if (baseUrl.endsWith("/")) { this.baseUrl = baseUrl.substring(0, baseUrl.length() - 1); } else { this.baseUrl = baseUrl; } this.timer = new Timer(30000); this.scriptMutator = new CompoundMutator(baseUrl); } /** * @return the instance of webdriver that this processor is wrapping. * @deprecated Use {#getWrappedDriver} instead. */ @Deprecated public WebDriver getUnderlyingWebDriver() { return driver; } public WebDriver getWrappedDriver() { return driver; } public String getRemoteControlServerLocation() { throw new UnsupportedOperationException(); } public String doCommand(String commandName, String[] args) { Object val = execute(commandName, args); if (val == null) { return null; } return val.toString(); } public void setExtensionJs(String s) { throw new UnsupportedOperationException(); } public void start() { start((Object) null); } public void start(String s) { throw new UnsupportedOperationException("Unsure how to process: " + s); } public void start(Object o) { if (driver != null) { throw new SeleniumException("You may not start more than one session at a time"); } driver = maker.get(); assertDriverSupportsJavascript(driver); setUpMethodMap(); } public void stop() { timer.stop(); if (driver != null) { driver.quit(); } driver = null; } public String getString(String commandName, String[] args) { return (String) execute(commandName, args); } public String[] getStringArray(String commandName, String[] args) { return (String[]) execute(commandName, args); } public Number getNumber(String commandName, String[] args) { return (Number) execute(commandName, args); } public Number[] getNumberArray(String s, String[] strings) { throw new UnsupportedOperationException(); } public boolean getBoolean(String commandName, String[] args) { return (Boolean) execute(commandName, args); } public boolean[] getBooleanArray(String s, String[] strings) { throw new UnsupportedOperationException(); } private Object execute(String commandName, final String[] args) { final SeleneseCommand command = seleneseMethods.get(commandName); if (command == null) { throw new UnsupportedOperationException(commandName); } return timer.run(command, driver, args); } public void addMutator(ScriptMutator mutator) { scriptMutator.addMutator(mutator); } public boolean isMethodAvailable(String methodName) { return seleneseMethods.containsKey(methodName); } public void addMethod(String methodName, SeleneseCommand command) { seleneseMethods.put(methodName, command); } public SeleneseCommand getMethod(String methodName) { return seleneseMethods.get(methodName); } private void assertDriverSupportsJavascript(WebDriver driver) { // TODO(simon): We're starting to need a "describe" interface for checks // like this. if (!(driver instanceof JavascriptExecutor)) { throw new IllegalStateException("Driver instance must support JS."); } if (!((JavascriptExecutor) driver).isJavascriptEnabled()) { throw new IllegalStateException("JS support must be enabled."); } } private void setUpMethodMap() { ElementFinder elementFinder = new ElementFinder(); JavascriptLibrary javascriptLibrary = new JavascriptLibrary(); KeyState keyState = new KeyState(); AlertOverride alertOverride = new AlertOverride(); SeleniumSelect select = new SeleniumSelect(elementFinder); Windows windows = new Windows(driver); // Note the we use the names used by the CommandProcessor seleneseMethods.put("addLocationStrategy", new AddLocationStrategy(elementFinder)); seleneseMethods.put("addSelection", new AddSelection(elementFinder, select)); seleneseMethods.put("altKeyDown", new AltKeyDown(keyState)); seleneseMethods.put("altKeyUp", new AltKeyUp(keyState)); seleneseMethods.put("assignId", new AssignId(javascriptLibrary, elementFinder)); seleneseMethods.put("attachFile", new AttachFile(elementFinder)); seleneseMethods.put("captureScreenshotToString", new CaptureScreenshotToString()); seleneseMethods.put("click", new Click(alertOverride, elementFinder)); seleneseMethods.put("check", new Check(alertOverride, elementFinder)); seleneseMethods.put("chooseCancelOnNextConfirmation", new SetNextConfirmationState(false)); seleneseMethods.put("chooseOkOnNextConfirmation", new SetNextConfirmationState(true)); seleneseMethods.put("close", new Close()); seleneseMethods.put("createCookie", new CreateCookie()); seleneseMethods.put("controlKeyDown", new ControlKeyDown(keyState)); seleneseMethods.put("controlKeyUp", new ControlKeyUp(keyState)); seleneseMethods.put("deleteAllVisibleCookies", new DeleteAllVisibleCookies()); seleneseMethods.put("deleteCookie", new DeleteCookie()); seleneseMethods.put("doubleClick", new DoubleClick(elementFinder)); seleneseMethods.put("dragdrop", new DragAndDrop(elementFinder)); seleneseMethods.put("dragAndDrop", new DragAndDrop(elementFinder)); seleneseMethods.put("dragAndDropToObject", new DragAndDropToObject(elementFinder)); seleneseMethods.put("fireEvent", new FireEvent(elementFinder, javascriptLibrary)); seleneseMethods.put("focus", new FireNamedEvent(elementFinder, javascriptLibrary, "focus")); seleneseMethods.put("getAlert", new GetAlert(alertOverride)); seleneseMethods.put("getAllButtons", new GetAllButtons()); seleneseMethods.put("getAllFields", new GetAllFields()); seleneseMethods.put("getAllLinks", new GetAllLinks()); seleneseMethods.put("getAllWindowTitles", new GetAllWindowTitles()); seleneseMethods.put("getAttribute", new GetAttribute(elementFinder)); seleneseMethods.put("getAttributeFromAllWindows", new GetAttributeFromAllWindows()); seleneseMethods.put("getBodyText", new GetBodyText()); seleneseMethods.put("getConfirmation", new GetConfirmation(alertOverride)); seleneseMethods.put("getCookie", new GetCookie()); seleneseMethods.put("getCookieByName", new GetCookieByName()); seleneseMethods.put("getElementHeight", new GetElementHeight(elementFinder)); seleneseMethods.put("getElementIndex", new GetElementIndex(elementFinder, javascriptLibrary)); seleneseMethods.put("getElementPositionLeft", new GetElementPositionLeft(elementFinder)); seleneseMethods.put("getElementPositionTop", new GetElementPositionTop(elementFinder)); seleneseMethods.put("getElementWidth", new GetElementWidth(elementFinder)); seleneseMethods.put("getEval", new GetEval(scriptMutator)); seleneseMethods.put("getExpression", new GetExpression()); seleneseMethods.put("getHtmlSource", new GetHtmlSource()); seleneseMethods.put("getLocation", new GetLocation()); seleneseMethods.put("getSelectedId", new FindFirstSelectedOptionProperty(select, ID)); seleneseMethods.put("getSelectedIds", new FindSelectedOptionProperties(select, ID)); seleneseMethods.put("getSelectedIndex", new FindFirstSelectedOptionProperty(select, INDEX)); seleneseMethods.put("getSelectedIndexes", new FindSelectedOptionProperties(select, INDEX)); seleneseMethods.put("getSelectedLabel", new FindFirstSelectedOptionProperty(select, TEXT)); seleneseMethods.put("getSelectedLabels", new FindSelectedOptionProperties(select, TEXT)); seleneseMethods.put("getSelectedValue", new FindFirstSelectedOptionProperty(select, VALUE)); seleneseMethods.put("getSelectedValues", new FindSelectedOptionProperties(select, VALUE)); seleneseMethods.put("getSelectOptions", new GetSelectOptions(select)); seleneseMethods.put("getSpeed", new NoOp("0")); seleneseMethods.put("getTable", new GetTable(elementFinder, javascriptLibrary)); seleneseMethods.put("getText", new GetText(javascriptLibrary)); seleneseMethods.put("getTitle", new GetTitle()); seleneseMethods.put("getValue", new GetValue(elementFinder)); seleneseMethods.put("getXpathCount", new GetXpathCount()); seleneseMethods.put("goBack", new GoBack()); seleneseMethods.put("highlight", new Highlight(elementFinder, javascriptLibrary)); seleneseMethods.put("isAlertPresent", new IsAlertPresent(alertOverride)); seleneseMethods.put("isChecked", new IsChecked(elementFinder)); seleneseMethods.put("isConfirmationPresent", new IsConfirmationPresent(alertOverride)); seleneseMethods.put("isCookiePresent", new IsCookiePresent()); seleneseMethods.put("isEditable", new IsEditable(elementFinder)); seleneseMethods.put("isElementPresent", new IsElementPresent(elementFinder)); seleneseMethods.put("isOrdered", new IsOrdered(elementFinder, javascriptLibrary)); seleneseMethods.put("isSomethingSelected", new IsSomethingSelected(select)); seleneseMethods.put("isTextPresent", new IsTextPresent(javascriptLibrary)); seleneseMethods.put("isVisible", new IsVisible(elementFinder)); seleneseMethods.put("keyDown", new KeyEvent(elementFinder, javascriptLibrary, keyState, "doKeyDown")); seleneseMethods.put("keyPress", new TypeKeys(alertOverride, elementFinder)); seleneseMethods.put("keyUp", new KeyEvent(elementFinder, javascriptLibrary, keyState, "doKeyUp")); seleneseMethods.put("metaKeyDown", new MetaKeyDown(keyState)); seleneseMethods.put("metaKeyUp", new MetaKeyUp(keyState)); seleneseMethods.put("mouseOver", new MouseEvent(elementFinder, javascriptLibrary, "mouseover")); seleneseMethods.put("mouseOut", new MouseEvent(elementFinder, javascriptLibrary, "mouseout")); seleneseMethods.put("mouseDown", new MouseEvent(elementFinder, javascriptLibrary, "mousedown")); seleneseMethods.put("mouseDownAt", new MouseEventAt(elementFinder, javascriptLibrary, "mousedown")); seleneseMethods.put("mouseMove", new MouseEvent(elementFinder, javascriptLibrary, "mousemove")); seleneseMethods.put("mouseMoveAt", new MouseEventAt(elementFinder, javascriptLibrary, "mousemove")); seleneseMethods.put("mouseUp", new MouseEvent(elementFinder, javascriptLibrary, "mouseup")); seleneseMethods.put("mouseUpAt", new MouseEventAt(elementFinder, javascriptLibrary, "mouseup")); seleneseMethods.put("open", new Open(baseUrl)); seleneseMethods.put("openWindow", new OpenWindow(new GetEval(scriptMutator))); seleneseMethods.put("refresh", new Refresh()); seleneseMethods.put("removeAllSelections", new RemoveAllSelections(elementFinder)); seleneseMethods.put("removeSelection", new RemoveSelection(elementFinder, select)); seleneseMethods.put("runScript", new RunScript(scriptMutator)); seleneseMethods.put("select", new SelectOption(alertOverride, select)); seleneseMethods.put("selectFrame", new SelectFrame(windows)); seleneseMethods.put("selectWindow", new SelectWindow(windows)); seleneseMethods.put("setBrowserLogLevel", new NoOp(null)); seleneseMethods.put("setContext", new NoOp(null)); seleneseMethods.put("setSpeed", new NoOp(null)); seleneseMethods.put("setTimeout", new SetTimeout(timer)); seleneseMethods.put("shiftKeyDown", new ShiftKeyDown(keyState)); seleneseMethods.put("shiftKeyUp", new ShiftKeyUp(keyState)); seleneseMethods.put("submit", new Submit(elementFinder)); seleneseMethods.put("type", new Type(alertOverride, javascriptLibrary, elementFinder, keyState)); seleneseMethods.put("typeKeys", new TypeKeys(alertOverride, elementFinder)); seleneseMethods.put("uncheck", new Uncheck(alertOverride, elementFinder)); seleneseMethods.put("useXpathLibrary", new NoOp(null)); seleneseMethods.put("waitForCondition", new WaitForCondition(scriptMutator)); seleneseMethods.put("waitForFrameToLoad", new NoOp(null)); seleneseMethods.put("waitForPageToLoad", new WaitForPageToLoad()); seleneseMethods.put("waitForPopUp", new WaitForPopup(windows)); seleneseMethods.put("windowFocus", new WindowFocus(javascriptLibrary)); seleneseMethods.put("windowMaximize", new WindowMaximize(javascriptLibrary)); } } PK lC>Corg/openqa/selenium/.svn/text-base/WebDriverException.java.svn-base/* Copyright 2007-2009 WebDriver committers Copyright 2007-2009 Google Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package org.openqa.selenium; public class WebDriverException extends RuntimeException { public WebDriverException() { super(); } public WebDriverException(String message) { super(message); } public WebDriverException(Throwable cause) { super(cause); } public WebDriverException(String message, Throwable cause) { super(message, cause); } @Override public String getMessage() { return createMessage(super.getMessage()); } private String createMessage(String originalMessageString) { return String.format("%sSystem info: %s\nDriver info: %s", originalMessageString == null ? "" : originalMessageString + "\n", getSystemInformation(), getDriverInformation()); } public String getSystemInformation() { return String.format("os.name: '%s', os.arch: '%s', os.version: '%s', java.version: '%s'", System.getProperty("os.name"), System.getProperty("os.arch"), System.getProperty("os.version"), System.getProperty("java.version")); } public String getDriverInformation() { return "driver.version: " + getDriverName(getStackTrace()); } public static String getDriverName(StackTraceElement[] stackTraceElements) { String driverName = "unknown"; for (StackTraceElement e : stackTraceElements) { if (e.getClassName().endsWith("Driver")) { String[] bits = e.getClassName().split("\\."); driverName = bits[bits.length - 1]; } } return driverName; } } PK lC>w.;org/openqa/selenium/.svn/text-base/WebElement.java.svn-base/* Copyright 2007-2009 WebDriver committers Copyright 2007-2009 Google Inc. Portions copyright 2007 ThoughtWorks, Inc Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package org.openqa.selenium; import java.util.List; /** * Represents an HTML element. Generally, all interesting operations to do with interacting with a * page will be performed through this interface. *

* All method calls will do a freshness check to ensure that the element reference is still valid. * This essentially determines whether or not the element is still attached to the DOM. If this test * fails, then an {@link org.openqa.selenium.StaleElementReferenceException} is thrown, and all * future calls to this instance will fail. */ public interface WebElement extends SearchContext { /** * Click this element. If this causes a new page to load, this method will block until the page * has loaded. At this point, you should discard all references to this element and any further * operations performed on this element will have undefined behaviour unless you know that the * element and the page will still be present. If click() causes a new page to be loaded via an * event or is done by sending a native event (which is a common case on Firefox, IE on Windows) * then the method will *not* wait for it to be loaded and the caller should verify that a new * page has been loaded. *

* If this element is not clickable, then this operation is a no-op since it's pretty common for * someone to accidentally miss the target when clicking in Real Life */ void click(); /** * If this current element is a form, or an element within a form, then this will be submitted * to the remote server. If this causes the current page to change, then this method will block * until the new page is loaded. * * @throws NoSuchElementException If the given element is not within a form */ void submit(); /** * Get the value of the element's "value" attribute. If this value has been modified after the * page has loaded (for example, through javascript) then this will reflect the current value of * the "value" attribute. * * @return The value of the element's "value" attribute. * @see WebElement#getAttribute(String) */ String getValue(); /** * Use this method to simulate typing into an element, which may set its value. */ void sendKeys(CharSequence... keysToSend); /** * If this element is a text entry element, this will clear the value. Has no effect on other * elements. Text entry elements are INPUT and TEXTAREA elements. */ void clear(); /** * Get the tag name of this element. Not the value of the name attribute: will return * "input" for the element <input name="foo" />. * * @return The tag name of this element. */ String getTagName(); /** * Get the value of a the given attribute of the element. Will return the current value, even if * this has been modified after the page has been loaded. More exactly, this method will return * the value of the given attribute, unless that attribute is not present, in which case the * value of the property with the same name is returned. If neither value is set, null is * returned. The "style" attribute is converted as best can be to a text representation with a * trailing semi-colon. The following are deemed to be "boolean" attributes, and will * return either "true" or "false": * * async, autofocus, autoplay, checked, compact, complete, controls, declare, defaultchecked, * defaultselected, defer, disabled, draggable, ended, formnovalidate, hidden, indeterminate, * iscontenteditable, ismap, itemscope, loop, multiple, muted, nohref, noresize, noshade, novalidate, * nowrap, open, paused, pubdate, readonly, required, reversed, scoped, seamless, seeking, * selected, spellcheck, truespeed, willvalidate * * Finally, the following commonly mis-capitalized attribute/property names are evaluated as * expected: * *

    *
  • "class"
  • "readonly" *
* * @param name The name of the attribute. * @return The attribute's current value or null if the value is not set. */ String getAttribute(String name); /** * If the element is a checkbox this will toggle the elements state from selected to not * selected, or from not selected to selected. * * @return Whether the toggled element is selected (true) or not (false) after this toggle is * complete */ boolean toggle(); /** * Determine whether or not this element is selected or not. This operation only applies to * input elements such as checkboxes, options in a select and radio buttons. * * @return True if the element is currently selected or checked, false otherwise. */ boolean isSelected(); /** * Select an element. This method will work against radio buttons, "option" elements within a * "select" and checkboxes */ void setSelected(); /** * Is the element currently enabled or not? This will generally return true for everything but * disabled input elements. * * @return True if the element is enabled, false otherwise. */ boolean isEnabled(); /** * Get the visible (i.e. not hidden by CSS) innerText of this element, including sub-elements, * without any leading or trailing whitespace. * * @return The innerText of this element. */ String getText(); /** * Find all elements within the current context using the given mechanism. When using xpath be * aware that webdriver follows standard conventions: a search prefixed with "//" will search * the entire document, not just the children of this current node. Use ".//" to limit your * search to the children of this WebElement. * * @param by The locating mechanism to use * @return A list of all {@link WebElement}s, or an empty list if nothing matches. * @see org.openqa.selenium.By */ List findElements(By by); /** * Find the first {@link WebElement} using the given method. See the note in * {@link #findElement(By)} about finding via XPath. * * @param by The locating mechanism * @return The first matching element on the current context. * @throws NoSuchElementException If no matching elements are found */ WebElement findElement(By by); } PK lC>{Eorg/openqa/selenium/.svn/text-base/XPathLookupException.java.svn-basepackage org.openqa.selenium; public class XPathLookupException extends WebDriverException { public XPathLookupException() { super(); } public XPathLookupException(String message) { super(message); } public XPathLookupException(Throwable cause) { super(cause); } public XPathLookupException(String message, Throwable cause) { super(message, cause); } } PK lC>ARzU6org/openqa/selenium/.svn/text-base/build.desc.svn-base java_library(name = "selenium", deps = [ ":webdriver-api", "//java/client/src/com/thoughtworks/selenium:api", "//java/client/src/org/openqa/selenium/browserlaunchers", "//java/client/src/org/openqa/selenium/interactions", "//java/client/src/org/openqa/selenium/net", ]) java_library(name = "base", srcs = [ "Capabilities.java", "Platform.java", "WebDriverException.java", ]) java_library(name = "webdriver-api", srcs = [ "Alert.java", "By.java", "Cookie.java", "Dimension.java", "ElementNotVisibleException.java", "HasInputDevices.java", "IllegalLocatorException.java", "InvalidCookieDomainException.java", "JavascriptExecutor.java", "Keyboard.java", "Keys.java", "Mouse.java", "NoAlertPresentException.java", "NoSuchElementException.java", "NoSuchFrameException.java", "NoSuchWindowException.java", "NotFoundException.java", "OutputType.java", "Point.java", "Proxy.java", "RenderedWebElement.java", "Rotatable.java", "ScreenOrientation.java", "SearchContext.java", "Speed.java", "StaleElementReferenceException.java", "TakesScreenshot.java", "TimeoutException.java", "UnableToSetCookieException.java", "UnhandledAlertException.java", "WebDriver.java", "WebElement.java", "XPathLookupException.java", "html5/*.java", "interactions/internal/Coordinates.java", "interactions/ActionChainsGenerator.java", "internal/FindsByClassName.java", "internal/FindsByCssSelector.java", "internal/FindsById.java", "internal/FindsByLinkText.java", "internal/FindsByName.java", "internal/FindsByTagName.java", "internal/FindsByXPath.java", "internal/Locatable.java", "internal/Lock.java", "internal/SocketLock.java", "internal/WrapsDriver.java", "internal/WrapsElement.java", ], deps = [ ":base", "//java/client/src/org/openqa/selenium/interactions:api", "//java/client/src/org/openqa/selenium/internal:codecs", ]) # TODO(simon): Break out the selenium emulation from the v1 implementation. java_library(name = "selenium-api", srcs = [ "ExplodingSupplier.java", "SuppliesWebDriver.java", "WebDriverCommandProcessor.java", "internal/seleniumemulation/**/*.java", ], deps = [ ":webdriver-api", "//java/client/src/com/thoughtworks/selenium:wait", "//java/client/src/org/openqa/selenium/chrome", "//java/client/src/org/openqa/selenium/firefox", "//java/client/src/org/openqa/selenium/ie", "//third_party/java/guava-libraries", "//third_party/java/json", ]) # Circular dependency avoidance technique java_library(name = "webdriver-backed-selenium", srcs = [ "WebDriverBackedSelenium.java", ], resources = [ { "internal/seleniumemulation/injectableSelenium.js" : "org/openqa/selenium/internal/seleniumemulation/injectableSelenium.js" }, { "internal/seleniumemulation/htmlutils.js" : "org/openqa/selenium/internal/seleniumemulation/htmlutils.js" }, { "//javascript/selenium-atoms:findElement" : "scripts/selenium/findElement.js" }, { "//javascript/selenium-atoms:getText" : "scripts/selenium/getText.js" }, { "//javascript/selenium-atoms:isElementPresent" : "scripts/selenium/isElementPresent.js" }, { "//javascript/selenium-atoms:isTextPresent" : "scripts/selenium/isTextPresent.js" }, { "//javascript/selenium-atoms:isVisible" : "scripts/selenium/isVisible.js" } ], deps = [ ":selenium-api", "//java/client/src/com/thoughtworks/selenium", ]) java_library(name = "selenium-backed-webdriver", srcs = [ "SeleneseCommandExecutor.java", ], deps = [ "//java/client/src/org/openqa/selenium/internal/selenesedriver", "//java/client/src/org/openqa/selenium/firefox", "//java/client/src/org/openqa/selenium/remote", ]) java_library(name = "client-combined", deps = [ "//java/client/src/com/thoughtworks/selenium:selenium", "//java/client/src/org/openqa/selenium/android", "//java/client/src/org/openqa/selenium/chrome", "//java/client/src/org/openqa/selenium/htmlunit", "//java/client/src/org/openqa/selenium/firefox", "//java/client/src/org/openqa/selenium/ie", "//java/client/src/org/openqa/selenium/iphone", "//java/client/src/org/openqa/selenium/remote", "//java/client/src/org/openqa/selenium:selenium-api", "//java/client/src/org/openqa/selenium:selenium-backed-webdriver", "//java/client/src/org/openqa/selenium/support", "//java/client/src/org/openqa/selenium:webdriver-backed-selenium", ]) PK )hC>ARzUorg/openqa/selenium/build.desc java_library(name = "selenium", deps = [ ":webdriver-api", "//java/client/src/com/thoughtworks/selenium:api", "//java/client/src/org/openqa/selenium/browserlaunchers", "//java/client/src/org/openqa/selenium/interactions", "//java/client/src/org/openqa/selenium/net", ]) java_library(name = "base", srcs = [ "Capabilities.java", "Platform.java", "WebDriverException.java", ]) java_library(name = "webdriver-api", srcs = [ "Alert.java", "By.java", "Cookie.java", "Dimension.java", "ElementNotVisibleException.java", "HasInputDevices.java", "IllegalLocatorException.java", "InvalidCookieDomainException.java", "JavascriptExecutor.java", "Keyboard.java", "Keys.java", "Mouse.java", "NoAlertPresentException.java", "NoSuchElementException.java", "NoSuchFrameException.java", "NoSuchWindowException.java", "NotFoundException.java", "OutputType.java", "Point.java", "Proxy.java", "RenderedWebElement.java", "Rotatable.java", "ScreenOrientation.java", "SearchContext.java", "Speed.java", "StaleElementReferenceException.java", "TakesScreenshot.java", "TimeoutException.java", "UnableToSetCookieException.java", "UnhandledAlertException.java", "WebDriver.java", "WebElement.java", "XPathLookupException.java", "html5/*.java", "interactions/internal/Coordinates.java", "interactions/ActionChainsGenerator.java", "internal/FindsByClassName.java", "internal/FindsByCssSelector.java", "internal/FindsById.java", "internal/FindsByLinkText.java", "internal/FindsByName.java", "internal/FindsByTagName.java", "internal/FindsByXPath.java", "internal/Locatable.java", "internal/Lock.java", "internal/SocketLock.java", "internal/WrapsDriver.java", "internal/WrapsElement.java", ], deps = [ ":base", "//java/client/src/org/openqa/selenium/interactions:api", "//java/client/src/org/openqa/selenium/internal:codecs", ]) # TODO(simon): Break out the selenium emulation from the v1 implementation. java_library(name = "selenium-api", srcs = [ "ExplodingSupplier.java", "SuppliesWebDriver.java", "WebDriverCommandProcessor.java", "internal/seleniumemulation/**/*.java", ], deps = [ ":webdriver-api", "//java/client/src/com/thoughtworks/selenium:wait", "//java/client/src/org/openqa/selenium/chrome", "//java/client/src/org/openqa/selenium/firefox", "//java/client/src/org/openqa/selenium/ie", "//third_party/java/guava-libraries", "//third_party/java/json", ]) # Circular dependency avoidance technique java_library(name = "webdriver-backed-selenium", srcs = [ "WebDriverBackedSelenium.java", ], resources = [ { "internal/seleniumemulation/injectableSelenium.js" : "org/openqa/selenium/internal/seleniumemulation/injectableSelenium.js" }, { "internal/seleniumemulation/htmlutils.js" : "org/openqa/selenium/internal/seleniumemulation/htmlutils.js" }, { "//javascript/selenium-atoms:findElement" : "scripts/selenium/findElement.js" }, { "//javascript/selenium-atoms:getText" : "scripts/selenium/getText.js" }, { "//javascript/selenium-atoms:isElementPresent" : "scripts/selenium/isElementPresent.js" }, { "//javascript/selenium-atoms:isTextPresent" : "scripts/selenium/isTextPresent.js" }, { "//javascript/selenium-atoms:isVisible" : "scripts/selenium/isVisible.js" } ], deps = [ ":selenium-api", "//java/client/src/com/thoughtworks/selenium", ]) java_library(name = "selenium-backed-webdriver", srcs = [ "SeleneseCommandExecutor.java", ], deps = [ "//java/client/src/org/openqa/selenium/internal/selenesedriver", "//java/client/src/org/openqa/selenium/firefox", "//java/client/src/org/openqa/selenium/remote", ]) java_library(name = "client-combined", deps = [ "//java/client/src/com/thoughtworks/selenium:selenium", "//java/client/src/org/openqa/selenium/android", "//java/client/src/org/openqa/selenium/chrome", "//java/client/src/org/openqa/selenium/htmlunit", "//java/client/src/org/openqa/selenium/firefox", "//java/client/src/org/openqa/selenium/ie", "//java/client/src/org/openqa/selenium/iphone", "//java/client/src/org/openqa/selenium/remote", "//java/client/src/org/openqa/selenium:selenium-api", "//java/client/src/org/openqa/selenium:selenium-backed-webdriver", "//java/client/src/org/openqa/selenium/support", "//java/client/src/org/openqa/selenium:webdriver-backed-selenium", ]) PK lC>2VVorg/.svn/all-wcpropsK 25 svn:wc:ra_dav:version-url V 45 /svn/!svn/ver/11261/trunk/java/client/src/org END PK lC>w  org/.svn/entries8 dir 11264 http://selenium.googlecode.com/svn/trunk/java/client/src/org http://selenium.googlecode.com/svn 2011-02-02T20:36:39.437809Z 11261 simon.m.stewart svn:special svn:externals svn:needs-lock 07704840-8298-11de-bf8c-fd130f914ac9 openqa dir PK lC>Gorg/.svn/format8 PK %^D>X_6 6 -org/openqa/selenium/firefox/Preferences.class1a'org/openqa/selenium/firefox/Preferencesjava/lang/ObjectadditionalPrefsLjava/util/Map; Signature5Ljava/util/Map;()VCode  java/util/HashMap   LineNumberTableLocalVariableTablethis)Lorg/openqa/selenium/firefox/Preferences; setPreference'(Ljava/lang/String;Ljava/lang/String;)V   isStringified(Ljava/lang/String;)Z"java/lang/IllegalArgumentException /Preference values must be plain strings: %s: %s "$#java/lang/String %&format9(Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/String; ( )(Ljava/lang/String;)V+"%s" -/. java/util/Map 01put8(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;keyLjava/lang/String;value(Ljava/lang/String;Z)V "7 89valueOf(Z)Ljava/lang/String;Z(Ljava/lang/String;I)V "= 8>(I)Ljava/lang/String;IaddTo(Ljava/util/Map;)V8(Ljava/util/Map;)V -D EAputAllprefsLocalVariableTypeTable/(Lorg/openqa/selenium/firefox/FirefoxProfile;)V JLK*org/openqa/selenium/firefox/FirefoxProfile MNgetAdditionalPreferences+()Lorg/openqa/selenium/firefox/Preferences;profile,Lorg/openqa/selenium/firefox/FirefoxProfile; getPreference&(Ljava/lang/String;)Ljava/lang/Object; -T UVget&(Ljava/lang/Object;)Ljava/lang/Object;X" "Z [ startsWith "] ^endsWith SourceFilePreferences.java   B* *Y  :*,YY+SY,S!'*+*Y,S!,W" !!9" ::23:435 R*+6,W %& 234:; R*+<,W )* 234?@AB U +*C - .  FG  F@H I+I*C 12OPQR ? *+S6  23 J+WY+W\<43_`PK %^D>s.6,990org/openqa/selenium/firefox/FirefoxProfile.class1*org/openqa/selenium/firefox/FirefoxProfilejava/lang/ObjectPORT_PREFERENCELjava/lang/String; ConstantValue webdriver_firefox_portadditionalPrefs)Lorg/openqa/selenium/firefox/Preferences; extensionsLjava/util/Map; SignatureSLjava/util/Map;enableNativeEventsZloadNoFocusLibacceptUntrustedCertsuntrustedCertIssuermodelLjava/io/File;ENABLE_NATIVE_EVENTS_PREFwebdriver_enable_native_eventsACCEPT_UNTRUSTED_CERTS_PREF webdriver_accept_untrusted_certsASSUME_UNTRUSTED_ISSUER_PREF!webdriver_assume_untrusted_issuer1$SWITCH_TABLE$org$openqa$selenium$Proxy$ProxyType[I()VCode & "'(Ljava/io/File;)VLineNumberTableLocalVariableTablethis,Lorg/openqa/selenium/firefox/FirefoxProfile; - "#/'org/openqa/selenium/firefox/Preferences .- 2 465com/google/common/collect/Maps 78 newHashMap()Ljava/util/HashMap; : <  > ?' verifyModelA java/io/FileCuser.js @E "F#(Ljava/io/File;Ljava/lang/String;)V @H IJexists()Z L MNreadExistingPrefs(Ljava/io/File;)Ljava/util/Map; PRQ java/util/Map STget&(Ljava/lang/Object;)Ljava/lang/Object;Vjava/lang/String XZYjava/lang/Boolean [\valueOf'(Ljava/lang/String;)Ljava/lang/Boolean; X^ _J booleanValue a  c  e  gih)org/openqa/selenium/firefox/FirefoxDriver jDEFAULT_ENABLE_NATIVE_EVENTS l  profileDir prefsInModel existingPrefsLocalVariableTypeTable5Ljava/util/Map;s:org/openqa/selenium/firefox/UnableToCreateProfileExceptionujava/lang/StringBuilderw.Given model profile directory does not exist: ty "z(Ljava/lang/String;)V @| }~getPath()Ljava/lang/String; t append-(Ljava/lang/String;)Ljava/lang/StringBuilder; t ~toString ry @ J isDirectory2Given model profile directory is not a directory: @ ~getAbsolutePathaddWebDriverExtensionIfNeeded webdriver P  containsKey(Ljava/lang/Object;)Z7org/openqa/selenium/firefox/internal/ClasspathExtension/webdriver.xpi "&(Ljava/lang/Class;Ljava/lang/String;)V   addExtensionE(Ljava/lang/String;Lorg/openqa/selenium/firefox/internal/Extension;)V extension9Lorg/openqa/selenium/firefox/internal/ClasspathExtension; Exceptionsjava/io/IOException)(Ljava/lang/Class<*>;Ljava/lang/String;)V @y  'loadResourcesUsingLjava/lang/Class;loadFromfileLjava/lang/Class<*>; @ ~getName2org/openqa/selenium/firefox/internal/FileExtension &extensionToInstall  deriveExtensionName&(Ljava/lang/String;)Ljava/lang/String; P put8(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;key0Lorg/openqa/selenium/firefox/internal/Extension;name U replace(CC)Ljava/lang/String;/ U split'(Ljava/lang/String;)[Ljava/lang/String;\..*?$ U  replaceAll8(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String; originalNamepieces[Ljava/lang/String;E(Ljava/io/File;)Ljava/util/Map;java/util/HashMap -java/io/BufferedReaderjava/io/FileReader & "(Ljava/io/Reader;)V ~readLine user_pref(" U  startsWith(Ljava/lang/String;)Z U length()I U  substring(I)Ljava/lang/String;); U (II)Ljava/lang/String;, U ~trim&org/openqa/selenium/WebDriverException  "(Ljava/lang/Throwable;)V org/openqa/selenium/io/Cleanly close userPrefsprefsreaderLjava/io/BufferedReader;linepartseLjava/io/IOException; setPreference'(Ljava/lang/String;Ljava/lang/String;)V . value(Ljava/lang/String;Z)V . (Ljava/lang/String;I)V . IsetProxyPreferencesI(Lorg/openqa/selenium/Proxy;)Lorg/openqa/selenium/firefox/FirefoxProfile;  org/openqa/selenium/Proxy !" getProxyType'()Lorg/openqa/selenium/Proxy$ProxyType; $&%#org/openqa/selenium/Proxy$ProxyType '( UNSPECIFIED%Lorg/openqa/selenium/Proxy$ProxyType;*network.proxy.type $, -ordinal  0 1()[I3network.proxy.no_proxies_on 6ftp 8 9~ getFtpProxy ; <setManualProxyPreference>http @ A~ getHttpProxyCssl E F~ getSslProxy H I~ getNoProxyKnetwork.proxy.autoconfig_url M N~getProxyAutoconfigUrlproxyLorg/openqa/selenium/Proxy;R:Tnetwork.proxy.V_port XZYjava/lang/Integer [\parseInt(Ljava/lang/String;)I settingStringhostPortgetAdditionalPreferences+()Lorg/openqa/selenium/firefox/Preferences;updateUserPrefscbrowser.startup.homepagee "about:blank"gbrowser.startup.pagei0 @k lJdeleten'Cannot delete existing user preferences y .q rsaddTo(Ljava/util/Map;)Vuapp.update.autowfalseyapp.update.enabled{)browser.download.manager.showWhenStarting}browser.EULA.overridetruebrowser.EULA.3.acceptedbrowser.link.open_external2browser.link.open_newwindowbrowser.safebrowsing.enabledbrowser.search.update&browser.sessionstore.resume_from_crash!browser.shell.checkDefaultBrowserbrowser.tabs.warnOnClosebrowser.tabs.warnOnOpendevtools.errorconsole.enableddom.disable_open_during_loaddom.max_script_run_time30extensions.logging.enabledextensions.update.enabledextensions.update.notifyUsernetwork.manage-offline-status'network.http.max-connections-per-server10security.fileuri.origin_policy3%security.fileuri.strict_origin_policysecurity.warn_entering_securesecurity.warn_submit_insecure'security.warn_entering_secure.show_oncesecurity.warn_entering_weak%security.warn_entering_weak.show_oncesecurity.warn_leaving_secure&security.warn_leaving_secure.show_oncesecurity.warn_viewing_mixed%security.warn_viewing_mixed.show_oncesignon.rememberSignonstoolkit.networkmanager.disable X (Z)Ljava/lang/String; javascript.options.showInConsolebrowser.dom.window.dump.enableddom.report_all_js_exceptionsstartup.homepage_welcome_url about:blank U equals1   writeNewPrefs (Ljava/io/File;Ljava/util/Map;)VdeleteLockFiles .parentlock parent.lockmacAndLinuxLockFilewindowsLockFiledeleteExtensionsCacheIfItExistsextensions.cache cacheFileF(Ljava/io/File;Ljava/util/Map;)Vjava/io/FileWriter & P entrySet()Ljava/util/Set;  java/util/Set iterator()Ljava/util/Iterator; java/util/Iterator next()Ljava/lang/Object;java/util/Map$Entryuser_pref("%s", %s);  getKey  getValue U format9(Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/String;   java/io/Writer  *(Ljava/lang/CharSequence;)Ljava/io/Writer;  JhasNext  (Ljava/io/Writer;)VwriterLjava/io/Writer;entryLjava/util/Map$Entry;;Ljava/util/Map$Entry;setEnableNativeEvents(Z)ValwaysLoadNoFocusLibsetAlwaysLoadNoFocusLibsetAcceptUntrustedCertificatesacceptUntrustedSsl#setAssumeUntrustedCertificateIssueruntrustedIssuer isRunning(Ljava/io/File;)Zclean #%$*org/openqa/selenium/io/TemporaryFilesystem &' deleteTempDirtoJson ) *+ layoutOnDisk()Ljava/io/File;-org/openqa/selenium/io/Zip ,- ,0 12zip"(Ljava/io/File;)Ljava/lang/String;generatedProfilefromJson@(Ljava/lang/String;)Lorg/openqa/selenium/firefox/FirefoxProfile;7 duplicated #9 :; createTempDir4(Ljava/lang/String;Ljava/lang/String;)Ljava/io/File; ,= >?unzip#(Ljava/lang/String;Ljava/io/File;)VjsondirC anonymousEwebdriver-profile G HI copyModel(Ljava/io/File;Ljava/io/File;)V K L'installExtensions N ' P ' R a' r UWVorg/apache/commons/io/FileUtils XI copyDirectory sourceDir P\ ]^values()Ljava/util/Collection; `ajava/util/Collectionc.org/openqa/selenium/firefox/internal/Extension be f'writeTo parentDir extensionsDir j ! $l ]m(()[Lorg/openqa/selenium/Proxy$ProxyType; $o p( AUTODETECT $r s(DIRECT $u v(MANUAL $x y(PAC ${ |( RESERVED_1 $~ (SYSTEMjava/lang/NoSuchFieldError SourceFileFirefoxProfile.java InnerClassesEntry ProxyType!    !!"#$4*%( 89) *+"'$-*,*.Y01*39*+;**;=@Y*;BDM,GK*,KN*-OUW]`*-OUW]b*-OUW]d*f`*b*d*k(BC,-DE#G1H8I>JSKhLNOPUV)**+m1fn>Bo p >Boq?'$J++GrYtYvx+{+rYtYx+(. YZ] ^_#^'b.c2dEcIf)J*+J#$g#*9YL*+(ijmn"o)#*+$%@Y,N-G *-*,Y+,(s tuvy$z)*%*+%% p %'$I*+Y+( )*+$c*+N*9-,W()**+ $t +\/ŶM,,d2N-ͶN-()* *+  MN$YMNYY+޷N-:n -:[:d::22dS,22W-::Y:--, (Z  #-36BU^s)H*+     v ^0   p q$L *1+,(  )  *+  $L *1+(  )  *+  $L *1+(  )  *+  $+#**)++./++.aV*2Ͷ4*5+7:*=+?:*B+D:+G*2+G4*J+L4*(: <EP[fmx{)*+OP<$M,,QN*tYSx+-24-$*tYSx+U-2W.( %+L)*M*+MM] @^_`$/*1() *+a'$YM,bdW,fhW+G*+KM+jYmo*1,p,tvW,xvW,zvW,|~W,~W,W,W,vW,vW,vW,vW,vW,vW,~W,vW,W,~W,vW,vW,vW,W,W,vW,vW,vW,vW,vW,vW,vW,vW,vW,vW,vW,vW,~W,*`ĹW,*bĹW,*dĹW,~W,~W,~W,,bOUW,bOњ,fԹW*+,ֱ(<" ) / 6 AIVcp} !" #$&%3&@'M(Z)g*t+,-./0123456:;: >#?*>0A3B:A@HMKZNgQ}STWX) *+ p q'${#@Y+۷DM@Y+ݷDN,jW-jW([ \^_"`)*#*+#m  '$c@Y+DM,G,jW(c deg) *+m $-qNY+N,:2:-YSYSW ʧ:Y:--TWcc(:jl m'n(oFnJmWrYscteuivlupw)>q*+qq o'#Y  pqq'#J$/*`(z) *+$>*`( ~)*+J$/*k() *+$>*k( )*+$>*b( )*+$>*d( )*+ $z*@Y+۷DM@Y+ݷDN,G -G( )***+*m !'$=+"( )*+m'~$I*(L,Y.+/( )*+ 3 45$Z68L,Y.*+<Y+%( )@ A*+$>BD8L@Y+BDM**;+F*+J*+M*+O*,Q+LrY+S34(*  #(-245)*>*+ *m5  HI$\+ +G+,T(  ) *+YmL'$<@Y+ZDM*9[_:bN-,d ( *1;)*<*+<g 0h* 1$siYWk K*n+OW*q+OW*t+OW*w+OW*z+OW*}+OW*#+OW*Yi&)*367@CDMPQ[^_il())P $@PK %^D>5=org/openqa/selenium/firefox/FirefoxBinary$OutputWatcher.class17org/openqa/selenium/firefox/FirefoxBinary$OutputWatcherjava/lang/Objectjava/lang/RunnableprocessLjava/lang/Process;streamLjava/io/OutputStream;BUFSIZEI ConstantValue,(Ljava/lang/Process;Ljava/io/OutputStream;)VCode  ()V     LineNumberTableLocalVariableTablethis9Lorg/openqa/selenium/firefox/FirefoxBinary$OutputWatcher;run !#"java/lang/Process $%getInputStream()Ljava/io/InputStream; ')(java/io/InputStream *+ available()I -/.java/lang/Math 01min(II)I -3 41max '6 78read([BII)I :<;java/io/OutputStream =>write([BII)V @BAjava/lang/System CDerrLjava/io/PrintStream;Fjava/lang/StringBuilderHERROR: Could not write to EJ K(Ljava/lang/String;)V EM NOappend-(Ljava/lang/Object;)Ljava/lang/StringBuilder;Q: ES NT-(Ljava/lang/String;)Ljava/lang/StringBuilder; EV WXtoString()Ljava/lang/String; Z\[java/io/PrintStream ]Kprint _a`java/io/IOException bcprintStackTrace(Ljava/io/PrintStream;)Ve Stream closed _g hX getMessage jlkjava/lang/String mnequals(Ljava/lang/Object;)Zp%ERROR: Could not read from stdout of 'r sclosestdoutOfWatchedProcessLjava/io/InputStream;buffer[BnavaileLjava/io/IOException; SourceFileFirefoxBinary.java InnerClasses)org/openqa/selenium/firefox/FirefoxBinary OutputWatcher    d***+*,<: =>?  L* LM+&,626+,5>D*=*,90:?EYGI*LPRUY?^*WMd,fi(?EYoI*LPRUY,?^+.+q':":+ +q:+ +q:8BE_wz____vBD EHI$J-K8MENGOePmUrXzY{Z]^acd`acdfacdgHtujvw-Mx Vy G+z{{1z{|}~  PK %^D>x)%%/org/openqa/selenium/firefox/FirefoxBinary.class1)org/openqa/selenium/firefox/FirefoxBinaryjava/lang/ObjectNO_FOCUS_LIBRARY_NAMELjava/lang/String; ConstantValue x_ignore_nofocus.soextraEnvLjava/util/Map; Signature5Ljava/util/Map; executable1Lorg/openqa/selenium/firefox/internal/Executable;processLjava/lang/Process;timeoutJstreamLjava/io/OutputStream; outputWatcherLjava/lang/Thread;()VCode  (Ljava/io/File;)VLineNumberTableLocalVariableTablethis+Lorg/openqa/selenium/firefox/FirefoxBinary; # %java/util/HashMap $# ( *,+java/util/concurrent/TimeUnit -.SECONDSLjava/util/concurrent/TimeUnit;- *2 34toMillis(J)J 6 8/org/openqa/selenium/firefox/internal/Executable 7 ; pathToFirefoxBinaryLjava/io/File; isOnLinux()Z ACBorg/openqa/selenium/Platform DE getCurrent ()Lorg/openqa/selenium/Platform; AG HILINUXLorg/openqa/selenium/Platform; AK LMis!(Lorg/openqa/selenium/Platform;)Z startProfileP(Lorg/openqa/selenium/firefox/FirefoxProfile;Ljava/io/File;[Ljava/lang/String;)V ExceptionsRjava/io/IOException TVU java/io/File WXgetAbsolutePath()Ljava/lang/String;ZXRE_PROFILE_PATH \ ]^setEnvironmentProperty'(Ljava/lang/String;Ljava/lang/String;)V` MOZ_NO_REMOTEb1dMOZ_CRASHREPORTER_DISABLEf NO_EM_RESTART h >? jlk*org/openqa/selenium/firefox/FirefoxProfile m?enableNativeEvents jo p?alwaysLoadNoFocusLib r smodifyLinkLibraryPathujava/util/ArrayList t# x yz getExecutable3()Lorg/openqa/selenium/firefox/internal/Executable; 7| }XgetPath java/util/List add(Ljava/lang/Object;)Z --verbose java/util/Arrays asList%([Ljava/lang/Object;)Ljava/util/List;  addAll(Ljava/util/Collection;)Zjava/lang/ProcessBuilder (Ljava/util/List;)V redirectErrorStream(Z)Ljava/lang/ProcessBuilder;  environment()Ljava/util/Map;   getExtraEnv  java/util/Map putAll(Ljava/util/Map;)V 7 setLibraryPath,(Ljava/lang/ProcessBuilder;Ljava/util/Map;)V   7 getDefaultOutputStream()Ljava/io/OutputStream;  startFirefoxProcess(Ljava/lang/ProcessBuilder;)V  copeWithTheStrangenessOfTheMac  startOutputWatcherprofile,Lorg/openqa/selenium/firefox/FirefoxProfile; profileDircommandLineFlags[Ljava/lang/String;profileAbsPathcommandsLjava/util/List;builderLjava/lang/ProcessBuilder;LocalVariableTypeTable$Ljava/util/List; start()Ljava/lang/Process;  java/lang/Thread7org/openqa/selenium/firefox/FirefoxBinary$OutputWatcher ,(Ljava/lang/Process;Ljava/io/OutputStream;)VFirefox output watcher )(Ljava/lang/Runnable;Ljava/lang/String;)V   7()Ljava/util/Map; java/util/Collections unmodifiableMap (Ljava/util/Map;)Ljava/util/Map;LD_LIBRARY_PATH java/lang/System getenv&(Ljava/lang/String;)Ljava/lang/String;x86amd64  extractAndCheckX(Ljava/io/File;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String; java/lang/String equalsjava/lang/StringBuilder valueOf&(Ljava/lang/Object;)Ljava/lang/String;  (Ljava/lang/String;)V  append-(Ljava/lang/String;)Ljava/lang/StringBuilder;   XtoString  LD_PRELOADexistingLdLibPath newLdLibPathjava/util/HashSet #  java/util/Set #  iterator()Ljava/util/Iterator; java/util/Iterator next()Ljava/lang/Object;  !"getClass()Ljava/lang/Class; T$ % separator ')("org/openqa/selenium/io/FileHandler *+ copyResource5(Ljava/io/File;Ljava/lang/Class;[Ljava/lang/String;)V-webdriver.development /10java/lang/Boolean 23 getBoolean(Ljava/lang/String;)Z 5 67errLjava/io/PrintStream;9IException unpacking required library, but in development mode. Continuing ;=<java/io/PrintStream >println@&org/openqa/selenium/WebDriverException ?B C(Ljava/lang/Throwable;)V TE ^ TG H?existsJCould not locate L: Nnative events will not work. ?Q: S T?hasNext noFocusSoName jarPath32Bit jarPath64BitpathsSetLjava/util/Set; builtPathLjava/lang/StringBuilder;patheLjava/io/IOException; outSoPathfile#Ljava/util/Set; Ac dIMAC, h ijsleep(J)V lnmjava/lang/Process op exitValue()I't!Unable to start firefox cleanly. v wXgetConsoleOutputy { Exit value: } ~(I)Ljava/lang/StringBuilder; Ran from:  command()Ljava/util/List;  -(Ljava/lang/Object;)Ljava/lang/StringBuilder;%java/lang/IllegalThreadStateExceptionmessage5You must set both the property name and value: %s, %s  format9(Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/String;  put8(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object; propertyNamevalue createProfile-CreateProfile  ([Ljava/lang/String;)V  (Ljava/lang/Runnable;)V profileNamewaitForjava/lang/InterruptedException l p ,org/openqa/selenium/firefox/internal/Streams  drainStream*(Ljava/io/OutputStream;)Ljava/lang/String; h timeInMillis Ljava/lang/InterruptedException;clean=(Lorg/openqa/selenium/firefox/FirefoxProfile;Ljava/io/File;)V-silent  NO   A IWINDOWS j  isRunning(Ljava/io/File;)Z getTimeout()J setTimeoutFirefoxBinary()setOutputWatcher(Ljava/io/OutputStream;)Vquit #org/openqa/selenium/os/ProcessUtils  killProcess(Ljava/lang/Process;)I SourceFileFirefoxBinary.java InnerClasses OutputWatcher!   4* 56  !m)*"*$Y&'*)/15*7Y+9:8-09(:) !)<=>?4 @FJ=  !NOPQ,S:*Y[*_a[*ca[*ea[*g+i +n*,qtYv:*w{~W~W-WY:W**w****w***ZABCDE&G-H;I@LIMXNbOnPyQRSUVY[]^H !=IuyE IuPQA *+Ƶʱ ab ! V$*YY**ӷյ*ضڱef#g $ !yz/*:j  ! 2*'ݰn  !sCM*+N,,Y-,N*-[* [vxyz2}9B*C !C== 1  Y:-WWY:::+*YY#,S&$: ,.48: ?Y AY+S#: TY ,D:  F)?YYIKMO PWR;=ehQV %=hjsvyp !=UVW XY%Z[=\j]^ H_ <`=  XaPQ?@bJ*eg*ʶk*qg*+M*eg*ʶkW*ʶkYsM,*uxW,z*ʶk|xW,+xW?Y,OM -*-.GHJ %-.5=GHSbz  !SH[]^/+,?YY+SY,SO*'+,W" ". / !//PQpYY*:{SYSYSY+SM,_aW***:*,*YY**з*ضڱ* $()7>INho p !p)GPQ7 *ʶW   !wXPQC**   !ijd N?Y-A      ! ]PQO*+,YS* N?Y-A@J$ *g+,*g+,2 !-07?FKN *O !OO= ]/*5#  !j>*5 '( ! XHY÷*:{Ŷ,  !>*+ 01 !7 *ʸW 45  !  PK %^D>D665org/openqa/selenium/firefox/ExtensionConnection.class1/org/openqa/selenium/firefox/ExtensionConnectionjava/lang/Object*org/openqa/selenium/remote/CommandExecutorstart()V Exceptions java/io/IOException isConnected()Zquit SourceFileExtensionConnection.java   PK %^D>43org/openqa/selenium/firefox/FirefoxWebElement.class13-org/openqa/selenium/firefox/FirefoxWebElement3org/openqa/selenium/remote/RenderedRemoteWebElement&org/openqa/selenium/RenderedWebElement.(Lorg/openqa/selenium/firefox/FirefoxDriver;)VCode   ()V   setParent/(Lorg/openqa/selenium/remote/RemoteWebDriver;)VLineNumberTableLocalVariableTablethis/Lorg/openqa/selenium/firefox/FirefoxWebElement;parent+Lorg/openqa/selenium/firefox/FirefoxDriver;equals(Ljava/lang/Object;)Zorg/openqa/selenium/WebElement)org/openqa/selenium/internal/WrapsElement   getWrappedElement"()Lorg/openqa/selenium/WebElement; " #$getId()Ljava/lang/String; &('java/lang/String objLjava/lang/Object;other Lorg/openqa/selenium/WebElement;hashCode()I &0 -. SourceFileFirefoxWebElement.java! F * *+     7++M, +M,*!,!%""# &'(+&,(. 77)*)+,-. 2*!/3 12PK %^D> ?7org/openqa/selenium/firefox/NotConnectedException.class181org/openqa/selenium/firefox/NotConnectedExceptionjava/io/IOException(Ljava/net/URL;J)VCode   getMessage#(Ljava/net/URL;J)Ljava/lang/String;  (Ljava/lang/String;)VLineNumberTableLocalVariableTablethis3Lorg/openqa/selenium/firefox/NotConnectedException;urlLjava/net/URL;timeToWaitInMilliSecondsJ3Unable to connect to host %s on port %d after %d msjava/lang/Object  java/net/URL  getHost()Ljava/lang/String; " #$getPort()I &('java/lang/Integer )*valueOf(I)Ljava/lang/Integer; ,.-java/lang/Long )/(J)Ljava/lang/Long; 132java/lang/String 45format9(Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/String; SourceFileNotConnectedException.java!L *+         ^"Y*SY*!%SY+S0""67PK %^D>wJZZ1org/openqa/selenium/firefox/FirefoxDriver$1.class1$+org/openqa/selenium/firefox/FirefoxDriver$1=org/openqa/selenium/remote/internal/JsonToWebElementConverterthis$0+Lorg/openqa/selenium/firefox/FirefoxDriver;Z(Lorg/openqa/selenium/firefox/FirefoxDriver;Lorg/openqa/selenium/remote/RemoteWebDriver;)VCode    /(Lorg/openqa/selenium/remote/RemoteWebDriver;)VLineNumberTableLocalVariableTablethis-Lorg/openqa/selenium/firefox/FirefoxDriver$1; $anonymous0,Lorg/openqa/selenium/remote/RemoteWebDriver;newRemoteWebElement/()Lorg/openqa/selenium/remote/RemoteWebElement;-org/openqa/selenium/firefox/FirefoxWebElement  .(Lorg/openqa/selenium/firefox/FirefoxDriver;)V SourceFileFirefoxDriver.javaEnclosingMethod )org/openqa/selenium/firefox/FirefoxDriver "Z(Lorg/openqa/selenium/firefox/FirefoxBinary;Lorg/openqa/selenium/firefox/FirefoxProfile;)V InnerClasses  C *+ *,  {   6 Y* ~  !# PK %^D>&!8 8 Corg/openqa/selenium/firefox/FirefoxDriver$LazyCommandExecutor.class1N=org/openqa/selenium/firefox/FirefoxDriver$LazyCommandExecutorjava/lang/Object*org/openqa/selenium/remote/CommandExecutor connection1Lorg/openqa/selenium/firefox/ExtensionConnection;binary+Lorg/openqa/selenium/firefox/FirefoxBinary;profile,Lorg/openqa/selenium/firefox/FirefoxProfile;Z(Lorg/openqa/selenium/firefox/FirefoxBinary;Lorg/openqa/selenium/firefox/FirefoxProfile;)VCode  ()V   LineNumberTableLocalVariableTablethis?Lorg/openqa/selenium/firefox/FirefoxDriver$LazyCommandExecutor; setConnection4(Lorg/openqa/selenium/firefox/ExtensionConnection;)V  quit !#"/org/openqa/selenium/firefox/ExtensionConnection executeK(Lorg/openqa/selenium/remote/Command;)Lorg/openqa/selenium/remote/Response; Exceptions(java/io/IOException *,+"org/openqa/selenium/remote/Command -.getName()Ljava/lang/String; 132java/lang/String 45equals(Ljava/lang/Object;)Z7&org/openqa/selenium/WebDriverException99The FirefoxDriver cannot be used after quit() was called. 6; <(Ljava/lang/String;)V !> $%command$Lorg/openqa/selenium/remote/Command;(Lorg/openqa/selenium/firefox/FirefoxBinary;Lorg/openqa/selenium/firefox/FirefoxProfile;Lorg/openqa/selenium/firefox/FirefoxDriver$LazyCommandExecutor;)V C access$1m(Lorg/openqa/selenium/firefox/FirefoxDriver$LazyCommandExecutor;)Lorg/openqa/selenium/firefox/FirefoxProfile;access$2l(Lorg/openqa/selenium/firefox/FirefoxDriver$LazyCommandExecutor;)Lorg/openqa/selenium/firefox/FirefoxBinary; SourceFileFirefoxDriver.java InnerClassesL)org/openqa/selenium/firefox/FirefoxDriverLazyCommandExecutor    Y**+*,    >*+ L** * $%&'n**+)/06Y8:*+=**?@ A'*+,BDE%*FG%*HIJ KM PK %^D>.&}!}!/org/openqa/selenium/firefox/FirefoxDriver.class1G)org/openqa/selenium/firefox/FirefoxDriver*org/openqa/selenium/remote/RemoteWebDriver#org/openqa/selenium/TakesScreenshotBINARYLjava/lang/String; ConstantValue firefox_binaryPROFILEfirefox_profileDEFAULT_ENABLE_NATIVE_EVENTSZACCEPT_UNTRUSTED_CERTIFICATESASSUME_UNTRUSTED_ISSUERbinary+Lorg/openqa/selenium/firefox/FirefoxBinary;()VCode org/openqa/selenium/Platform  getCurrent ()Lorg/openqa/selenium/Platform;  !"WINDOWSLorg/openqa/selenium/Platform; $ %&is!(Lorg/openqa/selenium/Platform;)Z ( LineNumberTableLocalVariableTable-)org/openqa/selenium/firefox/FirefoxBinary ,/ + 1 +2Z(Lorg/openqa/selenium/firefox/FirefoxBinary;Lorg/openqa/selenium/firefox/FirefoxProfile;)Vthis+Lorg/openqa/selenium/firefox/FirefoxDriver;/(Lorg/openqa/selenium/firefox/FirefoxProfile;)Vprofile,Lorg/openqa/selenium/firefox/FirefoxProfile;%(Lorg/openqa/selenium/Capabilities;)V : ;< getBinaryO(Lorg/openqa/selenium/Capabilities;)Lorg/openqa/selenium/firefox/FirefoxBinary; > ?@extractProfileP(Lorg/openqa/selenium/Capabilities;)Lorg/openqa/selenium/firefox/FirefoxProfile; capabilities"Lorg/openqa/selenium/Capabilities;D*org/openqa/selenium/firefox/FirefoxProfile C/ GIH org/openqa/selenium/Capabilities JK getCapability&(Ljava/lang/String;)Ljava/lang/Object;Mjava/lang/String CO PQfromJson@(Ljava/lang/String;)Lorg/openqa/selenium/firefox/FirefoxProfile;S&org/openqa/selenium/WebDriverException RU +V(Ljava/lang/Throwable;)VXproxy Z\[,org/openqa/selenium/browserlaunchers/Proxies ]^ extractProxy?(Lorg/openqa/selenium/Capabilities;)Lorg/openqa/selenium/Proxy; C` absetProxyPreferencesI(Lorg/openqa/selenium/Proxy;)Lorg/openqa/selenium/firefox/FirefoxProfile;djava/io/IOExceptionrawLjava/lang/Object;eLjava/io/IOException;Lorg/openqa/selenium/Proxy;k java/io/File jm +n(Ljava/lang/String;)V ,p +q(Ljava/io/File;)VfileLjava/io/File;u=org/openqa/selenium/firefox/FirefoxDriver$LazyCommandExecutor tw +x(Lorg/openqa/selenium/firefox/FirefoxBinary;Lorg/openqa/selenium/firefox/FirefoxProfile;Lorg/openqa/selenium/firefox/FirefoxDriver$LazyCommandExecutor;)V z|{.org/openqa/selenium/remote/DesiredCapabilities }~firefox2()Lorg/openqa/selenium/remote/DesiredCapabilities;  +Q(Lorg/openqa/selenium/remote/CommandExecutor;Lorg/openqa/selenium/Capabilities;)V  +org/openqa/selenium/firefox/FirefoxDriver$1 +Z(Lorg/openqa/selenium/firefox/FirefoxDriver;Lorg/openqa/selenium/remote/RemoteWebDriver;)V  setElementConverterB(Lorg/openqa/selenium/remote/internal/JsonToWebElementConverter;)V startClient  getCommandExecutor.()Lorg/openqa/selenium/remote/CommandExecutor; t access$1m(Lorg/openqa/selenium/firefox/FirefoxDriver$LazyCommandExecutor;)Lorg/openqa/selenium/firefox/FirefoxProfile;   getProfileZ(Lorg/openqa/selenium/firefox/FirefoxProfile;)Lorg/openqa/selenium/firefox/FirefoxProfile; C addWebDriverExtensionIfNeeded t access$2l(Lorg/openqa/selenium/firefox/FirefoxDriver$LazyCommandExecutor;)Lorg/openqa/selenium/firefox/FirefoxBinary; localhost   connectTo(Lorg/openqa/selenium/firefox/FirefoxBinary;Lorg/openqa/selenium/firefox/FirefoxProfile;Ljava/lang/String;)Lorg/openqa/selenium/firefox/ExtensionConnection; t  setConnection4(Lorg/openqa/selenium/firefox/ExtensionConnection;)V /org/openqa/selenium/firefox/ExtensionConnection start-An error occurred while connecting to Firefox R +*(Ljava/lang/String;Ljava/lang/Throwable;)Vexe?Lorg/openqa/selenium/firefox/FirefoxDriver$LazyCommandExecutor; profileToUse connection1Lorg/openqa/selenium/firefox/ExtensionConnection;webdriver.firefox.profile java/lang/System  getProperty&(Ljava/lang/String;)Ljava/lang/String;0org/openqa/selenium/firefox/internal/ProfilesIni / Qjava/lang/StringBuilderFirefox profile ' m append-(Ljava/lang/String;)Ljava/lang/StringBuilder;@' named in system property 'webdriver.firefox.profile' not found toString()Ljava/lang/String; RmsuggestedProfile   obtainLock%()Lorg/openqa/selenium/internal/Lock;Borg/openqa/selenium/firefox/internal/NewProfileExtensionConnection +(Lorg/openqa/selenium/internal/Lock;Lorg/openqa/selenium/firefox/FirefoxBinary;Lorg/openqa/selenium/firefox/FirefoxProfile;Ljava/lang/String;)V !org/openqa/selenium/internal/Lock unlockjava/lang/Exceptionhostlock#Lorg/openqa/selenium/internal/Lock;binLjava/lang/Exception;'org/openqa/selenium/internal/SocketLock / stopClient t quitnewRemoteWebElement1()Lorg/openqa/selenium/firefox/FirefoxWebElement;-org/openqa/selenium/firefox/FirefoxWebElement +.(Lorg/openqa/selenium/firefox/FirefoxDriver;)VisJavascriptEnabled()ZgetScreenshotAs4(Lorg/openqa/selenium/OutputType;)Ljava/lang/Object; Signature@(Lorg/openqa/selenium/OutputType;)TX; screenshot  execute9(Ljava/lang/String;)Lorg/openqa/selenium/remote/Response;   #org/openqa/selenium/remote/Response   getValue()Ljava/lang/Object; java/lang/Object org/openqa/selenium/OutputType KconvertFromBase64Pngtarget Lorg/openqa/selenium/OutputType;base64LocalVariableTypeTable%Lorg/openqa/selenium/OutputType;saveScreenshot DeprecatedRuntimeVisibleAnnotationsLjava/lang/Deprecated;"java/lang/IllegalArgumentException!)Method parameter pngFile must not be null m $ %FILE ' j) *+ getParentFile()Ljava/io/File; j- .exists j0 1mkdirs3Could not create directory j5 6getAbsolutePath 8:9"org/openqa/selenium/io/FileHandler ;<copy(Ljava/io/File;Ljava/io/File;)VpngFiletmpfiledir/()Lorg/openqa/selenium/remote/RemoteWebElement; B  SourceFileFirefoxDriver.java InnerClassesLazyCommandExecutor!       9 #')BC A <*+; *,Y.0) M N*  34+5E *,Y.+0) Q R* 34 67+8E *+9+=0) U V* 34 AB ?@_CYEL* F7* FM,C ,CL,L,LNL NRY-T*WF*YM+,_W+2:=c)6 Y[\]#^+_2a=b>cGhRiWj]m*4_ABW67+ef> ghWXi ;<m-* FjY* FLlL,+o,Y.)q rs%u*-ABrs+2n$*tY+,vy*+*Y**)yz{#* $34$$67>*tL*+M,*+,N+--:RY&,/c)& !&/1=*4>346-7!1 ghK+MN,4-0Y-M,,RYYɷ-ж̶ҷֿ, CYEM,).  19=AI**K34K67I7CH*:+ ,Y.+:Y,-::RYT:&0&<0<<)* &-02<>E*HH34HH67HB2 g2Y)* 349 *t)  *  343 Y*)*  34,)* 34j* M+,) * 34 qb+Y "*#&jM+(N---,&-/RYY2-4̶ҷֿ,+7:RYTMRUc)* 1MUWa*4b34b=sH>sC?sW ghD@%*A)*CDEtF PK %^D>VV@org/openqa/selenium/firefox/UnableToCreateProfileException.class1:org/openqa/selenium/firefox/UnableToCreateProfileException&org/openqa/selenium/WebDriverException(Ljava/lang/Throwable;)VCode  LineNumberTableLocalVariableTablethis*+   >*+   PK lC>,org/openqa/selenium/firefox/.svn/all-wcpropsK 25 svn:wc:ra_dav:version-url V 69 /svn/!svn/ver/11226/trunk/java/client/src/org/openqa/selenium/firefox END Preferences.java K 25 svn:wc:ra_dav:version-url V 86 /svn/!svn/ver/11222/trunk/java/client/src/org/openqa/selenium/firefox/Preferences.java END NotConnectedException.java K 25 svn:wc:ra_dav:version-url V 96 /svn/!svn/ver/11222/trunk/java/client/src/org/openqa/selenium/firefox/NotConnectedException.java END FirefoxProfile.java K 25 svn:wc:ra_dav:version-url V 89 /svn/!svn/ver/11222/trunk/java/client/src/org/openqa/selenium/firefox/FirefoxProfile.java END FirefoxBinary.java K 25 svn:wc:ra_dav:version-url V 88 /svn/!svn/ver/11222/trunk/java/client/src/org/openqa/selenium/firefox/FirefoxBinary.java END FirefoxWebElement.java K 25 svn:wc:ra_dav:version-url V 92 /svn/!svn/ver/11222/trunk/java/client/src/org/openqa/selenium/firefox/FirefoxWebElement.java END ExtensionConnection.java K 25 svn:wc:ra_dav:version-url V 94 /svn/!svn/ver/11222/trunk/java/client/src/org/openqa/selenium/firefox/ExtensionConnection.java END build.desc K 25 svn:wc:ra_dav:version-url V 80 /svn/!svn/ver/11226/trunk/java/client/src/org/openqa/selenium/firefox/build.desc END UnableToCreateProfileException.java K 25 svn:wc:ra_dav:version-url V 105 /svn/!svn/ver/11222/trunk/java/client/src/org/openqa/selenium/firefox/UnableToCreateProfileException.java END FirefoxDriver.java K 25 svn:wc:ra_dav:version-url V 88 /svn/!svn/ver/11222/trunk/java/client/src/org/openqa/selenium/firefox/FirefoxDriver.java END PK lC>O22(org/openqa/selenium/firefox/.svn/entries8 dir 11264 http://selenium.googlecode.com/svn/trunk/java/client/src/org/openqa/selenium/firefox http://selenium.googlecode.com/svn 2011-02-01T13:59:17.176547Z 11226 simon.m.stewart svn:special svn:externals svn:needs-lock 07704840-8298-11de-bf8c-fd130f914ac9 Preferences.java file 2011-02-03T12:01:16.000000Z 62f309d3455747daf0ebf6632b6f7e02 2010-06-02T17:41:40.786274Z 9059 simon.m.stewart NotConnectedException.java file 2011-02-03T12:01:16.000000Z ce57849893720291fa69ca2645fb060b 2010-03-13T21:05:51.939598Z 8500 simon.m.stewart FirefoxProfile.java file 2011-02-03T12:01:16.000000Z 80199eec79f72a4635e0d03c0ebea3c5 2011-01-17T21:50:09.122540Z 10988 simon.m.stewart FirefoxBinary.java file 2011-02-03T12:01:16.000000Z 954786cd164d0b33fe150a4a0e4fb309 2011-01-26T22:32:13.994760Z 11153 michael.tamm2 FirefoxWebElement.java file 2011-02-03T12:01:16.000000Z dcc8183ad1d8c47ac56f7eeb1837482c 2011-01-18T16:04:46.488656Z 11008 eran.mes@gmail.com internal dir ExtensionConnection.java file 2011-02-03T12:01:16.000000Z c5da4d0dfd9df33ffb50ad49786b1e1c 2010-03-13T21:05:51.939598Z 8500 simon.m.stewart build.desc file 2011-02-03T12:01:16.000000Z ff52d3b909a7bca65b68a30a3e7c4bd0 2011-02-01T13:59:17.176547Z 11226 simon.m.stewart UnableToCreateProfileException.java file 2011-02-03T12:01:16.000000Z 5376a78684802969650499a596f42d9e 2010-09-06T17:20:39.465033Z 9602 simon.m.stewart FirefoxDriver.java file 2011-02-03T12:01:16.000000Z 746977632e46e7bba9deea04defa6fb2 2011-01-17T21:50:09.122540Z 10988 simon.m.stewart PK lC>G'org/openqa/selenium/firefox/.svn/format8 PK lC>.qLorg/openqa/selenium/firefox/.svn/text-base/ExtensionConnection.java.svn-base/* Copyright 2007-2009 WebDriver committers Copyright 2007-2009 Google Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package org.openqa.selenium.firefox; import org.openqa.selenium.remote.CommandExecutor; import java.io.IOException; /** * Represents a connection with the FirefoxDriver browser extension. */ public interface ExtensionConnection extends CommandExecutor { /** * Establishes a connection to the extension. * @throws IOException If an I/O error occurs. */ void start() throws IOException; /** * @return Whether the extension is reachable and accepting requests. */ boolean isConnected(); /** * Terminates the connection. */ void quit(); } PK lC>`+i--Forg/openqa/selenium/firefox/.svn/text-base/FirefoxBinary.java.svn-base/* Copyright 2007-2009 WebDriver committers Copyright 2007-2009 Google Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package org.openqa.selenium.firefox; import java.io.File; import java.io.IOException; import java.io.InputStream; import java.io.OutputStream; import java.util.ArrayList; import java.util.Arrays; import java.util.Collections; import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Map; import java.util.Set; import org.openqa.selenium.Platform; import org.openqa.selenium.os.ProcessUtils; import org.openqa.selenium.WebDriverException; import org.openqa.selenium.firefox.internal.Executable; import org.openqa.selenium.firefox.internal.Streams; import org.openqa.selenium.io.FileHandler; import static java.util.concurrent.TimeUnit.SECONDS; public class FirefoxBinary { private static final String NO_FOCUS_LIBRARY_NAME = "x_ignore_nofocus.so"; private final Map extraEnv = new HashMap(); private final Executable executable; private Process process; private long timeout = SECONDS.toMillis(45); private OutputStream stream; private Thread outputWatcher; public FirefoxBinary() { this(null); } public FirefoxBinary(File pathToFirefoxBinary) { executable = new Executable(pathToFirefoxBinary); } protected boolean isOnLinux() { return Platform.getCurrent().is(Platform.LINUX); } public void startProfile(FirefoxProfile profile, File profileDir, String... commandLineFlags) throws IOException { String profileAbsPath = profileDir.getAbsolutePath(); setEnvironmentProperty("XRE_PROFILE_PATH", profileAbsPath); setEnvironmentProperty("MOZ_NO_REMOTE", "1"); setEnvironmentProperty("MOZ_CRASHREPORTER_DISABLE", "1"); // Disable Breakpad setEnvironmentProperty("NO_EM_RESTART", "1"); // Prevent the binary from detaching from the console if (isOnLinux() && (profile.enableNativeEvents() || profile.alwaysLoadNoFocusLib())) { modifyLinkLibraryPath(profileDir); } List commands = new ArrayList(); commands.add(getExecutable().getPath()); commands.add("--verbose"); commands.addAll(Arrays.asList(commandLineFlags)); ProcessBuilder builder = new ProcessBuilder(commands); builder.redirectErrorStream(true); builder.environment().putAll(getExtraEnv()); getExecutable().setLibraryPath(builder, getExtraEnv()); if (stream == null) { stream = getExecutable().getDefaultOutputStream(); } startFirefoxProcess(builder); copeWithTheStrangenessOfTheMac(builder); startOutputWatcher(); } protected void startFirefoxProcess(ProcessBuilder builder) throws IOException { process = builder.start(); } protected void startOutputWatcher() { outputWatcher = new Thread(new OutputWatcher(process, stream), "Firefox output watcher"); outputWatcher.start(); } protected Executable getExecutable() { return executable; } public Map getExtraEnv() { return Collections.unmodifiableMap(extraEnv); } protected void modifyLinkLibraryPath(File profileDir) { // Extract x_ignore_nofocus.so from x86, amd64 directories inside // the jar into a real place in the filesystem and change LD_LIBRARY_PATH // to reflect that. String existingLdLibPath = System.getenv("LD_LIBRARY_PATH"); // The returned new ld lib path is terminated with ':' String newLdLibPath = extractAndCheck(profileDir, NO_FOCUS_LIBRARY_NAME, "x86", "amd64"); if (existingLdLibPath != null && !existingLdLibPath.equals("")) { newLdLibPath += existingLdLibPath; } setEnvironmentProperty("LD_LIBRARY_PATH", newLdLibPath); // Set LD_PRELOAD to x_ignore_nofocus.so - this will be taken automagically // from the LD_LIBRARY_PATH setEnvironmentProperty("LD_PRELOAD", NO_FOCUS_LIBRARY_NAME); } protected String extractAndCheck(File profileDir, String noFocusSoName, String jarPath32Bit, String jarPath64Bit) { // 1. Extract x86/x_ignore_nofocus.so to profile.getLibsDir32bit // 2. Extract amd64/x_ignore_nofocus.so to profile.getLibsDir64bit // 3. Create a new LD_LIB_PATH string to contain: // profile.getLibsDir32bit + ":" + profile.getLibsDir64bit Set pathsSet = new HashSet(); pathsSet.add(jarPath32Bit); pathsSet.add(jarPath64Bit); StringBuilder builtPath = new StringBuilder(); for (String path : pathsSet) { try { FileHandler.copyResource(profileDir, getClass(), path + File.separator + noFocusSoName); } catch (IOException e) { if (Boolean.getBoolean("webdriver.development")) { System.err.println( "Exception unpacking required library, but in development mode. Continuing"); } else { throw new WebDriverException(e); } } // End catch. String outSoPath = profileDir.getAbsolutePath() + File.separator + path; File file = new File(outSoPath, noFocusSoName); if (!file.exists()) { throw new WebDriverException("Could not locate " + path + ": " + "native events will not work."); } builtPath.append(outSoPath).append(":"); } return builtPath.toString(); } protected void copeWithTheStrangenessOfTheMac(ProcessBuilder builder) throws IOException { if (Platform.getCurrent().is(Platform.MAC)) { // On the Mac, this process sometimes dies. Check for this, put in a decent sleep // and then attempt to restart it. If this doesn't work, then give up // TODO(simon): Why is this happening? Firefox 2 never seemed to suffer this try { sleep(300); if (process.exitValue() == 0) { return; } // Looks like it's gone wrong. // TODO(simon): This is utterly bogus. We should do something far smarter sleep(10000); startFirefoxProcess(builder); } catch (IllegalThreadStateException e) { // Excellent, we've not creashed. } // Ensure we're okay try { sleep(300); process.exitValue(); if (process.exitValue() == 0) { return; } StringBuilder message = new StringBuilder("Unable to start firefox cleanly.\n"); message.append(getConsoleOutput()).append("\n"); message.append("Exit value: ").append(process.exitValue()).append("\n"); message.append("Ran from: ").append(builder.command()).append("\n"); throw new WebDriverException(message.toString()); } catch (IllegalThreadStateException e) { // Woot! } } } public void setEnvironmentProperty(String propertyName, String value) { if (propertyName == null || value == null) { throw new WebDriverException( String.format("You must set both the property name and value: %s, %s", propertyName, value)); } extraEnv.put(propertyName, value); } public void createProfile(String profileName) throws IOException { ProcessBuilder builder = new ProcessBuilder(executable.getPath(), "--verbose", "-CreateProfile", profileName) .redirectErrorStream(true); builder.environment().put("MOZ_NO_REMOTE", "1"); if (stream == null) { stream = executable.getDefaultOutputStream(); } startFirefoxProcess(builder); outputWatcher = new Thread(new OutputWatcher(process, stream)); outputWatcher.start(); } /** * Waits for the process to execute, returning the command output taken from the profile's execution. * * @throws InterruptedException if we are interrupted while waiting for the process to launch * @throws IOException if there is a problem with reading the input stream of the launching process */ public void waitFor() throws InterruptedException, IOException { process.waitFor(); } /** * Gets all console output of the binary. * Output retrieval is non-destructive and non-blocking. * * @return the console output of the executed binary. * @throws IOException */ public String getConsoleOutput() throws IOException { if (process == null) { return null; } return Streams.drainStream(stream); } private void sleep(long timeInMillis) { try { Thread.sleep(timeInMillis); } catch (InterruptedException e) { throw new WebDriverException(e); } } public void clean(FirefoxProfile profile, File profileDir) throws IOException { startProfile(profile, profileDir, "-silent"); try { waitFor(); } catch (InterruptedException e) { throw new WebDriverException(e); } if (Platform.getCurrent().is(Platform.WINDOWS)) { while (profile.isRunning(profileDir)) { sleep(500); } do { sleep(500); } while (profile.isRunning(profileDir)); } } public long getTimeout() { return timeout; } public void setTimeout(long timeout) { this.timeout = timeout; } @Override public String toString() { return "FirefoxBinary(" + executable.getPath() + ")"; } public void setOutputWatcher(OutputStream stream) { this.stream = stream; } public void quit() { ProcessUtils.killProcess(process); } private static class OutputWatcher implements Runnable { private final Process process; private OutputStream stream; private final int BUFSIZE = 4096; public OutputWatcher(Process process, OutputStream stream) { this.process = process; this.stream = stream; } public void run() { InputStream stdoutOfWatchedProcess = null; try { stdoutOfWatchedProcess = process.getInputStream(); byte[] buffer = new byte[BUFSIZE]; int n; do { int avail = Math.min(BUFSIZE, stdoutOfWatchedProcess.available()); avail = Math.max(avail, 1); // Always ask for at least one byte n = stdoutOfWatchedProcess.read(buffer, 0, avail); if (n > 0 && stream != null) { try { stream.write(buffer, 0, n); } catch (IOException e) { System.err.print("ERROR: Could not write to " + stream + ": "); e.printStackTrace(System.err); // We must continue to read from stdoutOfWatchedProcess // (otherwise the process might block), therefore we can // not break out of the loop here, instead we set stream // to null, so that no further write attempts are made ... stream = null; } } } while (n != -1); } catch (IOException e) { if ("Stream closed".equals(e.getMessage())) { // We can and should ignore this IOException, see http://code.google.com/p/selenium/issues/detail?id=1159 } else { System.err.print("ERROR: Could not read from stdout of " + process + ": "); e.printStackTrace(System.err); } } finally { if (stdoutOfWatchedProcess != null) { try { stdoutOfWatchedProcess.close(); } catch (IOException ignored) {} } } } } } PK lC>|PuG""Forg/openqa/selenium/firefox/.svn/text-base/FirefoxDriver.java.svn-base/* Copyright 2007-2009 WebDriver committers Copyright 2007-2009 Google Inc. Portions copyright 2007 ThoughtWorks, Inc Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package org.openqa.selenium.firefox; import static org.openqa.selenium.OutputType.FILE; import static org.openqa.selenium.browserlaunchers.CapabilityType.PROXY; import org.openqa.selenium.Capabilities; import org.openqa.selenium.OutputType; import org.openqa.selenium.Platform; import org.openqa.selenium.Proxy; import org.openqa.selenium.TakesScreenshot; import org.openqa.selenium.WebDriverException; import org.openqa.selenium.browserlaunchers.Proxies; import org.openqa.selenium.firefox.internal.NewProfileExtensionConnection; import org.openqa.selenium.firefox.internal.ProfilesIni; import org.openqa.selenium.io.FileHandler; import org.openqa.selenium.internal.Lock; import org.openqa.selenium.internal.SocketLock; import org.openqa.selenium.remote.Command; import org.openqa.selenium.remote.CommandExecutor; import org.openqa.selenium.remote.DesiredCapabilities; import org.openqa.selenium.remote.DriverCommand; import org.openqa.selenium.remote.RemoteWebDriver; import org.openqa.selenium.remote.RemoteWebElement; import org.openqa.selenium.remote.Response; import org.openqa.selenium.remote.internal.JsonToWebElementConverter; import java.io.File; import java.io.IOException; /** * An implementation of the {#link WebDriver} interface that drives Firefox. This works through a firefox extension, * which gets installed automatically if necessary. Important system variables are: *
    *
  • webdriver.firefox.bin - Which firefox binary to use (normally "firefox" on the PATH).
  • *
  • webdriver.firefox.profile - The name of the profile to use (normally "WebDriver").
  • *
*

* When the driver starts, it will make a copy of the profile it is using, rather than using that profile directly. * This allows multiple instances of firefox to be started. */ public class FirefoxDriver extends RemoteWebDriver implements TakesScreenshot { public static final String BINARY = "firefox_binary"; public static final String PROFILE = "firefox_profile"; // For now, only enable native events on Windows public static final boolean DEFAULT_ENABLE_NATIVE_EVENTS = Platform.getCurrent() .is(Platform.WINDOWS); // Accept untrusted SSL certificates. public static final boolean ACCEPT_UNTRUSTED_CERTIFICATES = true; // Assume that the untrusted certificates will come from untrusted issuers // or will be self signed. public static final boolean ASSUME_UNTRUSTED_ISSUER = true; protected FirefoxBinary binary; public FirefoxDriver() { this(new FirefoxBinary(), null); } public FirefoxDriver(FirefoxProfile profile) { this(new FirefoxBinary(), profile); } public FirefoxDriver(Capabilities capabilities) { this(getBinary(capabilities), extractProfile(capabilities)); } private static FirefoxProfile extractProfile(Capabilities capabilities) { FirefoxProfile profile = new FirefoxProfile(); if (capabilities.getCapability(PROFILE) != null) { Object raw = capabilities.getCapability(PROFILE); if (raw instanceof FirefoxProfile) { profile = (FirefoxProfile) raw; } else if (raw instanceof String) { try { profile = FirefoxProfile.fromJson((String) raw); } catch (IOException e) { throw new WebDriverException(e); } } } if (capabilities.getCapability(PROXY) != null) { Proxy proxy = Proxies.extractProxy(capabilities); profile.setProxyPreferences(proxy); } return profile; } private static FirefoxBinary getBinary(Capabilities capabilities) { if (capabilities.getCapability(BINARY) != null) { File file = new File((String) capabilities.getCapability(BINARY)); new FirefoxBinary(file); } return new FirefoxBinary(); } public FirefoxDriver(FirefoxBinary binary, FirefoxProfile profile) { super(new LazyCommandExecutor(binary, profile), DesiredCapabilities.firefox()); this.binary = binary; setElementConverter(new JsonToWebElementConverter(this) { @Override protected RemoteWebElement newRemoteWebElement() { return new FirefoxWebElement(FirefoxDriver.this); } }); } @Override protected void startClient() { LazyCommandExecutor exe = (LazyCommandExecutor) getCommandExecutor(); FirefoxProfile profileToUse = getProfile(exe.profile); profileToUse.addWebDriverExtensionIfNeeded(); // TODO(simon): Make this not sinfully ugly ExtensionConnection connection = connectTo(exe.binary, profileToUse, "localhost"); exe.setConnection(connection); try { connection.start(); } catch (IOException e) { throw new WebDriverException("An error occurred while connecting to Firefox", e); } } private FirefoxProfile getProfile(FirefoxProfile profile) { FirefoxProfile profileToUse = profile; String suggestedProfile = System.getProperty("webdriver.firefox.profile"); if (profileToUse == null && suggestedProfile != null) { profileToUse = new ProfilesIni().getProfile(suggestedProfile); if (profileToUse == null) { throw new WebDriverException("Firefox profile '" + suggestedProfile + "' named in system property 'webdriver.firefox.profile' not found"); } } else if (profileToUse == null) { profileToUse = new FirefoxProfile(); } return profileToUse; } protected ExtensionConnection connectTo(FirefoxBinary binary, FirefoxProfile profile, String host) { Lock lock = obtainLock(); try { FirefoxBinary bin = binary == null ? new FirefoxBinary() : binary; return new NewProfileExtensionConnection(lock, bin, profile, host); } catch (Exception e) { throw new WebDriverException(e); } finally { lock.unlock(); } } protected Lock obtainLock() { return new SocketLock(); } @Override protected void stopClient() { ((LazyCommandExecutor) this.getCommandExecutor()).quit(); } @Override protected FirefoxWebElement newRemoteWebElement() { return new FirefoxWebElement(this); } @Override public boolean isJavascriptEnabled() { return true; } public X getScreenshotAs(OutputType target) { // Get the screenshot as base64. String base64 = execute(DriverCommand.SCREENSHOT).getValue().toString(); // ... and convert it. return target.convertFromBase64Png(base64); } /** * Saves a screenshot of the current page into the given file. * * @deprecated Use getScreenshotAs(file), which returns a temporary file. */ @Deprecated public void saveScreenshot(File pngFile) { if (pngFile == null) { throw new IllegalArgumentException("Method parameter pngFile must not be null"); } File tmpfile = getScreenshotAs(FILE); File dir = pngFile.getParentFile(); if (dir != null && !dir.exists() && !dir.mkdirs()) { throw new WebDriverException("Could not create directory " + dir.getAbsolutePath()); } try { FileHandler.copy(tmpfile, pngFile); } catch (IOException e) { throw new WebDriverException(e); } } private static class LazyCommandExecutor implements CommandExecutor { private ExtensionConnection connection; private final FirefoxBinary binary; private final FirefoxProfile profile; private LazyCommandExecutor(FirefoxBinary binary, FirefoxProfile profile) { this.binary = binary; this.profile = profile; } public void setConnection(ExtensionConnection connection) { this.connection = connection; } public void quit() { if (connection != null) { connection.quit(); connection = null; } } public Response execute(Command command) throws IOException { if (connection == null) { if (command.getName().equals(DriverCommand.QUIT)) { return null; } throw new WebDriverException("The FirefoxDriver cannot be used after quit() was called."); } return connection.execute(command); } } } PK lC>)vCCGorg/openqa/selenium/firefox/.svn/text-base/FirefoxProfile.java.svn-base/* Copyright 2007-2009 WebDriver committers Copyright 2007-2009 Google Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package org.openqa.selenium.firefox; import java.io.BufferedReader; import java.io.File; import java.io.FileReader; import java.io.FileWriter; import java.io.IOException; import java.io.Writer; import java.util.HashMap; import java.util.Map; import com.google.common.collect.Maps; import org.apache.commons.io.FileUtils; import org.openqa.selenium.Proxy; import org.openqa.selenium.Proxy.ProxyType; import org.openqa.selenium.WebDriverException; import org.openqa.selenium.firefox.internal.ClasspathExtension; import org.openqa.selenium.firefox.internal.Extension; import org.openqa.selenium.firefox.internal.FileExtension; import org.openqa.selenium.io.Cleanly; import org.openqa.selenium.io.TemporaryFilesystem; import org.openqa.selenium.io.Zip; public class FirefoxProfile { public static final String PORT_PREFERENCE = "webdriver_firefox_port"; private Preferences additionalPrefs = new Preferences(); private Map extensions = Maps.newHashMap(); private boolean enableNativeEvents; private boolean loadNoFocusLib; private boolean acceptUntrustedCerts; private boolean untrustedCertIssuer; private File model; private static final String ENABLE_NATIVE_EVENTS_PREF = "webdriver_enable_native_events"; private static final String ACCEPT_UNTRUSTED_CERTS_PREF = "webdriver_accept_untrusted_certs"; private static final String ASSUME_UNTRUSTED_ISSUER_PREF = "webdriver_assume_untrusted_issuer"; public FirefoxProfile() { this(null); } /** * Constructs a firefox profile from an existing profile directory. *

*

Users who need this functionality should consider using a named * profile. * * @param profileDir The profile directory to use as a model. */ public FirefoxProfile(File profileDir) { model = profileDir; verifyModel(model); File prefsInModel = new File(model, "user.js"); if (prefsInModel.exists()) { Map existingPrefs = readExistingPrefs(prefsInModel); enableNativeEvents = Boolean.valueOf(existingPrefs.get(ENABLE_NATIVE_EVENTS_PREF)); acceptUntrustedCerts = Boolean.valueOf(existingPrefs.get(ACCEPT_UNTRUSTED_CERTS_PREF)); untrustedCertIssuer = Boolean.valueOf(existingPrefs.get(ASSUME_UNTRUSTED_ISSUER_PREF)); } else { enableNativeEvents = FirefoxDriver.DEFAULT_ENABLE_NATIVE_EVENTS; acceptUntrustedCerts = FirefoxDriver.ACCEPT_UNTRUSTED_CERTIFICATES; untrustedCertIssuer = FirefoxDriver.ASSUME_UNTRUSTED_ISSUER; } // This is not entirely correct but this is not stored in the profile // so for now will always be set to false. loadNoFocusLib = false; } private void verifyModel(File model) { if (model == null) { return; } if (!model.exists()) { throw new UnableToCreateProfileException( "Given model profile directory does not exist: " + model.getPath()); } if (!model.isDirectory()) { throw new UnableToCreateProfileException( "Given model profile directory is not a directory: " + model.getAbsolutePath()); } } protected void addWebDriverExtensionIfNeeded() { if (extensions.containsKey("webdriver")) { return; } ClasspathExtension extension = new ClasspathExtension(FirefoxProfile.class, "/webdriver.xpi"); addExtension("webdriver", extension); } public void addExtension(Class loadResourcesUsing, String loadFrom) throws IOException { // Is loadFrom a file? File file = new File(loadFrom); if (file.exists()) { addExtension(file); return; } addExtension(loadFrom, new ClasspathExtension(loadResourcesUsing, loadFrom)); } /** * Attempt to add an extension to install into this instance. * * @param extensionToInstall * @throws IOException */ public void addExtension(File extensionToInstall) throws IOException { addExtension(extensionToInstall.getName(), new FileExtension(extensionToInstall)); } protected void addExtension(String key, Extension extension) { String name = deriveExtensionName(key); extensions.put(name, extension); } private String deriveExtensionName(String originalName) { String[] pieces = originalName.replace('\\', '/').split("/"); String name = pieces[pieces.length - 1]; name = name.replaceAll("\\..*?$", ""); return name; } //Assumes that we only really care about the preferences, not the comments private Map readExistingPrefs(File userPrefs) { Map prefs = new HashMap(); BufferedReader reader = null; try { reader = new BufferedReader(new FileReader(userPrefs)); String line = reader.readLine(); while (line != null) { if (!line.startsWith("user_pref(\"")) { line = reader.readLine(); continue; } line = line.substring("user_pref(\"".length()); line = line.substring(0, line.length() - ");".length()); String[] parts = line.split(","); parts[0] = parts[0].substring(0, parts[0].length() - 1); prefs.put(parts[0].trim(), parts[1].trim()); line = reader.readLine(); } } catch (IOException e) { throw new WebDriverException(e); } finally { Cleanly.close(reader); } return prefs; } /** * Set a preference for this particular profile. The value will be properly quoted * before use. Note that if a value looks as if it is a quoted string (that is, starts * with a quote character and ends with one too) an IllegalArgumentException is thrown: * Firefox fails to start properly when some values are set to this. * * @param key The key * @param value The new value. */ public void setPreference(String key, String value) { additionalPrefs.setPreference(key, value); } /** * Set a preference for this particular profile. * * @param key The key * @param value The new value. */ public void setPreference(String key, boolean value) { additionalPrefs.setPreference(key, value); } /** * Set a preference for this particular profile. * * @param key The key * @param value The new value. */ public void setPreference(String key, int value) { additionalPrefs.setPreference(key, value); } /** * Set proxy preferences for this profile. * * @param proxy The proxy preferences. * @return The profile, for further settings. */ public FirefoxProfile setProxyPreferences(Proxy proxy) { if (proxy.getProxyType() == ProxyType.UNSPECIFIED) { return this; } setPreference("network.proxy.type", proxy.getProxyType().ordinal()); switch (proxy.getProxyType()) { case MANUAL:// By default, assume we're proxying the lot setPreference("network.proxy.no_proxies_on", ""); setManualProxyPreference("ftp", proxy.getFtpProxy()); setManualProxyPreference("http", proxy.getHttpProxy()); setManualProxyPreference("ssl", proxy.getSslProxy()); if (proxy.getNoProxy() != null) { setPreference("network.proxy.no_proxies_on", proxy.getNoProxy()); } break; case PAC: setPreference("network.proxy.autoconfig_url", proxy.getProxyAutoconfigUrl()); break; } return this; } private void setManualProxyPreference(String key, String settingString) { if (settingString == null) { return; } String[] hostPort = settingString.split(":"); setPreference("network.proxy." + key, hostPort[0]); if (hostPort.length > 1) { setPreference("network.proxy." + key + "_port", Integer.parseInt(hostPort[1])); } } protected Preferences getAdditionalPreferences() { return additionalPrefs; } public void updateUserPrefs(File userPrefs) { Map prefs = new HashMap(); // Allow users to override these settings prefs.put("browser.startup.homepage", "\"about:blank\""); // The user must be able to override this setting (to 1) in order to // to change homepage on Firefox 3.0 prefs.put("browser.startup.page", "0"); if (userPrefs.exists()) { prefs = readExistingPrefs(userPrefs); if (!userPrefs.delete()) { throw new WebDriverException("Cannot delete existing user preferences"); } } additionalPrefs.addTo(prefs); // Normal settings to facilitate testing prefs.put("app.update.auto", "false"); prefs.put("app.update.enabled", "false"); prefs.put("browser.download.manager.showWhenStarting", "false"); prefs.put("browser.EULA.override", "true"); prefs.put("browser.EULA.3.accepted", "true"); prefs.put("browser.link.open_external", "2"); prefs.put("browser.link.open_newwindow", "2"); prefs.put("browser.safebrowsing.enabled", "false"); prefs.put("browser.search.update", "false"); prefs.put("browser.sessionstore.resume_from_crash", "false"); prefs.put("browser.shell.checkDefaultBrowser", "false"); prefs.put("browser.tabs.warnOnClose", "false"); prefs.put("browser.tabs.warnOnOpen", "false"); prefs.put("devtools.errorconsole.enabled", "true"); prefs.put("dom.disable_open_during_load", "false"); prefs.put("dom.max_script_run_time", "30"); prefs.put("extensions.logging.enabled", "true"); prefs.put("extensions.update.enabled", "false"); prefs.put("extensions.update.notifyUser", "false"); prefs.put("network.manage-offline-status", "false"); prefs.put("network.http.max-connections-per-server", "10"); prefs.put("security.fileuri.origin_policy", "3"); prefs.put("security.fileuri.strict_origin_policy", "false"); prefs.put("security.warn_entering_secure", "false"); prefs.put("security.warn_submit_insecure", "false"); prefs.put("security.warn_entering_secure.show_once", "false"); prefs.put("security.warn_entering_weak", "false"); prefs.put("security.warn_entering_weak.show_once", "false"); prefs.put("security.warn_leaving_secure", "false"); prefs.put("security.warn_leaving_secure.show_once", "false"); prefs.put("security.warn_submit_insecure", "false"); prefs.put("security.warn_viewing_mixed", "false"); prefs.put("security.warn_viewing_mixed.show_once", "false"); prefs.put("signon.rememberSignons", "false"); prefs.put("toolkit.networkmanager.disable", "true"); // Should we use native events? prefs.put(ENABLE_NATIVE_EVENTS_PREF, Boolean.toString(enableNativeEvents)); // Should we accept untrusted certificates or not? prefs.put(ACCEPT_UNTRUSTED_CERTS_PREF, Boolean.toString(acceptUntrustedCerts)); prefs.put(ASSUME_UNTRUSTED_ISSUER_PREF, Boolean.toString(untrustedCertIssuer)); // Settings to facilitate debugging the driver // Logs errors in chrome files to the Error Console. prefs.put("javascript.options.showInConsole", "true"); // Enables the use of the dump() statement prefs.put("browser.dom.window.dump.enabled", "true"); // Log exceptions from inner frames (i.e. setTimeout) prefs.put("dom.report_all_js_exceptions", "true"); // If the user sets the home page, we should also start up there prefs.put("startup.homepage_welcome_url", prefs.get("browser.startup.homepage")); if (!"about:blank".equals(prefs.get("browser.startup.homepage"))) { prefs.put("browser.startup.page", "1"); } writeNewPrefs(userPrefs, prefs); } protected void deleteLockFiles(File profileDir) { File macAndLinuxLockFile = new File(profileDir, ".parentlock"); File windowsLockFile = new File(profileDir, "parent.lock"); macAndLinuxLockFile.delete(); windowsLockFile.delete(); } public void deleteExtensionsCacheIfItExists(File profileDir) { File cacheFile = new File(profileDir, "extensions.cache"); if (cacheFile.exists()) { cacheFile.delete(); } } protected void writeNewPrefs(File userPrefs, Map prefs) { Writer writer = null; try { writer = new FileWriter(userPrefs); for (Map.Entry entry : prefs.entrySet()) { writer.append( String.format("user_pref(\"%s\", %s);\n", entry.getKey(), entry.getValue()) ); } } catch (IOException e) { throw new WebDriverException(e); } finally { Cleanly.close(writer); } } public boolean enableNativeEvents() { return enableNativeEvents; } public void setEnableNativeEvents(boolean enableNativeEvents) { this.enableNativeEvents = enableNativeEvents; } /** * Returns whether the no focus library should be loaded for Firefox * profiles launched on Linux, even if native events are disabled. * * @return Whether the no focus library should always be loaded for Firefox * on Linux. */ public boolean alwaysLoadNoFocusLib() { return loadNoFocusLib; } /** * Sets whether the no focus library should always be loaded on Linux. * * @param loadNoFocusLib Whether to always load the no focus library. */ public void setAlwaysLoadNoFocusLib(boolean loadNoFocusLib) { this.loadNoFocusLib = loadNoFocusLib; } /** * Sets whether Firefox should accept SSL certificates which have expired, * signed by an unknown authority or are generally untrusted. * This is set to true by default. * * @param acceptUntrustedSsl Whether untrusted SSL certificates should be * accepted. */ public void setAcceptUntrustedCertificates(boolean acceptUntrustedSsl) { this.acceptUntrustedCerts = acceptUntrustedSsl; } /** * By default, when accepting untrusted SSL certificates, assume that * these certificates will come from an untrusted issuer or will be self * signed. * Due to limitation within Firefox, it is easy to find out if the * certificate has expired or does not match the host it was served for, * but hard to find out if the issuer of the certificate is untrusted. *

* By default, it is assumed that the certificates were not be issued from * a trusted CA. *

* If you are receive an "untrusted site" prompt on Firefox when using a * certificate that was issued by valid issuer, but has expired or * is being served served for a different host (e.g. production certificate * served in a testing environment) set this to false. * * @param untrustedIssuer whether to assume untrusted issuer or not. */ public void setAssumeUntrustedCertificateIssuer(boolean untrustedIssuer) { this.untrustedCertIssuer = untrustedIssuer; } public boolean isRunning(File profileDir) { File macAndLinuxLockFile = new File(profileDir, ".parentlock"); File windowsLockFile = new File(profileDir, "parent.lock"); return macAndLinuxLockFile.exists() || windowsLockFile.exists(); } public void clean(File profileDir) { TemporaryFilesystem.deleteTempDir(profileDir); } public String toJson() throws IOException { File generatedProfile = layoutOnDisk(); return new Zip().zip(generatedProfile); } public static FirefoxProfile fromJson(String json) throws IOException { File dir = TemporaryFilesystem.createTempDir("webdriver", "duplicated"); new Zip().unzip(json, dir); return new FirefoxProfile(dir); } /** * Call this to cause the current profile to be written to disk. The profile * directory is returned. Note that this profile directory is a temporary one * and will be deleted when the JVM exists (at the latest) * * This method should be called immediately before starting to use the profile * and should only be called once per instance of the * {@link org.openqa.selenium.firefox.FirefoxDriver}. * * @return The directory containing the profile. */ public File layoutOnDisk() { try { File profileDir = TemporaryFilesystem.createTempDir("anonymous", "webdriver-profile"); File userPrefs = new File(profileDir, "user.js"); copyModel(model, profileDir); installExtensions(profileDir); deleteLockFiles(profileDir); deleteExtensionsCacheIfItExists(profileDir); updateUserPrefs(userPrefs); return profileDir; } catch (IOException e) { throw new UnableToCreateProfileException(e); } } protected void copyModel(File sourceDir, File profileDir) throws IOException { if (sourceDir == null || !sourceDir.exists()) { return; } FileUtils.copyDirectory(sourceDir, profileDir); } protected void installExtensions(File parentDir) throws IOException { File extensionsDir = new File(parentDir, "extensions"); for (Extension extension : extensions.values()) { extension.writeTo(extensionsDir); } } } PK lC>me@Jorg/openqa/selenium/firefox/.svn/text-base/FirefoxWebElement.java.svn-base/* Copyright 2007-2009 WebDriver committers Copyright 2007-2009 Google Inc. Portions copyright 2007 ThoughtWorks, Inc Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package org.openqa.selenium.firefox; import org.openqa.selenium.RenderedWebElement; import org.openqa.selenium.WebElement; import org.openqa.selenium.internal.WrapsElement; import org.openqa.selenium.remote.RenderedRemoteWebElement; public class FirefoxWebElement extends RenderedRemoteWebElement implements RenderedWebElement { public FirefoxWebElement(FirefoxDriver parent) { setParent(parent); } @Override public boolean equals(Object obj) { if (!(obj instanceof WebElement)) { return false; } WebElement other = (WebElement) obj; if (other instanceof WrapsElement) { other = ((WrapsElement) obj).getWrappedElement(); } if (!(other instanceof FirefoxWebElement)) { return false; } return getId().equals(((FirefoxWebElement)other).getId()); } @Override public int hashCode() { return getId().hashCode(); } } PK lC> YYNorg/openqa/selenium/firefox/.svn/text-base/NotConnectedException.java.svn-base/* Copyright 2007-2009 WebDriver committers Copyright 2007-2009 Google Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package org.openqa.selenium.firefox; import java.io.IOException; import java.net.URL; public class NotConnectedException extends IOException { public NotConnectedException(URL url, long timeToWaitInMilliSeconds) { super(getMessage(url, timeToWaitInMilliSeconds)); } private static String getMessage(URL url, long timeToWaitInMilliSeconds) { return String.format("Unable to connect to host %s on port %d after %d ms", url.getHost(), url.getPort(), timeToWaitInMilliSeconds); } } PK lC>yyDorg/openqa/selenium/firefox/.svn/text-base/Preferences.java.svn-base/* Copyright 2007-2009 WebDriver committers Copyright 2007-2009 Google Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package org.openqa.selenium.firefox; import java.util.HashMap; import java.util.Map; class Preferences { private Map additionalPrefs = new HashMap(); public void setPreference(String key, String value) { if (isStringified(value)) { throw new IllegalArgumentException( String.format("Preference values must be plain strings: %s: %s", key, value)); } additionalPrefs.put(key, String.format("\"%s\"", value)); } public void setPreference(String key, boolean value) { additionalPrefs.put(key, String.valueOf(value)); } public void setPreference(String key, int value) { additionalPrefs.put(key, String.valueOf(value)); } public void addTo(Map prefs) { prefs.putAll(additionalPrefs); } public void addTo(FirefoxProfile profile) { profile.getAdditionalPreferences().additionalPrefs.putAll(additionalPrefs); } // Visible for testing protected Object getPreference(String key) { return additionalPrefs.get(key); } private boolean isStringified(String value) { // Assume we a string is stringified (i.e. wrapped in " ") when // the first character == " and the last character == " return value.startsWith("\"") && value.endsWith("\""); } } PK lC>-Worg/openqa/selenium/firefox/.svn/text-base/UnableToCreateProfileException.java.svn-base/* Copyright 2010 WebDriver committers Copyright 2010 Google Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package org.openqa.selenium.firefox; import org.openqa.selenium.WebDriverException; public class UnableToCreateProfileException extends WebDriverException { public UnableToCreateProfileException(Throwable e) { super(e); } public UnableToCreateProfileException(String message) { super(message); } } PK lC>R_>org/openqa/selenium/firefox/.svn/text-base/build.desc.svn-basejava_library(name = "firefox", srcs = [ "*.java", "internal/*.java", ], resources = [ "//firefox:webdriver", { "//cpp:noblur" : "x86/x_ignore_nofocus.so" }, { "//cpp:noblur64" : "amd64/x_ignore_nofocus.so" } ], deps = [ "//java/client/src/org/openqa/selenium/io", "//java/client/src/org/openqa/selenium/net", "//java/client/src/org/openqa/selenium/remote", "//third_party/java/commons-io", "//third_party/java/guava-libraries", ]) PK (hC>R_&org/openqa/selenium/firefox/build.descjava_library(name = "firefox", srcs = [ "*.java", "internal/*.java", ], resources = [ "//firefox:webdriver", { "//cpp:noblur" : "x86/x_ignore_nofocus.so" }, { "//cpp:noblur64" : "amd64/x_ignore_nofocus.so" } ], deps = [ "//java/client/src/org/openqa/selenium/io", "//java/client/src/org/openqa/selenium/net", "//java/client/src/org/openqa/selenium/remote", "//third_party/java/commons-io", "//third_party/java/guava-libraries", ]) PK %^D>:5org/openqa/selenium/os/WindowsRegistryException.class1?/org/openqa/selenium/os/WindowsRegistryException&org/openqa/selenium/WebDriverException(Ljava/lang/Exception;)VCode  generateMessage()Ljava/lang/String;  *(Ljava/lang/String;Ljava/lang/Throwable;)VLineNumberTableLocalVariableTablethis1Lorg/openqa/selenium/os/WindowsRegistryException;eLjava/lang/Exception;java/lang/StringBuilder1Problem while managing the registry, OS Version '  (Ljava/lang/String;)V os.version ! java/lang/System "# getProperty&(Ljava/lang/String;)Ljava/lang/String; % &'append-(Ljava/lang/String;)Ljava/lang/StringBuilder;)', regVersion1 = +-,#org/openqa/selenium/os/WindowsUtils ./ regVersion1Ljava/lang/Boolean; 1 &2-(Ljava/lang/Object;)Ljava/lang/StringBuilder; 4 5 toString7java/lang/RuntimeException 6 : messageLjava/lang/String; SourceFileWindowsRegistryException.java!A *+       H Y$($*03  E *6Y+89    ;<=>PK %^D><*org/openqa/selenium/os/CommandLine$1.class1#$org/openqa/selenium/os/CommandLine$1java/lang/Threadthis$0$Lorg/openqa/selenium/os/CommandLine;'(Lorg/openqa/selenium/os/CommandLine;)VCode    ()VLineNumberTableLocalVariableTablethis&Lorg/openqa/selenium/os/CommandLine$1;run "org/openqa/selenium/os/CommandLine access$1  access$2 SourceFileCommandLine.javaEnclosingMethod ! executeAsync()Ljava/lang/Process; InnerClasses  8 *+ *     A* *  " PK %^D>M*org/openqa/selenium/os/CommandLine$2.class1.$org/openqa/selenium/os/CommandLine$2java/lang/Threadthis$0$Lorg/openqa/selenium/os/CommandLine;'(Lorg/openqa/selenium/os/CommandLine;)VCode    ()VLineNumberTableLocalVariableTablethis&Lorg/openqa/selenium/os/CommandLine$2;run "org/openqa/selenium/os/CommandLine access$39(Lorg/openqa/selenium/os/CommandLine;)Ljava/lang/Process; java/lang/Process  exitValue()I ! "destroy$%java/lang/IllegalThreadStateExceptione'Ljava/lang/IllegalThreadStateException; SourceFileCommandLine.javaEnclosingMethod +, executeAsync()Ljava/lang/Process; InnerClasses  8 *+ *     p$* * WL*   # #$ %&'()*- PK %^D>oo6org/openqa/selenium/os/CommandLine$StreamDrainer.class1X0org/openqa/selenium/os/CommandLine$StreamDrainerjava/lang/Objectjava/lang/RunnabletoWatchLjava/lang/Process;inputOutLjava/io/ByteArrayOutputStream;drainToLjava/io/OutputStream;,(Ljava/lang/Process;Ljava/io/OutputStream;)VCode  ()V    java/io/ByteArrayOutputStream   LineNumberTableLocalVariableTablethis2Lorg/openqa/selenium/os/CommandLine$StreamDrainer;run"java/io/BufferedInputStream $&%java/lang/Process '(getInputStream()Ljava/io/InputStream; !* +(Ljava/io/InputStream;)V - ./write([BII)V 1 2flush 4-5java/io/OutputStream 41 8:9java/io/InputStream ;<read([B)I > ?closeAjava/io/IOException inputStreamLjava/io/InputStream;buffer[BI getStdOut()Ljava/lang/String;Jjava/lang/String L MN toByteArray()[B IP Q([B)V SourceFileCommandLine.java InnerClassesV"org/openqa/selenium/os/CommandLine StreamDrainer    h**+*,*Y=> ?@A   >|!Y*#)LM,*,,*0**,3*6+,7Y>Ч$N*=%: :*=:*=:KN@OVY@O^`gj@ovy@NDEIJ"K)M0N:OAINROWYX^U`WjXl[oWyX{\4|mBCgDE);FH;FGH9IY*KO_ RST UW PK %^D>LVN%%(org/openqa/selenium/os/CommandLine.class1"org/openqa/selenium/os/CommandLinejava/lang/ObjectJDK6_CAN_EXECUTELjava/lang/reflect/Method;commandAndArgs[Ljava/lang/String;drainer2Lorg/openqa/selenium/os/CommandLine$StreamDrainer;drainToLjava/io/OutputStream; drainerThreadLjava/lang/Thread;exitCodeIexecutedZprocLjava/lang/Process;allInputLjava/lang/String;envLjava/util/Map; Signature5Ljava/util/Map;cleanup*$SWITCH_TABLE$org$openqa$selenium$Platform[I()VCode " #$findJdk6CanExecuteMethod()Ljava/lang/reflect/Method; & LineNumberTableLocalVariableTable((Ljava/lang/String;[Ljava/lang/String;)V , ).&java/util/concurrent/ConcurrentHashMap -, 1 3java/lang/String 5  7 89findExecutable&(Ljava/lang/String;)Ljava/lang/String;this$Lorg/openqa/selenium/os/CommandLine; executableargsindexarg([Ljava/lang/String;)VcmdarraygetEnvironment()Ljava/util/Map;7()Ljava/util/Map;Fjava/util/HashMap EH )I(Ljava/util/Map;)VsetEnvironmentVariables8(Ljava/util/Map;)V MON java/util/Map PQentrySet()Ljava/util/Set; SUT java/util/Set VWiterator()Ljava/util/Iterator; Y[Zjava/util/Iterator \]next()Ljava/lang/Object;_java/util/Map$Entry ^a b]getKey ^d e]getValue g hisetEnvironmentVariable'(Ljava/lang/String;Ljava/lang/String;)V Yk lmhasNext()Z environmententryLjava/util/Map$Entry;LocalVariableTypeTable;Ljava/util/Map$Entry;t"java/lang/IllegalArgumentExceptionv-Cannot have a null environment variable name! sx )y(Ljava/lang/String;)V{java/lang/StringBuilder}2Cannot have a null value for environment variable zx z append-(Ljava/lang/String;)Ljava/lang/StringBuilder; z toString()Ljava/lang/String; M put8(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;namevaluesetDynamicLibraryPath  getLibraryPathPropertyNamenewLibraryPath  ()[I org/openqa/selenium/Platform  getCurrent ()Lorg/openqa/selenium/Platform; ordinal()IDYLD_LIBRARY_PATHPATHLD_LIBRARY_PATH java/io/File x   canExecute(Ljava/io/File;)Z java/lang/System Cgetenv M  containsKey(Ljava/lang/Object;)Z M QkeySetpath 2 equalsIgnoreCase(Ljava/lang/String;)Z M get&(Ljava/lang/Object;)Ljava/lang/Object; WINDOWSLorg/openqa/selenium/Platform; is!(Lorg/openqa/selenium/Platform;)Z.exe.com.bat  pathSeparator 2 split'(Ljava/lang/String;)[Ljava/lang/String; 2 valueOf&(Ljava/lang/Object;)Ljava/lang/String; )i getAbsolutePathnamedfileLjava/io/File;pathNamekeyendingssegmentendingexecute   createProcess   setupDrainer  waitFor executeAsync()Ljava/lang/Process;$org/openqa/selenium/os/CommandLine$1 )'(Lorg/openqa/selenium/os/CommandLine;)V start$org/openqa/selenium/os/CommandLine$2   java/lang/Runtime  getRuntime()Ljava/lang/Runtime;    addShutdownHook(Ljava/lang/Thread;)V   java/lang/Process   java/lang/Thread join   exitValue    !postRunCleanup#&org/openqa/selenium/WebDriverException "% )&(Ljava/lang/Throwable;)V(java/lang/InterruptedExceptione Ljava/lang/InterruptedException;,0org/openqa/selenium/os/CommandLine$StreamDrainer . +0 )1,(Ljava/lang/Process;Ljava/io/OutputStream;)V 3 5Command line drainer: 7 )8)(Ljava/lang/Runnable;Ljava/lang/String;)V  ;  2= >?getBytes()[B A BCgetOutputStream()Ljava/io/OutputStream; EGFjava/io/OutputStream HIwrite([B)V EK LcloseNjava/io/IOExceptionbytes[BLjava/io/IOException;Sjava/lang/ProcessBuilder RU )@ RW XYredirectErrorStream(Z)Ljava/lang/ProcessBuilder; R[ nC M] ^IputAll R` b builderLjava/lang/ProcessBuilder; isSuccessful g h getExitCodejjava/lang/IllegalStateExceptionl4Cannot get exit code before executing command line: ix getStdOutp1Cannot get output before executing command line: +r ndestroyu*Cannot quit a process that's not running: w s y z{removeShutdownHook(Ljava/lang/Thread;)Z }~java/lang/reflect/Method invoke9(Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/Object;java/lang/Boolean  m booleanValue java/lang/IllegalAccessException+java/lang/reflect/InvocationTargetException setWritablejava/lang/Class   getMethod@(Ljava/lang/String;[Ljava/lang/Class;)Ljava/lang/reflect/Method;java/lang/NoSuchMethodException!Ljava/lang/NoSuchMethodException;setInput z, z (C)Ljava/lang/StringBuilder;bufLjava/lang/StringBuilder;s copyOutputTo(Ljava/io/OutputStream;)Vout    values!()[Lorg/openqa/selenium/Platform;  ANDROID  ANY  LINUX  MAC  UNIX  VISTA  XPjava/lang/NoSuchFieldErroraccess$1access$2access$39(Lorg/openqa/selenium/os/CommandLine;)Ljava/lang/Process; SourceFileCommandLine.java InnerClassesEntry StreamDrainer! B B B BBBB  +!%' &%()* P*+*-Y/0*,`24*4+6S>,Y:662:*4S'& 2/34$5&6:7E6O9(4P:;P<P=&*>: ?)@ U*+*-Y/0*+4';/<=(:;ABCD 6 EY*0G'@(  :;JIK 9+LRN#-X^M*,`2,c2f-jڱ'JK/J8M( 9:;9nopq9norhi 7+ sYuw,sYzY|~+w*0+,W'WXZ[*]6^( 7:;77y I + *+f'bc e( :;   ]1.$!!!'k(m+r.u( 89 Y*L+*MN,9,R:X2: N j,-2:2YS:Ķș2YSYSYSYS:ҶY: 66U 2:Y: 6 6 6  2: YzY*ٷ~ L++߰   Ʉ'^z {|$@JMPZfq}(\  @fqH) q  C ***' (  :; h**Y**Y** * ' %( *:; 3* W* *** * L"Y+$%(''"!()2(3:;) )* q*+Y* *-/2*Y*2zY4~*426*9*:-*:*+:' )*(:; 5zYL*4Y:6>2M+, W+'-./'.01( 5:;-  >*+-' 56(:;  YW K*OW*OW*OW*OW*OW*OW*ĶOW*OW*Y(+,69:CFGPST]`ajmnwz'%( %*'( %*'( %* '-("^M + PK %^D>)dm &org/openqa/selenium/os/UnixUtils.class1 org/openqa/selenium/os/UnixUtilsjava/lang/Objectlog$Lorg/openqa/selenium/internal/Trace;()VCode &org/openqa/selenium/internal/NullTrace   LineNumberTableLocalVariableTable  this"Lorg/openqa/selenium/os/UnixUtils; getProcessId(Ljava/lang/Process;)I org/openqa/selenium/Platform  getCurrent ()Lorg/openqa/selenium/Platform;  !WINDOWSLorg/openqa/selenium/Platform; # $%is!(Lorg/openqa/selenium/Platform;)Z'java/lang/IllegalStateException)$UnixUtils may not be used on Windows &+ ,(Ljava/lang/String;)V . /0getClass()Ljava/lang/Class;2pid 465java/lang/Class 78getDeclaredField-(Ljava/lang/String;)Ljava/lang/reflect/Field; :<;java/lang/reflect/Field => setAccessible(Z)V :@ ABget&(Ljava/lang/Object;)Ljava/lang/Object;Djava/lang/Integer CF GHintValue()IJjava/lang/RuntimeExceptionLCouldn't detect pid IN O*(Ljava/lang/String;Ljava/lang/Throwable;)VQjava/lang/ExceptionpLjava/lang/Process;fLjava/lang/reflect/Field;Ljava/lang/Integer;eLjava/lang/Exception;kill9(Ljava/lang/Integer;)V\java/lang/StringBuilder^kill -9 [+ [a bcappend-(Ljava/lang/Object;)Ljava/lang/StringBuilder; [e fgtoString()Ljava/lang/String; ikj"org/openqa/selenium/internal/Trace l,debugn"org/openqa/selenium/os/CommandLinepkillrjava/lang/Stringt-9 Ce mw x((Ljava/lang/String;[Ljava/lang/String;)V mz {execute m} ~g getStdOut m H getExitCode q valueOf(I)Ljava/lang/String; m  isSuccessful()Zexec return code [ b-(Ljava/lang/String;)Ljava/lang/StringBuilder;: [ b(I)Ljava/lang/StringBuilder; I+command$Lorg/openqa/selenium/os/CommandLine;resultLjava/lang/String;outputI(Ljava/lang/Process;)V   C (I)Ljava/lang/Integer;  YZ SourceFileUnixUtils.java! / Y    /*   ?" &Y(**-13L+9+*?CM,ELIYK+M23P"  %.34*?RS TU.2V4 WX YZ u[Y]_*`dhmYoqYsSY*uSvL+y+|M+>h+$IY[Y_,d& %'2(6);*@+L,S-t/*u2V2C;:@5 Y 9 * 3 4  RSPK %^D>XXDorg/openqa/selenium/os/ProcessUtils$ProcessStillAliveException.class1>org/openqa/selenium/os/ProcessUtils$ProcessStillAliveExceptionjava/lang/RuntimeException*(Ljava/lang/String;Ljava/lang/Throwable;)VCode  LineNumberTableLocalVariableTablethis@Lorg/openqa/selenium/os/ProcessUtils$ProcessStillAliveException;messageLjava/lang/String;causeLjava/lang/Throwable; SourceFileProcessUtils.java InnerClasses#org/openqa/selenium/os/ProcessUtilsProcessStillAliveException!I*+,     PK %^D>Y7org/openqa/selenium/os/ProcessUtils$ProcessWaiter.class1+1org/openqa/selenium/os/ProcessUtils$ProcessWaiterjava/lang/Objectjava/lang/Runnablet Ljava/lang/InterruptedException;pLjava/lang/Process; getException"()Ljava/lang/InterruptedException;Code  LineNumberTableLocalVariableTablethis3Lorg/openqa/selenium/os/ProcessUtils$ProcessWaiter;(Ljava/lang/Process;)V  ()V  run java/lang/Process !waitFor()I#java/lang/InterruptedExceptione SourceFileProcessUtils.java InnerClasses)#org/openqa/selenium/os/ProcessUtils ProcessWaiter B   /*  F **+    Z*W L*+ "  $%&' (* PK %^D>+D)org/openqa/selenium/os/ProcessUtils.class1#org/openqa/selenium/os/ProcessUtilsjava/lang/Object()VCode  LineNumberTableLocalVariableTablethis%Lorg/openqa/selenium/os/ProcessUtils;waitForProcessDeath(Ljava/lang/Process;J)I1org/openqa/selenium/os/ProcessUtils$ProcessWaiter  (Ljava/lang/Process;)Vjava/lang/Thread  (Ljava/lang/Runnable;)V  start   join(J)V"java/lang/RuntimeException$/Bug? Main interrupted while waiting for process !& '*(Ljava/lang/String;Ljava/lang/Throwable;)V ) *+isAlive()Z - . interrupt 0 2;Bug? Main interrupted while waiting for dead process waiter 4 56 getException"()Ljava/lang/InterruptedException;8>org/openqa/selenium/os/ProcessUtils$ProcessStillAliveException:"Timeout waiting for process to die 7& =?>java/lang/Process @A exitValue()ICjava/lang/InterruptedExceptionpLjava/lang/Process;timeoutJpw3Lorg/openqa/selenium/os/ProcessUtils$ProcessWaiter;waiterLjava/lang/Thread;e Ljava/lang/InterruptedException;ie killProcess(Ljava/lang/Process;)I T  =V Wdestroy' []\org/openqa/selenium/Platform ^_ getCurrent ()Lorg/openqa/selenium/Platform; [a bcWINDOWSLorg/openqa/selenium/Platform; [e fgis!(Lorg/openqa/selenium/Platform;)Z ikjjava/lang/System lmoutLjava/io/PrintStream;o#Process didn't die after 10 seconds qsrjava/io/PrintStream tuprintln(Ljava/lang/String;)V w xkill9z>Process refused to die after 10 seconds, and couldn't kill9 it |~}java/lang/Exception printStackTracejava/lang/StringBuilder@Process refused to die after 10 seconds, and couldn't kill9 it: u |  getMessage()Ljava/lang/String; append-(Ljava/lang/String;)Ljava/lang/StringBuilder; toStringprocessIex@Lorg/openqa/selenium/os/ProcessUtils$ProcessStillAliveException;Ljava/lang/Exception; getProcessIdjava/lang/IllegalStateException$UnixUtils may not be used on Windows  getClass()Ljava/lang/Class;pid java/lang/Class getDeclaredField-(Ljava/lang/String;)Ljava/lang/reflect/Field; java/lang/reflect/Field  setAccessible(Z)V get&(Ljava/lang/Object;)Ljava/lang/Object;java/lang/Integer AintValueCouldn't detect pidfLjava/lang/reflect/Field;Ljava/lang/Integer;(Ljava/lang/Integer;)V Exceptionsjava/io/IOExceptionjava/lang/ProcessBuilderjava/lang/Stringkill-9 ([Ljava/lang/String;)V +redirectErrorStream ()Ljava/lang/Process; = AwaitFor = getInputStream()Ljava/io/InputStream; org/openqa/selenium/io/IOUtils  readFully)(Ljava/io/InputStream;)Ljava/lang/String;kill return code (I)Ljava/lang/StringBuilder;: !pbLjava/lang/ProcessBuilder;codeoutputLjava/lang/String;  P valueOf(I)Ljava/lang/Integer;  x SourceFileProcessUtils.java InnerClassesProcessStillAliveException ProcessWaiter!/*   nY*NY-::!Y#%(,/:!Y1%-3:7Y9;*<!B<ADB > !#/7<DF R"X#]$i& HnDEnFG eHI[JK# LMF LMXNM OP9o*QS<M*U*XS<RMZ`d,hnp*v*XS<,Nhyp-{!YY-,% |7-AD| R67 8:>@AB+C-F5G9HDIEJMKQLUMhNiLmQ HoE@@A@m@NE(L P?Z`d Y*L++*M,L!Y+%23| "Y Z] ^%_.`3a4b *?DE .4 L xB\YYSYSY*SL+W+M,>.,ո:!YY߷濱 "no"p'q,s0t9u[w 4\?'5DE,09" xB9 *   DE7  PK %^D>N<ř5org/openqa/selenium/os/WindowsUtils$RegKeyValue.class1//org/openqa/selenium/os/WindowsUtils$RegKeyValuejava/lang/ObjectkeyLjava/lang/String;value(Ljava/lang/String;)VCode   ()V java/lang/String  lastIndexOf(I)I   substring(II)Ljava/lang/String;    (I)Ljava/lang/String;  LineNumberTableLocalVariableTablethis1Lorg/openqa/selenium/os/WindowsUtils$RegKeyValue;pathiIaccess$0E(Lorg/openqa/selenium/os/WindowsUtils$RegKeyValue;)Ljava/lang/String;access$1 SourceFileWindowsUtils.java InnerClasses-#org/openqa/selenium/os/WindowsUtils RegKeyValue   o!* +\=*+*+`xy z{ | !!"!# $%&' %*v (' %*u )*+ ,. PK %^D>Qɨ!=!=)org/openqa/selenium/os/WindowsUtils.class1#org/openqa/selenium/os/WindowsUtilsjava/lang/Object regVersion1Ljava/lang/Boolean;log$Lorg/openqa/selenium/internal/Trace;THIS_IS_WINDOWSZwmicLjava/lang/String;wbemLjava/io/File;taskkillregenvLjava/util/Properties;()VCode  &org/openqa/selenium/internal/NullTrace     "!org/openqa/selenium/Platform #$ getCurrent ()Lorg/openqa/selenium/Platform; & '(WINDOWSLorg/openqa/selenium/Platform; * +,is!(Lorg/openqa/selenium/Platform;)Z . 0 2  4  6  8 LineNumberTableLocalVariableTable this%Lorg/openqa/selenium/os/WindowsUtils;main([Ljava/lang/String;)V ExceptionsBjava/lang/Exception DFEjava/lang/System GHoutLjava/io/PrintStream;J7Kills Windows processes by matching their command lines LNMjava/io/PrintStream OPprintln(Ljava/lang/String;)VRjava/lang/StringBuilderTusage: QV P XZYjava/lang/Class [\getName()Ljava/lang/String; Q^ _`append-(Ljava/lang/String;)Ljava/lang/StringBuilder;b command arg1 arg2 ... Qd e\toString g h?killargs[Ljava/lang/String; traceWith'(Lorg/openqa/selenium/internal/Trace;)V killByNamepjava/lang/Stringr/ft/im v wxexecuteCommand9(Ljava/lang/String;[Ljava/lang/String;)Ljava/lang/String;nametryToKillByName | }~ thisIsWindows()Z  mP "org/openqa/selenium/internal/Trace warn(Ljava/lang/Throwable;)V/org/openqa/selenium/os/WindowsRegistryExceptione1Lorg/openqa/selenium/os/WindowsRegistryException;java/lang/StringBuffer  java/io/File V"?.*?\\ _,(Ljava/lang/String;)Ljava/lang/StringBuffer; Z"?\s?"?\Q\E"?\s* d java/util/regex/Pattern compile.(Ljava/lang/String;I)Ljava/util/regex/Pattern;  procMap()Ljava/util/Map;  java/util/Map keySet()Ljava/util/Set;  java/util/Set iterator()Ljava/util/Iterator; java/util/Iterator next()Ljava/lang/Object; matcher3(Ljava/lang/CharSequence;)Ljava/util/regex/Matcher; java/util/regex/Matcher ~matches get&(Ljava/lang/Object;)Ljava/lang/Object; Killing PID : Pinfo  PkillPIDKilled ~hasNextDidn't find any matches for ' Q _(C)Ljava/lang/StringBuilder; PcmdarraypatternLjava/lang/StringBuffer; executableiIargcmdLjava/util/regex/Pattern;Ljava/util/Map; killedOneLjava/util/Iterator; commandLinemLjava/util/regex/Matcher; processID logMessageLjava/lang/StringBuilder; errorMessage/pidReading Windows Process List...  \findWMICprocesslistfull/format:rawxml.xsl(Done, searching for processes to kill...TempWmicBatchFile.bat   ~exists   ~delete (javax/xml/parsers/DocumentBuilderFactory  newInstance,()Ljavax/xml/parsers/DocumentBuilderFactory;  newDocumentBuilder%()Ljavax/xml/parsers/DocumentBuilder;java/io/ByteArrayInputStream o getBytes()[B  ([B)V !#"!javax/xml/parsers/DocumentBuilder $%parse-(Ljava/io/InputStream;)Lorg/w3c/dom/Document;'INSTANCE )+*org/w3c/dom/Document ,-getElementsByTagName*(Ljava/lang/String;)Lorg/w3c/dom/NodeList;/java/util/HashMap . 243org/w3c/dom/NodeList 56item(I)Lorg/w3c/dom/Node;8org/w3c/dom/Element:PROPERTY 7+=NAME 7? @A getAttribute&(Ljava/lang/String;)Ljava/lang/String;CVALUE 2E FG getLength()I 7I JK getFirstChild()Lorg/w3c/dom/Node;Morg/w3c/dom/Text LO P\getData R STput8(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;V ProcessIdX CommandLineoutputTempWmicBatchFiledocLorg/w3c/dom/Document;procListLorg/w3c/dom/NodeList; processesLorg/w3c/dom/Element;propList procPropsjpropertypropNamevalListvalue valueElement valueNodeLorg/w3c/dom/Text;LocalVariableTypeTable5Ljava/util/Map;5Ljava/util/Map;loadEnvironment()Ljava/util/Properties;qjava/util/Properties p Dt ugetenv w xentrySetzjava/util/Map$Entry y| }getKey y getValue pRentryLjava/util/Map$Entry;;Ljava/util/Map$Entry;getExactPathEnvKey  no pPATH o equalsIgnoreCase(Ljava/lang/String;)ZkeygetPath  AgetEnvVarIgnoreCasegetProgramFilesPath ProgramFiles  \getAbsolutePathC:\Program FilespfgetLocalAppDataPath`HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders\Local AppData  AreadStringRegistryValue USERPROFILE %USERPROFILE% o replaceD(Ljava/lang/CharSequence;Ljava/lang/CharSequence;)Ljava/lang/String;keyLocalAppDatalocalAppDataPath userProfile p A getPropertyvarfindSystemRoot()Ljava/io/File; SystemRoot p SYSTEMROOT systemrootjava/lang/RuntimeExceptionSystemRoot apparently not set! VSystemRoot doesn't exist: psystemRootPath systemRoot  findWBEMwmic.exe  #(Ljava/io/File;Ljava/lang/String;)V,Couldn't find wmic! Hope it's on the path... wmicExe   system32/wbemCouldn't find wbem!  Perror findTaskKillsystem32/taskkill.exe0Couldn't find taskkill! Hope it's on the path... taskkillExefindRegsystem32/reg.exec:\ntreskit\reg.exereg.exe "org/openqa/selenium/os/CommandLine AfindExecutable OS Version:  os.version DCouldn't find reg.exe! Please download it from Microsoft and install it in a standard location. See here for details: http://wiki.openqa.org/display/SRC/Windows+Registry+Support VregExeisRegExeVersion1 java/lang/Boolean ~ booleanValue  \/? version 1.0 o indexOf(Ljava/lang/String;)I  (Z)Vversion1discoverRegistryKeyType%(Ljava/lang/String;)Ljava/lang/Class;   doesRegistryValueExist/org/openqa/selenium/os/WindowsUtils$RegKeyValue V  A runRegQuery  ~ \s*(REG_\S+)  -(Ljava/lang/String;)Ljava/util/regex/Pattern;\Q   access$0E(Lorg/openqa/selenium/os/WindowsUtils$RegKeyValue;)Ljava/lang/String;"\E\s+(REG_\S+)\s+(.*) $ %~find'Output didn't look right: ) *+group(I)Ljava/lang/String;-REG_SZ o/ 01equals(Ljava/lang/Object;)Z3 REG_EXPAND_SZ5 REG_DWORD 798java/lang/Integer :;TYPELjava/lang/Class;=Unknown type: r1Lorg/openqa/selenium/os/WindowsUtils$RegKeyValue;pattypeC\s*(REG_\S+)\s+\QE \E\s+(.*) oG HIvalueOf&(Ljava/lang/Object;)Ljava/lang/String;K/ was not a REG_SZ or a REG_EXPAND_SZ (String): readIntRegistryValueN\E\s+(REG_\S+)\s+0x(.*)P was not a REG_DWORD (int): 7R SparseInt 7U SV(Ljava/lang/String;I)IstrValuereadBooleanRegistryValue Z L\ was not either 0 or 1: Q^ __(I)Ljava/lang/StringBuilder;ajava/util/ArrayList `dquery fhgjava/util/List i1add k l access$1n/v fp qGsize fs tutoArray(([Ljava/lang/Object;)[Ljava/lang/Object;jLjava/util/List;$Ljava/util/List;writeStringRegistryValue'(Ljava/lang/String;Ljava/lang/String;)V|updatei=/ddata  ((Ljava/lang/String;[Ljava/lang/String;)V  execute  \ getStdOut  ~ isSuccessfulexec return code  G getExitCode commandName$Lorg/openqa/selenium/os/CommandLine;writeIntRegistryValue(Ljava/lang/String;I)V 7 e+/twriteBooleanRegistryValue(Ljava/lang/String;Z)V  deleteRegistryValue /FORCE SourceFileWindowsUtils.java InnerClassesEntry RegKeyValue!      !o/Y%)-/13579& ,./01"2&3*4.*:/*;9*: <= >?@Ak1**CIKCQYSUW]a]cK*f9;< =,?0A: 1ij kl3*9 DE:  mPGnoYqSYsSY*SuW9 KL: y zPi{* L+ 9RSVWXZ:y   h?@A AYLY*2M+W+,W+W> +W*2:+W+W*+W+N:6:wo:c-:So: QYɷU:   ]W ˶]W ]W c вӹ6EQYطU:6 ڶ]W*2]W'W*߲c9(cdlm#n*o/u6v;wBxIoRzY{b|g}j~{~ !)3@:Aj9.,&; bgj xh XB 7  7 ' PBnoYSY*SuW9 :  @AMoYSYSYSYSuKYL++ W Y* M,&(N.Y0:6-17:9;:.Y0:6 g 17:  <>:  B;: :  D% 17:HL:N:   QW  DUo: Wo:   QW-D39~ *5@GLR`aktz!0<J:*#Y @ Za[\k]^t_w`a^bsc Sd` Ge ;f^ 8g h` ij! 0 kt_lbm)noO77pYr7svL +yK7*{*~W+ݲ79 /BK: /k / \6W7K*oL++*9')2:"   \/ W9 : \~2WK*Y*L++Y9 $: '   \%WKLM, +,+9"#:     A8W7L+oM,* 7,+9%-6": 8 &  gK*oL+*oL+*oL+YY+M,YQYU+]c,92 )*+,."/-112<4E5L6e8: cX E" \I//W1#YȷK**//͹ϳ//9. AB DEF"G)H0I4L?MEN: " |611KY*ӷʳ11չ19"WX Z[\%]0^2`: ( \@33KY*۷L++33ݹn339* ij lmn!o(p,r7s<t:2& \55KY*L++55YL++55555QYU]cY9B}~ !(,7>EIRX\z:wk ~< oYSuK*<Y9 /::Y /     Y* Y*L*M N!QYU+]!]cN-,:#YQY&U,]c(:,.2.o4.6YQY<U]c9B 'ELTmu:H >?Y $@Er@LkuBA  ApȻY*L*M$QYBU+]D]cN!QYU+]!]cN-,:#YQY&U,]c(:,.22.'YQY+FUJ]]c(:9> 5SZb{:R >?Y 2@Su@ZnEA g  LֻY*L*M$QYBU+]D]cN!QYU+]M]cN-,:#YQY&U,]c(:4.'YQY+FUO]]c(: Q6 T69B 5SZb{:f  >?Y 2@S@Z|SA W gg X>Y*L*Y=YQY+FU[]]c9 : > 5>?0g  j`YbL+ceW+*eW,Y*M+,jeW+meW+,eW++oorvuWMLeg92 #,7ALeg h :*j biw, >?hk bix yz@L`YbMC* ,{eW ,}eW,QY*FU~]+]ceWQ,}eWY*N,-jeW,meW,-eW,eW,+eW,qeW,,oorvuW9B",NXalv #$:*  iwa;>?k ixwxAY*+M,,N,(YQYU,]˶]-]c-9' (*+,?.:*A Aij 7.Y  `YbMr* 2,{eW,QY*FU~]]ceW,}eW,QY*FU~]]ceW,4eWh,}eWY*N,-jeW,meW,-eW,eW,4eW,eW,eW,qeW,,oorvuW9R23456D8N9p:}=>?@ABCDEFIJ:* iwR>?k ix F*9 M N:   P`YbL"+eW+*eW+eW?Y*M+eW+,jeW+meW+,eW+qeW++oorvuW96 QRST U-W6X@YKZU[`\i_`:  {iw63>?k {ix Ae`YbL+ceW+*eW,Y*M+,jeW+meW+,eW++oorvu9& fghi#k,l7mAnLq: e ]iw, >?k ]ix }~$-9:y  PK lC>kĹ'org/openqa/selenium/os/.svn/all-wcpropsK 25 svn:wc:ra_dav:version-url V 64 /svn/!svn/ver/11226/trunk/java/client/src/org/openqa/selenium/os END ProcessUtils.java K 25 svn:wc:ra_dav:version-url V 82 /svn/!svn/ver/11226/trunk/java/client/src/org/openqa/selenium/os/ProcessUtils.java END WindowsRegistryException.java K 25 svn:wc:ra_dav:version-url V 94 /svn/!svn/ver/11226/trunk/java/client/src/org/openqa/selenium/os/WindowsRegistryException.java END UnixUtils.java K 25 svn:wc:ra_dav:version-url V 79 /svn/!svn/ver/11226/trunk/java/client/src/org/openqa/selenium/os/UnixUtils.java END CommandLine.java K 25 svn:wc:ra_dav:version-url V 81 /svn/!svn/ver/11226/trunk/java/client/src/org/openqa/selenium/os/CommandLine.java END WindowsUtils.java K 25 svn:wc:ra_dav:version-url V 82 /svn/!svn/ver/11226/trunk/java/client/src/org/openqa/selenium/os/WindowsUtils.java END build.desc K 25 svn:wc:ra_dav:version-url V 75 /svn/!svn/ver/11226/trunk/java/client/src/org/openqa/selenium/os/build.desc END PK lC>uee#org/openqa/selenium/os/.svn/entries8 dir 11264 http://selenium.googlecode.com/svn/trunk/java/client/src/org/openqa/selenium/os http://selenium.googlecode.com/svn 2011-02-01T13:59:17.176547Z 11226 simon.m.stewart svn:special svn:externals svn:needs-lock 07704840-8298-11de-bf8c-fd130f914ac9 ProcessUtils.java file 2011-02-03T12:01:16.000000Z 93b96b48b42369f40023eacfa4f8030a 2011-01-17T22:05:25.849355Z 10990 simon.m.stewart has-props WindowsRegistryException.java file 2011-02-03T12:01:16.000000Z 6cf728b26883cd4a3e4cc69483f0f7d6 2011-01-17T22:42:31.309983Z 10994 simon.m.stewart UnixUtils.java file 2011-02-03T12:01:16.000000Z b3fe8b8b8e2c3d89645f08bd0ec554cc 2011-01-17T22:42:31.309983Z 10994 simon.m.stewart CommandLine.java file 2011-02-03T12:01:16.000000Z 14bba7e8ed0f438ef7565471b80bd80f 2011-01-17T22:36:50.673692Z 10993 simon.m.stewart WindowsUtils.java file 2011-02-03T12:01:16.000000Z 6c1856c6c8542348fa486caffe81c268 2011-01-17T22:42:31.309983Z 10994 simon.m.stewart build.desc file 2011-02-03T12:01:16.000000Z 6361d789a41cdbf9cb4b5a1f9c8f0530 2011-02-01T13:59:17.176547Z 11226 simon.m.stewart PK lC>G"org/openqa/selenium/os/.svn/format8 PK lC>#3BB@org/openqa/selenium/os/.svn/prop-base/ProcessUtils.java.svn-baseK 13 svn:mergeinfo V 292 /selenium-core/trunk/common/src/java/org/openqa/selenium/internal/ProcessUtils.java:7680-7758 /webdriver/branches/wire2/common/src/java/org/openqa/selenium/internal/ProcessUtils.java:7892-8059 /webdriver/trunk/common/src/java/org/openqa/selenium/internal/ProcessUtils.java:7685-7747,7749-7804 END PK lC>%%?org/openqa/selenium/os/.svn/text-base/CommandLine.java.svn-base/* Copyright 2010 WebDriver committers Copyright 2010 Google Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package org.openqa.selenium.os; import java.io.BufferedInputStream; import java.io.ByteArrayOutputStream; import java.io.File; import java.io.IOException; import java.io.InputStream; import java.io.OutputStream; import java.lang.reflect.InvocationTargetException; import java.lang.reflect.Method; import java.util.HashMap; import java.util.Map; import java.util.concurrent.ConcurrentHashMap; import org.openqa.selenium.Platform; import org.openqa.selenium.WebDriverException; import static org.openqa.selenium.Platform.WINDOWS; public class CommandLine { private static final Method JDK6_CAN_EXECUTE = findJdk6CanExecuteMethod(); private final String[] commandAndArgs; private volatile StreamDrainer drainer; private volatile OutputStream drainTo; private volatile Thread drainerThread; private volatile int exitCode; private volatile boolean executed; private volatile Process proc; private volatile String allInput; private Map env = new ConcurrentHashMap(); private Thread cleanup; public CommandLine(String executable, String... args) { commandAndArgs = new String[args.length + 1]; commandAndArgs[0] = findExecutable(executable); int index = 1; for (String arg : args) { commandAndArgs[index++] = arg; } } public CommandLine(String[] cmdarray) { this.commandAndArgs = cmdarray; } Map getEnvironment() { return new HashMap(env); } /** * Adds the specified environment variables. * @param environment the variables to add * * @throws IllegalArgumentException if any value given is null (unsupported) */ public void setEnvironmentVariables(Map environment) { for (Map.Entry entry : environment.entrySet()) { setEnvironmentVariable(entry.getKey(), entry.getValue()); } } /** * Adds the specified environment variable. * * @param name the name of the environment variable * @param value the value of the environment variable * @throws IllegalArgumentException if the value given is null (unsupported) */ public void setEnvironmentVariable(String name, String value) { if (name == null) { throw new IllegalArgumentException("Cannot have a null environment variable name!"); } if (value == null) { throw new IllegalArgumentException("Cannot have a null value for environment variable " + name); } env.put(name, value); } public void setDynamicLibraryPath(String newLibraryPath) { // because on Windows, it is null according to SingleBrowserLocator.computeLibraryPath() if (newLibraryPath != null) { setEnvironmentVariable(getLibraryPathPropertyName(), newLibraryPath); } } /** * @return The platform specific env property name which contains the library path. */ public static String getLibraryPathPropertyName() { switch (Platform.getCurrent()) { case MAC: return "DYLD_LIBRARY_PATH"; case WINDOWS: case VISTA: case XP: return "PATH"; default: return "LD_LIBRARY_PATH"; } } public static String findExecutable(String named) { File file = new File(named); if (canExecute(file)) { return named; } Map env = System.getenv(); String pathName = "PATH"; if (!env.containsKey("PATH")) { for (String key : env.keySet()) { if ("path".equalsIgnoreCase(key)) { pathName = key; break; } } } String path = env.get(pathName); String[] endings = new String[] {""}; if (Platform.getCurrent().is(WINDOWS)) { endings = new String[] { "", ".exe", ".com", ".bat"}; } for (String segment : path.split(File.pathSeparator)) { for (String ending : endings) { file = new File(segment, named + ending); if (canExecute(file)) { return file.getAbsolutePath(); } } } return null; } public void execute() { createProcess(); setupDrainer(); waitFor(); } public Process executeAsync() { createProcess(); new Thread() { @Override public void run() { setupDrainer(); waitFor(); } }.start(); cleanup = new Thread() { @Override public void run() { if (proc != null) { try { proc.exitValue(); } catch (IllegalThreadStateException e) { proc.destroy(); } } } }; Runtime.getRuntime().addShutdownHook(cleanup); return proc; } private void waitFor() { try { proc.waitFor(); if(drainerThread != null) { drainerThread.join(); } exitCode = proc.exitValue(); postRunCleanup(); } catch (InterruptedException e) { throw new WebDriverException(e); } } private void setupDrainer() { try { drainer = new StreamDrainer(proc, drainTo); drainerThread = new Thread(drainer, "Command line drainer: " + commandAndArgs[0]); drainerThread.start(); if (allInput != null) { byte[] bytes = allInput.getBytes(); proc.getOutputStream().write(bytes); proc.getOutputStream().close(); } } catch (IOException e) { throw new WebDriverException(e); } } private void createProcess() { try { ProcessBuilder builder = new ProcessBuilder(commandAndArgs); builder.redirectErrorStream(true); builder.environment().putAll(env); proc = builder.start(); executed = true; } catch (IOException e) { throw new WebDriverException(e); } } public boolean isSuccessful() { return 0 == getExitCode(); } public int getExitCode() { if (!executed) { throw new IllegalStateException( "Cannot get exit code before executing command line: " + commandAndArgs[0]); } return exitCode; } public String getStdOut() { if (!executed) { throw new IllegalStateException( "Cannot get output before executing command line: " + commandAndArgs[0]); } return drainer.getStdOut(); } public void destroy() { if (!executed) { throw new IllegalStateException("Cannot quit a process that's not running: " + commandAndArgs[0]); } proc.destroy(); postRunCleanup(); } private void postRunCleanup() { proc = null; if (cleanup != null) { try { Runtime.getRuntime().removeShutdownHook(cleanup); } catch (IllegalStateException e) { // VM is shutting down } cleanup = null; } } private static boolean canExecute(File file) { if (JDK6_CAN_EXECUTE != null) { try { return (Boolean) JDK6_CAN_EXECUTE.invoke(file); } catch (IllegalAccessException e) { // Do nothing } catch (InvocationTargetException e) { // Still do nothing } } return true; } private static Method findJdk6CanExecuteMethod() { try { return File.class.getMethod("setWritable", Boolean.class); } catch (NoSuchMethodException e) { return null; } } public void setInput(String allInput) { this.allInput = allInput; } public String toString() { StringBuilder buf = new StringBuilder(); for (String s : commandAndArgs) { buf.append(s).append(' '); } return buf.toString(); } public void copyOutputTo(OutputStream out) { drainTo = out; } private static class StreamDrainer implements Runnable { private final Process toWatch; private final ByteArrayOutputStream inputOut; private final OutputStream drainTo; StreamDrainer(Process toWatch, OutputStream drainTo) { this.toWatch = toWatch; this.drainTo = drainTo; this.inputOut = new ByteArrayOutputStream(); } public void run() { InputStream inputStream = new BufferedInputStream(toWatch.getInputStream()); byte[] buffer = new byte[2048]; try { int read; while ((read = inputStream.read(buffer)) > 0) { inputOut.write(buffer, 0, read); inputOut.flush(); if (drainTo != null) { drainTo.write(buffer, 0, read); drainTo.flush(); } } } catch (IOException e) { // it's possible that the stream has been closed. That's okay. // Swallow the exception } finally { try { inputOut.close(); } catch (IOException e) { // Nothing sane to do } } } public String getStdOut() { return new String(inputOut.toByteArray()); } } } PK lC>!@org/openqa/selenium/os/.svn/text-base/ProcessUtils.java.svn-basepackage org.openqa.selenium.os; import org.openqa.selenium.Platform; import org.openqa.selenium.io.IOUtils; import java.io.IOException; import java.lang.reflect.Field; public class ProcessUtils { /** * Waits the specified timeout for the process to die * * @param p The process to kill. * @param timeout How long to wait in milliseconds. * @return The exit code of the given process. */ public static int waitForProcessDeath(Process p, long timeout) { ProcessWaiter pw = new ProcessWaiter(p); Thread waiter = new Thread(pw); waiter.start(); try { waiter.join(timeout); } catch (InterruptedException e) { throw new RuntimeException("Bug? Main interrupted while waiting for process", e); } if (waiter.isAlive()) { waiter.interrupt(); } try { waiter.join(); } catch (InterruptedException e) { throw new RuntimeException("Bug? Main interrupted while waiting for dead process waiter", e); } InterruptedException ie = pw.getException(); if (ie != null) { throw new ProcessStillAliveException("Timeout waiting for process to die", ie); } return p.exitValue(); } /** * Forcibly kills a process, using OS tools like "kill" as a last resort * * @param process The process to kill. * @return The exit value of the process. */ public static int killProcess(Process process) { int exitValue; // first, wait a second to see if the process will die on it's own (we will likely have asked // the process to kill itself just before calling this method try { exitValue = waitForProcessDeath(process, 1000); if (exitValue == 0) { return exitValue; } } catch (Exception e) { // no? ok, no biggie, now let's force kill it... } process.destroy(); try { exitValue = waitForProcessDeath(process, 10000); } catch (ProcessStillAliveException ex) { if (Platform.getCurrent().is(Platform.WINDOWS)) { throw ex; } try { System.out.println("Process didn't die after 10 seconds"); kill9(process); exitValue = waitForProcessDeath(process, 10000); } catch (Exception e) { System.out.println("Process refused to die after 10 seconds, and couldn't kill9 it"); e.printStackTrace(); throw new RuntimeException( "Process refused to die after 10 seconds, and couldn't kill9 it: " + e.getMessage(), ex); } } return exitValue; } /** * @param p The process to gather the PID of. * @return The process's PID */ public static int getProcessId(Process p) { if (Platform.getCurrent().is(Platform.WINDOWS)) { throw new IllegalStateException("UnixUtils may not be used on Windows"); } try { Field f = p.getClass().getDeclaredField("pid"); f.setAccessible(true); Integer pid = (Integer) f.get(p); return pid; } catch (Exception e) { throw new RuntimeException("Couldn't detect pid", e); } } /** * Runs "kill -9" on the specified pid * * @param pid The PID of the process to kill. * @throws IOException If unable to kill the process. * @throws InterruptedException If unable to kill the process. */ public static void kill9(Integer pid) throws IOException, InterruptedException { ProcessBuilder pb = new ProcessBuilder("kill", "-9", pid.toString()); pb.redirectErrorStream(); Process p = pb.start(); int code = p.waitFor(); if (code != 0) { String output = IOUtils.readFully(p.getInputStream()); throw new RuntimeException("kill return code " + code + ": " + output); } } /** * Runs "kill -9" on the specified process * * @param p The process to kill. * @throws IOException If unable to kill the process. * @throws InterruptedException If unable to kill the process. */ public static void kill9(Process p) throws IOException, InterruptedException { kill9(getProcessId(p)); } private static class ProcessWaiter implements Runnable { private volatile InterruptedException t; private final Process p; public InterruptedException getException() { return t; } public ProcessWaiter(Process p) { this.p = p; } public void run() { try { p.waitFor(); } catch (InterruptedException e) { this.t = e; } } } public static class ProcessStillAliveException extends RuntimeException { public ProcessStillAliveException(String message, Throwable cause) { super(message, cause); } } } PK lC>ER``=org/openqa/selenium/os/.svn/text-base/UnixUtils.java.svn-base/* * Created on Oct 13, 2006 * */ package org.openqa.selenium.os; import java.lang.reflect.Field; import org.openqa.selenium.Platform; import org.openqa.selenium.internal.NullTrace; import org.openqa.selenium.internal.Trace; import static org.openqa.selenium.Platform.WINDOWS; /** Handy utilities for managing Unix/Linux processes */ public class UnixUtils { static Trace log = new NullTrace(); /** retrieves the pid */ public static int getProcessId(Process p) { if (Platform.getCurrent().is(WINDOWS)) { throw new IllegalStateException("UnixUtils may not be used on Windows"); } try { Field f = p.getClass().getDeclaredField("pid"); f.setAccessible(true); Integer pid = (Integer) f.get(p); return pid; } catch (Exception e) { throw new RuntimeException("Couldn't detect pid", e); } } /** runs "kill -9" on the specified pid */ public static void kill9(Integer pid) { log.debug("kill -9 " + pid); CommandLine command = new CommandLine("kill", "-9", pid.toString()); command.execute(); String result = command.getStdOut(); int output = command.getExitCode(); log.debug(String.valueOf(output)); if (!command.isSuccessful()) { throw new RuntimeException("exec return code " + result + ": " + output); } } /** runs "kill -9" on the specified process */ public static void kill9(Process p) { kill9(getProcessId(p)); } } PK lC>nllLorg/openqa/selenium/os/.svn/text-base/WindowsRegistryException.java.svn-basepackage org.openqa.selenium.os; import org.openqa.selenium.WebDriverException; import org.openqa.selenium.os.WindowsUtils; @SuppressWarnings("serial") public class WindowsRegistryException extends WebDriverException { WindowsRegistryException(Exception e) { super(generateMessage(), e); } private static String generateMessage() { return "Problem while managing the registry, OS Version '" + System.getProperty("os.version") + "', regVersion1 = " + WindowsUtils.regVersion1; } WindowsRegistryException(String message) { this(new RuntimeException(message)); } } PK lC>9mQmQ@org/openqa/selenium/os/.svn/text-base/WindowsUtils.java.svn-base/* * Copyright 2006 ThoughtWorks, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package org.openqa.selenium.os; import javax.xml.parsers.DocumentBuilderFactory; import java.io.ByteArrayInputStream; import java.io.File; import java.io.IOException; import java.util.ArrayList; import java.util.HashMap; import java.util.Iterator; import java.util.List; import java.util.Map; import java.util.Properties; import java.util.regex.Matcher; import java.util.regex.Pattern; import org.openqa.selenium.Platform; import org.openqa.selenium.internal.NullTrace; import org.openqa.selenium.internal.Trace; import org.w3c.dom.Document; import org.w3c.dom.Element; import org.w3c.dom.NodeList; import org.w3c.dom.Text; import static org.openqa.selenium.Platform.WINDOWS; public class WindowsUtils { public static Boolean regVersion1 = null; private static Trace log = new NullTrace(); private static final boolean THIS_IS_WINDOWS = Platform.getCurrent().is(WINDOWS); private static String wmic = null; private static File wbem = null; private static String taskkill = null; private static String reg = null; private static Properties env = null; /** * @param args * @throws IOException */ public static void main(String[] args) throws Exception { if (args.length == 0) { System.out.println("Kills Windows processes by matching their command lines"); System.out.println("usage: " + WindowsUtils.class.getName() + " command arg1 arg2 ..."); } kill(args); } public static void traceWith(Trace log) { WindowsUtils.log = log; } /** * Kill processes by name */ public static void killByName(String name) { executeCommand("taskkill", "/f", "/im", name); } /** * Kill processes by name, log and ignore errors */ public static void tryToKillByName(String name) { if (!thisIsWindows()) { return; } try { killByName(name); } catch (WindowsRegistryException e) { log.warn(e); } } /** * Searches the process list for a process with the specified command line and kills it * * @param cmdarray the array of command line arguments * @throws Exception if something goes wrong while reading the process list or searching for your command line */ public static void kill(String[] cmdarray) throws Exception { StringBuffer pattern = new StringBuffer(); File executable = new File(cmdarray[0]); /* For the first argument, the executable, Windows may modify * the start path in any number of ways. Ignore a starting quote * if any (\"?), non-greedily look for anything up until the last * backslash (.*?\\\\), then look for the executable's filename, * then finally ignore a final quote (\"?) */ // TODO We should be careful, in case Windows has ~1-ified the executable name as well pattern.append("\"?.*?\\\\"); pattern.append(executable.getName()); pattern.append("\"?"); for (int i = 1; i < cmdarray.length; i++) { /* There may be a space, but maybe not (\\s?), may be a quote or maybe not (\"?), * but then turn on block quotation (as if *everything* had a regex backslash in front of it) * with \Q. Then look for the next argument (which may have ?s, \s, "s, who knows), * turning off block quotation. Now ignore a final quote if any (\"?) */ pattern.append("\\s?\"?\\Q"); String arg = cmdarray[i]; pattern.append(arg); pattern.append("\\E\"?"); } pattern.append("\\s*"); Pattern cmd = Pattern.compile(pattern.toString(), Pattern.CASE_INSENSITIVE); Map procMap = procMap(); boolean killedOne = false; for (Iterator i = procMap.keySet().iterator(); i.hasNext();) { String commandLine = (String) i.next(); if (commandLine == null) { continue; } Matcher m = cmd.matcher(commandLine); if (m.matches()) { String processID = (String) procMap.get(commandLine); StringBuilder logMessage = new StringBuilder("Killing PID "); logMessage.append(processID); logMessage.append(": "); logMessage.append(commandLine); log.info(logMessage.toString()); killPID(processID); log.info("Killed"); killedOne = true; } } if (!killedOne) { StringBuilder errorMessage = new StringBuilder("Didn't find any matches for"); for (int i = 0; i < cmdarray.length; i++) { errorMessage.append(" '"); errorMessage.append(cmdarray[i]); errorMessage.append('\''); } log.warn(errorMessage.toString()); } } /** * Kills the specified process ID */ private static void killPID(String processID) { executeCommand("taskkill", "/pid", processID); } /** * Returns a map of process IDs to command lines * * @return a map of process IDs to command lines * @throws Exception - if something goes wrong while reading the process list */ public static Map procMap() throws Exception { log.info("Reading Windows Process List..."); String output = executeCommand(findWMIC(), "process", "list", "full", "/format:rawxml.xsl"); // exec.setFailonerror(true); log.info("Done, searching for processes to kill..."); // WMIC drops an ugly zero-length batch file; clean that up File TempWmicBatchFile = new File("TempWmicBatchFile.bat"); if (TempWmicBatchFile.exists()) { TempWmicBatchFile.delete(); } // TODO This would be faster if it used SAX instead of DOM Document doc = DocumentBuilderFactory.newInstance().newDocumentBuilder() .parse(new ByteArrayInputStream(output.getBytes())); NodeList procList = doc.getElementsByTagName("INSTANCE"); Map processes = new HashMap(); for (int i = 0; i < procList.getLength(); i++) { Element process = (Element) procList.item(i); NodeList propList = process.getElementsByTagName("PROPERTY"); Map procProps = new HashMap(); for (int j = 0; j < propList.getLength(); j++) { Element property = (Element) propList.item(j); String propName = property.getAttribute("NAME"); NodeList valList = property.getElementsByTagName("VALUE"); String value = null; if (valList.getLength() != 0) { Element valueElement = (Element) valList.item(0); Text valueNode = (Text) valueElement.getFirstChild(); value = valueNode.getData(); } procProps.put(propName, value); } String processID = (String) procProps.get("ProcessId"); String commandLine = (String) procProps.get("CommandLine"); processes.put(commandLine, processID); } return processes; } /** * Returns the current process environment variables * * @return the current process environment variables */ public static synchronized Properties loadEnvironment() { if (env != null) { return env; } env = new Properties(); for (Map.Entry entry : System.getenv().entrySet()) { env.put(entry.getKey(), entry.getValue()); } return env; } /** * Retrieve the exact case-sensitive name of the "Path" environment variable, * which may be any one of "PATH", "Path" or "path". * * @return the exact case-sensitive name of the "Path" environment variable */ public static String getExactPathEnvKey() { loadEnvironment(); for (Iterator i = env.keySet().iterator(); i.hasNext();) { String key = (String) i.next(); if (key.equalsIgnoreCase("PATH")) { return key; } } // They don't have a path??? return "PATH"; } public static String getPath() { loadEnvironment(); return getEnvVarIgnoreCase("PATH"); } /** * Returns the path to the Windows Program Files. On non-English versions, * this is not necessarily "C:\Program Files". * * @return the path to the Windows Program Files */ public static String getProgramFilesPath() { loadEnvironment(); String pf = getEnvVarIgnoreCase("ProgramFiles"); if (pf != null) { File ProgramFiles = new File(pf); if (ProgramFiles.exists()) { return ProgramFiles.getAbsolutePath(); } } return new File("C:\\Program Files").getAbsolutePath(); } /** * Returns the path to Local AppData. For different users, this will be * different. * * @return the path to Local AppData */ public static String getLocalAppDataPath() { loadEnvironment(); final String keyLocalAppData = "HKEY_CURRENT_USER\\Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Shell Folders\\Local AppData"; String localAppDataPath = readStringRegistryValue(keyLocalAppData); String userProfile = getEnvVarIgnoreCase("USERPROFILE"); if (userProfile != null) { return localAppDataPath.replace("%USERPROFILE%", userProfile); } return localAppDataPath; } public static String getEnvVarIgnoreCase(String var) { loadEnvironment(); for (Iterator i = env.keySet().iterator(); i.hasNext();) { String key = (String) i.next(); if (key.equalsIgnoreCase(var)) { return env.getProperty(key); } } return null; } /** * Finds the system root directory, e.g. "c:\windows" or "c:\winnt" */ public static File findSystemRoot() { Properties p = loadEnvironment(); String systemRootPath = (String) p.get("SystemRoot"); if (systemRootPath == null) { systemRootPath = (String) p.get("SYSTEMROOT"); } if (systemRootPath == null) { systemRootPath = (String) p.get("systemroot"); } if (systemRootPath == null) { throw new RuntimeException("SystemRoot apparently not set!"); } File systemRoot = new File(systemRootPath); if (!systemRoot.exists()) { throw new RuntimeException("SystemRoot doesn't exist: " + systemRootPath); } return systemRoot; } /** * Finds WMIC.exe * * @return the exact path to wmic.exe, or just the string "wmic" if it couldn't be found (in which case you can pass that to exec to try to run it from the path) */ public static String findWMIC() { if (wmic != null) { return wmic; } findWBEM(); if (null != wbem) { File wmicExe = new File(findWBEM(), "wmic.exe"); if (wmicExe.exists()) { wmic = wmicExe.getAbsolutePath(); return wmic; } } log.warn("Couldn't find wmic! Hope it's on the path..."); wmic = "wmic"; return wmic; } /** * Finds the WBEM directory in the systemRoot directory * * @return the WBEM directory, or null if it couldn't be found */ public static File findWBEM() { if (wbem != null) { return wbem; } File systemRoot = findSystemRoot(); wbem = new File(systemRoot, "system32/wbem"); if (!wbem.exists()) { log.error("Couldn't find wbem!"); return null; } return wbem; } /** * Finds taskkill.exe * * @return the exact path to taskkill.exe, or just the string "taskkill" if it couldn't be found (in which case you can pass that to exec to try to run it from the path) */ public static String findTaskKill() { if (taskkill != null) { return taskkill; } File systemRoot = findSystemRoot(); File taskkillExe = new File(systemRoot, "system32/taskkill.exe"); if (taskkillExe.exists()) { taskkill = taskkillExe.getAbsolutePath(); return taskkill; } log.warn("Couldn't find taskkill! Hope it's on the path..."); taskkill = "taskkill"; return taskkill; } /** * Finds reg.exe * * @return the exact path to reg.exe, or just the string "reg" if it couldn't be found (in which case you can pass that to exec to try to run it from the path) */ public static String findReg() { if (reg != null) { return reg; } File systemRoot = findSystemRoot(); File regExe = new File(systemRoot, "system32/reg.exe"); if (regExe.exists()) { reg = regExe.getAbsolutePath(); return reg; } regExe = new File("c:\\ntreskit\\reg.exe"); if (regExe.exists()) { reg = regExe.getAbsolutePath(); return reg; } reg = CommandLine.findExecutable("reg.exe"); if (reg != null) { return reg; } log.error("OS Version: " + System.getProperty("os.version")); throw new WindowsRegistryException("Couldn't find reg.exe!\n" + "Please download it from Microsoft and install it in a standard location.\n" + "See here for details: http://wiki.openqa.org/display/SRC/Windows+Registry+Support"); } public static boolean isRegExeVersion1() { if (regVersion1 != null) { return regVersion1.booleanValue(); } String output = executeCommand(findReg(), "/?"); boolean version1 = output.indexOf("version 1.0") != -1; regVersion1 = new Boolean(version1); return version1; } public static Class discoverRegistryKeyType(String key) { if (!doesRegistryValueExist(key)) { return null; } RegKeyValue r = new RegKeyValue(key); String output = runRegQuery(key); Pattern pat; if (isRegExeVersion1()) { pat = Pattern.compile("\\s*(REG_\\S+)"); } else { pat = Pattern.compile("\\Q" + r.value + "\\E\\s+(REG_\\S+)\\s+(.*)"); } Matcher m = pat.matcher(output); if (!m.find()) { throw new WindowsRegistryException("Output didn't look right: " + output); } String type = m.group(1); if ("REG_SZ".equals(type) || "REG_EXPAND_SZ".equals(type)) { return String.class; } else if ("REG_DWORD".equals(type)) { return int.class; } else { throw new WindowsRegistryException("Unknown type: " + type); } } public static String readStringRegistryValue(String key) { RegKeyValue r = new RegKeyValue(key); String output = runRegQuery(key); Pattern pat; if (isRegExeVersion1()) { pat = Pattern.compile("\\s*(REG_\\S+)\\s+\\Q" + r.value + "\\E\\s+(.*)"); } else { pat = Pattern.compile("\\Q" + r.value + "\\E\\s+(REG_\\S+)\\s+(.*)"); } Matcher m = pat.matcher(output); if (!m.find()) { throw new WindowsRegistryException("Output didn't look right: " + output); } String type = m.group(1); if (!"REG_SZ".equals(type) && !"REG_EXPAND_SZ".equals(type)) { throw new WindowsRegistryException( r.value + " was not a REG_SZ or a REG_EXPAND_SZ (String): " + type); } String value = m.group(2); return value; } public static int readIntRegistryValue(String key) { RegKeyValue r = new RegKeyValue(key); String output = runRegQuery(key); Pattern pat; if (isRegExeVersion1()) { pat = Pattern.compile("\\s*(REG_\\S+)\\s+\\Q" + r.value + "\\E\\s+(.*)"); } else { pat = Pattern.compile("\\Q" + r.value + "\\E\\s+(REG_\\S+)\\s+0x(.*)"); } Matcher m = pat.matcher(output); if (!m.find()) { throw new WindowsRegistryException("Output didn't look right: " + output); } String type = m.group(1); if (!"REG_DWORD".equals(type)) { throw new WindowsRegistryException(r.value + " was not a REG_DWORD (int): " + type); } String strValue = m.group(2); int value; if (isRegExeVersion1()) { value = Integer.parseInt(strValue); } else { value = Integer.parseInt(strValue, 16); } return value; } public static boolean readBooleanRegistryValue(String key) { RegKeyValue r = new RegKeyValue(key); int value = readIntRegistryValue(key); if (0 == value) { return false; } if (1 == value) { return true; } throw new WindowsRegistryException(r.value + " was not either 0 or 1: " + value); } public static boolean doesRegistryValueExist(String key) { List args = new ArrayList(); args.add("query"); if (isRegExeVersion1()) { args.add(key); } else { RegKeyValue r = new RegKeyValue(key); args.add(r.key); args.add("/v"); args.add(r.value); } try { executeCommand(findReg(), args.toArray(new String[args.size()])); return true; } catch (WindowsRegistryException e) { return false; } } public static void writeStringRegistryValue(String key, String data) throws WindowsRegistryException { List args = new ArrayList(); if (isRegExeVersion1()) { if (doesRegistryValueExist(key)) { args.add("update"); } else { args.add("add"); } args.add(key + "=" + data); } else { args.add("add"); RegKeyValue r = new RegKeyValue(key); args.add(r.key); args.add("/v"); args.add(r.value); args.add("/d"); args.add(data); args.add("/f"); } executeCommand(findReg(), args.toArray(new String[args.size()])); } private static String executeCommand(String commandName, String... args) { CommandLine cmd = new CommandLine(commandName, args); cmd.execute(); String output = cmd.getStdOut(); if (!cmd.isSuccessful()) { throw new WindowsRegistryException("exec return code " + cmd.getExitCode() + ": " + output); } return output; } public static void writeIntRegistryValue(String key, int data) { List args = new ArrayList(); if (isRegExeVersion1()) { if (doesRegistryValueExist(key)) { args.add("update"); args.add(key + "=" + Integer.toString(data)); } else { args.add("add"); args.add(key + "=" + Integer.toString(data)); args.add("REG_DWORD"); } } else { args.add("add"); RegKeyValue r = new RegKeyValue(key); args.add(r.key); args.add("/v"); args.add(r.value); args.add("/t"); args.add("REG_DWORD"); args.add("/d"); args.add(Integer.toString(data)); args.add("/f"); } executeCommand(findReg(), args.toArray(new String[args.size()])); } public static void writeBooleanRegistryValue(String key, boolean data) { writeIntRegistryValue(key, data ? 1 : 0); } public static void deleteRegistryValue(String key) { List args = new ArrayList(); if (isRegExeVersion1()) { args.add("delete"); args.add(key); args.add("/FORCE"); } else { RegKeyValue r = new RegKeyValue(key); args.add("delete"); args.add(r.key); args.add("/v"); args.add(r.value); args.add("/f"); } executeCommand(findReg(), args.toArray(new String[args.size()])); } /** * Executes reg.exe to query the registry */ private static String runRegQuery(String key) { List args = new ArrayList(); args.add("query"); if (isRegExeVersion1()) { args.add(key); } else { RegKeyValue r = new RegKeyValue(key); args.add(r.key); args.add("/v"); args.add(r.value); } return executeCommand(findReg(), args.toArray(new String[args.size()])); } private static class RegKeyValue { private String key; private String value; public RegKeyValue(String path) { int i = path.lastIndexOf('\\'); key = path.substring(0, i); value = path.substring(i + 1); } } /** * Returns true if the current OS is MS Windows; false otherwise * * @return true if the current OS is MS Windows; false otherwise */ public static boolean thisIsWindows() { return THIS_IS_WINDOWS; } } PK lC>9org/openqa/selenium/os/.svn/text-base/build.desc.svn-base java_library(name = "os", srcs = [ "*.java" ], deps = [ "//java/client/src/org/openqa/selenium:base", "//java/client/src/org/openqa/selenium/internal:logging", "//java/client/src/org/openqa/selenium/io", ]) PK (hC>!org/openqa/selenium/os/build.desc java_library(name = "os", srcs = [ "*.java" ], deps = [ "//java/client/src/org/openqa/selenium:base", "//java/client/src/org/openqa/selenium/internal:logging", "//java/client/src/org/openqa/selenium/io", ]) PK %^D>pU&oo6org/openqa/selenium/remote/html5/AddWebStorage$1.class1(0org/openqa/selenium/remote/html5/AddWebStorage$1java/lang/Object2org/openqa/selenium/remote/InterfaceImplementationthis$00Lorg/openqa/selenium/remote/html5/AddWebStorage;3(Lorg/openqa/selenium/remote/html5/AddWebStorage;)VCode    ()VLineNumberTableLocalVariableTablethis2Lorg/openqa/selenium/remote/html5/AddWebStorage$1;invoke}(Lorg/openqa/selenium/remote/ExecuteMethod;Ljava/lang/Object;Ljava/lang/reflect/Method;[Ljava/lang/Object;)Ljava/lang/Object; executeMethod*Lorg/openqa/selenium/remote/ExecuteMethod;selfLjava/lang/Object;methodLjava/lang/reflect/Method;args[Ljava/lang/Object; SourceFileAddWebStorage.javaEnclosingMethod#.org/openqa/selenium/remote/html5/AddWebStorage %&getImplementationH(Ljava/lang/Object;)Lorg/openqa/selenium/remote/InterfaceImplementation; InnerClasses   8 *+ * "   T&4 !"$' PK %^D>xR4org/openqa/selenium/remote/html5/AddWebStorage.class1".org/openqa/selenium/remote/html5/AddWebStoragejava/lang/Object,org/openqa/selenium/remote/AugmenterProvider()VCode  LineNumberTableLocalVariableTablethis0Lorg/openqa/selenium/remote/html5/AddWebStorage;getDescribedInterface()Ljava/lang/Class; Signature()Ljava/lang/Class<*>;$org/openqa/selenium/html5/WebStoragegetImplementationH(Ljava/lang/Object;)Lorg/openqa/selenium/remote/InterfaceImplementation;0org/openqa/selenium/remote/html5/AddWebStorage$1  3(Lorg/openqa/selenium/remote/html5/AddWebStorage;)VvalueLjava/lang/Object; SourceFileAddWebStorage.java InnerClasses! /*    -   = Y* "    ! PK %^D>0Ii- - <org/openqa/selenium/remote/html5/AddApplicationCache$1.class16org/openqa/selenium/remote/html5/AddApplicationCache$1java/lang/Object2org/openqa/selenium/remote/InterfaceImplementationthis$06Lorg/openqa/selenium/remote/html5/AddApplicationCache;9(Lorg/openqa/selenium/remote/html5/AddApplicationCache;)VCode    ()VLineNumberTableLocalVariableTablethis8Lorg/openqa/selenium/remote/html5/AddApplicationCache$1;invoke}(Lorg/openqa/selenium/remote/ExecuteMethod;Ljava/lang/Object;Ljava/lang/reflect/Method;[Ljava/lang/Object;)Ljava/lang/Object; getAppCache java/lang/reflect/Method getName()Ljava/lang/String; "!java/lang/String #$equals(Ljava/lang/Object;)Z &('(org/openqa/selenium/remote/ExecuteMethod )*execute5(Ljava/lang/String;Ljava/util/Map;)Ljava/lang/Object;,java/util/List .0/com/google/common/collect/Lists 12 newArrayList()Ljava/util/ArrayList; +4 56iterator()Ljava/util/Iterator; 8:9java/util/Iterator ;<next()Ljava/lang/Object;> java/util/Map@'org/openqa/selenium/html5/AppCacheEntryBtype =D EFget&(Ljava/lang/Object;)Ljava/lang/Object; HJI&org/openqa/selenium/html5/AppCacheType KLvalueOf<(Ljava/lang/String;)Lorg/openqa/selenium/html5/AppCacheType;NurlPmimeType ?R SO(Lorg/openqa/selenium/html5/AppCacheType;Ljava/lang/String;Ljava/lang/String;)V +U V$add 8X YZhasNext()Z\ getStatus ^`_(org/openqa/selenium/html5/AppCacheStatus Ka>(Ljava/lang/String;)Lorg/openqa/selenium/html5/AppCacheStatus; executeMethod*Lorg/openqa/selenium/remote/ExecuteMethod;selfLjava/lang/Object;methodLjava/lang/reflect/Method;args[Ljava/lang/Object;resultLjava/util/List;toReturnobjmapLjava/util/Map;entry)Lorg/openqa/selenium/html5/AppCacheEntry;Ljava/lang/String;LocalVariableTypeTable$Ljava/util/List;;Ljava/util/List;5Ljava/util/Map; SourceFileAddApplicationCache.javaEnclosingMethod{4org/openqa/selenium/remote/html5/AddApplicationCache }~getImplementationH(Ljava/lang/Object;)Lorg/openqa/selenium/remote/InterfaceImplementation; InnerClasses   8 *+ * *    -w+%+:-:3:M7:=: ?Y AC G MC  OC Q:  TWW[-+[% :]F- ./.012293L4d3i5s1}789:<p bcdefghihjkclk2Ame9:no i pq jrs hjtclu9:nv wxyz| PK %^D>Jx:org/openqa/selenium/remote/html5/AddApplicationCache.class1"4org/openqa/selenium/remote/html5/AddApplicationCachejava/lang/Object,org/openqa/selenium/remote/AugmenterProvider()VCode  LineNumberTableLocalVariableTablethis6Lorg/openqa/selenium/remote/html5/AddApplicationCache;getDescribedInterface()Ljava/lang/Class; Signature()Ljava/lang/Class<*>;*org/openqa/selenium/html5/ApplicationCachegetImplementationH(Ljava/lang/Object;)Lorg/openqa/selenium/remote/InterfaceImplementation;6org/openqa/selenium/remote/html5/AddApplicationCache$1  9(Lorg/openqa/selenium/remote/html5/AddApplicationCache;)VvalueLjava/lang/Object; SourceFileAddApplicationCache.java InnerClasses! /*  #  - &  = Y* *    ! PK %^D>;org/openqa/selenium/remote/html5/AddLocationContext$1.class1j5org/openqa/selenium/remote/html5/AddLocationContext$1java/lang/Object2org/openqa/selenium/remote/InterfaceImplementationthis$05Lorg/openqa/selenium/remote/html5/AddLocationContext;8(Lorg/openqa/selenium/remote/html5/AddLocationContext;)VCode    ()VLineNumberTableLocalVariableTablethis7Lorg/openqa/selenium/remote/html5/AddLocationContext$1;invoke}(Lorg/openqa/selenium/remote/ExecuteMethod;Ljava/lang/Object;Ljava/lang/reflect/Method;[Ljava/lang/Object;)Ljava/lang/Object;location java/lang/reflect/Method getName()Ljava/lang/String; "!java/lang/String #$equals(Ljava/lang/Object;)Z& getLocation (*)(org/openqa/selenium/remote/ExecuteMethod +,execute5(Ljava/lang/String;Ljava/util/Map;)Ljava/lang/Object;. java/util/Map0latitude -2 34get&(Ljava/lang/Object;)Ljava/lang/Object;6java/lang/Long 58 9: longValue()J 5< =>valueOf(J)Ljava/lang/Long; 5@ AB doubleValue()DD longitudeFaltitudeH"org/openqa/selenium/html5/Location GJ K(DDD)VM setLocation OQP&com/google/common/collect/ImmutableMap RSofN(Ljava/lang/Object;Ljava/lang/Object;)Lcom/google/common/collect/ImmutableMap; executeMethod*Lorg/openqa/selenium/remote/ExecuteMethod;selfLjava/lang/Object;methodLjava/lang/reflect/Method;args[Ljava/lang/Object;mapLjava/util/Map;DLocalVariableTypeTable5Ljava/util/Map; SourceFileAddLocationContext.javaEnclosingMethode3org/openqa/selenium/remote/html5/AddLocationContext ghgetImplementationH(Ljava/lang/Object;)Lorg/openqa/selenium/remote/InterfaceImplementation; InnerClasses   8 *+ * '   9 -b+%'-:/157;?9C157;?9E157;?9 GY IL-+L2N'* * ,+-/.F/]0k1w24\ TUVWXYZ[S\]/<0^F%D^]F^ _ S\`abcdfi PK %^D>Rt1J9org/openqa/selenium/remote/html5/AddLocationContext.class1"3org/openqa/selenium/remote/html5/AddLocationContextjava/lang/Object,org/openqa/selenium/remote/AugmenterProvider()VCode  LineNumberTableLocalVariableTablethis5Lorg/openqa/selenium/remote/html5/AddLocationContext;getDescribedInterface()Ljava/lang/Class; Signature()Ljava/lang/Class<*>;)org/openqa/selenium/html5/LocationContextgetImplementationH(Ljava/lang/Object;)Lorg/openqa/selenium/remote/InterfaceImplementation;5org/openqa/selenium/remote/html5/AddLocationContext$1  8(Lorg/openqa/selenium/remote/html5/AddLocationContext;)VvalueLjava/lang/Object; SourceFileAddLocationContext.java InnerClasses! /*    - #  = Y* '    ! PK %^D> =org/openqa/selenium/remote/html5/AddBrowserConnection$1.class1J7org/openqa/selenium/remote/html5/AddBrowserConnection$1java/lang/Object2org/openqa/selenium/remote/InterfaceImplementationthis$07Lorg/openqa/selenium/remote/html5/AddBrowserConnection;:(Lorg/openqa/selenium/remote/html5/AddBrowserConnection;)VCode    ()VLineNumberTableLocalVariableTablethis9Lorg/openqa/selenium/remote/html5/AddBrowserConnection$1;invoke}(Lorg/openqa/selenium/remote/ExecuteMethod;Ljava/lang/Object;Ljava/lang/reflect/Method;[Ljava/lang/Object;)Ljava/lang/Object; setOnline java/lang/reflect/Method getName()Ljava/lang/String; "!java/lang/String #$equals(Ljava/lang/Object;)Z&setBrowserOnline(state *,+&com/google/common/collect/ImmutableMap -.ofN(Ljava/lang/Object;Ljava/lang/Object;)Lcom/google/common/collect/ImmutableMap; 021(org/openqa/selenium/remote/ExecuteMethod 34execute5(Ljava/lang/String;Ljava/util/Map;)Ljava/lang/Object;6isOnline8isBrowserOnline executeMethod*Lorg/openqa/selenium/remote/ExecuteMethod;selfLjava/lang/Object;methodLjava/lang/reflect/Method;args[Ljava/lang/Object; SourceFileAddBrowserConnection.javaEnclosingMethodE5org/openqa/selenium/remote/html5/AddBrowserConnection GHgetImplementationH(Ljava/lang/Object;)Lorg/openqa/selenium/remote/InterfaceImplementation; InnerClasses   8 *+ * %   2-+%'2)/5- +7/) *+*,(-0/4229:2;<2=>2?@ABCDFI PK %^D>p;org/openqa/selenium/remote/html5/AddBrowserConnection.class1"5org/openqa/selenium/remote/html5/AddBrowserConnectionjava/lang/Object,org/openqa/selenium/remote/AugmenterProvider()VCode  LineNumberTableLocalVariableTablethis7Lorg/openqa/selenium/remote/html5/AddBrowserConnection;getDescribedInterface()Ljava/lang/Class; Signature()Ljava/lang/Class<*>;+org/openqa/selenium/html5/BrowserConnectiongetImplementationH(Ljava/lang/Object;)Lorg/openqa/selenium/remote/InterfaceImplementation;7org/openqa/selenium/remote/html5/AddBrowserConnection$1  :(Lorg/openqa/selenium/remote/html5/AddBrowserConnection;)VvalueLjava/lang/Object; SourceFileAddBrowserConnection.java InnerClasses! /*    - !  = Y* %    ! PK %^D>ձ ;org/openqa/selenium/remote/html5/AddDatabaseStorage$1.class15org/openqa/selenium/remote/html5/AddDatabaseStorage$1java/lang/Object2org/openqa/selenium/remote/InterfaceImplementationthis$05Lorg/openqa/selenium/remote/html5/AddDatabaseStorage;8(Lorg/openqa/selenium/remote/html5/AddDatabaseStorage;)VCode    ()VLineNumberTableLocalVariableTablethis7Lorg/openqa/selenium/remote/html5/AddDatabaseStorage$1;invoke}(Lorg/openqa/selenium/remote/ExecuteMethod;Ljava/lang/Object;Ljava/lang/reflect/Method;[Ljava/lang/Object;)Ljava/lang/Object;java/lang/String[Ljava/lang/Object;"\"  !" replaceAll8(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String; $&%com/google/common/collect/Lists '( newArrayList*([Ljava/lang/Object;)Ljava/util/ArrayList;*=org/openqa/selenium/remote/internal/WebElementToJsonConverter ) -/.#com/google/common/collect/Iterables 01 transformK(Ljava/lang/Iterable;Lcom/google/common/base/Function;)Ljava/lang/Iterable;3dbName5query7args $9 ':+(Ljava/lang/Iterable;)Ljava/util/ArrayList; <>=&com/google/common/collect/ImmutableMap ?@of(Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;)Lcom/google/common/collect/ImmutableMap;B executeSQL DFE(org/openqa/selenium/remote/ExecuteMethod GHexecute5(Ljava/lang/String;Ljava/util/Map;)Ljava/lang/Object;J java/util/MapL#org/openqa/selenium/html5/ResultSetNinsertId IP QRget&(Ljava/lang/Object;)Ljava/lang/Object;Tjava/lang/Long SV WXintValue()IZ rowsAffected\'org/openqa/selenium/html5/ResultSetRows^rows`java/util/List [b c(Ljava/util/List;)V Ke f.(IILorg/openqa/selenium/html5/ResultSetRows;)V executeMethod*Lorg/openqa/selenium/remote/ExecuteMethod;selfLjava/lang/Object;methodLjava/lang/reflect/Method; databaseNameLjava/lang/String; arguments convertedArgsLjava/lang/Iterable;paramsLjava/util/Map; resultAsMaprs%Lorg/openqa/selenium/html5/ResultSet;LocalVariableTypeTable(Ljava/lang/Iterable;$Ljava/util/Map;5Ljava/util/Map; SourceFileAddDatabaseStorage.javaEnclosingMethod3org/openqa/selenium/remote/html5/AddDatabaseStorage getImplementationH(Ljava/lang/Object;)Lorg/openqa/selenium/remote/InterfaceImplementation; InnerClasses   8 *+ * ,    2:2:2:W#)Y+,:2468;: +A CI: KY MOSU YOSU[Y ]O_ad:  F. /02%41367:8>9E6J<U;W=j>y?=@z ghijkl7 mn5nyo6^pqJJrs W=ts uv w 6^pxJJry W=tz {|}~ PK %^D>Z9org/openqa/selenium/remote/html5/AddDatabaseStorage.class1"3org/openqa/selenium/remote/html5/AddDatabaseStoragejava/lang/Object,org/openqa/selenium/remote/AugmenterProvider()VCode  LineNumberTableLocalVariableTablethis5Lorg/openqa/selenium/remote/html5/AddDatabaseStorage;getDescribedInterface()Ljava/lang/Class; Signature()Ljava/lang/Class<*>;)org/openqa/selenium/html5/DatabaseStoragegetImplementationH(Ljava/lang/Object;)Lorg/openqa/selenium/remote/InterfaceImplementation;5org/openqa/selenium/remote/html5/AddDatabaseStorage$1  8(Lorg/openqa/selenium/remote/html5/AddDatabaseStorage;)VvalueLjava/lang/Object; SourceFileAddDatabaseStorage.java InnerClasses! /*  %  - (  = Y* ,    ! PK lC>\ 1org/openqa/selenium/remote/html5/.svn/all-wcpropsK 25 svn:wc:ra_dav:version-url V 74 /svn/!svn/ver/11222/trunk/java/client/src/org/openqa/selenium/remote/html5 END AddApplicationCache.java K 25 svn:wc:ra_dav:version-url V 99 /svn/!svn/ver/11222/trunk/java/client/src/org/openqa/selenium/remote/html5/AddApplicationCache.java END AddDatabaseStorage.java K 25 svn:wc:ra_dav:version-url V 98 /svn/!svn/ver/11222/trunk/java/client/src/org/openqa/selenium/remote/html5/AddDatabaseStorage.java END AddLocationContext.java K 25 svn:wc:ra_dav:version-url V 98 /svn/!svn/ver/11222/trunk/java/client/src/org/openqa/selenium/remote/html5/AddLocationContext.java END AddWebStorage.java K 25 svn:wc:ra_dav:version-url V 93 /svn/!svn/ver/11222/trunk/java/client/src/org/openqa/selenium/remote/html5/AddWebStorage.java END AddBrowserConnection.java K 25 svn:wc:ra_dav:version-url V 100 /svn/!svn/ver/11222/trunk/java/client/src/org/openqa/selenium/remote/html5/AddBrowserConnection.java END PK lC>jO-org/openqa/selenium/remote/html5/.svn/entries8 dir 11264 http://selenium.googlecode.com/svn/trunk/java/client/src/org/openqa/selenium/remote/html5 http://selenium.googlecode.com/svn 2011-02-01T12:22:07.764961Z 11222 simon.m.stewart svn:special svn:externals svn:needs-lock 07704840-8298-11de-bf8c-fd130f914ac9 AddApplicationCache.java file 2011-02-03T12:01:17.000000Z 8e4ae6feabc25a230cba8799bf13e415 2010-10-26T10:39:11.754877Z 10072 simon.m.stewart AddDatabaseStorage.java file 2011-02-03T12:01:17.000000Z 404ce3ff3df9df022fa1c3eb186278bf 2010-10-26T10:39:11.754877Z 10072 simon.m.stewart AddLocationContext.java file 2011-02-03T12:01:17.000000Z 6d995b4d0ba48dd7c811b40d94ff19c6 2010-10-26T10:39:11.754877Z 10072 simon.m.stewart AddWebStorage.java file 2011-02-03T12:01:17.000000Z 421947d354f4f8a9ec0c963632fb8f7a 2010-10-26T10:39:11.754877Z 10072 simon.m.stewart AddBrowserConnection.java file 2011-02-03T12:01:17.000000Z 1985b7608d783ad15d13321170c5f049 2010-10-26T10:39:11.754877Z 10072 simon.m.stewart PK lC>G,org/openqa/selenium/remote/html5/.svn/format8 PK lC>.x; ; Qorg/openqa/selenium/remote/html5/.svn/text-base/AddApplicationCache.java.svn-base/* Copyright 2007-2010 WebDriver committers Copyright 2007-2010 Google Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package org.openqa.selenium.remote.html5; import java.lang.reflect.Method; import java.util.List; import java.util.Map; import org.openqa.selenium.html5.AppCacheEntry; import org.openqa.selenium.html5.AppCacheStatus; import org.openqa.selenium.html5.AppCacheType; import org.openqa.selenium.html5.ApplicationCache; import org.openqa.selenium.remote.AugmenterProvider; import org.openqa.selenium.remote.DriverCommand; import org.openqa.selenium.remote.ExecuteMethod; import org.openqa.selenium.remote.InterfaceImplementation; import com.google.common.collect.Lists; public class AddApplicationCache implements AugmenterProvider { public Class getDescribedInterface() { return ApplicationCache.class; } public InterfaceImplementation getImplementation(Object value) { return new InterfaceImplementation() { public Object invoke(ExecuteMethod executeMethod, Object self, Method method, Object... args) { if ("getAppCache".equals(method.getName())) { List result = (List) executeMethod.execute(DriverCommand.GET_APP_CACHE, null); List toReturn = Lists.newArrayList(); for (Object obj : result) { Map map = (Map) obj; AppCacheEntry entry = new AppCacheEntry(AppCacheType.valueOf(map.get("type")), map.get("url"), map.get("mimeType")); toReturn.add(entry); } return toReturn; } else if ("getStatus".equals(method.getName())) { String result = (String) executeMethod.execute(DriverCommand.GET_APP_CACHE_STATUS, null); return AppCacheStatus.valueOf(result); } return null; } }; } } PK lC>yRorg/openqa/selenium/remote/html5/.svn/text-base/AddBrowserConnection.java.svn-base/* Copyright 2007-2010 WebDriver committers Copyright 2007-2010 Google Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package org.openqa.selenium.remote.html5; import java.lang.reflect.Method; import org.openqa.selenium.html5.BrowserConnection; import org.openqa.selenium.remote.AugmenterProvider; import org.openqa.selenium.remote.DriverCommand; import org.openqa.selenium.remote.ExecuteMethod; import org.openqa.selenium.remote.InterfaceImplementation; import com.google.common.collect.ImmutableMap; public class AddBrowserConnection implements AugmenterProvider { public Class getDescribedInterface() { return BrowserConnection.class; } public InterfaceImplementation getImplementation(Object value) { return new InterfaceImplementation() { public Object invoke(ExecuteMethod executeMethod, Object self, Method method, Object... args) { if ("setOnline".equals(method.getName())) { return executeMethod.execute(DriverCommand.SET_BROWSER_ONLINE, ImmutableMap.of("state", args[0])); } else if ("isOnline".equals(method.getName())) { return executeMethod.execute(DriverCommand.IS_BROWSER_ONLINE, null); } return null; } }; } } PK lC>1z4ZJ J Porg/openqa/selenium/remote/html5/.svn/text-base/AddDatabaseStorage.java.svn-base/* Copyright 2007-2010 WebDriver committers Copyright 2007-2010 Google Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package org.openqa.selenium.remote.html5; import java.lang.reflect.Method; import java.util.List; import java.util.Map; import org.openqa.selenium.html5.DatabaseStorage; import org.openqa.selenium.html5.ResultSet; import org.openqa.selenium.html5.ResultSetRows; import org.openqa.selenium.remote.AugmenterProvider; import org.openqa.selenium.remote.DriverCommand; import org.openqa.selenium.remote.ExecuteMethod; import org.openqa.selenium.remote.InterfaceImplementation; import org.openqa.selenium.remote.internal.WebElementToJsonConverter; import com.google.common.collect.ImmutableMap; import com.google.common.collect.Iterables; import com.google.common.collect.Lists; public class AddDatabaseStorage implements AugmenterProvider { public Class getDescribedInterface() { return DatabaseStorage.class; } public InterfaceImplementation getImplementation(Object value) { return new InterfaceImplementation() { public Object invoke(ExecuteMethod executeMethod, Object self, Method method, Object... args) { String databaseName = (String) args[0]; String query = (String) args[1]; Object[] arguments = (Object[]) args[2]; query.replaceAll("\"", "\\\""); Iterable convertedArgs = Iterables.transform( Lists.newArrayList(arguments), new WebElementToJsonConverter()); Map params = ImmutableMap.of( "dbName", databaseName, "query", query, "args", Lists.newArrayList(convertedArgs)); Map resultAsMap = (Map) executeMethod.execute(DriverCommand.EXECUTE_SQL, params); ResultSet rs = new ResultSet(((Long) resultAsMap.get("insertId")).intValue(), ((Long) resultAsMap.get("rowsAffected")).intValue(), new ResultSetRows((List>) resultAsMap.get("rows"))); return rs; } }; } } PK lC>>꫔Porg/openqa/selenium/remote/html5/.svn/text-base/AddLocationContext.java.svn-base/* Copyright 2007-2010 WebDriver committers Copyright 2007-2010 Google Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package org.openqa.selenium.remote.html5; import java.lang.reflect.Method; import java.util.Map; import org.openqa.selenium.html5.Location; import org.openqa.selenium.html5.LocationContext; import org.openqa.selenium.remote.AugmenterProvider; import org.openqa.selenium.remote.DriverCommand; import org.openqa.selenium.remote.ExecuteMethod; import org.openqa.selenium.remote.InterfaceImplementation; import com.google.common.collect.ImmutableMap; public class AddLocationContext implements AugmenterProvider { public Class getDescribedInterface() { return LocationContext.class; } public InterfaceImplementation getImplementation(Object value) { return new InterfaceImplementation() { public Object invoke(ExecuteMethod executeMethod, Object self, Method method, Object... args) { if ("location".equals(method.getName())) { Map map = (Map) executeMethod.execute(DriverCommand.GET_LOCATION, null); double latitude = Long.valueOf((Long) map.get("latitude")).doubleValue(); double longitude = Long.valueOf((Long) map.get("longitude")).doubleValue(); double altitude = Long.valueOf((Long) map.get("altitude")).doubleValue(); return new Location(latitude, longitude, altitude); } else if ("setLocation".equals(method.getName())) { return executeMethod.execute(DriverCommand.SET_LOCATION, ImmutableMap.of("location", args[0])); } return null; } }; } } PK lC>,Hy%%Korg/openqa/selenium/remote/html5/.svn/text-base/AddWebStorage.java.svn-base/* Copyright 2010 WebDriver committers Copyright 2010 Google Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package org.openqa.selenium.remote.html5; import org.openqa.selenium.html5.WebStorage; import org.openqa.selenium.remote.AugmenterProvider; import org.openqa.selenium.remote.ExecuteMethod; import org.openqa.selenium.remote.InterfaceImplementation; import java.lang.reflect.Method; public class AddWebStorage implements AugmenterProvider { public Class getDescribedInterface() { return WebStorage.class; } public InterfaceImplementation getImplementation(Object value) { return new InterfaceImplementation() { public Object invoke(ExecuteMethod executeMethod, Object self, Method method, Object... args) { // This is only an abstraction return null; } }; } } PK lC>PPVVcom/.svn/all-wcpropsK 25 svn:wc:ra_dav:version-url V 45 /svn/!svn/ver/11226/trunk/java/client/src/com END PK lC>vVcom/.svn/entries8 dir 11264 http://selenium.googlecode.com/svn/trunk/java/client/src/com http://selenium.googlecode.com/svn 2011-02-01T13:59:17.176547Z 11226 simon.m.stewart svn:special svn:externals svn:needs-lock 07704840-8298-11de-bf8c-fd130f914ac9 thoughtworks dir PK lC>Gcom/.svn/format8 PK %^D> 1org/openqa/selenium/chrome/ChromeWebElement.class1v+org/openqa/selenium/chrome/ChromeWebElement3org/openqa/selenium/remote/RenderedRemoteWebElement&org/openqa/selenium/internal/Locatable,(Lorg/openqa/selenium/chrome/ChromeDriver;)VCode   ()V   setParent/(Lorg/openqa/selenium/remote/RemoteWebDriver;)VLineNumberTableLocalVariableTablethis-Lorg/openqa/selenium/chrome/ChromeWebElement;parent)Lorg/openqa/selenium/chrome/ChromeDriver; dragAndDropBy(II)V'java/lang/UnsupportedOperationExceptionNot yet supported in Chrome  (Ljava/lang/String;)V moveRightByI moveDownBy dragAndDropOn+(Lorg/openqa/selenium/RenderedWebElement;)Velement(Lorg/openqa/selenium/RenderedWebElement;'getLocationOnScreenOnceScrolledIntoView()Lorg/openqa/selenium/Point;*&getElementLocationOnceScrolledIntoView,id . /0getId()Ljava/lang/String; 243&com/google/common/collect/ImmutableMap 56ofN(Ljava/lang/Object;Ljava/lang/Object;)Lcom/google/common/collect/ImmutableMap; 8 9:executeH(Ljava/lang/String;Ljava/util/Map;)Lorg/openqa/selenium/remote/Response; <>=#org/openqa/selenium/remote/Response ?@getValue()Ljava/lang/Object;B java/util/MapDx AF GHget&(Ljava/lang/Object;)Ljava/lang/Object;Jjava/lang/Long IL MNintValue()IPyRorg/openqa/selenium/Point QT response%Lorg/openqa/selenium/remote/Response;rawPointLjava/util/Map;LocalVariableTypeTable5Ljava/util/Map;getCoordinates9()Lorg/openqa/selenium/interactions/internal/Coordinates;^:This chrome driver does not support advanced interactions.hashCode acbjava/lang/String _Nequals(Ljava/lang/Object;)Zgorg/openqa/selenium/WebElementi)org/openqa/selenium/internal/WrapsElement hk lmgetWrappedElement"()Lorg/openqa/selenium/WebElement; ao deobjLjava/lang/Object;other Lorg/openqa/selenium/WebElement; SourceFileChromeWebElement.java! F * *+     H Y   ! "!#$ > Y  %&'( B*)+*-17L+;AM,CEIK>,OEIK6QYS#$ #&''(7)4B2UV*WX'D!7 P!Y *WZ[\ 4 Y]-  _N 2*-`3 de 7+f+fM,h +hjM,*-,-n"89 <=>A&B(E 77pq)rstuPK %^D>%>Forg/openqa/selenium/chrome/ChromeCommandExecutor$ListeningThread.class1@org/openqa/selenium/chrome/ChromeCommandExecutor$ListeningThreadjava/lang/Thread isListeningZsocketsLjava/util/Queue; Signature$Ljava/util/Queue; serverSocketLjava/net/ServerSocket; hasClientthis$02Lorg/openqa/selenium/chrome/ChromeCommandExecutor;L(Lorg/openqa/selenium/chrome/ChromeCommandExecutor;Ljava/net/ServerSocket;)VCode    ()V  *java/util/concurrent/ConcurrentLinkedQueue      " LineNumberTableLocalVariableTablethisBLorg/openqa/selenium/chrome/ChromeCommandExecutor$ListeningThread;run ) *listen ,.-java/net/ServerSocket /0accept()Ljava/net/Socket; 243java/net/Socket 56 setSoLinger(ZI)V 28 9:getInputStream()Ljava/io/InputStream; <>=java/io/InputStream ?@read()I BDCjava/util/Queue EFadd(Ljava/lang/Object;)Z H IJrespondWithHoldingPage(Ljava/net/Socket;)V LNM0org/openqa/selenium/chrome/ChromeCommandExecutor OPaccess$05(Lorg/openqa/selenium/chrome/ChromeCommandExecutor;)Z ,R STisClosed()ZV&org/openqa/selenium/WebDriverException UX Y(Ljava/lang/Throwable;)V[java/net/SocketException]java/io/IOExceptionacceptedSocketLjava/net/Socket;rIeLjava/io/IOException; Exceptionsf

ChromeDriver server started and connected. Please leave this tab open.

hContent-Type: text/html Lj klaccess$1Z(Lorg/openqa/selenium/chrome/ChromeCommandExecutor;Ljava/lang/String;Ljava/lang/String;)[B Ln opaccess$2H(Lorg/openqa/selenium/chrome/ChromeCommandExecutor;[BLjava/net/Socket;)Vsocketdata[B stopListening v wcloseCurrentSockets ,y zclose | }yield L access$3()Ljava/util/logging/Logger; java/util/logging/Level FINELjava/util/logging/Level;)I/O error while closing the server socket java/util/logging/Logger logC(Ljava/util/logging/Level;Ljava/lang/String;Ljava/lang/Throwable;)Vjava/lang/ExceptionLjava/lang/Exception; B iterator()Ljava/util/Iterator; java/util/Iterator next()Ljava/lang/Object; 2y B Fremove ThasNextE(Lorg/openqa/selenium/chrome/ChromeCommandExecutor$ListeningThread;)Z[(Lorg/openqa/selenium/chrome/ChromeCommandExecutor$ListeningThread;)Ljava/net/ServerSocket;U(Lorg/openqa/selenium/chrome/ChromeCommandExecutor$ListeningThread;)Ljava/util/Queue; SourceFileChromeCommandExecutor.java InnerClassesListeningThread    B  l$*+***Y**,!# $$%&$ '> **(# $  %&*h*8*!+L+ 1+7;=G*+AW**+G*K#*!QLL*UY+WQTZQX\#>%08=TXY^g$*h%&-^_`aYbcIJd\h*egiM*,+m# $ %&q_ rst+w*uALUY+WM*!Q**!x{*!QN~-,*!Q**!x{*!QN~-36\Efi\#R#&)6 7 C EOVY\i j v$*w%& b7 bcj bcw4*M ,2L+*+WN,ݱ&)\#)*3$4%&q_O%*#$k%*!#$o%*#$ LPK %^D>xF2F26org/openqa/selenium/chrome/ChromeCommandExecutor.class1c0org/openqa/selenium/chrome/ChromeCommandExecutorjava/lang/Object*org/openqa/selenium/remote/CommandExecutorLOGLjava/util/logging/Logger;DEFAULT_TIMEOUTJMAX_START_RETRIESI ConstantValueELEMENT_ID_ARG[Ljava/lang/String;NO_ARGSbinary)Lorg/openqa/selenium/chrome/ChromeBinary;timeoutlistenZlisteningThreadBLorg/openqa/selenium/chrome/ChromeCommandExecutor$ListeningThread;commandsLjava/util/Map; Signature6Ljava/util/Map;()VCode !#"java/lang/Class $%getName()Ljava/lang/String; ')(java/util/logging/Logger *+ getLogger.(Ljava/lang/String;)Ljava/util/logging/Logger; -  /10java/util/concurrent/TimeUnit 23SECONDSLjava/util/concurrent/TimeUnit;x /7 89toMicros(J)J ; =java/lang/String?id A  C LineNumberTableLocalVariableTable,(Lorg/openqa/selenium/chrome/ChromeBinary;)V I F K  M  O  QSR&com/google/common/collect/ImmutableMap TUbuilder2()Lcom/google/common/collect/ImmutableMap$Builder;Wclose Y[Z.com/google/common/collect/ImmutableMap$Builder \]putV(Ljava/lang/Object;Ljava/lang/Object;)Lcom/google/common/collect/ImmutableMap$Builder;_quitagetcurlegoBackg goForwardirefreshk addCookiemcookieo getCookiesq getCookiesnameudeleteAllCookiesw deleteCookiey findElement{using}value findElementsfindChildElementfindChildElements clearElement clickElementhoverOverElementsendKeysToElement submitElement toggleElementgetElementAttribute&getElementLocationOnceScrolledIntoViewgetElementLocationgetElementSizegetElementTagNamegetElementTextgetElementValuegetElementValueOfCssProperty propertyNameisElementDisplayedisElementEnabledisElementSelectedsetElementSelectedgetActiveElement switchToFramegetCurrentWindowHandlegetWindowHandlesswitchToWindow getCurrentUrl getPageSourcegetTitle executeScriptscriptargsexecuteAsyncScript screenshotimplicitlyWaitmssetScriptTimeout Y build*()Lcom/google/common/collect/ImmutableMap;  this2Lorg/openqa/selenium/chrome/ChromeCommandExecutor; getBinary+()Lorg/openqa/selenium/chrome/ChromeBinary; hasClient()Z   @org/openqa/selenium/chrome/ChromeCommandExecutor$ListeningThread access$0E(Lorg/openqa/selenium/chrome/ChromeCommandExecutor$ListeningThread;)ZgetPort()I access$1[(Lorg/openqa/selenium/chrome/ChromeCommandExecutor$ListeningThread;)Ljava/net/ServerSocket; java/net/ServerSocket  getLocalPortexecuteK(Lorg/openqa/selenium/remote/Command;)Lorg/openqa/selenium/remote/Response; Exceptionsjava/io/IOException newSession #"org/openqa/selenium/remote/Command < equals(Ljava/lang/Object;)Z  createCannedNewSessionResponse'()Lorg/openqa/selenium/remote/Response;   sendCommand'(Lorg/openqa/selenium/remote/Command;)V  handleResponsecommand$Lorg/openqa/selenium/remote/Command;#org/openqa/selenium/remote/Response I [no session]     setSessionId(Ljava/lang/String;)V .org/openqa/selenium/remote/DesiredCapabilities chrome2()Lorg/openqa/selenium/remote/DesiredCapabilities;  setJavascriptEnabled(Z)V.org/openqa/selenium/remote/JsonToBeanConverter I java/util/Map.org/openqa/selenium/remote/BeanToJsonConverter I  !"convert&(Ljava/lang/Object;)Ljava/lang/String; $ !%7(Ljava/lang/Class;Ljava/lang/Object;)Ljava/lang/Object;'&org/openqa/selenium/WebDriverException &) F*(Ljava/lang/Throwable;)V , -.setValue(Ljava/lang/Object;)V0java/lang/Exceptionresponse%Lorg/openqa/selenium/remote/Response; capabilities0Lorg/openqa/selenium/remote/DesiredCapabilities;capabilitiesMape(Lorg/openqa/selenium/WebDriverException;Ljava/lang/Exception;LocalVariableTypeTableLjava/util/Map<**>; < >java/lang/IllegalStateException@'Cannot execute command without a client =B F D EFfillArgs8(Lorg/openqa/selenium/remote/Command;)Ljava/lang/String; H IJfillTwoHundredWithJson(Ljava/lang/String;)[B L MNgetOldestSocket()Ljava/net/Socket; P QRwriteAndFlushToSocket([BLjava/net/Socket;)VcommandStringToSendLjava/lang/String;data[B oldestSocketLjava/net/Socket; Z\[java/net/Socket ]^getOutputStream()Ljava/io/OutputStream; `bajava/io/OutputStream cdwrite([B)V `f gflush kmljava/lang/Thread nosleep(J)V Zq W s tuaccess$2U(Lorg/openqa/selenium/chrome/ChromeCommandExecutor$ListeningThread;)Ljava/util/Queue; wyxjava/util/Queue zremove|java/lang/InterruptedExceptionsocket  a&(Ljava/lang/Object;)Ljava/lang/Object;   getParameters()Ljava/util/Map;  size"java/lang/IllegalArgumentException0Did not supply the expected number of parameters Borg/json/JSONObject Brequest  \;(Ljava/lang/String;Ljava/lang/Object;)Lorg/json/JSONObject;   containsKeyjava/lang/StringBuilderMissing required parameter " B  append-(Ljava/lang/String;)Ljava/lang/StringBuilder;"  %toString &B org/json/JSONExceptionparameterNamesjsonLorg/json/JSONObject;rawJson parameterNameLorg/json/JSONException;application/json; charset=UTF-8  fillTwoHundred((Ljava/lang/String;Ljava/lang/String;)[Bmessage!HTTP/1.1 200 OK Content-Length: UTF-8 < JgetBytes  (I)Ljava/lang/StringBuilder; Content-Type:  &Your environment doesn't support UTF-8$java/io/UnsupportedEncodingException contentType httpMessage&Ljava/io/UnsupportedEncodingException; Ijava/io/BufferedReaderjava/io/InputStreamReader Z getInputStream()Ljava/io/InputStream;  F(Ljava/io/InputStream;)V  F(Ljava/io/Reader;)V  length   %readLine EOResponse resultBuilderLjava/lang/StringBuilder;readerLjava/io/BufferedReader;linehasSeenDoubleCRLF 'org/openqa/selenium/chrome/ChromeBinary  isRunning4org/openqa/selenium/chrome/ChromeNotRunningExceptionChrome is no longer running! B k yield w peek()Ljava/lang/Object;start  newLock%()Lorg/openqa/selenium/internal/Lock; !org/openqa/selenium/internal/Lock olock    determineNextFreePort(I)I  setPort(I)V  stop  startListening    incrementBackoffBy/org/openqa/selenium/chrome/FatalChromeException!Cannot create chrome driver B $ %unlock#Lorg/openqa/selenium/internal/Lock;portretriesLjava/io/IOException; ZI,java/net/InetSocketAddress. localhost +0 F1(Ljava/lang/String;I)V Z3 45bind(Ljava/net/SocketAddress;)V7,Cannot find free port in the range %d to %d 9;:java/lang/Integer <=valueOf(I)Ljava/lang/Integer; <? @Aformat9(Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/String;Cjava/net/BindExceptionnewportaddressLjava/net/InetSocketAddress;H'org/openqa/selenium/internal/SocketLock GI setTimeout L F N FOL(Lorg/openqa/selenium/chrome/ChromeCommandExecutor;Ljava/net/ServerSocket;)V  serverSocketLjava/net/ServerSocket; T Ukill W X stopListening5(Lorg/openqa/selenium/chrome/ChromeCommandExecutor;)ZZ(Lorg/openqa/selenium/chrome/ChromeCommandExecutor;Ljava/lang/String;Ljava/lang/String;)[BH(Lorg/openqa/selenium/chrome/ChromeCommandExecutor;[BLjava/net/Socket;)Vaccess$3()Ljava/util/logging/Logger; SourceFileChromeCommandExecutor.java InnerClassesBuilderListeningThread!     B[+ &,.46:S@<BDS TW#X*QEFG5-*H*:J*L*+N*PVBX^BX`SYzSY|SXSYzSY|SX@X@X@XSY|SX@X@XSYrSX@X@X@X@X@X@XSYSX@X@X@X@XBXSXBXBXHMEHOG12<3445H5967> 68945:H5:,*;=Y?A*+CM*,GN*K:*-OD$+E4,,STUV$WXQRP,Y+_,Ye#Nhj:,p*ָr,vW-hj:,p*ָr,vW{28;{D6 "02;=AOE PPUVP}XEFg *+~M,+&YY(Y+:YN-+W,Y:66;2:+#&YYħ:&Y(-1D>'-1AKWky   ERK[AeTk.T 6IJ= *+DE TAY+¶,Ķ+N-N&YƷ45D"% &'()%-)5*6,E4AATAT-T6 6\*KLYMYY+ҷַN6,,ܞ ,߶W,W6-Y:ŻY,#::&Y(dxy&dx~/DN:; <=< ?#@&A+B2D:FAHLIO@dNyO{P~QRE\ }X } j&)TV4T#g{67 68MN1*NY*ָrZYL+D[\ ]_[/aE 1}X,}XH*L+:*N = * =*N>***N*N*;*N*;'*Y "M&Y,(:+#+#rr||D^hjlmn"p*r/s3t7u>wFrTz\|c}g~rs|~E4&\' ,(( s 6) h==ZY*N+Y-/:-26-p:-p :-p`&Y6Y8SY8S>#*B#3*,3DB  #'*,359<HLdE4hh' fD  /}X"EF2GYIDE Jo>*JD E 6Y*N KL M&Y,(*L*Y*+M*ֶPD!.5E*6QRQR 6)^ *NS*L**ֶV*ֱD E  Y%*LD^EZ'*+,D#Et['*+,ODE\]$,DSE^_`YQa bPK %^D>m 0org/openqa/selenium/chrome/ChromeExtension.class1~*org/openqa/selenium/chrome/ChromeExtensionjava/lang/Object#CHROME_EXTENSION_DIRECTORY_PROPERTYLjava/lang/String; ConstantValue webdriver.chrome.extensiondirDEFAULT_EXTENSION_PATH /chrome-extension.zip MANIFEST_FILE manifest.jsondefaultExtensionDirLjava/io/File; directory(Ljava/io/File;)V Exceptions&org/openqa/selenium/WebDriverExceptionCode  ()V  checkExtensionForManifest(Ljava/io/File;)Ljava/io/File; !  # $(Ljava/lang/Throwable;)V&java/io/IOExceptionLineNumberTableLocalVariableTablethis,Lorg/openqa/selenium/chrome/ChromeExtension;eLjava/io/IOException; . /0findChromeExtensionDir()Ljava/io/File; 2  getDirectory 5  7 80 loadExtension :<; java/io/File => isDirectory()Z@java/io/FileNotFoundExceptionBOThe specified directory is not a Chrome extension directory: %s; Try setting %s :D EFgetAbsolutePath()Ljava/lang/String; HJIjava/lang/String KLformat9(Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/String; ?N O(Ljava/lang/String;)V :Q R#(Ljava/io/File;Ljava/lang/String;)V :T U>existsW*The specified extension has no %s file: %s Y[Z"org/openqa/selenium/io/FileHandler \]copy(Ljava/io/File;Ljava/io/File;)V manifestFileplatformManifestFile acbjava/lang/System de getProperty&(Ljava/lang/String;)Ljava/lang/String;g Hi jkequals(Ljava/lang/Object;)Z :Nn(org/openqa/selenium/chrome/ChromeProfile prqjava/lang/Class stgetResourceAsStream)(Ljava/lang/String;)Ljava/io/InputStream; Yv wxunzip%(Ljava/io/InputStream;)Ljava/io/File; extensionDirstreamLjava/io/InputStream; SourceFileChromeExtension.java!   Jp**+ MY," %'8:;<>( )* +,6*-1' HI( )*30/* 'L( )* /0}'4K* YL²4K* 6Y4K+ç+ÿ* ""$"'"XYZ [\]Z%a( # %l*9 ?YAY*CSYSGM:Y*PL+S7:Y*PM,S ?YVYSY*CSGM,+X*'>op qrp$u/v6wAxHyLzT{^ye~j( l/=^A)_ 80;`L+f+h:Y+lKm oM,uK*KY*"01%'"',12(4y,y+'z{2 +,|}PK %^D>¢ E:$:$-org/openqa/selenium/chrome/ChromeBinary.class1'org/openqa/selenium/chrome/ChromeBinaryjava/lang/ObjectCHROME_LOG_FILE_PROPERTYLjava/lang/String; ConstantValue webdriver.chrome.logFileBACKOFF_INTERVALI linearBackoffCoefficientprofile*Lorg/openqa/selenium/chrome/ChromeProfile; extension,Lorg/openqa/selenium/chrome/ChromeExtension;port chromeProcess0Lorg/openqa/selenium/remote/internal/SubProcess; customFlagsLjava/util/List; Signature$Ljava/util/List;chromeBinaryLocationY(Lorg/openqa/selenium/chrome/ChromeProfile;Lorg/openqa/selenium/chrome/ChromeExtension;)VCode  Z(Lorg/openqa/selenium/chrome/ChromeProfile;Lorg/openqa/selenium/chrome/ChromeExtension;I)VLineNumberTableLocalVariableTablethis)Lorg/openqa/selenium/chrome/ChromeBinary; % &()V ( *java/util/ArrayList )% -  /  1  3  5  prepareProcess2()Lorg/openqa/selenium/remote/internal/SubProcess;9)http://localhost:%d/chromeCommandExecutor ;=<java/lang/Integer >?valueOf(I)Ljava/lang/Integer; ACBjava/lang/String DEformat9(Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/String; G HIgetCommandline$(Ljava/lang/String;)Ljava/util/List;Kjava/lang/ProcessBuilder JM N(Ljava/util/List;)VP&org/openqa/selenium/WebDriverException OR S(Ljava/lang/Throwable;)V U VW getLogFile()Ljava/io/File;Y.org/openqa/selenium/remote/internal/SubProcess X[ \(Ljava/lang/ProcessBuilder;)V^8org/openqa/selenium/remote/internal/CircularOutputStream ]` a(Ljava/io/File;)V Xc d3(Ljava/lang/ProcessBuilder;Ljava/io/OutputStream;)Vfjava/io/IOException serverUrlbuilderLjava/lang/ProcessBuilder; commandlineeLjava/io/IOException;logFileLjava/io/File;LocalVariableTypeTable qsrjava/lang/System tu getProperty&(Ljava/lang/String;)Ljava/lang/String;w java/io/File vy z(Ljava/lang/String;)VaddCustomBinaryFlag }~java/util/List add(Ljava/lang/Object;)Zflag getProfile,()Lorg/openqa/selenium/chrome/ChromeProfile; getExtension.()Lorg/openqa/selenium/chrome/ChromeExtension;getPort()IsetPort(I)Vstart    67 X &launch java/lang/Thread sleep(J)Vjava/lang/InterruptedException Exceptions8(Ljava/lang/String;)Ljava/util/List;RuntimeInvisibleAnnotations1Lcom/google/common/annotations/VisibleForTesting;  getChromeBinaryLocation()Ljava/lang/String;java/lang/StringBuilder--load-extension= y *org/openqa/selenium/chrome/ChromeExtension W getDirectory v getAbsolutePath append-(Ljava/lang/String;)Ljava/lang/StringBuilder; toString--activate-on-launch--homepage=about:blank--no-first-run--disable-hang-monitor--disable-popup-blocking--disable-prompt-on-repost--no-default-browser-check--disable-translate (org/openqa/selenium/chrome/ChromeProfile getUntrustedCertificatesFlag com/google/common/collect/Lists  newArrayList*([Ljava/lang/Object;)Ljava/util/ArrayList; } addAll(Ljava/util/Collection;)Z DEFAULT_PROFILE equals--user-data-dir=  appendProxyArguments"(Ljava/util/List;)Ljava/util/List;J(Ljava/util/List;)Ljava/util/List; getProxy()Lorg/openqa/selenium/Proxy; org/openqa/selenium/Proxy getProxyAutoconfigUrl--proxy-pac-url=  getHttpProxy--proxy-server=  isAutodetect()Z--proxy-auto-detect  getProxyType'()Lorg/openqa/selenium/Proxy$ProxyType; #org/openqa/selenium/Proxy$ProxyType DIRECT%Lorg/openqa/selenium/Proxy$ProxyType;--no-proxy-server  SYSTEM java/lang/IllegalStateException Unsupported proxy setting  yproxyLorg/openqa/selenium/Proxy; isRunning X kill X &shutdownincrementBackoffBydiff  isChromeBinaryLocationKnownwebdriver.chrome.bin ! org/openqa/selenium/Platform "# getCurrent ()Lorg/openqa/selenium/Platform; % &'WINDOWSLorg/openqa/selenium/Platform; ) *+is!(Lorg/openqa/selenium/Platform;)Z - .$getWindowsBinaryLocationFromRegistry 0 1getDefaultWindowsBinaryLocation 3 4'UNIX6/usr/bin/google-chrome8/usr/bin/chromium : ;'MAC=*4 ef!"# &m'* *** *'hL"% lmoq%r&u! '"#HIe= AY*SYY*2SYSYSYSYSYSYSYSY SY *0SM,*,W*0ֶٚ#,Yܷ*0޶|W*,+|W, Jxyz*{/|4}9~?EKQWcn{! "#gcFjo cFj*0M,+, +Y,|Wf, +Y,|WB,+|W/,+|W, Y  + : 29V]is! "#jo j2* ! "#&A* * ! "#C *Y'`'  ! "#  e **p.*.)Y+L$(+,|W+/|Wm2(+5|W+7|WJ9(3+<|W+Y>@p<|WOYBD+EN8-IAM,'vY,x:O*RUX. -Y*OY\D*. f ,6COYfr|!* "# ^+_`no  ^F*.vY*.xO ! "#.k$(aYceflnKrYtY*v|L*W,,N--d2+YMާKKWdeXadeWhXah F !)049<FNXdhi!4!C40<^N 1KYK*pW(*W( *W*W* "  * 6 >F! C_ @PK %^D>L/org/openqa/selenium/chrome/ChromeDriver$1.class1$)org/openqa/selenium/chrome/ChromeDriver$1=org/openqa/selenium/remote/internal/JsonToWebElementConverterthis$0)Lorg/openqa/selenium/chrome/ChromeDriver;X(Lorg/openqa/selenium/chrome/ChromeDriver;Lorg/openqa/selenium/remote/RemoteWebDriver;)VCode    /(Lorg/openqa/selenium/remote/RemoteWebDriver;)VLineNumberTableLocalVariableTablethis+Lorg/openqa/selenium/chrome/ChromeDriver$1; $anonymous0,Lorg/openqa/selenium/remote/RemoteWebDriver;newRemoteWebElement/()Lorg/openqa/selenium/remote/RemoteWebElement;+org/openqa/selenium/chrome/ChromeWebElement  ,(Lorg/openqa/selenium/chrome/ChromeDriver;)V SourceFileChromeDriver.javaEnclosingMethod 'org/openqa/selenium/chrome/ChromeDriver ",(Lorg/openqa/selenium/chrome/ChromeBinary;)V InnerClasses  C *+ *,     6 Y*   !# PK %^D>˱dd-org/openqa/selenium/chrome/ChromeDriver.class1'org/openqa/selenium/chrome/ChromeDriver*org/openqa/selenium/remote/RemoteWebDriver#org/openqa/selenium/TakesScreenshotACCEPT_UNTRUSTED_CERTIFICATESZ ConstantValue,(Lorg/openqa/selenium/chrome/ChromeBinary;)VCode0org/openqa/selenium/chrome/ChromeCommandExecutor  .org/openqa/selenium/remote/DesiredCapabilities chrome2()Lorg/openqa/selenium/remote/DesiredCapabilities;  Q(Lorg/openqa/selenium/remote/CommandExecutor;Lorg/openqa/selenium/Capabilities;)V)org/openqa/selenium/chrome/ChromeDriver$1  X(Lorg/openqa/selenium/chrome/ChromeDriver;Lorg/openqa/selenium/remote/RemoteWebDriver;)V ! "#setElementConverterB(Lorg/openqa/selenium/remote/internal/JsonToWebElementConverter;)VLineNumberTableLocalVariableTablethis)Lorg/openqa/selenium/chrome/ChromeDriver;binary)Lorg/openqa/selenium/chrome/ChromeBinary;Y(Lorg/openqa/selenium/chrome/ChromeProfile;Lorg/openqa/selenium/chrome/ChromeExtension;)V,'org/openqa/selenium/chrome/ChromeBinary +. * profile*Lorg/openqa/selenium/chrome/ChromeProfile; extension,Lorg/openqa/selenium/chrome/ChromeExtension;()V6(org/openqa/selenium/chrome/ChromeProfile 58 4:*org/openqa/selenium/chrome/ChromeExtension 98 . startClient ? @AgetCommandExecutor.()Lorg/openqa/selenium/remote/CommandExecutor; C D4start stopClient G H4stopexecuteH(Ljava/lang/String;Ljava/util/Map;)Lorg/openqa/selenium/remote/Response; Signature](Ljava/lang/String;Ljava/util/Map;)Lorg/openqa/selenium/remote/Response; N IJP"java/lang/IllegalArgumentExceptionR/org/openqa/selenium/chrome/FatalChromeException T E4 V =4Xjava/lang/RuntimeExceptionZ&org/openqa/selenium/WebDriverException Y\ ](Ljava/lang/Throwable;)V_java/lang/Exception driverCommandLjava/lang/String; parametersLjava/util/Map;eLjava/lang/Exception;LocalVariableTypeTable$Ljava/util/Map;isJavascriptEnabled()ZnewRemoteWebElement/()Lorg/openqa/selenium/remote/RemoteWebElement;m+org/openqa/selenium/chrome/ChromeWebElement lo p,(Lorg/openqa/selenium/chrome/ChromeDriver;)Velement-Lorg/openqa/selenium/remote/RemoteWebElement;getScreenshotAs4(Lorg/openqa/selenium/OutputType;)Ljava/lang/Object;@(Lorg/openqa/selenium/OutputType;)TX;w screenshot y{z&com/google/common/collect/ImmutableMap |}of*()Lcom/google/common/collect/ImmutableMap; N #org/openqa/selenium/remote/Response getValue()Ljava/lang/Object; java/lang/Object toString()Ljava/lang/String; org/openqa/selenium/OutputType convertFromBase64Png&(Ljava/lang/String;)Ljava/lang/Object;target Lorg/openqa/selenium/OutputType;%Lorg/openqa/selenium/OutputType; SourceFileChromeDriver.java InnerClasses!    Y*Y+*Y** $!%&'() * P*+Y+,-/$ + ,% &'0123 4 A*5Y79Y;<$ 56% &'=4 9 *>B$ A B%  &'E4 9 *>F$ I J%  &'IJKL 3*+,MN-O -Q *S*U-W-WYY-[^$& UVWX[\^%_*a%*3&'3`a3bc+def 3bghi ,$h% &'jk C lY*nL+$ m n% &' qrstKu d+*vx~$r sr%&'f  PK %^D>%5org/openqa/selenium/chrome/FatalChromeException.class1/org/openqa/selenium/chrome/FatalChromeException&org/openqa/selenium/WebDriverException(Ljava/lang/String;)VCode  LineNumberTableLocalVariableTablethis1Lorg/openqa/selenium/chrome/FatalChromeException;messageLjava/lang/String; SourceFileFatalChromeException.java!>*+   PK %^D> ʐ.org/openqa/selenium/chrome/ChromeProfile.class1Z(org/openqa/selenium/chrome/ChromeProfilejava/lang/ObjectDEFAULT_PROFILE*Lorg/openqa/selenium/chrome/ChromeProfile;REAP_PROFILE_PROPERTYLjava/lang/String; ConstantValue webdriver.reap_profile directoryLjava/io/File;proxyLorg/openqa/selenium/Proxy;acceptUntrustedCertsZ()VCode java/io/FileWEBDRIVER_DEFAULT_PROFILE  (Ljava/lang/String;)V  (Ljava/io/File;)V ! LineNumberTableLocalVariableTable %  ' ) this , -.createProfileDir()Ljava/io/File;setAcceptUntrustedCertificates(Z)VacceptUntrustedSslgetUntrustedCertificatesFlag()Ljava/lang/String;5--ignore-certificate-errors7 getDirectory:profile <>=*org/openqa/selenium/io/TemporaryFilesystem ?@ createTempDir4(Ljava/lang/String;Ljava/lang/String;)Ljava/io/File;Bfalse DFEjava/lang/System GH setProperty8(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;tempProfileDirgetProxy()Lorg/openqa/selenium/Proxy; M setProxy(Lorg/openqa/selenium/Proxy;)Vequals(Ljava/lang/Object;)Z S PQ SobjLjava/lang/Object;other SourceFileChromeProfile.java!    8YY " "#O*$*+&*("01 23#* 6*+" 9:# */0>*(" FG#*1239*(46"J# *8./*&"N# * -.D96;K ACW*"WYZ#  I JK/*L"^# *NO>*+L" bc#*PQZ++M*& ,&*&*&,&R*L ,L*L*L,LT"* gh jkl1m3oApVqXs# Z*ZUVLWXYPK %^D>4{;((:org/openqa/selenium/chrome/ChromeNotRunningException.class14org/openqa/selenium/chrome/ChromeNotRunningException&org/openqa/selenium/WebDriverException()VCode  LineNumberTableLocalVariableTablethis6Lorg/openqa/selenium/chrome/ChromeNotRunningException;(Ljava/lang/String;)V  messageLjava/lang/String;(Ljava/lang/Throwable;)V  causeLjava/lang/Throwable;*(Ljava/lang/String;Ljava/lang/Throwable;)V   SourceFileChromeNotRunningException.java!3*   >*+ !"  >*+ %&  I*+, )*  PK lC>r+org/openqa/selenium/chrome/.svn/all-wcpropsK 25 svn:wc:ra_dav:version-url V 68 /svn/!svn/ver/11222/trunk/java/client/src/org/openqa/selenium/chrome END ChromeBinary.java K 25 svn:wc:ra_dav:version-url V 86 /svn/!svn/ver/11222/trunk/java/client/src/org/openqa/selenium/chrome/ChromeBinary.java END FatalChromeException.java K 25 svn:wc:ra_dav:version-url V 94 /svn/!svn/ver/11222/trunk/java/client/src/org/openqa/selenium/chrome/FatalChromeException.java END ChromeWebElement.java K 25 svn:wc:ra_dav:version-url V 90 /svn/!svn/ver/11222/trunk/java/client/src/org/openqa/selenium/chrome/ChromeWebElement.java END ChromeDriver.java K 25 svn:wc:ra_dav:version-url V 86 /svn/!svn/ver/11222/trunk/java/client/src/org/openqa/selenium/chrome/ChromeDriver.java END ChromeExtension.java K 25 svn:wc:ra_dav:version-url V 89 /svn/!svn/ver/11222/trunk/java/client/src/org/openqa/selenium/chrome/ChromeExtension.java END ChromeCommandExecutor.java K 25 svn:wc:ra_dav:version-url V 95 /svn/!svn/ver/11222/trunk/java/client/src/org/openqa/selenium/chrome/ChromeCommandExecutor.java END build.desc K 25 svn:wc:ra_dav:version-url V 79 /svn/!svn/ver/11222/trunk/java/client/src/org/openqa/selenium/chrome/build.desc END ChromeProfile.java K 25 svn:wc:ra_dav:version-url V 87 /svn/!svn/ver/11222/trunk/java/client/src/org/openqa/selenium/chrome/ChromeProfile.java END ChromeNotRunningException.java K 25 svn:wc:ra_dav:version-url V 99 /svn/!svn/ver/11222/trunk/java/client/src/org/openqa/selenium/chrome/ChromeNotRunningException.java END PK lC>o'org/openqa/selenium/chrome/.svn/entries8 dir 11264 http://selenium.googlecode.com/svn/trunk/java/client/src/org/openqa/selenium/chrome http://selenium.googlecode.com/svn 2011-02-01T12:22:07.764961Z 11222 simon.m.stewart svn:special svn:externals svn:needs-lock 07704840-8298-11de-bf8c-fd130f914ac9 ChromeBinary.java file 2011-02-03T12:01:18.000000Z 578690f4bd9eb354ba40c7bdf74921e8 2010-11-22T13:32:30.579967Z 10392 simon.m.stewart FatalChromeException.java file 2011-02-03T12:01:18.000000Z 0b61c11fae61ae5a7f2732fb1e521e17 2009-08-27T10:17:14.330389Z 7160 dawagner ChromeWebElement.java file 2011-02-03T12:01:18.000000Z 356d552e93477c3f096b9df4ea8f6a98 2011-01-18T16:04:46.488656Z 11008 eran.mes@gmail.com ChromeDriver.java file 2011-02-03T12:01:18.000000Z c955eaea5c8c04968e1aaa604f14e793 2010-12-21T19:40:07.595523Z 10724 simon.m.stewart ChromeExtension.java file 2011-02-03T12:01:18.000000Z cf3c019749cc1ee92f09c3b1819f9e33 2011-01-17T21:50:09.122540Z 10988 simon.m.stewart ChromeCommandExecutor.java file 2011-02-03T12:01:18.000000Z bf2ed0bfb6cb2fa3d67e0581c77be2ed 2010-12-05T17:43:46.474389Z 10524 jmleyba build.desc file 2011-02-03T12:01:18.000000Z 162dba6ad85dec18a10f2c382e3a7fde 2011-02-01T12:22:07.764961Z 11222 simon.m.stewart ChromeProfile.java file 2011-02-03T12:01:18.000000Z 2f895b4fbb889960b3db4f4df1ba7e0c 2011-01-17T21:50:09.122540Z 10988 simon.m.stewart ChromeNotRunningException.java file 2011-02-03T12:01:18.000000Z 33a4b69a1da1da555e5212a8ba96b373 2010-03-13T21:05:51.939598Z 8500 simon.m.stewart PK lC>G&org/openqa/selenium/chrome/.svn/format8 PK lC>18i$$Dorg/openqa/selenium/chrome/.svn/text-base/ChromeBinary.java.svn-basepackage org.openqa.selenium.chrome; import com.google.common.annotations.VisibleForTesting; import com.google.common.collect.Lists; import org.openqa.selenium.Platform; import org.openqa.selenium.Proxy; import org.openqa.selenium.WebDriverException; import org.openqa.selenium.remote.internal.CircularOutputStream; import org.openqa.selenium.remote.internal.SubProcess; import java.io.BufferedReader; import java.io.File; import java.io.IOException; import java.io.InputStreamReader; import java.util.ArrayList; import java.util.List; import static org.openqa.selenium.Proxy.ProxyType; public class ChromeBinary { private static final String CHROME_LOG_FILE_PROPERTY = "webdriver.chrome.logFile"; private static final int BACKOFF_INTERVAL = 2500; private volatile int linearBackoffCoefficient = 1; private final ChromeProfile profile; private final ChromeExtension extension; private int port; private SubProcess chromeProcess; private List customFlags = new ArrayList(); protected String chromeBinaryLocation = null; /** * @param profile The Chrome profile to use. * @param extension The extension to launch Chrome with. * @throws WebDriverException If an error occurs locating the Chrome executable. * @see ChromeBinary(ChromeProfile, ChromeExtension, int) */ public ChromeBinary(ChromeProfile profile, ChromeExtension extension) { this(profile, extension, 0); } /** * Creates a new instance for managing an instance of Chrome using the given * {@code profile} and {@code extension}. * * @param profile The Chrome profile to use. * @param extension The extension to launch Chrome with. * @param port Which port to start Chrome on, or 0 for any free port. * @throws WebDriverException If an error occurs locating the Chrome executable. */ public ChromeBinary(ChromeProfile profile, ChromeExtension extension, int port) { this.profile = profile; this.extension = extension; this.port = port; } private SubProcess prepareProcess() { String serverUrl = String.format("http://localhost:%d/chromeCommandExecutor", this.port); ProcessBuilder builder; try { List commandline = getCommandline(serverUrl); builder = new ProcessBuilder(commandline); } catch (IOException e) { throw new WebDriverException(e); } File logFile = getLogFile(); return logFile == null ? new SubProcess(builder) : new SubProcess(builder, new CircularOutputStream(logFile)); } private static File getLogFile() { String logFile = System.getProperty(CHROME_LOG_FILE_PROPERTY); return logFile == null ? null : new File(logFile); } public void addCustomBinaryFlag(String flag) { this.customFlags.add(flag); } public ChromeProfile getProfile() { return profile; } public ChromeExtension getExtension() { return extension; } public int getPort() { return port; } public void setPort(int port) { this.port = port; } /** * Starts the Chrome process for WebDriver. */ public void start() { if (chromeProcess == null) { chromeProcess = prepareProcess(); } chromeProcess.launch(); try { Thread.sleep(BACKOFF_INTERVAL * linearBackoffCoefficient); } catch (InterruptedException e) { //Nothing sane to do here } } @VisibleForTesting List getCommandline(String serverUrl) throws IOException { List commandline = Lists.newArrayList( getChromeBinaryLocation(), "--load-extension=" + extension.getDirectory().getAbsolutePath(), "--activate-on-launch", "--homepage=about:blank", "--no-first-run", "--disable-hang-monitor", "--disable-popup-blocking", "--disable-prompt-on-repost", "--no-default-browser-check", "--disable-translate", profile.getUntrustedCertificatesFlag() ); commandline.addAll(this.customFlags); if (!profile.equals(ChromeProfile.DEFAULT_PROFILE)) { commandline.add("--user-data-dir=" + profile.getDirectory().getAbsolutePath()); } appendProxyArguments(commandline) .add(serverUrl); return commandline; } private List appendProxyArguments(List commandline) { Proxy proxy = profile.getProxy(); if (proxy == null) { return commandline; } if (proxy.getProxyAutoconfigUrl() != null) { commandline.add("--proxy-pac-url=" + proxy.getProxyAutoconfigUrl()); } else if (proxy.getHttpProxy() != null) { commandline.add("--proxy-server=" + proxy.getHttpProxy()); } else if (proxy.isAutodetect()) { commandline.add("--proxy-auto-detect"); } else if (proxy.getProxyType() == ProxyType.DIRECT) { commandline.add("--no-proxy-server"); } else if (proxy.getProxyType() != ProxyType.SYSTEM) { throw new IllegalStateException("Unsupported proxy setting"); } return commandline; } /** * @return Whether the Chrome process managed by this instance is still * running. */ public boolean isRunning() { return chromeProcess.isRunning(); } /** * Kills the Chrome process managed by this instance. */ public void kill() { if (chromeProcess != null) { chromeProcess.shutdown(); } } public void incrementBackoffBy(int diff) { linearBackoffCoefficient += diff; } /** * Locates the Chrome executable on the current platform. * First looks in the webdriver.chrome.bin property, then searches * through the default expected locations. * @return chrome.exe * @throws IOException if file could not be found/accessed */ protected String getChromeBinaryLocation() throws IOException { if (!isChromeBinaryLocationKnown()) { chromeBinaryLocation = System.getProperty("webdriver.chrome.bin"); if (chromeBinaryLocation == null) { List paths = new ArrayList(); if (Platform.getCurrent().is(Platform.WINDOWS)) { paths.add(getWindowsBinaryLocationFromRegistry()); paths.add(getDefaultWindowsBinaryLocation()); } else if (Platform.getCurrent().is(Platform.UNIX)) { paths.add("/usr/bin/google-chrome"); paths.add("/usr/bin/chromium"); //TODO: Add `which google-chrome` and `which chromium` } else if (Platform.getCurrent().is(Platform.MAC)) { paths.add("/Applications/Google Chrome.app/Contents/MacOS/Google Chrome"); paths.add("/Users/" + System.getProperty("user.name") + "/Applications/Google Chrome.app/Contents/MacOS/Google Chrome"); } else { throw new WebDriverException("Unsupported operating system. " + "Could not locate Chrome. Set webdriver.chrome.bin"); } for (String path : paths) { if (path == null) { continue; } File binary = new File(path); if (binary.exists()) { chromeBinaryLocation = binary.getCanonicalFile().getAbsoluteFile().toString(); break; } } } if (!isChromeBinaryLocationKnown()) { throw new WebDriverException("Couldn't locate Chrome. " + "Set webdriver.chrome.bin"); } } return chromeBinaryLocation; } protected boolean isChromeBinaryLocationKnown() { return chromeBinaryLocation != null && new File(chromeBinaryLocation).exists(); } /** * Returns null if couldn't read value from registry */ protected static final String getWindowsBinaryLocationFromRegistry() { //TODO: Promote org.openqa.selenium.server.browserlaunchers.WindowsUtils //to common and reuse that to read the registry if (!Platform.WINDOWS.is(Platform.getCurrent())) { throw new UnsupportedOperationException("Cannot get registry value on non-Windows systems"); } try { Process process = Runtime.getRuntime().exec( "reg query \"HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\App Paths\\chrome.exe\" /v \"\""); BufferedReader reader = new BufferedReader(new InputStreamReader( process.getInputStream())); process.waitFor(); String line; while ((line = reader.readLine()) != null) { if (line.contains(" ")) { String[] tokens = line.split("REG_SZ"); return tokens[tokens.length - 1].trim(); } } } catch (IOException e) { //Drop through to return null } catch (InterruptedException e) { //Drop through to return null } return null; } protected static final String getDefaultWindowsBinaryLocation() { StringBuilder path = new StringBuilder(); path.append(System.getProperty("user.home")); //XXX: Not localised for other languages if (Platform.VISTA.is(Platform.getCurrent())) { path.append("\\AppData\\Local"); } else if (Platform.XP.is(Platform.getCurrent())) { path.append("\\Local Settings\\Application Data"); } path.append("\\Google\\Chrome\\Application\\chrome.exe"); return path.toString(); } } PK lC>ӿ己PPMorg/openqa/selenium/chrome/.svn/text-base/ChromeCommandExecutor.java.svn-basepackage org.openqa.selenium.chrome; import static org.openqa.selenium.remote.DriverCommand.ADD_COOKIE; import static org.openqa.selenium.remote.DriverCommand.CLEAR_ELEMENT; import static org.openqa.selenium.remote.DriverCommand.CLICK_ELEMENT; import static org.openqa.selenium.remote.DriverCommand.CLOSE; import static org.openqa.selenium.remote.DriverCommand.DELETE_ALL_COOKIES; import static org.openqa.selenium.remote.DriverCommand.DELETE_COOKIE; import static org.openqa.selenium.remote.DriverCommand.EXECUTE_ASYNC_SCRIPT; import static org.openqa.selenium.remote.DriverCommand.EXECUTE_SCRIPT; import static org.openqa.selenium.remote.DriverCommand.FIND_CHILD_ELEMENT; import static org.openqa.selenium.remote.DriverCommand.FIND_CHILD_ELEMENTS; import static org.openqa.selenium.remote.DriverCommand.FIND_ELEMENT; import static org.openqa.selenium.remote.DriverCommand.FIND_ELEMENTS; import static org.openqa.selenium.remote.DriverCommand.GET; import static org.openqa.selenium.remote.DriverCommand.GET_ACTIVE_ELEMENT; import static org.openqa.selenium.remote.DriverCommand.GET_ALL_COOKIES; import static org.openqa.selenium.remote.DriverCommand.GET_COOKIE; import static org.openqa.selenium.remote.DriverCommand.GET_CURRENT_URL; import static org.openqa.selenium.remote.DriverCommand.GET_CURRENT_WINDOW_HANDLE; import static org.openqa.selenium.remote.DriverCommand.GET_ELEMENT_ATTRIBUTE; import static org.openqa.selenium.remote.DriverCommand.GET_ELEMENT_LOCATION; import static org.openqa.selenium.remote.DriverCommand.GET_ELEMENT_LOCATION_ONCE_SCROLLED_INTO_VIEW; import static org.openqa.selenium.remote.DriverCommand.GET_ELEMENT_SIZE; import static org.openqa.selenium.remote.DriverCommand.GET_ELEMENT_TAG_NAME; import static org.openqa.selenium.remote.DriverCommand.GET_ELEMENT_TEXT; import static org.openqa.selenium.remote.DriverCommand.GET_ELEMENT_VALUE; import static org.openqa.selenium.remote.DriverCommand.GET_ELEMENT_VALUE_OF_CSS_PROPERTY; import static org.openqa.selenium.remote.DriverCommand.GET_PAGE_SOURCE; import static org.openqa.selenium.remote.DriverCommand.GET_TITLE; import static org.openqa.selenium.remote.DriverCommand.GET_WINDOW_HANDLES; import static org.openqa.selenium.remote.DriverCommand.GO_BACK; import static org.openqa.selenium.remote.DriverCommand.GO_FORWARD; import static org.openqa.selenium.remote.DriverCommand.HOVER_OVER_ELEMENT; import static org.openqa.selenium.remote.DriverCommand.IMPLICITLY_WAIT; import static org.openqa.selenium.remote.DriverCommand.IS_ELEMENT_DISPLAYED; import static org.openqa.selenium.remote.DriverCommand.IS_ELEMENT_ENABLED; import static org.openqa.selenium.remote.DriverCommand.IS_ELEMENT_SELECTED; import static org.openqa.selenium.remote.DriverCommand.QUIT; import static org.openqa.selenium.remote.DriverCommand.REFRESH; import static org.openqa.selenium.remote.DriverCommand.SCREENSHOT; import static org.openqa.selenium.remote.DriverCommand.SEND_KEYS_TO_ELEMENT; import static org.openqa.selenium.remote.DriverCommand.SET_ELEMENT_SELECTED; import static org.openqa.selenium.remote.DriverCommand.SET_SCRIPT_TIMEOUT; import static org.openqa.selenium.remote.DriverCommand.SUBMIT_ELEMENT; import static org.openqa.selenium.remote.DriverCommand.SWITCH_TO_FRAME; import static org.openqa.selenium.remote.DriverCommand.SWITCH_TO_WINDOW; import static org.openqa.selenium.remote.DriverCommand.TOGGLE_ELEMENT; import org.openqa.selenium.WebDriverException; import org.openqa.selenium.internal.Lock; import org.openqa.selenium.internal.SocketLock; import org.openqa.selenium.remote.BeanToJsonConverter; import org.openqa.selenium.remote.Command; import org.openqa.selenium.remote.CommandExecutor; import org.openqa.selenium.remote.DesiredCapabilities; import org.openqa.selenium.remote.DriverCommand; import org.openqa.selenium.remote.JsonToBeanConverter; import org.openqa.selenium.remote.Response; import com.google.common.collect.ImmutableMap; import org.json.JSONException; import org.json.JSONObject; import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; import java.io.UnsupportedEncodingException; import java.net.BindException; import java.net.InetSocketAddress; import java.net.ServerSocket; import java.net.Socket; import java.net.SocketException; import java.util.Map; import java.util.Queue; import java.util.concurrent.ConcurrentLinkedQueue; import java.util.concurrent.TimeUnit; import java.util.logging.Level; import java.util.logging.Logger; public class ChromeCommandExecutor implements CommandExecutor { private static final Logger LOG = Logger.getLogger(ChromeCommandExecutor.class.getName()); private static final long DEFAULT_TIMEOUT = TimeUnit.SECONDS.toMicros(120); private static final int MAX_START_RETRIES = 5; private static final String[] ELEMENT_ID_ARG = new String[] {"id"}; private static final String[] NO_ARGS = new String[] {}; private ChromeBinary binary; private long timeout = DEFAULT_TIMEOUT; //Whether the listening thread should listen private volatile boolean listen = false; ListeningThread listeningThread; private Map commands; /** * Creates a new ChromeCommandExecutor which listens on a free TCP port. * Doesn't return until the TCP port is connected to. * * @param binary The binary to use when {@link #start() starting} a new Chrome * instance. */ public ChromeCommandExecutor(ChromeBinary binary) { this.binary = binary; this.commands = ImmutableMap. builder() .put(CLOSE, NO_ARGS) .put(QUIT, NO_ARGS) .put(GET, new String[] {"url"}) .put(GO_BACK, NO_ARGS) .put(GO_FORWARD, NO_ARGS) .put(REFRESH, NO_ARGS) .put(ADD_COOKIE, new String[] {"cookie"}) .put(GET_ALL_COOKIES, NO_ARGS) .put(GET_COOKIE, new String[] {"name"}) .put(DELETE_ALL_COOKIES, NO_ARGS) .put(DELETE_COOKIE, new String[] {"name"}) .put(FIND_ELEMENT, new String[] {"using", "value"}) .put(FIND_ELEMENTS, new String[] {"using", "value"}) .put(FIND_CHILD_ELEMENT, new String[] {"id", "using", "value"}) .put(FIND_CHILD_ELEMENTS, new String[] {"id", "using", "value"}) .put(CLEAR_ELEMENT, ELEMENT_ID_ARG) .put(CLICK_ELEMENT, ELEMENT_ID_ARG) .put(HOVER_OVER_ELEMENT, ELEMENT_ID_ARG) .put(SEND_KEYS_TO_ELEMENT, new String[] {"id", "value"}) .put(SUBMIT_ELEMENT, ELEMENT_ID_ARG) .put(TOGGLE_ELEMENT, ELEMENT_ID_ARG) .put(GET_ELEMENT_ATTRIBUTE, new String[] {"id", "name"}) .put(GET_ELEMENT_LOCATION_ONCE_SCROLLED_INTO_VIEW, ELEMENT_ID_ARG) .put(GET_ELEMENT_LOCATION, ELEMENT_ID_ARG) .put(GET_ELEMENT_SIZE, ELEMENT_ID_ARG) .put(GET_ELEMENT_TAG_NAME, ELEMENT_ID_ARG) .put(GET_ELEMENT_TEXT, ELEMENT_ID_ARG) .put(GET_ELEMENT_VALUE, ELEMENT_ID_ARG) .put(GET_ELEMENT_VALUE_OF_CSS_PROPERTY, new String[] {"id", "propertyName"}) .put(IS_ELEMENT_DISPLAYED, ELEMENT_ID_ARG) .put(IS_ELEMENT_ENABLED, ELEMENT_ID_ARG) .put(IS_ELEMENT_SELECTED, ELEMENT_ID_ARG) .put(SET_ELEMENT_SELECTED, ELEMENT_ID_ARG) .put(GET_ACTIVE_ELEMENT, NO_ARGS) .put(SWITCH_TO_FRAME, new String[] {"id"}) .put(GET_CURRENT_WINDOW_HANDLE, NO_ARGS) .put(GET_WINDOW_HANDLES, NO_ARGS) .put(SWITCH_TO_WINDOW, new String[] {"name"}) .put(GET_CURRENT_URL, NO_ARGS) .put(GET_PAGE_SOURCE, NO_ARGS) .put(GET_TITLE, NO_ARGS) .put(EXECUTE_SCRIPT, new String[] {"script", "args"}) .put(EXECUTE_ASYNC_SCRIPT, new String[] {"script", "args"}) .put(SCREENSHOT, NO_ARGS) .put(IMPLICITLY_WAIT, new String[] {"ms"}) .put(SET_SCRIPT_TIMEOUT, new String[] {"ms"}) .build(); } public ChromeBinary getBinary() { return binary; } /** * @return Whether an instance of Chrome is currently connected. */ boolean hasClient() { return listeningThread != null && listeningThread.hasClient; } /** * @return the port being listened on. */ public int getPort() { return listeningThread == null ? -1 : listeningThread.serverSocket.getLocalPort(); } /** * Executes the passed command * @param command command to execute * @return response to command * @throws IllegalStateException if no socket was present */ public Response execute(Command command) throws IOException { // Chrome doesn't support sessions yet, so just send a canned response. if (DriverCommand.NEW_SESSION.equals(command.getName())) { return createCannedNewSessionResponse(); } else { sendCommand(command); return handleResponse(); } } /** * Creates a canned response for * {@link DriverCommand#NEW_SESSION NEW_SESSION} commands. * * @return A canned response. */ private Response createCannedNewSessionResponse() { Response response = new Response(); response.setSessionId("[no session]"); // This is dumb, but temporary until we add sessions to the ChromeDriver DesiredCapabilities capabilities = DesiredCapabilities.chrome(); capabilities.setJavascriptEnabled(true); Map capabilitiesMap; try { capabilitiesMap = new JsonToBeanConverter() .convert(Map.class, new BeanToJsonConverter().convert(capabilities)); } catch (WebDriverException e) { throw e; } catch (Exception e) { throw new WebDriverException(e); } response.setValue(capabilitiesMap); return response; } /** * Sends the passed command to the Chrome extension on the * longest-time accepted socket. Removes the socket from the queue when done * @param command command to send * @throws IOException if couldn't write command to socket */ private void sendCommand(Command command) throws IOException { if (!hasClient()) { throw new IllegalStateException("Cannot execute command without a client"); } //Respond to request with the command String commandStringToSend = fillArgs(command); byte[] data = fillTwoHundredWithJson(commandStringToSend); Socket oldestSocket = getOldestSocket(); writeAndFlushToSocket(data, oldestSocket); } private void writeAndFlushToSocket(byte[] data, Socket socket) throws IOException { try { socket.getOutputStream().write(data); socket.getOutputStream().flush(); } finally { try { //This shouldn't be necessary with SO_LINGER set, but seems to make a difference Thread.sleep(5); } catch (InterruptedException e) {} socket.close(); //Removes the socket if it is present, no-op otherwise listeningThread.sockets.remove(socket); } } String fillArgs(Command command) { String[] parameterNames = commands.get(command.getName()); if (parameterNames.length != command.getParameters().size()) { throw new WebDriverException(new IllegalArgumentException( "Did not supply the expected number of parameters")); } JSONObject json; try { String rawJson = new BeanToJsonConverter().convert(command.getParameters()); json = new JSONObject(rawJson); json.put("request", command.getName()); for (String parameterName : parameterNames) { //Icky icky special case if (!command.getParameters().containsKey(parameterName)) { throw new WebDriverException("Missing required parameter \"" + parameterName + "\""); } } } catch (JSONException e) { throw new WebDriverException(e); } return json.toString(); } /** * Wraps the passed message up in an HTTP 200 response, with the Content-type * header set to application/json * @param message message to wrap up as the response * @return The passed message, wrapped up in an HTTP 200 response, * encoded in UTF-8 */ private byte[] fillTwoHundredWithJson(String message) { return fillTwoHundred(message, "application/json; charset=UTF-8"); } /** * Fills in an HTTP 200 response with the passed message and content type. * @param message Response * @param contentType HTTP Content-type header * @return The HTTP 200 message encoded in UTF-8 as an array of bytes */ private byte[] fillTwoHundred(String message, String contentType) { try { String httpMessage = "HTTP/1.1 200 OK" + "\r\nContent-Length: " + message.getBytes("UTF-8").length + "\r\nContent-Type: " + contentType + "\r\n\r\n" + message; return httpMessage.getBytes("UTF-8"); } catch (UnsupportedEncodingException e) { //Should never happen - Java ships with UTF-8 throw new WebDriverException("Your environment doesn't support UTF-8"); } } /** * Listens for the response to a command on the oldest socket in the queue * and parses it. * Expects the response to be an HTTP request, which ends in the line: * EOResponse * Responds by sending a 200 response containing QUIT * @return response to the command. * @throws IOException if there are errors with the socket being used */ private Response handleResponse() throws IOException { Socket socket = getOldestSocket(); StringBuilder resultBuilder = new StringBuilder(); BufferedReader reader = new BufferedReader( new InputStreamReader(socket.getInputStream())); String line; boolean hasSeenDoubleCRLF = false; //Whether we are out of headers yet while ((line = reader.readLine()) != null && !line.equals("EOResponse")) { if (hasSeenDoubleCRLF) { if (resultBuilder.length() > 0) { //Out of headers, and not the first line, so append a newline resultBuilder.append("\n"); } resultBuilder.append(line); } if (line.equals("")) { hasSeenDoubleCRLF = true; } } try { return new JsonToBeanConverter().convert(Response.class, resultBuilder.toString()); } catch (WebDriverException e) { throw e; } catch (Exception e) { throw new WebDriverException(e); } } private Socket getOldestSocket() { Socket socket; // Peek, rather than poll, so that if it all goes horribly wrong, we can // just close all sockets in the queue, not having to worry about the // current ones. while ((socket = listeningThread.sockets.peek()) == null) { if (!binary.isRunning()) { throw new ChromeNotRunningException("Chrome is no longer running!"); } Thread.yield(); } return socket; } /** * Starts a new instanceof Chrome and waits for a TCP port connection from it. */ public void start() { Lock lock = newLock(); lock.lock(DEFAULT_TIMEOUT); try { int port = binary.getPort(); if (port == 0) { port = determineNextFreePort(SocketLock.DEFAULT_PORT); } binary.setPort(port); for (int retries = MAX_START_RETRIES; !hasClient() && retries > 0; retries--) { stop(); startListening(); binary.start(); //In case this attempt fails, we increment how long we wait before sending a command binary.incrementBackoffBy(1); } //The last one attempt succeeded, so we reduce back to that time binary.incrementBackoffBy(-1); if (!hasClient()) { stop(); throw new FatalChromeException("Cannot create chrome driver"); } } catch (IOException e) { throw new WebDriverException(e); } finally { lock.unlock(); } } protected int determineNextFreePort(int port) throws IOException { // Attempt to connect to the given port on the host // If we can't connect, then we're good to use it int newport; for (newport = port; newport < port + 200; newport++) { Socket socket = new Socket(); InetSocketAddress address = new InetSocketAddress("localhost", newport); try { socket.bind(address); return newport; } catch (BindException e) { // Port is already bound. Skip it and continue } finally { socket.close(); } } throw new WebDriverException( String.format("Cannot find free port in the range %d to %d ", port, newport)); } protected Lock newLock() { return new SocketLock(); } public void setTimeout(long timeout) { this.timeout = timeout; } /** * Starts listening for new socket connections from Chrome. Does not return * until the TCP port is connected to. */ private void startListening() { ServerSocket serverSocket; try { serverSocket = new ServerSocket(binary.getPort()); } catch (IOException e) { throw new WebDriverException(e); } listen = true; listeningThread = new ListeningThread(serverSocket); listeningThread.start(); } /** * Shuts down Chrome and stops listening for new socket connections. */ public void stop() { binary.kill(); listen = false; if (listeningThread != null) { listeningThread.stopListening(); listeningThread = null; } } /** * Thread which, when spawned, accepts all sockets on its ServerSocket and * queues them up */ private class ListeningThread extends Thread { private boolean isListening = false; private Queue sockets = new ConcurrentLinkedQueue(); private ServerSocket serverSocket; private volatile boolean hasClient = false; ListeningThread(ServerSocket serverSocket) { this.serverSocket = serverSocket; } @Override public void run() { if (!isListening) { listen(); } } public void listen() { isListening = true; try { while (listen && !serverSocket.isClosed()) { Socket acceptedSocket = serverSocket.accept(); acceptedSocket.setSoLinger(true, 10); int r = acceptedSocket.getInputStream().read(); if (r != 'G') { //Not a GET. //Use browser sending a GET to sniff the URL we need to talk to, //so we ignore any GET requests, but queue up any others, //which we assume to be POSTs from the extension sockets.add(acceptedSocket); hasClient = true; } else { //The browser, rather than extension, is visiting the page //Because the extension always uses POST //Serve up a holding page and ignore the socket //sockets.add(acceptedSocket); respondWithHoldingPage(acceptedSocket); } } } catch (SocketException e) { //We are shutting down sockets manually } catch (IOException e) { isListening = false; throw new WebDriverException(e); } } private void respondWithHoldingPage(Socket socket) throws IOException { //We offer a reload to work around http://crbug.com/11547 on Mac byte[] data = fillTwoHundred( "

ChromeDriver server started and connected. Please leave this tab open.

", "Content-Type: text/html"); writeAndFlushToSocket(data, socket); } public void stopListening() { try { closeCurrentSockets(); } catch (Exception e) { throw new WebDriverException(e); } finally { try { if (!serverSocket.isClosed()) { serverSocket.close(); while (!serverSocket.isClosed()) { Thread.yield(); } } } catch (IOException e) { LOG.log(Level.FINE, "I/O error while closing the server socket", e); } } } private void closeCurrentSockets() { for (Socket socket : sockets) { try { socket.close(); sockets.remove(socket); } catch (IOException e) { //Nothing we can sanely do here } } } } } PK lC>3Um''Dorg/openqa/selenium/chrome/.svn/text-base/ChromeDriver.java.svn-basepackage org.openqa.selenium.chrome; import static org.openqa.selenium.remote.DriverCommand.SCREENSHOT; import org.openqa.selenium.OutputType; import org.openqa.selenium.TakesScreenshot; import org.openqa.selenium.WebDriverException; import org.openqa.selenium.remote.DesiredCapabilities; import org.openqa.selenium.remote.RemoteWebDriver; import org.openqa.selenium.remote.RemoteWebElement; import org.openqa.selenium.remote.Response; import org.openqa.selenium.remote.internal.JsonToWebElementConverter; import com.google.common.collect.ImmutableMap; import java.util.Map; public class ChromeDriver extends RemoteWebDriver implements TakesScreenshot { //Accept untrusted SSL certificates. //TODO: This should probably be a capability, or at least drawn out to be shared with FirefoxDriver public static final boolean ACCEPT_UNTRUSTED_CERTIFICATES = true; public ChromeDriver(ChromeBinary binary) { super(new ChromeCommandExecutor(binary), DesiredCapabilities.chrome()); setElementConverter(new JsonToWebElementConverter(this) { @Override protected RemoteWebElement newRemoteWebElement() { return new ChromeWebElement(ChromeDriver.this); } }); } /** * Starts up a new instance of Chrome using the specified profile and * extension. * * @param profile The profile to use. * @param extension The extension to use. */ public ChromeDriver(ChromeProfile profile, ChromeExtension extension) { this(new ChromeBinary(profile, extension)); } /** * Starts up a new instance of Chrome, with the required extension loaded, * and has it connect to a new ChromeCommandExecutor on its port * * @see #ChromeDriver(ChromeProfile, ChromeExtension) */ public ChromeDriver() { this(new ChromeProfile(), new ChromeExtension()); } /** * By default will try to load Chrome from system property * webdriver.chrome.bin and the extension from * webdriver.chrome.extensiondir. If the former fails, will try to guess the * path to Chrome. If the latter fails, will try to unzip from the JAR we * hope we're in. If these fail, throws exceptions. */ @Override protected void startClient() { ((ChromeCommandExecutor)getCommandExecutor()).start(); } /** * Kills the started Chrome process and ChromeCommandExecutor if they exist */ @Override protected void stopClient() { ((ChromeCommandExecutor)getCommandExecutor()).stop(); } /** * Executes a passed command using the current ChromeCommandExecutor * @param driverCommand command to execute * @param parameters parameters of command being executed * @return response to the command (a Response wrapping a null value if none) */ @Override protected Response execute(String driverCommand, Map parameters) { try { return super.execute(driverCommand, parameters); } catch (Exception e) { if (e instanceof IllegalArgumentException || e instanceof FatalChromeException) { //These exceptions may leave the extension hung, or in an //inconsistent state, so we restart Chrome stopClient(); startClient(); } if (e instanceof RuntimeException) { throw (RuntimeException)e; } else { throw new WebDriverException(e); } } } @Override public boolean isJavascriptEnabled() { return true; } @Override protected RemoteWebElement newRemoteWebElement() { RemoteWebElement element = new ChromeWebElement(this); return element; } public X getScreenshotAs(OutputType target) { return target.convertFromBase64Png(execute(SCREENSHOT, ImmutableMap.of()) .getValue().toString()); } } PK lC>蘵Gorg/openqa/selenium/chrome/.svn/text-base/ChromeExtension.java.svn-base/* Copyright 2007-2009 WebDriver committers Copyright 2007-2009 Google Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package org.openqa.selenium.chrome; import org.openqa.selenium.WebDriverException; import org.openqa.selenium.io.FileHandler; import java.io.File; import java.io.FileNotFoundException; import java.io.IOException; import java.io.InputStream; /** * Class for managing the WebDriver Chrome extension. * * @author jmleyba@google.com (Jason Leyba) */ public class ChromeExtension { /** * System property used to specify which extension directory to use. */ public static final String CHROME_EXTENSION_DIRECTORY_PROPERTY = "webdriver.chrome.extensiondir"; private static final String DEFAULT_EXTENSION_PATH = "/chrome-extension.zip"; private static final String MANIFEST_FILE = "manifest.json"; private static volatile File defaultExtensionDir; private final File directory; /** * Create a new instance that manages the extension in the specified * directory. Assumes that the directory exists and has the required * files. * @param directory The directory to use as the Chrome extension. * @throws WebDriverException If the directory is not valid (e.g. does not * contain a manifest.json file). */ public ChromeExtension(File directory) throws WebDriverException { try { this.directory = checkExtensionForManifest(directory); } catch (IOException e) { throw new WebDriverException(e); } } /** * Creates a new instance using the directory specified by the criteria * defined by {@link #findChromeExtensionDir()}. * * @see ChromeExtension(File) * @see ChromeExtension#findChromeExtensionDir() */ public ChromeExtension() { this(findChromeExtensionDir()); } public File getDirectory() { return directory; } /** * Searches for the Chrome extension directory to use. Will first check the * directory specified by the {@code webdriver.chrome.extensiondir} system * property, and then will check the current classpath for * {@code chrome-extension.zip}. * * @return The Chrome extension directory. */ public static File findChromeExtensionDir() { File directory = defaultExtensionDir; if (directory == null) { synchronized (ChromeExtension.class) { directory = defaultExtensionDir; if (directory == null) { directory = defaultExtensionDir = loadExtension(); } } } return directory; } /** * Verifies that the given {@code directory} is a valid Chrome extension * directory. Will check if the directory has the required * {@code manifest.json} file. If not, it will check for the correct * platform manifest and copy it over. * * @param directory The directory to check. * @return The verified directory. * @throws IOException If the directory is not valid. */ private static File checkExtensionForManifest(File directory) throws IOException { if (!directory.isDirectory()) { throw new FileNotFoundException(String.format( "The specified directory is not a Chrome extension directory: %s; Try setting %s", directory.getAbsolutePath(), CHROME_EXTENSION_DIRECTORY_PROPERTY)); } File manifestFile = new File(directory, MANIFEST_FILE); if (!manifestFile.exists()) { File platformManifestFile = new File(directory, MANIFEST_FILE); if (!platformManifestFile.exists()) { throw new FileNotFoundException(String.format( "The specified extension has no %s file: %s", MANIFEST_FILE, directory.getAbsolutePath())); } FileHandler.copy(platformManifestFile, manifestFile); } return directory; } private static File loadExtension() { try { File extensionDir; String directory = System.getProperty(CHROME_EXTENSION_DIRECTORY_PROPERTY); if (directory != null && !"".equals(directory)) { extensionDir = new File(directory); } else { InputStream stream = ChromeProfile.class.getResourceAsStream(DEFAULT_EXTENSION_PATH); extensionDir = FileHandler.unzip(stream); } return checkExtensionForManifest(extensionDir); } catch (IOException e) { throw new WebDriverException(e); } } }PK lC>l~Qorg/openqa/selenium/chrome/.svn/text-base/ChromeNotRunningException.java.svn-base/* Copyright 2007-2010 WebDriver committers Copyright 2007-2010 Google Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package org.openqa.selenium.chrome; import org.openqa.selenium.WebDriverException; /** * Exception used to signal that Chrome is not (or is no longer) running. * * @author jmleyba@gmail.com (Jason Leyba) */ public class ChromeNotRunningException extends WebDriverException { public ChromeNotRunningException() { } public ChromeNotRunningException(String message) { super(message); } public ChromeNotRunningException(Throwable cause) { super(cause); } public ChromeNotRunningException(String message, Throwable cause) { super(message, cause); } } PK lC>ϳIz z Eorg/openqa/selenium/chrome/.svn/text-base/ChromeProfile.java.svn-base/* Copyright 2007-2009 WebDriver committers Copyright 2007-2009 Google Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package org.openqa.selenium.chrome; import org.openqa.selenium.Proxy; import org.openqa.selenium.io.TemporaryFilesystem; import java.io.File; /** * Manages the extension used by the {@link ChromeDriver}. * * @author jmleyba@google.com (Jason Leyba) */ public class ChromeProfile { /// Note: Using the default profile if it currently has windows open will fail, as the extension will not be installed // TODO(danielwh): This should really create a new profile identical to the default profile public static final ChromeProfile DEFAULT_PROFILE = new ChromeProfile(new File("WEBDRIVER_DEFAULT_PROFILE")); private static final String REAP_PROFILE_PROPERTY = "webdriver.reap_profile"; private final File directory; private Proxy proxy; private boolean acceptUntrustedCerts; /** * Create a new profile using the given directory. Assumes that the directory * exists and has the required files. * * @param directory The directory to use. */ public ChromeProfile(File directory) { this.directory = directory; acceptUntrustedCerts = ChromeDriver.ACCEPT_UNTRUSTED_CERTIFICATES; } /** * Creates a new profile using a temporary directory. */ public ChromeProfile() { this(createProfileDir()); } /** * Sets whether Chrome should accept SSL certificates which have expired, * signed by an unknown authority or are generally untrusted. * This is set to true by default. * * @param acceptUntrustedSsl Whether untrusted SSL certificates should be * accepted. */ public void setAcceptUntrustedCertificates(boolean acceptUntrustedSsl) { this.acceptUntrustedCerts = acceptUntrustedSsl; } public String getUntrustedCertificatesFlag() { return acceptUntrustedCerts ? "--ignore-certificate-errors" : ""; } public File getDirectory() { return directory; } /** * Creates a temporary directory to use as the Chrome profile directory. * * @return File object for the created directory. */ private static File createProfileDir() { File tempProfileDir = TemporaryFilesystem.createTempDir("profile", ""); System.setProperty(REAP_PROFILE_PROPERTY, "false"); return tempProfileDir; } public Proxy getProxy() { return proxy; } public void setProxy(Proxy proxy) { this.proxy = proxy; } @Override public boolean equals(Object obj) { if (!(obj instanceof ChromeProfile)) { return false; } ChromeProfile other = (ChromeProfile)obj; if ((this.directory == null && other.directory != null) || (this.directory != null && !(this.directory.equals(other.directory)))) { return false; } if ((this.proxy == null && other.proxy != null) || (this.proxy != null && !(this.proxy.equals(other.proxy)))) { return false; } return true; } }PK lC> KKHorg/openqa/selenium/chrome/.svn/text-base/ChromeWebElement.java.svn-basepackage org.openqa.selenium.chrome; import java.util.Map; import com.google.common.collect.ImmutableMap; import org.openqa.selenium.Point; import org.openqa.selenium.RenderedWebElement; import org.openqa.selenium.WebElement; import org.openqa.selenium.internal.Locatable; import org.openqa.selenium.internal.WrapsElement; import org.openqa.selenium.interactions.internal.Coordinates; import org.openqa.selenium.remote.DriverCommand; import org.openqa.selenium.remote.RenderedRemoteWebElement; import org.openqa.selenium.remote.Response; public class ChromeWebElement extends RenderedRemoteWebElement implements Locatable { public ChromeWebElement(ChromeDriver parent) { setParent(parent); } @Override public void dragAndDropBy(int moveRightBy, int moveDownBy) { throw new UnsupportedOperationException("Not yet supported in Chrome"); } @Override public void dragAndDropOn(RenderedWebElement element) { throw new UnsupportedOperationException("Not yet supported in Chrome"); } public org.openqa.selenium.Point getLocationOnScreenOnceScrolledIntoView() { Response response = execute(DriverCommand.GET_ELEMENT_LOCATION_ONCE_SCROLLED_INTO_VIEW, ImmutableMap.of("id", getId())); @SuppressWarnings("unchecked") Map rawPoint = (Map) response.getValue(); int x = ((Long) rawPoint.get("x")).intValue(); int y = ((Long) rawPoint.get("y")).intValue(); return new Point(x, y); } public Coordinates getCoordinates() { throw new UnsupportedOperationException("This chrome driver does not support advanced " + "interactions."); } @Override public int hashCode() { return getId().hashCode(); } @Override public boolean equals(Object obj) { if (!(obj instanceof WebElement)) { return false; } WebElement other = (WebElement) obj; if (other instanceof WrapsElement) { other = ((WrapsElement) obj).getWrappedElement(); } if (!(other instanceof ChromeWebElement)) { return false; } return getId().equals(((ChromeWebElement)other).getId()); } } PK lC>?CLorg/openqa/selenium/chrome/.svn/text-base/FatalChromeException.java.svn-basepackage org.openqa.selenium.chrome; import org.openqa.selenium.WebDriverException; public class FatalChromeException extends WebDriverException { public FatalChromeException(String message) { super(message); } } PK lC>=org/openqa/selenium/chrome/.svn/text-base/build.desc.svn-base java_library(name = "chrome", srcs = [ "*.java" ], deps = [ "//java/client/src/org/openqa/selenium/remote", ], resources = [ "//chrome:chrome_extension" ]) PK )hC>%org/openqa/selenium/chrome/build.desc java_library(name = "chrome", srcs = [ "*.java" ], deps = [ "//java/client/src/org/openqa/selenium/remote", ], resources = [ "//chrome:chrome_extension" ]) PK lC>O_Rww5org/openqa/selenium/support/internal/.svn/all-wcpropsK 25 svn:wc:ra_dav:version-url V 78 /svn/!svn/ver/11224/trunk/java/client/src/org/openqa/selenium/support/internal END PK lC>1org/openqa/selenium/support/internal/.svn/entries8 dir 11264 http://selenium.googlecode.com/svn/trunk/java/client/src/org/openqa/selenium/support/internal http://selenium.googlecode.com/svn 2008-12-16T11:57:14.384849Z 5958 simon.m.stewart svn:special svn:externals svn:needs-lock 07704840-8298-11de-bf8c-fd130f914ac9 PK lC>G0org/openqa/selenium/support/internal/.svn/format8 PK %^D>R R 7org/openqa/selenium/browserlaunchers/AsyncExecute.class1y1org/openqa/selenium/browserlaunchers/AsyncExecutejava/lang/Objectlog$Lorg/openqa/selenium/internal/Trace;()VCode &org/openqa/selenium/internal/NullTrace   LineNumberTableLocalVariableTable  this3Lorg/openqa/selenium/browserlaunchers/AsyncExecute;sleepTightInSeconds(J)V   sleepTighttimeoutInSecondsJ "!java/lang/Thread #sleep%java/lang/RuntimeException $' ((Ljava/lang/Throwable;)V*java/lang/InterruptedExceptiontimeoute Ljava/lang/InterruptedException; killProcess(Ljava/lang/Process;)I 132java/lang/Process 4destroy' 8:9#org/openqa/selenium/os/ProcessUtils ;<waitForProcessDeath(Ljava/lang/Process;J)I >@?#org/openqa/selenium/os/WindowsUtils AB thisIsWindows()ZD#Process didn't die after 10 seconds FHG"org/openqa/selenium/internal/Trace IJinfo(Ljava/lang/String;)V LNM org/openqa/selenium/os/UnixUtils OPkill9(Ljava/lang/Process;)VR>Process refused to die after 10 seconds, and couldn't kill9 it FT UVerror*(Ljava/lang/String;Ljava/lang/Throwable;)VXjava/lang/StringBuilderZ@Process refused to die after 10 seconds, and couldn't kill9 it: W\ J ^`_java/lang/Exception ab getMessage()Ljava/lang/String; Wd efappend-(Ljava/lang/String;)Ljava/lang/StringBuilder; Wh ibtoString $k Vm>org/openqa/selenium/os/ProcessUtils$ProcessStillAliveExceptionprocessLjava/lang/Process; exitValueIex@Lorg/openqa/selenium/os/ProcessUtils$ProcessStillAliveException;Ljava/lang/Exception; SourceFileAsyncExecute.java InnerClassesProcessStillAliveException! / Y  "  /*    7 i +,    Z M$Y,&)678:+ ,- ./ [*0*57<MM=,CE*K*57<+NQ-S$YWYY[-]cg,j l.1^>DGHIJM"N&O1P2Q=RASTTURYW>[no pq.pqYpqIrs2',tuvw l8x PK %^D>*RRCorg/openqa/selenium/browserlaunchers/MacProxyManager$CodeName.class1i=org/openqa/selenium/browserlaunchers/MacProxyManager$CodeNamejava/lang/EnumPUMA?Lorg/openqa/selenium/browserlaunchers/MacProxyManager$CodeName;JAGUARPANTHERTIGERLEOPARD minorVersionLjava/lang/String; ENUM$VALUES@[Lorg/openqa/selenium/browserlaunchers/MacProxyManager$CodeName;()VCode1  ((Ljava/lang/String;ILjava/lang/String;)V  2  "3 $  '4 )  ,5 .  0 LineNumberTableLocalVariableTable 4 5(Ljava/lang/String;I)V 7 thisS(Ljava/lang/String;)Lorg/openqa/selenium/browserlaunchers/MacProxyManager$CodeName; ; <=valuesB()[Lorg/openqa/selenium/browserlaunchers/MacProxyManager$CodeName; ?A@java/lang/String BCequals(Ljava/lang/Object;)ZE"java/lang/IllegalArgumentExceptionGjava/lang/StringBuilderI!No codename matches minorVersion FK L(Ljava/lang/String;)V FN OPappend-(Ljava/lang/String;)Ljava/lang/StringBuilder; FR STtoString()Ljava/lang/String; DKcn XZYjava/lang/System [\ arraycopy*(Ljava/lang/Object;ILjava/lang/Object;II)VvalueOf _ ]`5(Ljava/lang/Class;Ljava/lang/String;)Ljava/lang/Enum; SourceFileMacProxyManager.java SignatureQLjava/lang/Enum; InnerClassesg4org/openqa/selenium/browserlaunchers/MacProxyManagerCodeName@0@@@@ @   qYYY !#Y%&(Y*+-YSYSY#SY(SY-S/1-<K2H *+3*-61 2 8  9?:Y:>=2L+6*>+DYFYHJ*MQU1'2?  V <=6/YK*Y<YMW,12 ]9* *^12abcde fh@PK %^D>xXMorg/openqa/selenium/browserlaunchers/MacProxyManager$MacNetworkSettings.class1_Gorg/openqa/selenium/browserlaunchers/MacProxyManager$MacNetworkSettingsjava/lang/Object serviceNameLjava/lang/String;enabledZ proxyServerport1I authenticatedbypass[Ljava/lang/String;this$06Lorg/openqa/selenium/browserlaunchers/MacProxyManager;s(Lorg/openqa/selenium/browserlaunchers/MacProxyManager;Ljava/lang/String;ZLjava/lang/String;IZ[Ljava/lang/String;)VCode    ()V        "  $ LineNumberTableLocalVariableTablethisILorg/openqa/selenium/browserlaunchers/MacProxyManager$MacNetworkSettings;serverportbypassAsString()Ljava/lang/String;.java/lang/StringBuffer - -1 23append(I)Ljava/lang/StringBuffer; -5 26(C)Ljava/lang/StringBuffer; -8 29,(Ljava/lang/String;)Ljava/lang/StringBuffer; -; <,toStringsbLjava/lang/StringBuffer;domainA {serviceName= -C D(Ljava/lang/String;)VF , enabled= -H 2I(Z)Ljava/lang/StringBuffer;K, proxyServer=M, port=O, authenticated=Q , bypass= SUTjava/util/Arrays <V'([Ljava/lang/Object;)Ljava/lang/String;X} SourceFileMacProxyManager.java InnerClasses]4org/openqa/selenium/browserlaunchers/MacProxyManagerMacNetworkSettings     ,*+**,****!*#%" %&H,'(,,,),* , , +,D-Y/L+*#0 4W*#Y:6>2M+,7 4W+:%+6?& D'(<=>+ ?<,\-Y@BL+*7E7*GJ7*7L7*0N7*!GP7*#R7W7W+:%&  *6BQW&\'( R=>YZ[ \^PK %^D>LSorg/openqa/selenium/browserlaunchers/MacProxyManager$MacNetworkSetupException.class1?Morg/openqa/selenium/browserlaunchers/MacProxyManager$MacNetworkSetupExceptionjava/lang/RuntimeException(Ljava/lang/Exception;)VCode  generateMessage()Ljava/lang/String;  *(Ljava/lang/String;Ljava/lang/Throwable;)VLineNumberTableLocalVariableTablethisOLorg/openqa/selenium/browserlaunchers/MacProxyManager$MacNetworkSetupException;eLjava/lang/Exception;java/lang/StringBuilder9Problem while managing OS X network settings, OS Version  (Ljava/lang/String;)V os.version ! java/lang/System "# getProperty&(Ljava/lang/String;)Ljava/lang/String; % &'append-(Ljava/lang/String;)Ljava/lang/StringBuilder; ) * toString  - messageLjava/lang/String; 132java/lang/String 45valueOf&(Ljava/lang/Object;)Ljava/lang/String;7: Ljava/lang/Throwable; SourceFileMacProxyManager.java InnerClasses=4org/openqa/selenium/browserlaunchers/MacProxyManagerMacNetworkSetupException A *+  >?   =Y$(B CBE *Y++, H I  ./a*Y06$+$(,  LM ./89:; <>PK %^D>_44:org/openqa/selenium/browserlaunchers/MacProxyManager.class1>4org/openqa/selenium/browserlaunchers/MacProxyManagerjava/lang/Objectlog$Lorg/openqa/selenium/internal/Trace; SCUTIL_LINELjava/util/regex/Pattern;NETWORKSETUP_LISTORDER_LINENETWORKSETUP_LINE BACKUP_READYLjava/lang/String; ConstantValue backupready sessionIdcustomProxyPACDirLjava/io/File;portIprefsLjava/util/prefs/Preferences;networkService()VCode&org/openqa/selenium/internal/NullTrace   ! #^ (\S+) : (.*)$ %'&java/util/regex/Pattern ()compile-(Ljava/lang/String;)Ljava/util/regex/Pattern; + -,\(Hardware Port: ([^,]*), Device: ([^\)]*)\) / 1^([^:]+): (.*)$ 3 LineNumberTableLocalVariableTable(Ljava/lang/String;I)V  9;:java/util/prefs/Preferences <=userNodeForPackage0(Ljava/lang/Class;)Ljava/util/prefs/Preferences; ?  A  C this6Lorg/openqa/selenium/browserlaunchers/MacProxyManager;getCustomProxyPACDir()Ljava/io/File; I prefNodeExists(Ljava/lang/String;)Z 9M NOget8(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;keychangeNetworkSettings ExceptionsTjava/io/IOException V  X YZgetCurrentNetworkSettingsK()Lorg/openqa/selenium/browserlaunchers/MacProxyManager$MacNetworkSettings; \^]2org/openqa/selenium/browserlaunchers/LauncherUtils _`createCustomProfileDir"(Ljava/lang/String;)Ljava/io/File; bdc java/io/File efexists()Z \h ijrecursivelyDeleteDir(Ljava/io/File;)V bl mfmkdiro)Modifying OS X global network settings... qsr"org/openqa/selenium/internal/Trace tuinfo(Ljava/lang/String;)Vwjava/lang/Stringy -setwebproxy{ localhost}java/lang/StringBuilder | | append(I)Ljava/lang/StringBuilder; | toString()Ljava/lang/String;  runNetworkSetup'([Ljava/lang/String;)Ljava/lang/String;-setproxybypassdomainsEmptyfindNetworkSetupBinX/System/Library/CoreServices/RemoteManagement/ARDAgent.app/Contents/Support/networksetup b u b getAbsolutePath networksetup "org/openqa/selenium/os/CommandLine findExecutable&(Ljava/lang/String;)Ljava/lang/String; b G getParentFile b list()[Ljava/lang/String; os.version java/lang/System  getPropertyos.arch  chooseSuitableNetworkSetupK(Ljava/lang/String;Ljava/lang/String;[Ljava/lang/String;)Ljava/lang/String; b #(Ljava/io/File;Ljava/lang/String;)VRCouldn't find 'networksetup' in expected location; we're taking a guess and using | | -(Ljava/lang/String;)Ljava/lang/StringBuilder;A instead. Please create a symlink called 'networksetup' to make this warning go away. q uwarnMorg/openqa/selenium/browserlaunchers/MacProxyManager$MacNetworkSetupExceptionnetworksetup couldn't be found in the path! Please add the directory containing 'networksetup' to your PATH environment variable.  defaultPathdefaultLocationnetworkSetupBinfiles[Ljava/lang/String;guessguessedLocationjava/util/HashSet  networksetup- v K startsWith  java/util/Set add(Ljava/lang/Object;)Z fisEmpty No networksetup candidates found q udebug size()I One networksetup candidate found iterator()Ljava/util/Iterator; java/util/Iterator next()Ljava/lang/Object;(Multiple networksetup candidates found: | -(Ljava/lang/Object;)Ljava/lang/StringBuilder;\. v split'(Ljava/lang/String;)[Ljava/lang/String; OS version seems to be invalid: 10 v equals$OS version doesn't seem to be 10.*:    =org/openqa/selenium/browserlaunchers/MacProxyManager$CodeName   minorVersionS(Ljava/lang/String;)Lorg/openqa/selenium/browserlaunchers/MacProxyManager$CodeName;   name v  toLowerCase  containsThis seems to be , so we'll use , but there's no 'Couldn't find code name for OS version !"java/lang/IllegalArgumentException osVersionosArch candidatesLjava/util/Set;file versionPartscodeName?Lorg/openqa/selenium/browserlaunchers/MacProxyManager$CodeName;possibleCandidatee$Ljava/lang/IllegalArgumentException;LocalVariableTypeTable#Ljava/util/Set; findScutilBin1/usr/sbin/scutil3scutil5uscutil couldn't be found in the path! Please add the directory containing 'scutil' to your PATH environment variable. scutilBin 8 9getPrimaryNetworkServiceName; -getwebproxy v >@?)org/openqa/selenium/browserlaunchers/Maps ABparseDictionary=(Ljava/lang/String;Ljava/util/regex/Pattern;Z)Ljava/util/Map;DEnabled F GH verifyKeyY(Ljava/lang/String;Ljava/util/Map;Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String; J KKisTrueOrSomethingMServerOPort QSRjava/lang/Integer TUparseInt(Ljava/lang/String;)IWPort didn't look right: Y Z*(Ljava/lang/String;Ljava/lang/Throwable;)V\Authenticated Proxy Enabled ^ _getCurrentProxyBypassDomainsaGorg/openqa/selenium/browserlaunchers/MacProxyManager$MacNetworkSettings `c ds(Lorg/openqa/selenium/browserlaunchers/MacProxyManager;Ljava/lang/String;ZLjava/lang/String;IZ[Ljava/lang/String;)Vfjava/lang/NumberFormatExceptionoutput dictionaryLjava/util/Map; strEnabledenabledZserverstrPortport1!Ljava/lang/NumberFormatException;strAuthauth bypassDomainsnetworkSettingsILorg/openqa/selenium/browserlaunchers/MacProxyManager$MacNetworkSettings;5Ljava/util/Map;x-getproxybypassdomainsz$-getproxybypassdomains had no output| ~ cp: /LibraryThere aren't any   arraycopy*(Ljava/lang/Object;ILjava/lang/Object;II)Vlinesidomainsyes1trueon v KequalsIgnoreCasevaluematchesmatch Signature(Ljava/lang/String;Ljava/util/Map;Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;  java/util/Map  containsKeyCouldn't find  in  ; output:  N&(Ljava/lang/Object;)Ljava/lang/Object; executableshow State:/Network/Global/IPv4   runScutilPrimaryInterface-listnetworkserviceorder#networksetup -listnetworksetuporderprimaryInterfaceuserDefinedName  /  ((Ljava/lang/String;[Ljava/lang/String;)V v valueOf&(Ljava/lang/Object;)Ljava/lang/String; quit  usetInput  execute   getStdOut  f isSuccessfuljava/lang/RuntimeExceptionexec return code   getExitCode: argcommand$Lorg/openqa/selenium/os/CommandLine;  argsbackupNetworkSettings  f backupIsReady*Backing up OS X global network settings...   writeToPrefsL(Lorg/openqa/selenium/browserlaunchers/MacProxyManager$MacNetworkSettings;)V   backupReady(Z)VrestoreNetworkSettings)Restoring OS X global network settings...  ZretrieveFromPrefs `   serviceName `   proxyServer ` o ` bypass ` kloff-setwebproxystatebypassDomainArgs enabledArg  prefsGetStringOrFail   (BUG! Couldn't decode bypass preference:   UprefsGetIntOrFailk  KprefsGetBooleanOrFail authenticated strBypassbypassEncodedArrayBUG! pref key  should not be null 9  !getInt(Ljava/lang/String;I)I 9# $% getBoolean(Ljava/lang/String;Z)Z 9' ()put'(Ljava/lang/String;Ljava/lang/String;)V 9+ ,- putBoolean(Ljava/lang/String;Z)V 9/ 06putInt `2 l `4 5bypassAsString 7 JK SourceFileMacProxyManager.java InnerClassesCodeNameMacNetworkSettingsMacNetworkSetupException!       S#Y "$*,$.0$24- /01",56s!*7*8>*+@*B*8>4?9 @AB C5 !DE! !FG/*H4F5 DEJKD*>+L4J5DEP QRS*U*WW**@[H*Ha *Hg*HkW np*vYxSY*USYzSY|Y~*BSW*vYSY*USYSW4* OP RS!T(V0W:Zh\]5 DEILbY+M,a,N--,a^,:*:>bY,: |YYŷǿ4V`a bcef"g$i.j7k=lDkImNn]oipqqvr~osv5HDE  u 7RI@ ], ~Y:-Y:66!2:Ҷԙ W  v |Y+: |Y+2 |Y+2 :|Yҷ:+ |Y |Y : |Y+6_ 7\_ 4v '1;EOQ\fv47_az|5p ~DE~" ~# ~ u$%& 'u()|()\* a+,-  u$./10LbY+M,a,2N--Y4ǿ4"  $&5*1DE-  $ 6 YZ *7W*vY:SY*USL ++<2=M*C,+EN*-I6*L,+E:*N,+E:P6 :Y|YV+X*[,+E:*I6 *]: `Y**U  b:  ]dge4F$/0<CP]gi5DEg 0hi<~j CwklPjm ]]n do6oi+p)q !rl s tu - 0hv_.*vYwSY*USL ++Yyǿ+{M>,vY}S,2ԙ,vY}S,2ԙv,,dv:,,d4J#.68>IUX^iuz54DEg 6b8`KKFvYSYSYSYSM,Y:662N-+40:D 5*FDEF )0  GHC,+1Y|Y+-ǿ,+v4 854CDECP ChiC Cg - Chv9c*L ++<*=M*,2+EN*vYSL ++<.=M*-,+E:*U4* *9BNZ` 54cDE[g Fhi*9 Z  - Fhv`Y*vM,|Y+,,N,ʚ)Y|YϷ,ѶԶ-ֿ-4&'((,)1*8+^-5*`DE` P1/g EY*+M,,N,ʚ)Y|YϷ,ǶԶ-ֿ-42 3456C85*EDEE 8/g RSk#*ޙ p*WL*+*4VWXYZ"[5#DE tuJ*ޚ p*L*vYxSY+SY+SY|Y~+SW+2+`vM,S,+S+,+*,W*vYSY+SYSW+ M*vYSY+SY,SW*4>`abdHgPh[i`jgkvlnqsuv5*DEtu[$  Z *L*M* N}- v:- :2P6:Y|Y -ֿv:KvY}S:ddY|Y -ֿd1`Y|Y -ֿ*6*6*6`Y*+,b4=@e4^z{|~"+4@B[bjp5 DE   4(b=[B+p%oklly/*>+LM,"Y|Y+ֿ,4 -5 /DE/P  % UH*+W*>+4 5DEP KH*+W*>+"4 5DEP U*>+&*>+**>+&*>+.*>+1**> +3&4*8FT5UDEUtufD*6*>"4  5 DEC *>*4  5 DE l89: ;@`<=PK %^D>o,xl/org/openqa/selenium/browserlaunchers/Maps.class1D)org/openqa/selenium/browserlaunchers/Mapsjava/lang/Object()VCode  LineNumberTableLocalVariableTablethis+Lorg/openqa/selenium/browserlaunchers/Maps;parseDictionary=(Ljava/lang/String;Ljava/util/regex/Pattern;Z)Ljava/util/Map; Signaturec(Ljava/lang/String;Ljava/util/regex/Pattern;Z)Ljava/util/Map;java/util/HashMap   java/lang/String split'(Ljava/lang/String;)[Ljava/lang/String;  java/util/regex/Pattern !"matcher3(Ljava/lang/CharSequence;)Ljava/util/regex/Matcher; $&%java/util/regex/Matcher '(find()Z $* +,group(I)Ljava/lang/String; .0/ java/util/Map 12put8(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;dataLjava/lang/String;patternLjava/util/regex/Pattern;reverseZmapLjava/util/Map;linemLjava/util/regex/Matcher;namevalueLocalVariableTypeTable5Ljava/util/Map; SourceFile Maps.java /*   8 rYN*Y:66R2:+:#5): ): ): ): -  -W- 6 !!")#1$4'8(@)K+S,[.f!p0 f r34r56r78j9:!E;4)=<=@ >4 S>4 H?4 [ ?4 @ j9ABCPK %^D>nQ2org/openqa/selenium/browserlaunchers/Proxies.class1,org/openqa/selenium/browserlaunchers/Proxiesjava/lang/Object PROXY_CONFIGLjava/lang/String; ConstantValue proxy()VCode  LineNumberTableLocalVariableTablethis.Lorg/openqa/selenium/browserlaunchers/Proxies;isProxyRequired%(Lorg/openqa/selenium/Capabilities;)Z proxyRequired  org/openqa/selenium/Capabilities is(Ljava/lang/String;)Z    getCapability&(Ljava/lang/String;)Ljava/lang/Object; capabilities"Lorg/openqa/selenium/Capabilities; makeProxyPACA(Ljava/io/File;ILorg/openqa/selenium/Capabilities;)Ljava/io/File; Exceptions'java/io/FileNotFoundException)http.proxyHost +-,java/lang/System ./ getProperty&(Ljava/lang/String;)Ljava/lang/String;1http.proxyPort3http.nonProxyHosts 5 #6w(Ljava/io/File;ILjava/lang/String;Ljava/lang/String;Ljava/lang/String;Lorg/openqa/selenium/Capabilities;)Ljava/io/File; parentDirLjava/io/File;portI < => newProxyPac(ILjava/lang/String;Ljava/lang/String;Ljava/lang/String;Lorg/openqa/selenium/Capabilities;)Lorg/openqa/selenium/browserlaunchers/DoNotUseProxyPac; @ AB extractProxy?(Lorg/openqa/selenium/Capabilities;)Lorg/openqa/selenium/Proxy; DFEorg/openqa/selenium/Proxy GH getHttpProxy()Ljava/lang/String; JLK5org/openqa/selenium/browserlaunchers/DoNotUseProxyPac MNdefaultsF()Lorg/openqa/selenium/browserlaunchers/DoNotUseProxyPac$DefaultProxy; PRQBorg/openqa/selenium/browserlaunchers/DoNotUseProxyPac$DefaultProxy STtoProxyK(Ljava/lang/String;)Lorg/openqa/selenium/browserlaunchers/DoNotUseProxyPac;V java/io/FileX proxy.pac UZ [#(Ljava/io/File;Ljava/lang/String;)V]java/io/FileWriter \_ `(Ljava/io/File;)V Jb cdoutputTo(Ljava/io/Writer;)V fhgjava/io/Writer i closek+com/thoughtworks/selenium/SeleniumExceptionm2Unable to configure proxy. Selenium will not work. jo p(Ljava/lang/String;)Vrjava/io/IOExceptionconfiguredProxy proxyPort nonProxyHostspac7Lorg/openqa/selenium/browserlaunchers/DoNotUseProxyPac;Lorg/openqa/selenium/Proxy;pacFileoutLjava/io/Writer;eLjava/io/IOException; java/util/Map D (Ljava/util/Map;)VrawProxyLjava/lang/Object; proxy_pac Jjava/lang/StringBuilder java/lang/String valueOf&(Ljava/lang/Object;)Ljava/lang/String; o: append-(Ljava/lang/String;)Ljava/lang/StringBuilder; HtoStringDIRECTPROXY  localhost: (I)Ljava/lang/StringBuilder;;  isOnlyProxyingSelenium*/selenium-server/* J mapW(Ljava/lang/String;)Lorg/openqa/selenium/browserlaunchers/DoNotUseProxyPac$ProxyUrlVia; RAorg/openqa/selenium/browserlaunchers/DoNotUseProxyPac$ProxyUrlVia Htrim length()I\| split'(Ljava/lang/String;)[Ljava/lang/String; J mapHostX(Ljava/lang/String;)Lorg/openqa/selenium/browserlaunchers/DoNotUseProxyPac$ProxyHostVia; Borg/openqa/selenium/browserlaunchers/DoNotUseProxyPac$ProxyHostVia  toNoProxy9()Lorg/openqa/selenium/browserlaunchers/DoNotUseProxyPac;existingConfig tempProxy proxyToUse defaultProxyseleniumServerAsProxyhosts[Ljava/lang/String;hostisProxyingAllTrafficonlyProxySeleniumTraffic avoidProxyproxyEverything  setProxyEverythingG(Lorg/openqa/selenium/Capabilities;Z)Lorg/openqa/selenium/Capabilities;  newDesiredCapabilitiesT(Lorg/openqa/selenium/Capabilities;)Lorg/openqa/selenium/remote/DesiredCapabilities; .org/openqa/selenium/remote/DesiredCapabilities  setCapability(Ljava/lang/String;Z)VsourceisProxyingEverythingZtoReturn0Lorg/openqa/selenium/remote/DesiredCapabilities; setAvoidProxysetOnlyProxySeleniumTrafficsetProxyRequired %(Lorg/openqa/selenium/Capabilities;)V SourceFile Proxies.java InnerClasses DefaultProxy ProxyHostVia ProxyUrlVia!   /* '   D**+ !" #$%& d*(*0*2*,4678 96 789:!" #6%&  `,-;:?:CICOWUY*WY:\Y^:  a e:jYln.STq. > @A B.F:GEHLIQJTKVLp `78`9:`s`t`u`!" TvwM x:y8Ez{ V |} AB 3*LM+%+D +DM+~DY+~M,"Q R STUV%X1[ 3!" * ( x=> T8J: JY:: ?:CICOW+/+:,Y,:IOW:+3Y+:,Y,:Y: S W-M-C-:  Y:6 6  2:  W   I OWv_`_a!c,d1e8f@gNkRlUmYnsp~stuvw{|}~*589:8s8t8u8!"*w!vw, 8 xU)f *    ]'*ѹ*ӹ*չ  '!"  7 *י  !"  T*M,,  "   T*M,,  "   T*M,,  "   T*M,,  "   G**఻Y*  "PJJJPK %^D>Horg/openqa/selenium/browserlaunchers/DoNotUseProxyPac$DefaultProxy.class16Borg/openqa/selenium/browserlaunchers/DoNotUseProxyPac$DefaultProxyjava/lang/Objectthis$07Lorg/openqa/selenium/browserlaunchers/DoNotUseProxyPac;:(Lorg/openqa/selenium/browserlaunchers/DoNotUseProxyPac;)VCode    ()VLineNumberTableLocalVariableTablethisDLorg/openqa/selenium/browserlaunchers/DoNotUseProxyPac$DefaultProxy; toNoProxy9()Lorg/openqa/selenium/browserlaunchers/DoNotUseProxyPac;'DIRECT' 5org/openqa/selenium/browserlaunchers/DoNotUseProxyPac access$6L(Lorg/openqa/selenium/browserlaunchers/DoNotUseProxyPac;Ljava/lang/String;)VtoProxyK(Ljava/lang/String;)Lorg/openqa/selenium/browserlaunchers/DoNotUseProxyPac; java/lang/StringBuilder"'PROXY $ %(Ljava/lang/String;)V ' ()append-(Ljava/lang/String;)Ljava/lang/StringBuilder;+' - ./toString()Ljava/lang/String;proxyViaLjava/lang/String; SourceFileDoNotUseProxyPac.java InnerClasses DefaultProxy! 4 *+ *    <* *     Y!* Y!#+&*&,*  !!01234 5PK %^D>#QQHorg/openqa/selenium/browserlaunchers/DoNotUseProxyPac$ProxyHostVia.class19Borg/openqa/selenium/browserlaunchers/DoNotUseProxyPac$ProxyHostViajava/lang/ObjecthostLjava/lang/String;this$07Lorg/openqa/selenium/browserlaunchers/DoNotUseProxyPac;L(Lorg/openqa/selenium/browserlaunchers/DoNotUseProxyPac;Ljava/lang/String;)VCode    ()V  LineNumberTableLocalVariableTablethisDLorg/openqa/selenium/browserlaunchers/DoNotUseProxyPac$ProxyHostVia;toProxyK(Ljava/lang/String;)Lorg/openqa/selenium/browserlaunchers/DoNotUseProxyPac; 5org/openqa/selenium/browserlaunchers/DoNotUseProxyPac access$4H(Lorg/openqa/selenium/browserlaunchers/DoNotUseProxyPac;)Ljava/util/Map; "! java/util/Map #$put8(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;proxyVia toNoProxy9()Lorg/openqa/selenium/browserlaunchers/DoNotUseProxyPac; ) *+access$5H(Lorg/openqa/selenium/browserlaunchers/DoNotUseProxyPac;)Ljava/util/Set; -/. java/util/Set 01add(Ljava/lang/Object;)Z(Lorg/openqa/selenium/browserlaunchers/DoNotUseProxyPac;Ljava/lang/String;Lorg/openqa/selenium/browserlaunchers/DoNotUseProxyPac$ProxyHostVia;)V 4  SourceFileDoNotUseProxyPac.java InnerClasses ProxyHostVia!  K*+ **,  O* *+W*  %&' D* (*,W*    2 '*+,3567 8PK %^D>Gorg/openqa/selenium/browserlaunchers/DoNotUseProxyPac$ProxyUrlVia.class1PAorg/openqa/selenium/browserlaunchers/DoNotUseProxyPac$ProxyUrlViajava/lang/Object outgoingUrlLjava/lang/String;this$07Lorg/openqa/selenium/browserlaunchers/DoNotUseProxyPac;L(Lorg/openqa/selenium/browserlaunchers/DoNotUseProxyPac;Ljava/lang/String;)VCode    ()V  LineNumberTableLocalVariableTablethisCLorg/openqa/selenium/browserlaunchers/DoNotUseProxyPac$ProxyUrlVia;toProxyK(Ljava/lang/String;)Lorg/openqa/selenium/browserlaunchers/DoNotUseProxyPac;  isIeIncompatibleRegEx(Ljava/lang/String;)Z  5org/openqa/selenium/browserlaunchers/DoNotUseProxyPac !"access$0H(Lorg/openqa/selenium/browserlaunchers/DoNotUseProxyPac;)Ljava/util/Map; $&% java/util/Map '(put8(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object; * +"access$1proxyVia . /0access$2()Ljava/util/regex/Pattern; 243java/util/regex/Pattern 56matcher3(Ljava/lang/CharSequence;)Ljava/util/regex/Matcher; 8:9java/util/regex/Matcher ;<matches()Z toNoProxy9()Lorg/openqa/selenium/browserlaunchers/DoNotUseProxyPac; @ ABaccess$3H(Lorg/openqa/selenium/browserlaunchers/DoNotUseProxyPac;)Ljava/util/Set; DFE java/util/Set GHadd(Ljava/lang/Object;)Z(Lorg/openqa/selenium/browserlaunchers/DoNotUseProxyPac;Ljava/lang/String;Lorg/openqa/selenium/browserlaunchers/DoNotUseProxyPac$ProxyUrlVia;)V K  SourceFileDoNotUseProxyPac.java InnerClasses ProxyUrlVia!  K*+ **,  w7*** *+#W* )*+#W*  277, G-+17=> D* ?*CW*    I '*+,JLMN OPK %^D>n;org/openqa/selenium/browserlaunchers/DoNotUseProxyPac.class1'5org/openqa/selenium/browserlaunchers/DoNotUseProxyPacjava/lang/Objectjava/io/SerializableacceptableShExpPatternLjava/util/regex/Pattern; directUrlsLjava/util/Set; Signature#Ljava/util/Set; proxiedUrlsLjava/util/Map;5Ljava/util/Map;proxiedRegexUrls directHosts proxiedHosts defaultProxyLjava/lang/String; deriveFromLjava/net/URI;()VCode[\w\*\?:/\.-]* java/util/regex/Pattern !compile-(Ljava/lang/String;)Ljava/util/regex/Pattern; # LineNumberTableLocalVariableTable ( &*java/util/LinkedHashSet )( - /java/util/HashMap .( 2  4  6  8 : < this7Lorg/openqa/selenium/browserlaunchers/DoNotUseProxyPac;outputTo(Ljava/io/Writer;)V ExceptionsCjava/io/IOException E F@appendSuperPacH&function FindProxyForURL(url, host) { JLKjava/io/Writer MNappend*(Ljava/lang/CharSequence;)Ljava/io/Writer; P Q@appendDirectHosts S T@appendProxiedHosts V W@appendDirectUrls Y Z@appendProxiedUrls \ ]@appendProxiedRegExUrls _ `@appendFallbackToSuperPac bdcjava/lang/String efequals(Ljava/lang/Object;)Zh return j; l} writerLjava/io/Writer; p rjava/io/InputStreamReader tvu java/net/URI wxtoURL()Ljava/net/URL; z|{ java/net/URL }~ getContent()Ljava/lang/Object;java/io/InputStream q &(Ljava/io/InputStream;)Vjava/lang/StringBuilder ( java/io/Reader read()I M(C)Ljava/lang/StringBuilder; toString()Ljava/lang/String;FindProxyForURLoriginalFindProxyForURL b replaceD(Ljava/lang/CharSequence;Ljava/lang/CharSequence;)Ljava/lang/String; readerLjava/io/Reader;contentLjava/lang/StringBuilder;iI2 var value = originalFindProxyForURL(host, url);  if (value) { return value; }  java/util/Set iterator()Ljava/util/Iterator; java/util/Iterator ~next if (shExpMatch(host, '')) { return 'DIRECT'; } hasNext()Zhost  java/util/Map entrySet()Ljava/util/Set;java/util/Map$Entry ~getKeyjava/lang/CharSequence')) { return 'PROXY ~getValue'; } entryLjava/util/Map$Entry;LocalVariableTypeTable;Ljava/util/Map$Entry; if (shExpMatch(url, 'url if (.test(url)) { return 'PROXY mapW(Ljava/lang/String;)Lorg/openqa/selenium/browserlaunchers/DoNotUseProxyPac$ProxyUrlVia;Aorg/openqa/selenium/browserlaunchers/DoNotUseProxyPac$ProxyUrlVia &(Lorg/openqa/selenium/browserlaunchers/DoNotUseProxyPac;Ljava/lang/String;Lorg/openqa/selenium/browserlaunchers/DoNotUseProxyPac$ProxyUrlVia;)V outgoingUrlmapHostX(Ljava/lang/String;)Lorg/openqa/selenium/browserlaunchers/DoNotUseProxyPac$ProxyHostVia;Borg/openqa/selenium/browserlaunchers/DoNotUseProxyPac$ProxyHostVia &(Lorg/openqa/selenium/browserlaunchers/DoNotUseProxyPac;Ljava/lang/String;Lorg/openqa/selenium/browserlaunchers/DoNotUseProxyPac$ProxyHostVia;)VhostnamedefaultsF()Lorg/openqa/selenium/browserlaunchers/DoNotUseProxyPac$DefaultProxy;Borg/openqa/selenium/browserlaunchers/DoNotUseProxyPac$DefaultProxy &:(Lorg/openqa/selenium/browserlaunchers/DoNotUseProxyPac;)VasMap()Ljava/util/Map; size java/util/Collections unmodifiableSet (Ljava/util/Set;)Ljava/util/Set; put8(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;   unmodifiableMap (Ljava/util/Map;)Ljava/util/Map; b  length ttoReturn5Ljava/util/Map;G(Ljava/net/URI;)Lorg/openqa/selenium/browserlaunchers/DoNotUseProxyPac;uriaccess$0H(Lorg/openqa/selenium/browserlaunchers/DoNotUseProxyPac;)Ljava/util/Map;access$1access$2()Ljava/util/regex/Pattern;access$3H(Lorg/openqa/selenium/browserlaunchers/DoNotUseProxyPac;)Ljava/util/Set;access$4access$5access$6L(Lorg/openqa/selenium/browserlaunchers/DoNotUseProxyPac;Ljava/lang/String;)V SourceFileDoNotUseProxyPac.java InnerClassesEntry DefaultProxy ProxyHostVia ProxyUrlVia!          1 "$%&B*'*)Y+,*.Y01*.Y03*)Y+5*.Y07*9;$"%0 ;"A% B=>?@ABQ*+D+GIW*+O*+R*+U*+X*+[*+^9*;a+gI*;IiIW+kIW$2 ,. 0123 4%6*869I<P=%Q=>QmnF@ABZ*oqY*osyMYN,6-W,6+-IW+IW$* @AEF%G.H6GBKRLYM%4Z=>Zmn=%5+`@ABb*o+IIIW$PQTUVW%=>mnQ@AB1*5N-bM+I,IIW-$Z[\!]'Z0_% 1=>1mnT@ABO*7N6-M+I,ǶIɶI,ǶIζIW-DZ$"bc"d.e3f?gEbNi% O=>Omn) )W@AB1*,N-bM+ԶI,IIW-$lmn!o'l0q% 1=>1mnZ@ABO*1N6-M+ԶI,ǶIɶI,ǶIζIW-DZ$"tu"v.w3x?yEtN{% O=>Omn) )]@ABO*3N6-M+׶I,ǶIٶI,ǶIζIW-DZ$"~".3?E~N% O=>Omn) )? Y*+߰$% => ? Y*+$% => 3 Y*$%  =>Lʻ.Y0L*,+*,W*1+*1W*3+*3W*5+ *5W*7+ *7W*; +*;W*o+*oW+$B$0AM^j{%=> ?*+o*$ %=>%*3$%%*1$%$"$%%*,$%%*7$ %%*5$%&*+;$"% !""# $%&PK %^D>o&"QQ:org/openqa/selenium/browserlaunchers/BrowserLauncher.class14org/openqa/selenium/browserlaunchers/BrowserLauncherjava/lang/ObjectlaunchRemoteSession(Ljava/lang/String;)VlaunchHTMLSuite'(Ljava/lang/String;Ljava/lang/String;)Vclose()V getProcess()Ljava/lang/Process; SourceFileBrowserLauncher.java   PK %^D>**8org/openqa/selenium/browserlaunchers/LauncherUtils.class12org/openqa/selenium/browserlaunchers/LauncherUtilsjava/lang/Objectlog$Lorg/openqa/selenium/internal/Trace;JAVA_STYLE_UNC_URLLjava/util/regex/Pattern;()VCode &org/openqa/selenium/internal/NullTrace     ^file:////([^/]+/.*)$ java/util/regex/Pattern compile-(Ljava/lang/String;)Ljava/util/regex/Pattern;  LineNumberTableLocalVariableTable this4Lorg/openqa/selenium/browserlaunchers/LauncherUtils;createCustomProfileDir"(Ljava/lang/String;)Ljava/io/File; % &#customProfileDir (*) java/io/File +,exists()Z . /0recursivelyDeleteDir(Ljava/io/File;)V (2 3,mkdir sessionIdLjava/lang/String;Ljava/io/File;8java.io.tmpdir :<;java/lang/System => getProperty&(Ljava/lang/String;)Ljava/lang/String; (@ A(Ljava/lang/String;)V (C D, isDirectory (F GHgetAbsolutePath()Ljava/lang/String;J.Ljava/lang/StringBuilder NPOjava/lang/String QRvalueOf&(Ljava/lang/Object;)Ljava/lang/String; K@U/customProfileDir KW XYappend-(Ljava/lang/String;)Ljava/lang/StringBuilder; K[ \HtoStringtmpDircustomProfileDirParent `ba"org/openqa/selenium/io/FileHandler cddelete(Ljava/io/File;)ZdeleteTryTryAgain(Ljava/io/File;I)V jlk1org/openqa/selenium/browserlaunchers/AsyncExecute mn sleepTight(J)V p efrjava/lang/RuntimeExceptiondirtriesIeLjava/lang/RuntimeException;getQueryStringz java/net/URL y@ y} ~HgetQuery q (Ljava/lang/Throwable;)Vjava/net/MalformedURLExceptionurlquery Ljava/net/MalformedURLException;getDefaultHTMLSuiteUrl:(Ljava/lang/String;Ljava/lang/String;ZI)Ljava/lang/String; org/openqa/selenium/net/Urls >toProtocolHostAndPort../postResultshttp://localhost: K X(I)Ljava/lang/StringBuilder;/selenium-server/postResults//selenium-server/core/TestRunner.html?auto=true &multiWindow= K X(Z)Ljava/lang/StringBuilder;&defaultLogLevel=info &baseUrl= > urlEncode &resultsUrl=&test= browserURLsuiteUrl multiWindowZ serverPort resultsUrlgetDefaultRemoteSessionUrl;(Ljava/lang/String;Ljava/lang/String;ZIZ)Ljava/lang/String;2/selenium-server/core/RemoteRunner.html?sessionId= &debugMode=&driverUrl=http://localhost:/selenium-server/driver/startURLbrowserSideLogextractHTAFileC(Ljava/io/File;ILjava/lang/String;Ljava/lang/String;)Ljava/io/File;  getSeleniumResourceAsStream)(Ljava/lang/String;)Ljava/io/InputStream;java/io/BufferedReaderjava/io/InputStreamReader (Ljava/io/InputStream;)V (Ljava/io/Reader;)V ( #(Ljava/io/File;Ljava/lang/String;)Vjava/io/FileWriter 0 HreadLine Awrite (I)V flush closejava/io/IOExceptionport resourceFileoutFileinputLjava/io/InputStream;brLjava/io/BufferedReader;htafwLjava/io/FileWriter;lineLjava/io/IOException; java/lang/Class getResourceAsStreamOneJar forName%(Ljava/lang/String;)Ljava/lang/Class; java/lang/ClassNotFoundExceptionclazzLjava/lang/Class; isScriptFilejava/io/FileReader     read([C)IaFile firstTwoChars[CreaderLjava/io/FileReader; charsReadcopySingleFile(Ljava/io/File;Ljava/io/File;)V  copySingleFileWithOverwrite (Ljava/io/File;Ljava/io/File;Z)V sourceFiledestFileSource file does not exist: K X-(Ljava/lang/Object;)Ljava/lang/StringBuilder; q@ (! ",isFile$Source is not a single file: &!Destination file already exists: `( )copy +-,!com/google/common/base/Throwables ./ propagate3(Ljava/lang/Throwable;)Ljava/lang/RuntimeException; overwrite copyDirectorysourcedest1(Ljava/io/File;Ljava/lang/String;Ljava/io/File;)Z `6 )71(Ljava/io/File;Ljava/io/File;Ljava/lang/String;)VsuffixgeneratePacAndPrefJsH(Ljava/io/File;ILjava/lang/String;ZJLorg/openqa/selenium/Capabilities;)V Exceptions=java/io/FileNotFoundException?prefs.jsAjava/io/PrintStreamCjava/io/FileOutputStream BE F(Ljava/io/File;Z)V @H I(Ljava/io/OutputStream;)VK6user_pref('browser.shell.checkDefaultBrowser', false); @M NAprintln PRQ,org/openqa/selenium/browserlaunchers/Proxies STisProxyRequired%(Lorg/openqa/selenium/Capabilities;)Z PV WX makeProxyPACA(Ljava/io/File;ILorg/openqa/selenium/Capabilities;)Ljava/io/File;Z#user_pref('network.proxy.type', 2);\+user_pref('network.proxy.autoconfig_url', ' ^ _>pathToBrowserURLa');c6user_pref('network.http.phishy-userpass-length', 255);e'user_pref('browser.allowpopups', true);g1user_pref('dom.disable_open_during_load', false);i%user_pref('dom.max_script_run_time', Kk Xl(J)Ljava/lang/StringBuilder;n);p,user_pref('dom.max_chrome_script_run_time', r+user_pref('browser.link.open_external', 2);t,user_pref('browser.link.open_newwindow', 2);v,user_pref('startup.homepage_override_url', 'x'user_pref('browser.startup.homepage', 'z.user_pref('startup.homepage_welcome_url', '');|%user_pref('browser.startup.page', 1);~2user_pref('security.warn_submit_insecure', false); s!yY*{|L++MqY,_ `ab !5 5 v  m*: :KYSVZ:KYMSVVVV*VVVV+VZ. hj km(o9pBqGrSs]tioHm5m5mmug55(E5  e*:KYMSV+VVV*VVZ:"KYMSVVZ:* yz{|$}0~:z?Cb>e5e45eeue_5  a ,:YYǷ:(Y*-:Y:: KYݷS߶VZק Y::qY#F#.5<C]`gny~f s6u55}#r6.X5Q5 v  }L+*M,L+*MN,   5  d :LY*M,+>+4# +4!:qY.-." .04: 66  !u0 v  ?*+ 66  s*'qYKYS*Z* qYKY#S*Z#+'qYKY%S+Z*+' N-*dil*  '@Kdlmr*s6s6s0mv 1 a*+' M,*  2636 v 14 g *,+5N * 26 85 36 v 9:;<  ܻ(Y*>:@YBYDG:JLO7*U: YLKY[S E]V`VZLbLdLfLKYhSjmVZLKYoSjmVZLqLsL,KKYuS,V`VZLKYwS,V`VZLyL{L}LLLLLLLLLLLLLLLLLLLL#LLLL0 (09AMad lt| !%&"'*(2):*B+J,R-Z.b1j2r5z89<=>?@BCDEFIJ\ &6u5 6 9+6 _> A*(Y*?L+M,ÙLKY+MS,ʶVZL+"_`bcd$e(f?h A5,5$PK %^D>o`\\Korg/openqa/selenium/browserlaunchers/CapabilityType$ForSeleniumServer.class1Eorg/openqa/selenium/browserlaunchers/CapabilityType$ForSeleniumServerjava/lang/ObjectAVOIDING_PROXYLjava/lang/String; ConstantValue  avoidProxyONLY_PROXYING_SELENIUM_TRAFFIC onlyProxySeleniumTrafficPROXYING_EVERYTHINGproxyEverything PROXY_PAC proxy_pacENSURING_CLEAN_SESSIONensureCleanSession SourceFileCapabilityType.java InnerClasses3org/openqa/selenium/browserlaunchers/CapabilityTypeForSeleniumServer     PK %^D>hh9org/openqa/selenium/browserlaunchers/CapabilityType.class173org/openqa/selenium/browserlaunchers/CapabilityTypejava/lang/Object BROWSER_NAMELjava/lang/String; ConstantValue  browserNamePLATFORM platformSUPPORTS_JAVASCRIPTjavascriptEnabledTAKES_SCREENSHOTtakesScreenshotVERSIONversionSUPPORTS_SQL_DATABASEdatabaseEnabledSUPPORTS_LOCATION_CONTEXTlocationContextEnabledSUPPORTS_APPLICATION_CACHEapplicationCacheEnabledSUPPORTS_BROWSER_CONNECTION!browserConnectionEnabledSUPPORTS_FINDING_BY_CSS$cssSelectorsEnabledPROXY'proxySUPPORTS_WEB_STORAGE*webStorageEnabled ROTATABLE- rotatable SourceFileCapabilityType.java DeprecatedRuntimeVisibleAnnotationsLjava/lang/Deprecated; InnerClasses5Eorg/openqa/selenium/browserlaunchers/CapabilityType$ForSeleniumServerForSeleniumServer     "#%&()+,./0123 46 PK %^D>7‰,,Jorg/openqa/selenium/browserlaunchers/WindowsProxyManager$HudsuckrKey.class1JDorg/openqa/selenium/browserlaunchers/WindowsProxyManager$HudsuckrKeyjava/lang/EnumACTIVE_CONNECTIONFLorg/openqa/selenium/browserlaunchers/WindowsProxyManager$HudsuckrKey;PROXY_TYPE_DIRECTPROXY_TYPE_PROXYPROXY_TYPE_AUTO_PROXY_URLPROXY_TYPE_AUTO_DETECTINTERNET_PER_CONN_PROXY_SERVERINTERNET_PER_CONN_PROXY_BYPASS INTERNET_PER_CONN_AUTOCONFIG_URL ENUM$VALUESG[Lorg/openqa/selenium/browserlaunchers/WindowsProxyManager$HudsuckrKey;()VCode  (Ljava/lang/String;I)V       "  %  (  +  .  0 LineNumberTableLocalVariableTable thisvaluesI()[Lorg/openqa/selenium/browserlaunchers/WindowsProxyManager$HudsuckrKey; 8:9java/lang/System ;< arraycopy*(Ljava/lang/Object;ILjava/lang/Object;II)VvalueOfZ(Ljava/lang/String;)Lorg/openqa/selenium/browserlaunchers/WindowsProxyManager$HudsuckrKey; @ =A5(Ljava/lang/Class;Ljava/lang/String;)Ljava/lang/Enum; SourceFileWindowsProxyManager.java SignatureXLjava/lang/Enum; InnerClassesH8org/openqa/selenium/browserlaunchers/WindowsProxyManager HudsuckrKey@0 @@@@ @ @ @ @ YYYY !Y#$Y&'Y)*Y,-YSYSYSY!SY$SY'SY*SY-S/1& ` ab'c4dAeNf\gj_21*+31_2 4 566/YK*Y<YM7,12 =>* *?12BCDEF GI@PK %^D>;Oorg/openqa/selenium/browserlaunchers/WindowsProxyManager$HudsuckrSettings.class1CIorg/openqa/selenium/browserlaunchers/WindowsProxyManager$HudsuckrSettingsjava/lang/Object connectionLjava/lang/String;serverbypasspacUrldirectZproxypacwpadO(Ljava/lang/String;ZZZZLjava/lang/String;Ljava/lang/String;Ljava/lang/String;)VCode  ()V           " $  LineNumberTableLocalVariableTablethisKLorg/openqa/selenium/browserlaunchers/WindowsProxyManager$HudsuckrSettings; toStringArray()[Ljava/lang/String;,java/lang/String .0/java/lang/Boolean 12toString(Z)Ljava/lang/String;result[Ljava/lang/String;()Ljava/lang/String; 7 )* 9;:java/util/Arrays 1<'([Ljava/lang/Object;)Ljava/lang/String; SourceFileWindowsProxyManager.java InnerClassesA8org/openqa/selenium/browserlaunchers/WindowsProxyManagerHudsuckrSettings       2**+******!*#%* nq rstu v%w+x1y&\ 2'(22 2 2 2 222 )*N+L+*S+*-S+*-S+*!-S+*#-S+*S+*S+*S+%* |} ~!+5<DL&N'(H34152*68%& '(=>? @B PK %^D>11Eorg/openqa/selenium/browserlaunchers/WindowsProxyManager$RegKey.class1?org/openqa/selenium/browserlaunchers/WindowsProxyManager$RegKeyjava/lang/Enum POPUP_MGRALorg/openqa/selenium/browserlaunchers/WindowsProxyManager$RegKey;USERNAME_PASSWORD_DISABLEMAX_CONNECTIONS_PER_1_0_SVRMAX_CONNECTIONS_PER_1_1_SVRAUTOPROXY_RESULT_CACHEMIME_EXCLUSION_LIST_FOR_CACHEWARN_ON_FORM_SUBMITDISPLAY_MIXED_CONTENTWARN_ON_HTTPS_TO_HTTP_REDIRECTWARN_ON_BAD_CERT_RECEIVINGDISABLE_SCRIPT_DEBUGGERDISABLE_SCRIPT_DEBUGGER_IE%ERROR_DIALOG_DISPLAYED_ON_EVERY_ERRORDOWNLOAD_SIGNED_ACTIVEXkeyLjava/lang/String;typeLjava/lang/Class; SignatureLjava/lang/Class<*>; ENUM$VALUESB[Lorg/openqa/selenium/browserlaunchers/WindowsProxyManager$RegKey;()VCode!java/lang/StringBuilder #%$8org/openqa/selenium/browserlaunchers/WindowsProxyManager & REG_KEY_BASE (*)java/lang/String +,valueOf&(Ljava/lang/Object;)Ljava/lang/String; . /0(Ljava/lang/String;)V2:\Software\Microsoft\Internet Explorer\New Windows\PopupMgr 4 56append-(Ljava/lang/String;)Ljava/lang/StringBuilder; 8 9:toString()Ljava/lang/String; < /=9(Ljava/lang/String;ILjava/lang/String;Ljava/lang/Class;)V ? Bm\Software\Microsoft\Internet Explorer\Main\FeatureControl\FEATURE_HTTP_USERNAME_PASSWORD_DISABLE\iexplore.exe DFEjava/lang/Boolean GTYPE I LW\Software\Microsoft\Windows\CurrentVersion\Internet Settings\MaxConnectionsPer1_0Server NFOjava/lang/Integer Q  TT\Software\Microsoft\Windows\CurrentVersion\Internet Settings\MaxConnectionsPerServer V  Y`\Software\Policies\Microsoft\Windows\CurrentVersion\Internet Settings\EnableAutoproxyResultCache [  ^_\Software\Policies\Microsoft\Windows\CurrentVersion\Internet Settings\MimeExclusionListForCache `  cI\Software\Microsoft\Windows\CurrentVersion\Internet Settings\Zones\3\1601 e  hI\Software\Microsoft\Windows\CurrentVersion\Internet Settings\Zones\3\1609 j mV\Software\Microsoft\Windows\CurrentVersion\Internet Settings\WarnOnHTTPSToHTTPRedirect o rQ\Software\Microsoft\Windows\CurrentVersion\Internet Settings\WarnonBadCertRecving t wB\Software\Microsoft\Internet Explorer\Main\Disable Script Debugger y |B\Software\Microsoft\Internet Explorer\Main\DisableScriptDebuggerIE ~ M\Software\Microsoft\Internet Explorer\Main\Error Dlg Displayed On Every Error  I\Software\Microsoft\Windows\CurrentVersion\Internet Settings\Zones\3\1001    LineNumberTableLocalVariableTable)(Ljava/lang/String;Ljava/lang/Class<*>;)V  /(Ljava/lang/String;I)V    thisLocalVariableTypeTable backupExists()Z  :name # access$0(Ljava/lang/String;)ZoriginalExists #org/openqa/selenium/os/WindowsUtils doesRegistryValueExistbackup  java/lang/Object equals(Ljava/lang/Object;)Z readStringRegistryValue&(Ljava/lang/String;)Ljava/lang/String; # access$1()Ljava/util/prefs/Preferences; java/util/prefs/Preferences put'(Ljava/lang/String;Ljava/lang/String;)V readBooleanRegistryValue  putBoolean(Ljava/lang/String;Z)V readIntRegistryValue(Ljava/lang/String;)I putIntjava/lang/RuntimeException Bad type: java/lang/Class :getName . 0removedataZIrestore  get8(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String; writeStringRegistryValue  getBoolean(Ljava/lang/String;Z)Z writeBooleanRegistryValue getInt(Ljava/lang/String;I)I writeIntRegistryValue 0deleteRegistryValuevaluesD()[Lorg/openqa/selenium/browserlaunchers/WindowsProxyManager$RegKey; java/lang/System  arraycopy*(Ljava/lang/Object;ILjava/lang/Object;II)VU(Ljava/lang/String;)Lorg/openqa/selenium/browserlaunchers/WindowsProxyManager$RegKey;  +5(Ljava/lang/Class;Ljava/lang/String;)Ljava/lang/Enum;access$2D(Lorg/openqa/selenium/browserlaunchers/WindowsProxyManager$RegKey;)V  access$3   SourceFileWindowsProxyManager.javaSLjava/lang/Enum; InnerClassesRegKey@0@@@@ @ @ @ @ @@@@@@ mY Y"'-137;>Y@ Y"'-A37C;HYJ Y"'-K37M;PYR Y"'-S37M;UYW Y"'-X37C;ZY\ Y"'-]37(;_Ya Y"'-b37C;dYf Y"'-g37M;iYk Y"'-l37M;nYp Y"'-q37M;sYu Y"'-v37(;xYz Y"'-{37(;}Y Y"'-37(;Y Y"'-37M;Y>SYHSYPSYUSYZSY_SYdSYiSYnSY sSY xSY }SY SY SD#*7<?HO\admt '/<ADMUbgjs{/=n*+*-*   2* 2* **(*L*+*C*<**M*<*ȱY Yͷ-*϶37Կ*ձB&'4<GHU]hi* < ] $*ܙ*(*L*+*C*<**M*<*Y Yͷ-*϶37Կ* *F'(5AIJWckl* A c  6YK*Y<YM, +* *%*%*    # @PK %^D>̩Korg/openqa/selenium/browserlaunchers/WindowsProxyManager$SuffixFilter.class1-Eorg/openqa/selenium/browserlaunchers/WindowsProxyManager$SuffixFilterjava/lang/Objectjava/io/FileFiltersuffixLjava/lang/String;(Ljava/lang/String;)VCode  ()V  LineNumberTableLocalVariableTablethisGLorg/openqa/selenium/browserlaunchers/WindowsProxyManager$SuffixFilter;accept(Ljava/io/File;)Z  java/io/File getName()Ljava/lang/String;  java/lang/String !"endsWith(Ljava/lang/String;)ZpathnameLjava/io/File;resultZ SourceFileWindowsProxyManager.java InnerClasses+8org/openqa/selenium/browserlaunchers/WindowsProxyManager SuffixFilter   F * *+    r =*=+*=    #$%&'() *, PK %^D>Q|;;>org/openqa/selenium/browserlaunchers/WindowsProxyManager.class1y8org/openqa/selenium/browserlaunchers/WindowsProxyManagerjava/lang/Objectlog$Lorg/openqa/selenium/internal/Trace;REG_KEY_BACKUP_READYLjava/lang/String; ConstantValue  BackupReady COOKIE_SUFFIX.txtHIDDEN_COOKIE_DIRLjava/io/File; REG_KEY_BASE HUDSUCKR_LINELjava/util/regex/Pattern; oldSettingsKLorg/openqa/selenium/browserlaunchers/WindowsProxyManager$HudsuckrSettings;customPACappropriateZcustomProxyPACDirportIportDriversShouldContactchangeMaxConnectionsprefsLjava/util/prefs/Preferences;()VCode#&org/openqa/selenium/internal/NullTrace "% &  ( * java/io/File,java/lang/StringBuilder. USERPROFILE 021java/lang/System 34getenv&(Ljava/lang/String;)Ljava/lang/String; 687java/lang/String 9:valueOf&(Ljava/lang/Object;)Ljava/lang/String; +< &=(Ljava/lang/String;)V )? @ separator +B CDappend-(Ljava/lang/String;)Ljava/lang/StringBuilder;FCookiesHiddenBySeleniumRC +H IJtoString()Ljava/lang/String; )< M OHKEY_CURRENT_USER Q S^([^=]+)=(.*)$ UWVjava/util/regex/Pattern XYcompile-(Ljava/lang/String;)Ljava/util/regex/Pattern; [  ]_^java/util/prefs/Preferences `auserNodeForPackage0(Ljava/lang/Class;)Ljava/util/prefs/Preferences; c LineNumberTableLocalVariableTable(ZLjava/lang/String;II)V % i  k  m o qsr*org/openqa/selenium/io/TemporaryFilesystem tu createTempDir4(Ljava/lang/String;Ljava/lang/String;)Ljava/io/File; w  y z initthis:Lorg/openqa/selenium/browserlaunchers/WindowsProxyManager; sessionIdsetChangeMaxConnections(Z)V  getChangeMaxConnections()ZgetCustomProxyPACDir()Ljava/io/File;  handleEvilPopupMgrBackup ?org/openqa/selenium/browserlaunchers/WindowsProxyManager$RegKey  POPUP_MGRALorg/openqa/selenium/browserlaunchers/WindowsProxyManager$RegKey; typeLjava/lang/Class; key #org/openqa/selenium/os/WindowsUtils discoverRegistryKeyType%(Ljava/lang/String;)Ljava/lang/Class; Jname  discoverPrefKeyType java/lang/Boolean TYPE  equals(Ljava/lang/Object;)Z =deleteRegistryValue   backupIsReadynofalse ] put'(Ljava/lang/String;Ljava/lang/String;)VbackupPopupMgrTypevalueLocalVariableTypeTableLjava/lang/Class<*>;prefNodeExists(Ljava/lang/String;)Z ] get8(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String; Signature((Ljava/lang/String;)Ljava/lang/Class<*>;true 6 java/lang/Integer parseInt(Ljava/lang/String;)I java/lang/NumberFormatExceptiondatae!Ljava/lang/NumberFormatException; setBaseRegKeybasechangeRegistrySettings%(Lorg/openqa/selenium/Capabilities;)V Exceptionsjava/io/IOExceptionModifying registry settings... "org/openqa/selenium/internal/Trace =info    backupHudsuckrSettings 127.0.0.1: + C(I)Ljava/lang/StringBuilder;Iorg/openqa/selenium/browserlaunchers/WindowsProxyManager$HudsuckrSettings  connection(null) &O(Ljava/lang/String;ZZZZLjava/lang/String;Ljava/lang/String;Ljava/lang/String;)V ,org/openqa/selenium/browserlaunchers/Proxies  makeProxyPACA(Ljava/io/File;ILorg/openqa/selenium/Capabilities;)Ljava/io/File;file:// ) JgetAbsolutePath 6 replace(CC)Ljava/lang/String;   toStringArray()[Ljava/lang/String;     runHudsuckr'([Ljava/lang/String;)Ljava/lang/String;  AUTOPROXY_RESULT_CACHE  writeBooleanRegistryValue(Ljava/lang/String;Z)VaCouldn't modify autoproxy result cache; this often fails on Vista, but it's merely a nice-to-have  debug*(Ljava/lang/String;Ljava/lang/Throwable;)V  MIME_EXCLUSION_LIST_FOR_CACHEJmultipart/mixed multipart/x-mixed-replace multipart/x-byteranges text/html  !writeStringRegistryValue#[Couldn't disable caching of html; this often fails on Vista, but it's merely a nice-to-have % &USERNAME_PASSWORD_DISABLE ( )doesRegistryValueExist + ,WARN_ON_FORM_SUBMIT . /DISPLAY_MIXED_CONTENT 1 23writeIntRegistryValue(Ljava/lang/String;I)V 5 6WARN_ON_HTTPS_TO_HTTP_REDIRECT 8 9WARN_ON_BAD_CERT_RECEIVING ; <DISABLE_SCRIPT_DEBUGGER>yes @ ADISABLE_SCRIPT_DEBUGGER_IE C D%ERROR_DIALOG_DISPLAYED_ON_EVERY_ERROR F GDOWNLOAD_SIGNED_ACTIVEX I JMAX_CONNECTIONS_PER_1_0_SVR L MMAX_CONNECTIONS_PER_1_1_SVROensureCleanSession QSR org/openqa/selenium/Capabilities Tis V W hidePreexistingCookies Y Z deleteTemporaryInternetFiles\/org/openqa/selenium/os/WindowsRegistryExceptionoptions"Lorg/openqa/selenium/Capabilities;settings proxyServerproxyPACnewURLex1Lorg/openqa/selenium/os/WindowsRegistryException;fG\Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders\Cache h i4readStringRegistryValuek Content.IE5 )m &n#(Ljava/io/File;Ljava/lang/String;)V )p qexists sut"org/openqa/selenium/io/FileHandler vwdelete(Ljava/io/File;)Z cachePathglobalCacheDiriexploreCacheDirbackupRegistrySettings}Backing up registry settings...  valuesD()[Lorg/openqa/selenium/browserlaunchers/WindowsProxyManager$RegKey;  access$2D(Lorg/openqa/selenium/browserlaunchers/WindowsProxyManager$RegKey;)V   backupReadyrestoreRegistrySettings   restorePreexistingCookies>Restoring registry settings (won't affect running browsers)...  access$3   restoreHudsuckrSettings   getCookieDir   hideCookies1(Ljava/io/File;Ljava/lang/String;Ljava/io/File;)ZnCould not hide pre-existing cookies using either theWinXP directory structure or the Vista directory structure  =warndone cookieDirCopying cookies from  to s copy1(Ljava/io/File;Ljava/io/File;Ljava/lang/String;)V.Unable to back up original cookies. ContinuingDeleting original cookies...  ndeleteFlatDirContents cookieSuffixhiddenCookieDirresultLjava/io/IOException;I\Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders\Cookies cookiePath  restoreCookiesrCould not restore pre-existing cookies, using either theWinXp directory structure or the Vista directory structure-Deleting cookies created during session from s (Ljava/io/File;Ljava/io/File;)VUnable to restore cookies.  looking for files ending with: Eorg/openqa/selenium/browserlaunchers/WindowsProxyManager$SuffixFilter < )  listFiles%(Ljava/io/FileFilter;)[Ljava/io/File; ) vCould not delete file ...no matching filesdirsuffixlist[Ljava/io/File;filesuccess  ]  getBoolean(Ljava/lang/String;Z)Z ]  putBoolean traceWith'(Lorg/openqa/selenium/internal/Trace;)VextractHudsuckrhudsuckr/hudsuckr.exe s  copyResource5(Ljava/io/File;Ljava/lang/Class;[Ljava/lang/String;)Vjava/lang/RuntimeExceptionBug extracting hudsuckr  &.Bug extracting hudscukr: cannot extract file: + C-(Ljava/lang/Object;)Ljava/lang/StringBuilder; <hudsuckr  Running hudsuckr:  ="org/openqa/selenium/os/CommandLine  &((Ljava/lang/String;[Ljava/lang/String;)V   execute Executed successfully   J getStdOut   isSuccessfulexec return code   getExitCode()I: )Failed to execute hudsuckr successfully: args[Ljava/lang/String;pathcommand$Lorg/openqa/selenium/os/CommandLine;outputLjava/lang/RuntimeException;parseHudsuckrSettings_(Ljava/lang/String;)Lorg/openqa/selenium/browserlaunchers/WindowsProxyManager$HudsuckrSettings; %'&)org/openqa/selenium/browserlaunchers/Maps ()parseDictionary=(Ljava/lang/String;Ljava/util/regex/Pattern;Z)Ljava/util/Map; +-,Dorg/openqa/selenium/browserlaunchers/WindowsProxyManager$HudsuckrKey .I()[Lorg/openqa/selenium/browserlaunchers/WindowsProxyManager$HudsuckrKey; + 132 java/util/Map 4 containsKey6&Bug! Hudsuckr settings didn't include +8 9:ACTIVE_CONNECTIONFLorg/openqa/selenium/browserlaunchers/WindowsProxyManager$HudsuckrKey; 1< =&(Ljava/lang/Object;)Ljava/lang/Object; +? @:PROXY_TYPE_DIRECT +B C:PROXY_TYPE_PROXY +E F:PROXY_TYPE_AUTO_PROXY_URL +H I:PROXY_TYPE_AUTO_DETECT +K L:INTERNET_PER_CONN_PROXY_SERVER +N O:INTERNET_PER_CONN_PROXY_BYPASS +Q R: INTERNET_PER_CONN_AUTOCONFIG_URLhudsuckrOutputLjava/util/Map;serverbypasspacUrldirectproxypacwpad5Ljava/util/Map; ^ "# ` X b Y d Z f [ h U j V l WnBug! Prefs don't contain access$0access$1()Ljava/util/prefs/Preferences; SourceFileWindowsProxyManager.java InnerClasses HudsuckrKeyHudsuckrSettingsRegKey SuffixFilter!        !G"Y$')Y+Y-/5;>AEAGKLNPRTZ\bd. & -./(.+-1162>:C9F%e&f!#*g*h*j*l*,npv*xd<= >?AC"De4#{|##}##~!>*d GHe{|!/*dKe {|!/*vdOe {|z !3*d STe {| !)*L+ +++ *MMb,dVY Z ]^$_-`1c:d;gBhCjPkQpUq^setfxiyxz{|}e {|$ei  $e !9b*de !2b+M,,ǚ ,Ǚ,WΰN6%-.d& !%*./e*2{|2 )/ =!3*Pd e ! '۹***j2+Y;*hGNY*-ME*v*l+N+Y;-\/AG:Y*M*, W N'-N'"-$' 6 *-04070:=?=BE0*H0K0+NP UX[[d2 0@DKXt%/9EQ\fmye\ {|]^H_ _0`X5atb cd cd Z !<+YP5;eAGgK)Y*KL)Y+jlM,o,rWd" #/6;e "x#y/ z{ !;*'|~Y:>=2L+**d& %)15:e;{|%!D*'~Y:6>2M,**d.  -1:>Ce D{|DO- W !h ;L+ L;'d"#$%&)e !a>,rW*oT'+Y;*AA,AG*,+:''*+>7=@d6 1234"52477@8B9M<X=]>_@e4aaa_B  !i%+YP5;AGgK)Y*KL+dD EDF#Ge #  !h ;L+ L;'dKLMNORe !z>*o$'+Y;*AG*+,oJ'+Y;,AA*AG,*:',rW>Z_bdBYZ [\ [%]*_1`EaU`Zcbddeqhvixke4zzzxd  n!*o'+YǷ;+AG*Y+˶M,J,Y:6632N-6'+Yҷ;-AĢ'Թd. uv w-x1yDzJ{O|kyxe4-VD'J!!F ܚb ެd e {|!B b d  e {|  !3*'d e !])Y*vlL+o+*v6YSMY,+oY+Y;+G++.d&  . / ;B[e ]{|N/   !*M'+Y;,AGY,+N-' - :-*Y+Y;-AAGN'-!pqd2 !+/:@Gnq r!~#e>{|x+F@1 r !"#! +Z$M*Y:6 6 ? 2: , /0'Y+Y5; A+AG   ,7/;6N,>/;6,A/;6,D/;6 ,G/;6 ,J/;6:,M/;6:,P/;6:Y-  dB' *+-,1-M,Q*[0k1~2345678ez {|S _Tk9U(VW~XpY]Z J[ 2:  _\ !*6 L*+]M*,b7/,b>/,_bA/,abD/,cbG/,ebJ/,gbM/,ibP/,kd2 < =>?$@4ADBTCdDtEFGe {|  _ ! ۸*Y: 6 6 2  2:  /ܚY+Ym; G   Ͳb7/Lb>/6bA/6bD/6bG/6bJ/MbM/NbP/:Y+,-: *  WdBMN!O;MERSSbTqUVWXY[Z\]ep {|S>U0V!WbyXqjY[ZL[%: _ o!%*ܬdepq!$bd9erst"+u@v w@x PK lC>ȍ1>5org/openqa/selenium/browserlaunchers/.svn/all-wcpropsK 25 svn:wc:ra_dav:version-url V 78 /svn/!svn/ver/11226/trunk/java/client/src/org/openqa/selenium/browserlaunchers END Maps.java K 25 svn:wc:ra_dav:version-url V 88 /svn/!svn/ver/11226/trunk/java/client/src/org/openqa/selenium/browserlaunchers/Maps.java END AsyncExecute.java K 25 svn:wc:ra_dav:version-url V 96 /svn/!svn/ver/11226/trunk/java/client/src/org/openqa/selenium/browserlaunchers/AsyncExecute.java END LauncherUtils.java K 25 svn:wc:ra_dav:version-url V 97 /svn/!svn/ver/11226/trunk/java/client/src/org/openqa/selenium/browserlaunchers/LauncherUtils.java END CapabilityType.java K 25 svn:wc:ra_dav:version-url V 98 /svn/!svn/ver/11226/trunk/java/client/src/org/openqa/selenium/browserlaunchers/CapabilityType.java END BrowserLauncher.java K 25 svn:wc:ra_dav:version-url V 99 /svn/!svn/ver/11226/trunk/java/client/src/org/openqa/selenium/browserlaunchers/BrowserLauncher.java END DoNotUseProxyPac.java K 25 svn:wc:ra_dav:version-url V 100 /svn/!svn/ver/11226/trunk/java/client/src/org/openqa/selenium/browserlaunchers/DoNotUseProxyPac.java END WindowsProxyManager.java K 25 svn:wc:ra_dav:version-url V 103 /svn/!svn/ver/11226/trunk/java/client/src/org/openqa/selenium/browserlaunchers/WindowsProxyManager.java END Proxies.java K 25 svn:wc:ra_dav:version-url V 91 /svn/!svn/ver/11226/trunk/java/client/src/org/openqa/selenium/browserlaunchers/Proxies.java END build.desc K 25 svn:wc:ra_dav:version-url V 89 /svn/!svn/ver/11226/trunk/java/client/src/org/openqa/selenium/browserlaunchers/build.desc END MacProxyManager.java K 25 svn:wc:ra_dav:version-url V 99 /svn/!svn/ver/11226/trunk/java/client/src/org/openqa/selenium/browserlaunchers/MacProxyManager.java END PK lC>j]1org/openqa/selenium/browserlaunchers/.svn/entries8 dir 11264 http://selenium.googlecode.com/svn/trunk/java/client/src/org/openqa/selenium/browserlaunchers http://selenium.googlecode.com/svn 2011-02-01T13:59:17.176547Z 11226 simon.m.stewart svn:special svn:externals svn:needs-lock 07704840-8298-11de-bf8c-fd130f914ac9 Maps.java file 2011-02-03T12:01:17.000000Z 5e77ae0b75db7fe0e08db613deaede54 2011-01-17T23:43:11.610784Z 10997 simon.m.stewart AsyncExecute.java file 2011-02-03T12:01:17.000000Z fdd81ae1171a599f4e7cb9f6297b3199 2011-01-17T23:43:11.610784Z 10997 simon.m.stewart LauncherUtils.java file 2011-02-03T12:01:17.000000Z fd89c2419eaa13545f95ac832ab695dc 2011-01-19T18:28:45.431881Z 11025 simon.m.stewart CapabilityType.java file 2011-02-03T12:01:17.000000Z 96a2c1795afc0e1fdd5b86aff465a668 2011-01-23T22:27:35.375184Z 11090 simon.m.stewart BrowserLauncher.java file 2011-02-03T12:01:17.000000Z 82443541ac62163ce64ce26fa61e9f22 2011-01-23T21:21:52.211030Z 11089 simon.m.stewart locators dir DoNotUseProxyPac.java file 2011-02-03T12:01:17.000000Z 8689c3bf82fc368a8981214248b06311 2010-05-21T14:00:33.148513Z 8954 simon.m.stewart WindowsProxyManager.java file 2011-02-03T12:01:17.000000Z 09d5d1576b685e57745865f7eae88c8c 2011-01-17T23:43:11.610784Z 10997 simon.m.stewart Proxies.java file 2011-02-03T12:01:17.000000Z 6ed0bc9df104ead5c470a2840f9d067a 2011-01-23T22:27:35.375184Z 11090 simon.m.stewart build.desc file 2011-02-03T12:01:17.000000Z 03a47bb25360dbaad2e4b5fb7d3bfbed 2011-02-01T13:59:17.176547Z 11226 simon.m.stewart MacProxyManager.java file 2011-02-03T12:01:17.000000Z 635b37f01c46386bcc2109c4f75ce92a 2011-01-18T00:05:25.628026Z 10998 simon.m.stewart PK lC>G0org/openqa/selenium/browserlaunchers/.svn/format8 PK lC>, Norg/openqa/selenium/browserlaunchers/.svn/text-base/AsyncExecute.java.svn-base/* * Copyright 2006 ThoughtWorks, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package org.openqa.selenium.browserlaunchers; import org.openqa.selenium.internal.NullTrace; import org.openqa.selenium.internal.Trace; import org.openqa.selenium.os.ProcessUtils; import org.openqa.selenium.os.WindowsUtils; import org.openqa.selenium.os.UnixUtils; /** * Spawn a process and return the process handle so you can close it yourself * later. * * @author dfabulich */ public class AsyncExecute { static Trace log = new NullTrace(); /** * Sleeps without explicitly throwing an InterruptedException * * @param timeoutInSeconds Sleep time in seconds. * @throws RuntimeException wrapping an InterruptedException if one gets thrown */ public static void sleepTightInSeconds(long timeoutInSeconds) { sleepTight(timeoutInSeconds * 1000); } /** * Sleeps without explicitly throwing an InterruptedException * * @param timeout the amout of time to sleep * @throws RuntimeException wrapping an InterruptedException if one gets thrown */ public static void sleepTight(long timeout) { try { Thread.sleep(timeout); } catch (InterruptedException e) { throw new RuntimeException(e); } } /** * Forcibly kills a process, using OS tools like "kill" as a last resort * * @param process The process to kill. * @return The exit value of the process. */ public static int killProcess(Process process) { process.destroy(); int exitValue; try { exitValue = ProcessUtils.waitForProcessDeath(process, 10000); } catch (ProcessUtils.ProcessStillAliveException ex) { if (WindowsUtils.thisIsWindows()) { throw ex; } try { log.info("Process didn't die after 10 seconds"); UnixUtils.kill9(process); exitValue = ProcessUtils.waitForProcessDeath(process, 10000); } catch (Exception e) { log.error("Process refused to die after 10 seconds, and couldn't kill9 it", e); throw new RuntimeException( "Process refused to die after 10 seconds, and couldn't kill9 it: " + e.getMessage(), ex); } } return exitValue; } }PK lC>NQorg/openqa/selenium/browserlaunchers/.svn/text-base/BrowserLauncher.java.svn-base/* * Copyright 2006 ThoughtWorks, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package org.openqa.selenium.browserlaunchers; /** * The launcher interface for classes that will start/stop the browser process. * * @author Paul Hammant * @version $Revision: 732 $ */ public interface BrowserLauncher { /** * Start the browser and navigate directly to the specified URL using the supplied browser configurations */ void launchRemoteSession(String url); /** * Start the browser in Selenese mode, auto-running the specified HTML suite * * @param suiteUrl the url of the HTML suite to launch * @param baseUrl the url within which to initiate the session (if needed) */ void launchHTMLSuite(String suiteUrl, String baseUrl); /** * Stop (kill) the browser process */ void close(); /** * Returns a process if there is an associated one running with this browser launcher (this is not required to be implementd). * * @return a handle to a process if one is available, or null if one is not available or if no browser is running */ Process getProcess(); } PK lC>/T=Porg/openqa/selenium/browserlaunchers/.svn/text-base/CapabilityType.java.svn-base/* Copyright 2007-2010 WebDriver committers Copyright 2007-2010 Google Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package org.openqa.selenium.browserlaunchers; /** * Commonly seen remote webdriver capabilities. * * @deprecated Use {@link org.openqa.selenium.remote.CapabilityType} */ @Deprecated public interface CapabilityType { String BROWSER_NAME = "browserName"; String PLATFORM = "platform"; String SUPPORTS_JAVASCRIPT = "javascriptEnabled"; String TAKES_SCREENSHOT = "takesScreenshot"; String VERSION = "version"; String SUPPORTS_SQL_DATABASE = "databaseEnabled"; String SUPPORTS_LOCATION_CONTEXT = "locationContextEnabled"; String SUPPORTS_APPLICATION_CACHE = "applicationCacheEnabled"; String SUPPORTS_BROWSER_CONNECTION = "browserConnectionEnabled"; String SUPPORTS_FINDING_BY_CSS = "cssSelectorsEnabled"; String PROXY = "proxy"; String SUPPORTS_WEB_STORAGE = "webStorageEnabled"; String ROTATABLE = "rotatable"; interface ForSeleniumServer { String AVOIDING_PROXY = "avoidProxy"; String ONLY_PROXYING_SELENIUM_TRAFFIC = "onlyProxySeleniumTraffic"; String PROXYING_EVERYTHING = "proxyEverything"; String PROXY_PAC = "proxy_pac"; String ENSURING_CLEAN_SESSION = "ensureCleanSession"; } } PK lC>4Rorg/openqa/selenium/browserlaunchers/.svn/text-base/DoNotUseProxyPac.java.svn-basepackage org.openqa.selenium.browserlaunchers; import java.io.IOException; import java.io.InputStream; import java.io.InputStreamReader; import java.io.Reader; import java.io.Serializable; import java.io.Writer; import java.net.URI; import java.util.HashMap; import java.util.LinkedHashSet; import java.util.Map; import java.util.Set; import java.util.regex.Pattern; import static java.util.Collections.unmodifiableMap; import static java.util.Collections.unmodifiableSet; /** * A representation of a proxy configuration file. */ public class DoNotUseProxyPac implements Serializable { // Note that we put the dash character at the end of the pattern private static final Pattern acceptableShExpPattern = Pattern.compile("[\\w\\*\\?:/\\.-]*"); // Make an effort to preserve the ordering the user asked for. private final Set directUrls = new LinkedHashSet(); private final Map proxiedUrls = new HashMap(); private final Map proxiedRegexUrls = new HashMap(); private final Set directHosts = new LinkedHashSet(); private final Map proxiedHosts = new HashMap(); // TODO(simon): Is this right? Really? private String defaultProxy = ""; // Does nothing. Emulates old behaviour of Selenium private URI deriveFrom; /** * Output the PAC file to the given writer. * * @param writer Will have config written to it. * @throws IOException Should the underlying writer fail. */ public void outputTo(Writer writer) throws IOException { appendSuperPac(writer); writer.append("function FindProxyForURL(url, host) {\n"); appendDirectHosts(writer); appendProxiedHosts(writer); appendDirectUrls(writer); appendProxiedUrls(writer); appendProxiedRegExUrls(writer); appendFallbackToSuperPac(writer); if (!"".equals(defaultProxy)) { writer.append(" return ").append(defaultProxy).append(";\n"); } writer.append("}\n"); } private void appendSuperPac(Writer writer) throws IOException { if (deriveFrom == null) { return; } // TODO(simon): This is going to be a cause of bugs. Should detect encoding of incoming data. Reader reader = new InputStreamReader((InputStream) deriveFrom.toURL().getContent()); StringBuilder content = new StringBuilder(); for (int i = reader.read(); i != -1; i = reader.read()) { content.append((char) i); } writer.append(content.toString().replace("FindProxyForURL", "originalFindProxyForURL")); writer.append("\n"); } private void appendFallbackToSuperPac(Writer writer) throws IOException { if (deriveFrom == null) { return; } writer.append("\n") .append(" var value = originalFindProxyForURL(host, url);\n") .append(" if (value) { return value; }\n\n"); } private void appendDirectHosts(Writer writer) throws IOException { for (String host : this.directHosts) { writer.append(" if (shExpMatch(host, '") .append(host) .append("')) { return 'DIRECT'; }\n"); } } private void appendProxiedHosts(Writer writer) throws IOException { for (Map.Entry entry : proxiedHosts.entrySet()) { writer.append(" if (shExpMatch(host, '") .append(entry.getKey()) .append("')) { return 'PROXY ") .append(entry.getValue()) .append("'; }\n"); } } private void appendDirectUrls(Writer writer) throws IOException { for (String url : this.directUrls) { writer.append(" if (shExpMatch(url, '") .append(url) .append("')) { return 'DIRECT'; }\n"); } } private void appendProxiedUrls(Writer writer) throws IOException { for (Map.Entry entry : proxiedUrls.entrySet()) { writer.append(" if (shExpMatch(url, '") .append(entry.getKey()) .append("')) { return 'PROXY ") .append(entry.getValue()) .append("'; }\n"); } } private void appendProxiedRegExUrls(Writer writer) throws IOException { for (Map.Entry entry : proxiedRegexUrls.entrySet()) { writer.append(" if (") .append(entry.getKey()) .append(".test(url)) { return 'PROXY ") .append(entry.getValue()) .append("'; }\n"); } } public ProxyUrlVia map(String outgoingUrl) { return new ProxyUrlVia(outgoingUrl); } public ProxyHostVia mapHost(String hostname) { return new ProxyHostVia(hostname); } public DefaultProxy defaults() { return new DefaultProxy(); } public Map asMap() { Map toReturn = new HashMap(); if (directUrls.size() > 0) { toReturn.put("directUrls", unmodifiableSet(directUrls)); } if (proxiedUrls.size() > 0) { toReturn.put("proxiedUrls", unmodifiableMap(proxiedUrls)); } if (proxiedRegexUrls.size() > 0) { toReturn.put("proxiedRegexUrls", unmodifiableMap(proxiedRegexUrls)); } if (directHosts.size() > 0) { toReturn.put("directHosts", unmodifiableSet(directHosts)); } if (proxiedHosts.size() > 0) { toReturn.put("proxiedHosts", unmodifiableMap(proxiedHosts)); } if (defaultProxy.length() > 0) { toReturn.put("defaultProxy", defaultProxy); } if (deriveFrom != null) { toReturn.put("deriveFrom", deriveFrom.toString()); } return toReturn; } public DoNotUseProxyPac deriveFrom(URI uri) { // Store the uri for now this.deriveFrom = uri; return this; } public class ProxyUrlVia { private String outgoingUrl; private ProxyUrlVia(String outgoingUrl) { this.outgoingUrl = outgoingUrl; } public DoNotUseProxyPac toProxy(String proxyVia) { if (isIeIncompatibleRegEx(outgoingUrl)) { proxiedRegexUrls.put(outgoingUrl, proxyVia); } else { proxiedUrls.put(outgoingUrl, proxyVia); } return DoNotUseProxyPac.this; } // See: http://support.microsoft.com/kb/274204 private boolean isIeIncompatibleRegEx(String outgoingUrl) { return !acceptableShExpPattern.matcher(outgoingUrl).matches(); } public DoNotUseProxyPac toNoProxy() { DoNotUseProxyPac.this.directUrls.add(outgoingUrl); return DoNotUseProxyPac.this; } } public class ProxyHostVia { private String host; private ProxyHostVia(String host) { this.host = host; } public DoNotUseProxyPac toProxy(String proxyVia) { proxiedHosts.put(host, proxyVia); return DoNotUseProxyPac.this; } public DoNotUseProxyPac toNoProxy() { directHosts.add(host); return DoNotUseProxyPac.this; } } public class DefaultProxy { public DoNotUseProxyPac toNoProxy() { defaultProxy = "'DIRECT'"; return DoNotUseProxyPac.this; } public DoNotUseProxyPac toProxy(String proxyVia) { defaultProxy = "'PROXY " + proxyVia + "'"; return DoNotUseProxyPac.this; } } } PK lC>244Oorg/openqa/selenium/browserlaunchers/.svn/text-base/LauncherUtils.java.svn-basepackage org.openqa.selenium.browserlaunchers; import java.io.BufferedReader; import java.io.File; import java.io.FileNotFoundException; import java.io.FileOutputStream; import java.io.FileReader; import java.io.FileWriter; import java.io.IOException; import java.io.InputStream; import java.io.InputStreamReader; import java.io.PrintStream; import java.net.MalformedURLException; import java.net.URL; import java.util.regex.Matcher; import java.util.regex.Pattern; import com.google.common.base.Throwables; import org.openqa.selenium.Capabilities; import org.openqa.selenium.internal.NullTrace; import org.openqa.selenium.internal.Trace; import org.openqa.selenium.io.FileHandler; import org.openqa.selenium.net.Urls; /** * Various static utility functions used to launch browsers */ public class LauncherUtils { static Trace log = new NullTrace(); /** * creates an empty temp directory for managing a browser profile */ // TODO(simon): Change this back to protected once moved into browserlaunchers public static File createCustomProfileDir(String sessionId) { final File customProfileDir; customProfileDir = customProfileDir(sessionId); if (customProfileDir.exists()) { LauncherUtils.recursivelyDeleteDir(customProfileDir); } customProfileDir.mkdir(); return customProfileDir; } /** * Return the name of the custom profile directory for a specific seleniumm session * * @param sessionId Current selenium sesssion id. Cannot be null. * @return file path of the custom profile directory for this session. */ public static File customProfileDir(String sessionId) { final File tmpDir; final String customProfileDirParent; final File customProfileDir; tmpDir = new File(System.getProperty("java.io.tmpdir")); customProfileDirParent = ((tmpDir.exists() && tmpDir.isDirectory()) ? tmpDir.getAbsolutePath() : "."); customProfileDir = new File(customProfileDirParent + "/customProfileDir" + sessionId); return customProfileDir; } /** * Delete a directory and all subdirectories */ public static void recursivelyDeleteDir(File customProfileDir) { FileHandler.delete(customProfileDir); } /** * Try several times to recursively delete a directory */ public static void deleteTryTryAgain(File dir, int tries) { try { recursivelyDeleteDir(dir); } catch (RuntimeException e) { if (tries > 0) { AsyncExecute.sleepTight(2000); deleteTryTryAgain(dir, tries - 1); } else { throw e; } } } // TODO(simon): Should not be public public static String getQueryString(String url) { final String query; try { query = new URL(url).getQuery(); return query == null ? "" : query; } catch (MalformedURLException e) { throw new RuntimeException(e); } } // TODO(simon): Revert back to protected once the abstract browser launcher is in the same package public static String getDefaultHTMLSuiteUrl(String browserURL, String suiteUrl, boolean multiWindow, int serverPort) { String url = Urls.toProtocolHostAndPort(browserURL); String resultsUrl; if (serverPort == 0) { resultsUrl = "../postResults"; } else { resultsUrl = "http://localhost:" + serverPort + "/selenium-server/postResults"; } return url + "/selenium-server/core/TestRunner.html?auto=true" + "&multiWindow=" + multiWindow + "&defaultLogLevel=info" + "&baseUrl=" + Urls.urlEncode(browserURL) + "&resultsUrl=" + resultsUrl + "&test=" + Urls.urlEncode(suiteUrl); } // TODO(simon): Reduce visibility once server/browserlaunchers no more public static String getDefaultRemoteSessionUrl(String startURL, String sessionId, boolean multiWindow, int serverPort, boolean browserSideLog) { String url = Urls.toProtocolHostAndPort(startURL); url += "/selenium-server/core/RemoteRunner.html?" + "sessionId=" + sessionId + "&multiWindow=" + multiWindow + "&baseUrl=" + Urls.urlEncode(startURL) + "&debugMode=" + browserSideLog; if (serverPort != 0) { url += "&driverUrl=http://localhost:" + serverPort + "/selenium-server/driver/"; } return url; } // TODO(simon): Reduce visibility. public static File extractHTAFile(File dir, int port, String resourceFile, String outFile) { InputStream input = getSeleniumResourceAsStream(resourceFile); BufferedReader br = new BufferedReader(new InputStreamReader(input)); File hta = new File(dir, outFile); try { FileWriter fw = new FileWriter(hta); String line = br.readLine(); fw.write(line); fw.write('\n'); fw.write(""); while ((line = br.readLine()) != null) { fw.write(line); fw.write('\n'); } fw.flush(); fw.close(); } catch (IOException e) { throw new RuntimeException(e); } return hta; } public static InputStream getSeleniumResourceAsStream(String resourceFile) { Class clazz = LauncherUtils.class; InputStream input = clazz.getResourceAsStream(resourceFile); if (input == null) { try { // This is hack for the OneJar version of Selenium-Server. // Examine the contents of the jar made by // https://svn.openqa.org/svn/selenium-rc/trunk/selenium-server-onejar/build.xml clazz = Class.forName("OneJar"); input = clazz.getResourceAsStream(resourceFile); } catch (ClassNotFoundException e) { } } return input; } public static boolean isScriptFile(File aFile) { final char firstTwoChars[] = new char[2]; final FileReader reader; int charsRead; try { reader = new FileReader(aFile); charsRead = reader.read(firstTwoChars); if (2 != charsRead) { return false; } return (firstTwoChars[0] == '#' && firstTwoChars[1] == '!'); } catch (IOException e) { throw new RuntimeException(e); } } // TODO(simon): Replace with something not in LauncherUtils public static void copySingleFile(File sourceFile, File destFile) { copySingleFileWithOverwrite(sourceFile, destFile, false); } // TODO(simon): Replace me public static void copySingleFileWithOverwrite(File sourceFile, File destFile, boolean overwrite) { // Ensure that the source is actually a file if (!sourceFile.exists()) { throw new RuntimeException("Source file does not exist: " + sourceFile); } if (!sourceFile.isFile()) { throw new RuntimeException("Source is not a single file: " + sourceFile); } if (!overwrite && destFile.exists()) { throw new RuntimeException("Destination file already exists: " + destFile); } try { FileHandler.copy(sourceFile, destFile); } catch (IOException e) { throw Throwables.propagate(e); } } // TODO(simon): Replace me public static void copyDirectory(File source, File dest) { try { FileHandler.copy(source, dest); } catch (IOException e) { throw Throwables.propagate(e); } } /** * Copies all files matching the suffix to the destination directory. *

* If no files match, and the destination directory did not already * exist, the destination directory is still created, if possible. * * @param source the source directory * @param suffix the suffix for all files to be copied. * @param dest the destination directory */ protected static boolean copyDirectory(File source, String suffix, File dest) { try { FileHandler.copy(source, dest, suffix); return true; } catch (IOException e) { return false; } } // TODO(simon): Reduce visibility public static void generatePacAndPrefJs(File customProfileDir, int port, String homePage, boolean changeMaxConnections, long timeoutInSeconds, Capabilities capabilities) throws FileNotFoundException { File prefsJS = new File(customProfileDir, "prefs.js"); PrintStream out = new PrintStream(new FileOutputStream(prefsJS, true)); // Don't ask if we want to switch default browsers out.println("user_pref('browser.shell.checkDefaultBrowser', false);"); // TODO(simon): Remove hard-coded string if (Proxies.isProxyRequired(capabilities)) { // Configure us as the local proxy File proxyPAC = Proxies.makeProxyPAC(customProfileDir, port, capabilities); out.println("user_pref('network.proxy.type', 2);"); out.println("user_pref('network.proxy.autoconfig_url', '" + pathToBrowserURL(proxyPAC.getAbsolutePath()) + "');"); } // suppress authentication confirmations out.println("user_pref('network.http.phishy-userpass-length', 255);"); // Disable pop-up blocking out.println("user_pref('browser.allowpopups', true);"); out.println("user_pref('dom.disable_open_during_load', false);"); // Allow scripts to run as long as the server timeout out.println("user_pref('dom.max_script_run_time', " + timeoutInSeconds + ");"); out.println("user_pref('dom.max_chrome_script_run_time', " + timeoutInSeconds + ");"); // Open links in new windows (Firefox 2.0) out.println("user_pref('browser.link.open_external', 2);"); out.println("user_pref('browser.link.open_newwindow', 2);"); if (homePage != null) { out.println("user_pref('startup.homepage_override_url', '" + homePage + "');"); // for Firefox 2.0 out.println("user_pref('browser.startup.homepage', '" + homePage + "');"); out.println("user_pref('startup.homepage_welcome_url', '');"); // This handles known RC problems when the startup page is a blank page or when the previous session has been restored out.println("user_pref('browser.startup.page', 1);"); } // Disable security warnings out.println("user_pref('security.warn_submit_insecure', false);"); out.println("user_pref('security.warn_submit_insecure.show_once', false);"); out.println("user_pref('security.warn_entering_secure', false);"); out.println("user_pref('security.warn_entering_secure.show_once', false);"); out.println("user_pref('security.warn_entering_weak', false);"); out.println("user_pref('security.warn_entering_weak.show_once', false);"); out.println("user_pref('security.warn_leaving_secure', false);"); out.println("user_pref('security.warn_leaving_secure.show_once', false);"); out.println("user_pref('security.warn_viewing_mixed', false);"); out.println("user_pref('security.warn_viewing_mixed.show_once', false);"); // Disable cache out.println("user_pref('browser.cache.disk.enable', false);"); out.println("user_pref('browser.cache.memory.enable', true);"); // Disable "do you want to remember this password?" out.println("user_pref('signon.rememberSignons', false);"); // Disable re-asking for license agreement (Firefox 3) out.println("user_pref('browser.EULA.3.accepted', true);"); out.println("user_pref('browser.EULA.override', true);"); // Disable any of the random self-updating crap out.println("user_pref('app.update.auto', false);"); out.println("user_pref('app.update.enabled', false);"); out.println("user_pref('extensions.update.enabled', false);"); out.println("user_pref('browser.search.update', false);"); out.println("user_pref('browser.safebrowsing.enabled', false);"); if (changeMaxConnections) { out.println("user_pref('network.http.max-connections', 256);"); out.println("user_pref('network.http.max-connections-per-server', 256);"); out.println("user_pref('network.http.max-persistent-connections-per-proxy', 256);"); out.println("user_pref('network.http.max-persistent-connections-per-server', 256);"); } out.close(); } static final Pattern JAVA_STYLE_UNC_URL = Pattern.compile("^file:////([^/]+/.*)$"); /** * Generates an URL suitable for use in browsers, unlike Java's URLs, which * choke on UNC paths.

*

* Java's URLs work in IE, but break in Mozilla. Mozilla's team snobbily * demanded that all file paths must have the empty authority * (file:///), even for UNC file paths. On Mozilla \\socrates\build is * therefore represented as file://///socrates/build. *

* See Mozilla bug 66194. * * @param path - * the file path to convert to a browser URL * @return a nice Mozilla-compatible file URL */ private static String pathToBrowserURL(String path) { if (path == null) { return null; } String url = (new File(path)).toURI().toString(); Matcher m = JAVA_STYLE_UNC_URL.matcher(url); if (m.find()) { url = "file://///"; url += m.group(1); } return url; } } PK lC>X0RRQorg/openqa/selenium/browserlaunchers/.svn/text-base/MacProxyManager.java.svn-base/* * Copyright 2007 ThoughtWorks, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package org.openqa.selenium.browserlaunchers; import java.io.File; import java.io.IOException; import java.util.Arrays; import java.util.HashSet; import java.util.Map; import java.util.Set; import java.util.prefs.Preferences; import java.util.regex.Pattern; import org.openqa.selenium.internal.NullTrace; import org.openqa.selenium.internal.Trace; import org.openqa.selenium.os.CommandLine; //import org.openqa.selenium.server.browserlaunchers.LauncherUtils; /** * Class to manage the proxy server on OS X. It uses the 'networksetup' tool to do * its magic; it also depends on 'scutil' to read some settings we need to interact * with 'networksetup.' * *

'networksetup' seems to come in a great many varieties depending on different * versions of OS X (and different architectures: PPC vs Intel), so we've taken * some care to write this class very defensively.

* @author Dan Fabulich * */ public class MacProxyManager { static Trace log = new NullTrace(); private static final Pattern SCUTIL_LINE = Pattern.compile("^ (\\S+) : (.*)$"); private static final Pattern NETWORKSETUP_LISTORDER_LINE = Pattern.compile("\\(Hardware Port: ([^,]*), Device: ([^\\)]*)\\)"); private static final Pattern NETWORKSETUP_LINE = Pattern.compile("^([^:]+): (.*)$"); private static final String BACKUP_READY = "backupready"; private String sessionId; private File customProxyPACDir; // TODO evict this? private int port; // DGF used to be static/final, but that made it harder to mock out private Preferences prefs = Preferences.userNodeForPackage(MacProxyManager.class); /** The user defined name of the network service, used as an * argument to 'networksetup', e.g. "Built-in Ethernet" * or "AirPort". */ private String networkService; public MacProxyManager(String sessionId, int port) { this.sessionId = sessionId; this.port = port; prefs = Preferences.userNodeForPackage(MacProxyManager.class); } public File getCustomProxyPACDir() { return customProxyPACDir; } private boolean prefNodeExists(String key) { return null != prefs.get(key, null); } /** change the network settings to enable use of our proxy */ public void changeNetworkSettings() throws IOException { if (networkService == null) { getCurrentNetworkSettings(); } customProxyPACDir = LauncherUtils.createCustomProfileDir(sessionId); if (customProxyPACDir.exists()) { LauncherUtils.recursivelyDeleteDir(customProxyPACDir); } customProxyPACDir.mkdir(); log.info("Modifying OS X global network settings..."); // TODO Disable proxy PAC URL (or, even better, use one!) SRC-364 runNetworkSetup("-setwebproxy", networkService, "localhost", ""+port); runNetworkSetup("-setproxybypassdomains", networkService, "Empty"); } private String findNetworkSetupBin() { String defaultPath = "/System/Library/CoreServices/RemoteManagement/ARDAgent.app/Contents/Support/networksetup"; File defaultLocation = new File(defaultPath); if (defaultLocation.exists()) { return defaultLocation.getAbsolutePath(); } String networkSetupBin = CommandLine.findExecutable("networksetup"); if (networkSetupBin != null) { return networkSetupBin; } if (defaultLocation.getParentFile().exists()) { String[] files = defaultLocation.getParentFile().list(); String guess = chooseSuitableNetworkSetup(System.getProperty("os.version"), System.getProperty("os.arch"), files); if (guess != null) { File guessedLocation = new File(defaultLocation.getParentFile(), guess); log.warn("Couldn't find 'networksetup' in expected location; we're taking " + "a guess and using " + guessedLocation.getAbsolutePath() + " instead. Please create a symlink called 'networksetup' to make " + "this warning go away."); return guessedLocation.getAbsolutePath(); } } throw new MacNetworkSetupException("networksetup couldn't be found in the path!\n" + "Please add the directory containing 'networksetup' to your PATH environment\n" + "variable."); } /** Try to guess which 'networksetup' executable to use */ private String chooseSuitableNetworkSetup(String osVersion, String osArch, String... files) { // DGF we don't technically need to know osArch, but according to comments in SRC-13, // sometimes Tiger on PPC looks different from Tiger on Intel, so we'll leave it in, // just in case Set candidates = new HashSet(); for (String file : files) { if (file.startsWith("networksetup-")) { candidates.add(file); } } if (candidates.isEmpty()) { log.debug("No networksetup candidates found"); return null; } if (candidates.size() == 1) { log.debug("One networksetup candidate found"); return candidates.iterator().next(); } log.debug("Multiple networksetup candidates found: " + candidates); // uh-oh. There's no 'networksetup' and more than one 'networksetup-*' // we'll have to take a guess! String[] versionParts = osVersion.split("\\."); if (versionParts.length < 2) { log.debug("OS version seems to be invalid: " + osVersion); return null; } if (!"10".equals(versionParts[0])) { log.debug("OS version doesn't seem to be 10.*: " + osVersion); return null; } CodeName codeName; try { codeName = CodeName.minorVersion(versionParts[1]); String possibleCandidate = "networksetup-"+codeName.name().toLowerCase(); if (candidates.contains(possibleCandidate)) { log.debug("This seems to be " + codeName + ", so we'll use " + possibleCandidate); return possibleCandidate; } log.debug("This seems to be " + codeName + ", but there's no " + possibleCandidate); } catch (IllegalArgumentException e) { log.debug("Couldn't find code name for OS version " + osVersion); return null; } // DGF when we know there's multiple candidates, but none of them match, should we just pick one? return null; } private enum CodeName { PUMA("1"), JAGUAR("2"), PANTHER("3"), TIGER("4"), LEOPARD("5"); String minorVersion; CodeName(String minorVersion) { this.minorVersion = minorVersion; } static CodeName minorVersion(String minorVersion) { for (CodeName cn : values()) { if (cn.minorVersion.equals(minorVersion)) { return cn; } } throw new IllegalArgumentException("No codename matches minorVersion " + minorVersion); } } private String findScutilBin() { String defaultPath = "/usr/sbin/scutil"; File defaultLocation = new File(defaultPath); if (defaultLocation.exists()) { return defaultLocation.getAbsolutePath(); } String scutilBin = CommandLine.findExecutable("scutil"); if (scutilBin != null) { return scutilBin; } throw new MacNetworkSetupException("scutil couldn't be found in the path!\n" + "Please add the directory containing 'scutil' to your PATH environment\n" + "variable."); } /** Acquire current network settings using scutil/networksetup */ private MacNetworkSettings getCurrentNetworkSettings() { getPrimaryNetworkServiceName(); String output = runNetworkSetup("-getwebproxy", networkService); log.debug(output); Map dictionary = Maps.parseDictionary(output.toString(), NETWORKSETUP_LINE, false); String strEnabled = verifyKey("Enabled", dictionary, "networksetup", output); boolean enabled = isTrueOrSomething(strEnabled); String server = verifyKey("Server", dictionary, "networksetup", output); String strPort = verifyKey("Port", dictionary, "networksetup", output); int port1; try { port1 = Integer.parseInt(strPort); } catch (NumberFormatException e) { throw new MacNetworkSetupException("Port didn't look right: " + output, e); } String strAuth = verifyKey("Authenticated Proxy Enabled", dictionary, "networksetup", output); boolean auth = isTrueOrSomething(strAuth); String[] bypassDomains = getCurrentProxyBypassDomains(); MacNetworkSettings networkSettings = new MacNetworkSettings(networkService, enabled, server, port1, auth, bypassDomains); return networkSettings; } private String[] getCurrentProxyBypassDomains() { String output = runNetworkSetup("-getproxybypassdomains", networkService); log.debug(output); if (output == null) { throw new MacNetworkSetupException("-getproxybypassdomains had no output"); } String[] lines = output.split("\n"); int i = 0; if (lines.length == i) { return new String[] {""}; } if (lines[i].startsWith("cp: /Library")) { // spurious warning when you don't run as root i++; } if (lines.length == i) { return new String[] {""}; } if (lines[i].startsWith("There aren't any")) { return new String[0]; } if (i == 0) return lines; String[] domains = new String[lines.length-i]; System.arraycopy(lines, i, domains, 0, lines.length-i); return domains; } private boolean isTrueOrSomething(String value) { // networksetup sometimes uses one of these; we don't really care which! String[] matches = {"yes", "1", "true", "on"}; for (String match : matches) { if (match.equalsIgnoreCase(value)) return true; } return false; } private String verifyKey(String key, Map dictionary, String executable, String output) { if (!dictionary.containsKey(key)) { throw new MacNetworkSetupException("Couldn't find " + key + " in " + executable + "; output: " + output); } return dictionary.get(key); } private String getPrimaryNetworkServiceName() { // TODO This would be faster (but harder to test?) if we just launched scutil once // and communicated with it line-by-line using stdin/stdout String output = runScutil("show State:/Network/Global/IPv4"); log.debug(output); Map dictionary = Maps.parseDictionary(output.toString(), SCUTIL_LINE, false); String primaryInterface = verifyKey("PrimaryInterface", dictionary, "scutil", output); output = runNetworkSetup("-listnetworkserviceorder"); log.debug(output); dictionary = Maps.parseDictionary(output.toString(), NETWORKSETUP_LISTORDER_LINE, true); String userDefinedName = verifyKey(primaryInterface, dictionary, "networksetup -listnetworksetuporder", output); networkService = userDefinedName; return userDefinedName; } /** Execute scutil and quit, returning the output */ protected String runScutil(String arg) { CommandLine command = new CommandLine(findScutilBin()); command.setInput(arg + "\nquit\n"); command.execute(); String output = command.getStdOut(); if (!command.isSuccessful()) { throw new RuntimeException("exec return code " + command.getExitCode() + ": " + output); } return output; } /** Execute networksetup, returning the output */ protected String runNetworkSetup(String... args) { CommandLine command = new CommandLine(findNetworkSetupBin(), args); command.execute(); String output = command.getStdOut(); if (!command.isSuccessful()) { throw new RuntimeException("exec return code " + command.getStdOut() + ": " + output); } return output; } @SuppressWarnings("serial") static class MacNetworkSetupException extends RuntimeException { MacNetworkSetupException(Exception e) { super(generateMessage(), e); } private static String generateMessage() { return "Problem while managing OS X network settings, OS Version " + System.getProperty("os.version"); // TODO more diagnostics re: networksetup? md5sum? others? } MacNetworkSetupException(String message) { this(new RuntimeException(message)); } MacNetworkSetupException(String message, Throwable e) { super(generateMessage() + ": " + message, e); } } /** Copy OS X network settings into Java's per-user persistent preference store * @see Preferences * */ public void backupNetworkSettings() throws IOException { // Don't clobber our old backup if we // never got the chance to restore for some reason if (backupIsReady()) return; log.info("Backing up OS X global network settings..."); MacNetworkSettings networkSettings = getCurrentNetworkSettings(); writeToPrefs(networkSettings); backupReady(true); } /** Restore OS X network settings back the way thay were */ public void restoreNetworkSettings() { // Backup really should be ready, but if not, skip it if (!backupIsReady()) return; log.info("Restoring OS X global network settings..."); MacNetworkSettings networkSettings = retrieveFromPrefs(); runNetworkSetup("-setwebproxy", networkSettings.serviceName, networkSettings.proxyServer, ""+networkSettings.port1); // DGF Do we need to do anything with authentication? Let's just leave it alone and hope it doesn't bite us if (networkSettings.bypass.length > 0) { String[] bypassDomainArgs = new String[networkSettings.bypass.length+2]; bypassDomainArgs[0] = "-setproxybypassdomains"; bypassDomainArgs[1] = networkSettings.serviceName; System.arraycopy(networkSettings.bypass, 0, bypassDomainArgs, 2, networkSettings.bypass.length); runNetworkSetup(bypassDomainArgs); } else { runNetworkSetup("-setproxybypassdomains", networkSettings.serviceName, "Empty"); } String enabledArg = networkSettings.enabled ? "on" : "off"; runNetworkSetup("-setwebproxystate", networkSettings.serviceName, enabledArg); backupReady(false); } /** Extract network data from Java user preferences */ private MacNetworkSettings retrieveFromPrefs() { String serviceName = prefsGetStringOrFail("serviceName"); String proxyServer = prefsGetStringOrFail("proxyServer"); String strBypass = prefsGetStringOrFail("bypass"); String[] bypassEncodedArray, bypass; if ("".equals(strBypass)) { bypass = new String[0]; } else { bypassEncodedArray = strBypass.split("\t"); int domains; try { domains = Integer.parseInt(bypassEncodedArray[0]); } catch (NumberFormatException e) { throw new RuntimeException("BUG! Couldn't decode bypass preference: " + strBypass); } bypass = new String[domains]; if (domains == bypassEncodedArray.length) { // DGF blank domain... I assume that only the last domain can be blank? if (domains == 1) { bypass = new String[] {""}; } else { if (bypassEncodedArray.length != domains -1 ) { throw new RuntimeException("BUG! Couldn't decode bypass preference: " + strBypass); } System.arraycopy(bypassEncodedArray, 1, bypass, 0, domains-1); } } else { if (bypassEncodedArray.length != domains +1 ) { throw new RuntimeException("BUG! Couldn't decode bypass preference: " + strBypass); } System.arraycopy(bypassEncodedArray, 1, bypass, 0, domains); } } int port1 = prefsGetIntOrFail("port"); boolean enabled = prefsGetBooleanOrFail("enabled"); boolean authenticated = prefsGetBooleanOrFail("authenticated"); return new MacNetworkSettings(serviceName, enabled, proxyServer, port1, authenticated, bypass); } private String prefsGetStringOrFail(String key) { String value = prefs.get(key, null); if (value == null) { throw new RuntimeException("BUG! pref key " + key + " should not be null"); } return value; } private int prefsGetIntOrFail(String key) { prefsGetStringOrFail(key); return prefs.getInt(key, 0); } private boolean prefsGetBooleanOrFail(String key) { prefsGetStringOrFail(key); return prefs.getBoolean(key, false); } private void writeToPrefs(MacNetworkSettings networkSettings) { prefs.put("serviceName", networkSettings.serviceName); prefs.putBoolean("enabled", networkSettings.enabled); prefs.put("proxyServer", networkSettings.proxyServer); prefs.putInt("port", networkSettings.port1); prefs.putBoolean("authenticated", networkSettings.authenticated); prefs.put("bypass", networkSettings.bypassAsString()); } private boolean backupIsReady() { if (!prefNodeExists(BACKUP_READY)) return false; return prefs.getBoolean(BACKUP_READY, false); } private void backupReady(boolean backupReady) { prefs.putBoolean(BACKUP_READY, backupReady); } /** Data class to hold network settings */ class MacNetworkSettings { final String serviceName; final boolean enabled; final String proxyServer; final int port1; final boolean authenticated; final String[] bypass; public MacNetworkSettings(String serviceName, boolean enabled, String server, int port, boolean authenticated, String[] bypass) { this.serviceName = serviceName; this.enabled = enabled; this.proxyServer = server; this.port1 = port; this.authenticated = authenticated; this.bypass = bypass; } /** Return bypass domains as tab-delimited string */ public String bypassAsString() { StringBuffer sb = new StringBuffer(); sb.append(bypass.length).append('\t'); for (String domain : bypass) { sb.append(domain).append('\t'); } return sb.toString(); } @Override public String toString() { StringBuffer sb = new StringBuffer("{serviceName="); sb.append(serviceName) .append(", enabled=").append(enabled) .append(", proxyServer=").append(proxyServer) .append(", port=").append(port1) .append(", authenticated=").append(authenticated) .append(", bypass=").append(Arrays.toString(bypass)) .append("}"); ; return sb.toString(); } } } PK lC>鯞Forg/openqa/selenium/browserlaunchers/.svn/text-base/Maps.java.svn-base/* Copyright 2010 WebDriver committers Copyright 2010 Google Inc. Portions copyright 2006 ThoughtWorks, Inc Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package org.openqa.selenium.browserlaunchers; import java.util.HashMap; import java.util.Map; import java.util.regex.Matcher; import java.util.regex.Pattern; // Deliberately set to package level visibility class Maps { /** * Run the specified pattern on each line of the data to extract a dictionary */ public static Map parseDictionary(String data, Pattern pattern, boolean reverse) { Map map = new HashMap(); for (String line : data.split("\n")) { Matcher m = pattern.matcher(line); if (!m.find()) { continue; } String name, value; if (reverse) { name = m.group(2); value = m.group(1); } else { name = m.group(1); value = m.group(2); } map.put(name, value); } return map; } } PK lC>gtIorg/openqa/selenium/browserlaunchers/.svn/text-base/Proxies.java.svn-base/* Copyright 2010 WebDriver committers Copyright 2010Google Inc. Portions copyright 2007 ThoughtWorks, Inc Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package org.openqa.selenium.browserlaunchers; import java.io.File; import java.io.FileNotFoundException; import java.io.FileWriter; import java.io.IOException; import java.io.Writer; import java.util.Map; import com.thoughtworks.selenium.SeleniumException; import org.openqa.selenium.Capabilities; import org.openqa.selenium.Proxy; import org.openqa.selenium.remote.DesiredCapabilities; import static org.openqa.selenium.remote.CapabilityType.ForSeleniumServer; import static org.openqa.selenium.remote.CapabilityType.ForSeleniumServer.AVOIDING_PROXY; import static org.openqa.selenium.remote.CapabilityType.ForSeleniumServer.ONLY_PROXYING_SELENIUM_TRAFFIC; import static org.openqa.selenium.remote.CapabilityType.ForSeleniumServer.PROXYING_EVERYTHING; import static org.openqa.selenium.remote.CapabilityType.PROXY; public class Proxies { public static final String PROXY_CONFIG = "proxy"; public static boolean isProxyRequired(Capabilities capabilities) { return capabilities.is("proxyRequired") || capabilities.getCapability(PROXY_CONFIG) != null; } /** * Generate a proxy.pac file, configuring a dynamic proxy.

If * proxySeleniumTrafficOnly is true, then the proxy applies only to URLs * containing "/selenium-server/". Otherwise the proxy applies to all URLs. */ public static File makeProxyPAC(File parentDir, int port, Capabilities capabilities) throws FileNotFoundException { return makeProxyPAC(parentDir, port, System.getProperty("http.proxyHost"), System.getProperty("http.proxyPort"), System.getProperty("http.nonProxyHosts"), capabilities); } public static File makeProxyPAC(File parentDir, int port, String configuredProxy, String proxyPort, String nonProxyHosts, Capabilities capabilities) throws FileNotFoundException { DoNotUseProxyPac pac = newProxyPac(port, configuredProxy, proxyPort, nonProxyHosts, capabilities); Proxy proxy = extractProxy(capabilities); if (proxy != null && proxy.getHttpProxy() != null) { pac.defaults().toProxy(proxy.getHttpProxy()); } try { File pacFile = new File(parentDir, "proxy.pac"); Writer out = new FileWriter(pacFile); pac.outputTo(out); out.close(); return pacFile; } catch (IOException e) { throw new SeleniumException("Unable to configure proxy. Selenium will not work."); } } public static Proxy extractProxy(Capabilities capabilities) { Object rawProxy = capabilities.getCapability(PROXY); Proxy proxy = null; if (rawProxy != null) { if (rawProxy instanceof Proxy) { proxy = (Proxy) rawProxy; } else if (rawProxy instanceof Map) { //noinspection unchecked proxy = new Proxy((Map) rawProxy); } } return proxy; } static DoNotUseProxyPac newProxyPac(int port, String configuredProxy, String proxyPort, String nonProxyHosts, Capabilities capabilities) { DoNotUseProxyPac existingConfig = (DoNotUseProxyPac) capabilities.getCapability( ForSeleniumServer.PROXY_PAC); DoNotUseProxyPac pac = existingConfig == null ? new DoNotUseProxyPac() : existingConfig; Object tempProxy = capabilities.getCapability(CapabilityType.PROXY); if (tempProxy != null) { Proxy proxy = extractProxy(capabilities); if (proxy.getHttpProxy() != null) { pac.defaults().toProxy(proxy.getHttpProxy()); } } if (configuredProxy != null) { String proxyToUse = configuredProxy; if (proxyPort != null) { proxyToUse += ":" + proxyPort; } pac.defaults().toProxy(proxyToUse); } String defaultProxy = "DIRECT"; if (configuredProxy != null) { defaultProxy = "PROXY " + configuredProxy; if (proxyPort != null) { defaultProxy += ":" + proxyPort; } } String seleniumServerAsProxy = "localhost:" + port + "; " + defaultProxy; if (isOnlyProxyingSelenium(capabilities)) { pac.map("*/selenium-server/*").toProxy(seleniumServerAsProxy); if (nonProxyHosts != null && nonProxyHosts.trim().length() > 0) { String[] hosts = nonProxyHosts.split("\\|"); for (String host : hosts) { pac.mapHost(host).toNoProxy(); } } } else { pac.defaults().toProxy(seleniumServerAsProxy); } return pac; } public static boolean isProxyingAllTraffic(Capabilities capabilities) { // According to the original logic of Selenium Server, the only time when // the selenium sever wouldn't be proxying all traffic was when it was // configured to only proxy selenium traffic, was avoid the proxy and had // not been asked to proxy everything. Modeling that first before tidying // up the logic. return !(capabilities.is(ONLY_PROXYING_SELENIUM_TRAFFIC) && capabilities.is(AVOIDING_PROXY) && !capabilities.is(PROXYING_EVERYTHING)); } public static boolean isOnlyProxyingSelenium(Capabilities capabilities) { return !isProxyingAllTraffic(capabilities); } public static Capabilities setProxyEverything(Capabilities source, boolean isProxyingEverything) { DesiredCapabilities toReturn = newDesiredCapabilities(source); toReturn.setCapability(PROXYING_EVERYTHING, isProxyingEverything); return toReturn; } public static Capabilities setAvoidProxy(Capabilities source, boolean avoidProxy) { DesiredCapabilities toReturn = newDesiredCapabilities(source); toReturn.setCapability(AVOIDING_PROXY, avoidProxy); return toReturn; } public static Capabilities setOnlyProxySeleniumTraffic(Capabilities source, boolean onlyProxySeleniumTraffic) { DesiredCapabilities toReturn = newDesiredCapabilities(source); toReturn.setCapability(ONLY_PROXYING_SELENIUM_TRAFFIC, onlyProxySeleniumTraffic); return toReturn; } public static Capabilities setProxyRequired(Capabilities source, boolean proxyRequired) { DesiredCapabilities toReturn = newDesiredCapabilities(source); toReturn.setCapability("proxyRequired", proxyRequired); return toReturn; } private static DesiredCapabilities newDesiredCapabilities(Capabilities source) { if (source instanceof DesiredCapabilities) { return (DesiredCapabilities) source; } return new DesiredCapabilities(source); } } PK lC>WeeUorg/openqa/selenium/browserlaunchers/.svn/text-base/WindowsProxyManager.java.svn-base/* * Copyright 2006 ThoughtWorks, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package org.openqa.selenium.browserlaunchers; import java.io.File; import java.io.FileFilter; import java.io.IOException; import java.util.Arrays; import java.util.Map; import java.util.prefs.Preferences; import java.util.regex.Pattern; import org.openqa.selenium.Capabilities; import org.openqa.selenium.os.CommandLine; import org.openqa.selenium.internal.NullTrace; import org.openqa.selenium.io.FileHandler; import org.openqa.selenium.io.TemporaryFilesystem; import org.openqa.selenium.internal.Trace; import org.openqa.selenium.os.WindowsRegistryException; import org.openqa.selenium.os.WindowsUtils; public class WindowsProxyManager { private static Trace log = new NullTrace(); protected static final String REG_KEY_BACKUP_READY = "BackupReady"; // All Cookies end in ".txt" protected static final String COOKIE_SUFFIX = ".txt"; // All cookies hidden by Selenium RC will go here. protected static final File HIDDEN_COOKIE_DIR = new File( System.getenv("USERPROFILE") + File.separator + "CookiesHiddenBySeleniumRC"); protected static String REG_KEY_BASE = "HKEY_CURRENT_USER"; private static final Pattern HUDSUCKR_LINE = Pattern.compile("^([^=]+)=(.*)$"); private HudsuckrSettings oldSettings; private boolean customPACappropriate; private File customProxyPACDir; private int port; private int portDriversShouldContact; private boolean changeMaxConnections; private static final Preferences prefs = Preferences.userNodeForPackage(WindowsProxyManager.class); public WindowsProxyManager(boolean customPACappropriate, String sessionId, int port, int portDriversShouldContact) { this.portDriversShouldContact = portDriversShouldContact; this.customPACappropriate = customPACappropriate; this.port = port; customProxyPACDir = TemporaryFilesystem.createTempDir(sessionId, ""); init(); } public void setChangeMaxConnections(boolean changeMaxConnections) { this.changeMaxConnections = changeMaxConnections; } public boolean getChangeMaxConnections() { return changeMaxConnections; } public File getCustomProxyPACDir() { return customProxyPACDir; } protected void init() { handleEvilPopupMgrBackup(); } // IE7 changed the type of the popup mgr key to DWORD (int/boolean) from String (which could be "yes" or "no") protected void handleEvilPopupMgrBackup() { if (RegKey.POPUP_MGR.type != null) { return; } // this will return String (REG_SZ), int (REG_DWORD), or null if the key is missing RegKey.POPUP_MGR.type = WindowsUtils.discoverRegistryKeyType(RegKey.POPUP_MGR.key); Class backupPopupMgrType = discoverPrefKeyType(RegKey.POPUP_MGR.name()); if (RegKey.POPUP_MGR.type == null) { // if official PopupMgr key is missing if (backupPopupMgrType == null) { // we don't know which type it should be; let's take a guess // IE6 can deal with a DWORD 0 RegKey.POPUP_MGR.type = boolean.class; return; } // non-null backup type is our best guess RegKey.POPUP_MGR.type = backupPopupMgrType; return; } if (RegKey.POPUP_MGR.type.equals(backupPopupMgrType)) { return; } // if we're here, we know the current type of pop-up manager, // and the backup has a different (wrong) type if (backupPopupMgrType != null) { WindowsUtils.deleteRegistryValue(RegKey.POPUP_MGR.key); } if (!backupIsReady()) { return; } // assume they originally wanted it off, set backup pref to false String value = "no"; if (RegKey.POPUP_MGR.type.equals(boolean.class)) { value = "false"; } prefs.put(RegKey.POPUP_MGR.name(), value); } private static boolean prefNodeExists(String key) { return null != prefs.get(key, null); } private Class discoverPrefKeyType(String key) { String data = prefs.get(key, null); if (data == null) { return null; } if ("true".equals(data) || "false".equals(data)) { return boolean.class; } try { Integer.parseInt(data); return int.class; } catch (NumberFormatException e) { return String.class; } } public static void setBaseRegKey(String base) { REG_KEY_BASE = base; } public void changeRegistrySettings(Capabilities options) throws IOException { log.info("Modifying registry settings..."); HudsuckrSettings settings; if (oldSettings == null) { backupHudsuckrSettings(); } if (!customPACappropriate) { String proxyServer = "127.0.0.1:" + portDriversShouldContact; settings = new HudsuckrSettings(oldSettings.connection, true, true, false, false, proxyServer, "(null)", "(null)"); } else { File proxyPAC = Proxies.makeProxyPAC(customProxyPACDir, port, options); String newURL = "file://" + proxyPAC.getAbsolutePath().replace('\\', '/'); settings = new HudsuckrSettings(oldSettings.connection, true, false, true, false, "(null)", "(null)", newURL); } runHudsuckr(settings.toStringArray()); // Disabling automatic proxy caching // http://support.microsoft.com/?kbid=271361 // Otherwise, *all* requests will go through our proxy, rather than just */selenium-server/* requests try { WindowsUtils.writeBooleanRegistryValue(RegKey.AUTOPROXY_RESULT_CACHE.key, false); } catch (WindowsRegistryException ex) { log.debug( "Couldn't modify autoproxy result cache; this often fails on Vista, but it's merely a nice-to-have", ex); } // Disable caching of html try { WindowsUtils.writeStringRegistryValue(RegKey.MIME_EXCLUSION_LIST_FOR_CACHE.key, "multipart/mixed multipart/x-mixed-replace multipart/x-byteranges text/html"); } catch (WindowsRegistryException ex) { log.debug( "Couldn't disable caching of html; this often fails on Vista, but it's merely a nice-to-have", ex); } WindowsUtils.writeBooleanRegistryValue(RegKey.USERNAME_PASSWORD_DISABLE.key, false); // Disable pop-up blocking if (WindowsUtils.doesRegistryValueExist(RegKey.POPUP_MGR.key)) { WindowsUtils.deleteRegistryValue(RegKey.POPUP_MGR.key); } if (RegKey.POPUP_MGR.type.equals(String.class)) { WindowsUtils.writeStringRegistryValue(RegKey.POPUP_MGR.key, "no"); } else { WindowsUtils.writeBooleanRegistryValue(RegKey.POPUP_MGR.key, false); } WindowsUtils.writeBooleanRegistryValue(RegKey.WARN_ON_FORM_SUBMIT.key, false); // Disable HTTP <=> HTTPS issues. WindowsUtils.writeIntRegistryValue(RegKey.DISPLAY_MIXED_CONTENT.key, 0); WindowsUtils.writeIntRegistryValue(RegKey.WARN_ON_HTTPS_TO_HTTP_REDIRECT.key, 0); WindowsUtils.writeIntRegistryValue(RegKey.WARN_ON_BAD_CERT_RECEIVING.key, 0); // Disable script debugger & errors. WindowsUtils.writeStringRegistryValue(RegKey.DISABLE_SCRIPT_DEBUGGER.key, "yes"); WindowsUtils.writeStringRegistryValue(RegKey.DISABLE_SCRIPT_DEBUGGER_IE.key, "yes"); WindowsUtils.writeStringRegistryValue(RegKey.ERROR_DIALOG_DISPLAYED_ON_EVERY_ERROR.key, "no"); // Disable prompting & running signed ActiveX controls that haven't already been enabled. WindowsUtils.writeIntRegistryValue(RegKey.DOWNLOAD_SIGNED_ACTIVEX.key, 3); // DGF Don't manage proxy settings the IE4 way; use hudsuckr instead // if (WindowsUtils.doesRegistryValueExist(RegKey.PROXY_OVERRIDE.key)) { // WindowsUtils.deleteRegistryValue(RegKey.PROXY_OVERRIDE.key); // } if (changeMaxConnections) { // need at least 1 xmlHttp connection per frame/window WindowsUtils.writeIntRegistryValue(RegKey.MAX_CONNECTIONS_PER_1_0_SVR.key, 256); WindowsUtils.writeIntRegistryValue(RegKey.MAX_CONNECTIONS_PER_1_1_SVR.key, 256); } // Hide pre-existing user cookies if -ensureCleanSession is set if (options.is(CapabilityType.ForSeleniumServer.ENSURING_CLEAN_SESSION)) { hidePreexistingCookies(); deleteTemporaryInternetFiles(); } // TODO Do we want to make these preferences configurable somehow? // TODO Disable security warnings // TODO Disable "do you want to remember this password?" } private static void deleteTemporaryInternetFiles() { String cachePath = WindowsUtils.readStringRegistryValue(REG_KEY_BASE + "\\Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Shell Folders\\Cache"); File globalCacheDir = new File(cachePath); File iexploreCacheDir = new File(globalCacheDir, "Content.IE5"); if (iexploreCacheDir.exists()) { // Errors are expected here; the index.dat file is undeletable. Ignore return value FileHandler.delete(iexploreCacheDir); } } public void backupRegistrySettings() { // Don't clobber our old backup if we // never got the chance to restore for some reason if (backupIsReady()) { return; } log.info("Backing up registry settings..."); for (RegKey key : RegKey.values()) { key.backup(); } backupHudsuckrSettings(); backupReady(true); } public void restoreRegistrySettings(boolean ensureCleanSession) { // restore pre-existing user cookies if -ensureCleanSession is set if (ensureCleanSession) { restorePreexistingCookies(); } // Backup really should be ready, but if not, skip it if (!backupIsReady()) { return; } log.info("Restoring registry settings (won't affect running browsers)..."); for (RegKey key : RegKey.values()) { key.restore(); } restoreHudsuckrSettings(); backupReady(false); } /** * Hides pre-existing cookies, if any. If no cookies can be found * then just exit. */ private static void hidePreexistingCookies() { boolean done = false; File cookieDir = getCookieDir(); done = hideCookies(cookieDir, COOKIE_SUFFIX, HIDDEN_COOKIE_DIR); if (!done) { log.warn("Could not hide pre-existing cookies using either the" + "WinXP directory structure or the Vista directory structure"); } } /** * Hides all previously existing user cookies, found in the * WinXP directory structure, by moving them to a different directory. */ protected static boolean hideCookies(File cookieDir, String cookieSuffix, File hiddenCookieDir) { boolean result = false; FileHandler.delete(hiddenCookieDir); if (cookieDir.exists()) { log.info("Copying cookies from " + cookieDir.getAbsolutePath() + " to " + hiddenCookieDir.getAbsolutePath()); try { FileHandler.copy(cookieDir, hiddenCookieDir, cookieSuffix); } catch (IOException e) { log.warn("Unable to back up original cookies. Continuing"); // We used to ignore this, continue to do so } log.info("Deleting original cookies..."); deleteFlatDirContents(cookieDir, cookieSuffix); result = true; } return result; } private static File getCookieDir() { String cookiePath = WindowsUtils.readStringRegistryValue(REG_KEY_BASE + "\\Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Shell Folders\\Cookies"); File cookieDir = new File(cookiePath); return cookieDir; } private static void restorePreexistingCookies() { boolean done = false; File cookieDir = getCookieDir(); done = restoreCookies(cookieDir, COOKIE_SUFFIX, HIDDEN_COOKIE_DIR); if (!done) { log.warn("Could not restore pre-existing cookies, using either the" + "WinXp directory structure or the Vista directory structure"); } } /** * Restores previously hidden user cookies, if any. */ protected static boolean restoreCookies(File cookieDir, String cookieSuffix, File hiddenCookieDir) { boolean result = false; if (cookieDir.exists()) { log.info("Deleting cookies created during session from " + cookieDir.getAbsolutePath()); deleteFlatDirContents(cookieDir, cookieSuffix); } if (hiddenCookieDir.exists()) { log.info("Copying cookies from " + hiddenCookieDir.getAbsolutePath() + " to " + cookieDir.getAbsolutePath()); try { FileHandler.copy(hiddenCookieDir, cookieDir); } catch (IOException e) { log.warn("Unable to restore cookies.", e); // We used to ignore this, so just keep on trucking } FileHandler.delete(hiddenCookieDir); result = true; } return result; } /** * Deletes all files contained by the given directory. * * @param dir the directory to delete the contents of * @param suffix if not null, only files with this suffix will be deleted. */ protected static void deleteFlatDirContents(File dir, String suffix) { if (dir.exists()) { log.info("looking for files ending with: " + suffix); File[] list = dir.listFiles(new SuffixFilter(suffix)); if (null != list) { for (File file : list) { boolean success = file.delete(); if (!success) { log.warn("Could not delete file " + file.getAbsolutePath()); } } } else { log.info("...no matching files"); } } } private boolean backupIsReady() { if (!prefNodeExists(REG_KEY_BACKUP_READY)) { return false; } return prefs.getBoolean(REG_KEY_BACKUP_READY, false); } private void backupReady(boolean backupReady) { prefs.putBoolean(REG_KEY_BACKUP_READY, backupReady); } public static void traceWith(Trace log) { WindowsProxyManager.log = log; } private enum RegKey { POPUP_MGR(REG_KEY_BASE + "\\Software\\Microsoft\\Internet Explorer\\New Windows\\PopupMgr", null), // In IE7 it's a DWORD; in IE6 a string "yes"/"no" USERNAME_PASSWORD_DISABLE(REG_KEY_BASE + "\\Software\\Microsoft\\Internet Explorer\\Main\\FeatureControl\\FEATURE_HTTP_USERNAME_PASSWORD_DISABLE\\iexplore.exe", boolean.class), MAX_CONNECTIONS_PER_1_0_SVR(REG_KEY_BASE + "\\Software\\Microsoft\\Windows\\CurrentVersion\\Internet Settings\\MaxConnectionsPer1_0Server", int.class), MAX_CONNECTIONS_PER_1_1_SVR(REG_KEY_BASE + "\\Software\\Microsoft\\Windows\\CurrentVersion\\Internet Settings\\MaxConnectionsPerServer", int.class), AUTOPROXY_RESULT_CACHE(REG_KEY_BASE + "\\Software\\Policies\\Microsoft\\Windows\\CurrentVersion\\Internet Settings\\EnableAutoproxyResultCache", boolean.class), MIME_EXCLUSION_LIST_FOR_CACHE(REG_KEY_BASE + "\\Software\\Policies\\Microsoft\\Windows\\CurrentVersion\\Internet Settings\\MimeExclusionListForCache", String.class), WARN_ON_FORM_SUBMIT(REG_KEY_BASE + "\\Software\\Microsoft\\Windows\\CurrentVersion\\Internet Settings\\Zones\\3\\1601", boolean.class), DISPLAY_MIXED_CONTENT(REG_KEY_BASE + "\\Software\\Microsoft\\Windows\\CurrentVersion\\Internet Settings\\Zones\\3\\1609", int.class), WARN_ON_HTTPS_TO_HTTP_REDIRECT(REG_KEY_BASE + "\\Software\\Microsoft\\Windows\\CurrentVersion\\Internet Settings\\WarnOnHTTPSToHTTPRedirect", int.class), WARN_ON_BAD_CERT_RECEIVING(REG_KEY_BASE + "\\Software\\Microsoft\\Windows\\CurrentVersion\\Internet Settings\\WarnonBadCertRecving", int.class), DISABLE_SCRIPT_DEBUGGER(REG_KEY_BASE + "\\Software\\Microsoft\\Internet Explorer\\Main\\Disable Script Debugger", String.class), DISABLE_SCRIPT_DEBUGGER_IE(REG_KEY_BASE + "\\Software\\Microsoft\\Internet Explorer\\Main\\DisableScriptDebuggerIE", String.class), ERROR_DIALOG_DISPLAYED_ON_EVERY_ERROR(REG_KEY_BASE + "\\Software\\Microsoft\\Internet Explorer\\Main\\Error Dlg Displayed On Every Error", String.class), DOWNLOAD_SIGNED_ACTIVEX(REG_KEY_BASE + "\\Software\\Microsoft\\Windows\\CurrentVersion\\Internet Settings\\Zones\\3\\1001", int.class), //DGF Don't manage proxy settings the IE4 way; use hudsuckr instead //AUTOCONFIG_URL(REG_KEY_BASE + "\\Software\\Microsoft\\Windows\\CurrentVersion\\Internet Settings\\AutoConfigURL", String.class), //PROXY_ENABLE(REG_KEY_BASE + "\\Software\\Microsoft\\Windows\\CurrentVersion\\Internet Settings\\ProxyEnable", boolean.class), //PROXY_OVERRIDE(REG_KEY_BASE + "\\Software\\Microsoft\\Windows\\CurrentVersion\\Internet Settings\\ProxyOverride", String.class), //PROXY_SERVER(REG_KEY_BASE + "\\Software\\Microsoft\\Windows\\CurrentVersion\\Internet Settings\\ProxyServer", String.class), ; RegKey(String key, Class type) { this.key = key; this.type = type; } String key; Class type; private boolean backupExists() { return prefNodeExists(name()); } private boolean originalExists() { return WindowsUtils.doesRegistryValueExist(key); } private void backup() { if (originalExists()) { if (type.equals(String.class)) { String data = WindowsUtils.readStringRegistryValue(key); prefs.put(name(), data); return; } else if (type.equals(boolean.class)) { boolean data = WindowsUtils.readBooleanRegistryValue(key); prefs.putBoolean(name(), data); return; } else if (type.equals(int.class)) { int data = WindowsUtils.readIntRegistryValue(key); prefs.putInt(name(), data); return; } throw new RuntimeException("Bad type: " + type.getName()); } prefs.remove(name()); } private void restore() { if (backupExists()) { if (type.equals(String.class)) { String data = prefs.get(name(), null); WindowsUtils.writeStringRegistryValue(key, data); return; } else if (type.equals(boolean.class)) { boolean data = prefs.getBoolean(name(), false); WindowsUtils.writeBooleanRegistryValue(key, data); return; } else if (type.equals(int.class)) { int data = prefs.getInt(name(), 0); WindowsUtils.writeIntRegistryValue(key, data); return; } throw new RuntimeException("Bad type: " + type.getName()); } if (WindowsUtils.doesRegistryValueExist(key)) { WindowsUtils.deleteRegistryValue(key); } } } private File extractHudsuckr() { File hudsuckr = new File(customProxyPACDir, "hudsuckr/hudsuckr.exe"); if (hudsuckr.exists()) { return hudsuckr; } try { FileHandler.copyResource(customProxyPACDir, WindowsProxyManager.class, "hudsuckr/hudsuckr.exe"); } catch (IOException e) { throw new RuntimeException("Bug extracting hudsuckr", e); } if (!hudsuckr.exists()) { throw new RuntimeException("Bug extracting hudscukr: cannot extract file: " + hudsuckr); } return hudsuckr; } private String runHudsuckr(String... args) { String path = extractHudsuckr().getAbsolutePath(); log.debug("Running hudsuckr: " + path); try { CommandLine command = new CommandLine(path, args); command.execute(); log.debug("Executed successfully"); String output = command.getStdOut(); if (!command.isSuccessful()) { throw new RuntimeException("exec return code " + command.getExitCode() + ": " + output); } return output; } catch (RuntimeException e) { log.warn("Failed to execute hudsuckr successfully: ", e); } return null; } private HudsuckrSettings parseHudsuckrSettings(String hudsuckrOutput) { Map settings = Maps.parseDictionary(hudsuckrOutput, HUDSUCKR_LINE, false); String connection, server, bypass, pacUrl; boolean direct, proxy, pac, wpad; for (HudsuckrKey key : HudsuckrKey.values()) { if (!settings.containsKey(key.name())) { throw new RuntimeException( "Bug! Hudsuckr settings didn't include " + key + ": " + hudsuckrOutput); } } connection = settings.get(HudsuckrKey.ACTIVE_CONNECTION.name()); direct = "true".equals(settings.get(HudsuckrKey.PROXY_TYPE_DIRECT.name())); proxy = "true".equals(settings.get(HudsuckrKey.PROXY_TYPE_PROXY.name())); pac = "true".equals(settings.get(HudsuckrKey.PROXY_TYPE_AUTO_PROXY_URL.name())); wpad = "true".equals(settings.get(HudsuckrKey.PROXY_TYPE_AUTO_DETECT.name())); server = settings.get(HudsuckrKey.INTERNET_PER_CONN_PROXY_SERVER.name()); bypass = settings.get(HudsuckrKey.INTERNET_PER_CONN_PROXY_BYPASS.name()); pacUrl = settings.get(HudsuckrKey.INTERNET_PER_CONN_AUTOCONFIG_URL.name()); return new HudsuckrSettings(connection, direct, proxy, pac, wpad, server, bypass, pacUrl); } private void backupHudsuckrSettings() { String output = runHudsuckr(); HudsuckrSettings settings = parseHudsuckrSettings(output); oldSettings = settings; prefs.put(HudsuckrKey.ACTIVE_CONNECTION.name(), settings.connection); prefs.putBoolean(HudsuckrKey.PROXY_TYPE_DIRECT.name(), settings.direct); prefs.putBoolean(HudsuckrKey.PROXY_TYPE_PROXY.name(), settings.proxy); prefs.putBoolean(HudsuckrKey.PROXY_TYPE_AUTO_PROXY_URL.name(), settings.pac); prefs.putBoolean(HudsuckrKey.PROXY_TYPE_AUTO_DETECT.name(), settings.wpad); prefs.put(HudsuckrKey.INTERNET_PER_CONN_PROXY_SERVER.name(), settings.server); prefs.put(HudsuckrKey.INTERNET_PER_CONN_PROXY_BYPASS.name(), settings.bypass); prefs.put(HudsuckrKey.INTERNET_PER_CONN_AUTOCONFIG_URL.name(), settings.pacUrl); } private void restoreHudsuckrSettings() { String connection, server, bypass, pacUrl; boolean direct, proxy, pac, wpad; for (HudsuckrKey key : HudsuckrKey.values()) { if (!prefNodeExists(key.name())) { throw new RuntimeException("Bug! Prefs don't contain " + key); } } connection = prefs.get(HudsuckrKey.ACTIVE_CONNECTION.name(), null); direct = prefs.getBoolean(HudsuckrKey.PROXY_TYPE_DIRECT.name(), false); proxy = prefs.getBoolean(HudsuckrKey.PROXY_TYPE_PROXY.name(), false); pac = prefs.getBoolean(HudsuckrKey.PROXY_TYPE_AUTO_PROXY_URL.name(), false); wpad = prefs.getBoolean(HudsuckrKey.PROXY_TYPE_AUTO_DETECT.name(), false); server = prefs.get(HudsuckrKey.INTERNET_PER_CONN_PROXY_SERVER.name(), null); bypass = prefs.get(HudsuckrKey.INTERNET_PER_CONN_PROXY_BYPASS.name(), null); pacUrl = prefs.get(HudsuckrKey.INTERNET_PER_CONN_AUTOCONFIG_URL.name(), null); HudsuckrSettings settings = new HudsuckrSettings(connection, direct, proxy, pac, wpad, server, bypass, pacUrl); runHudsuckr(settings.toStringArray()); } private enum HudsuckrKey { ACTIVE_CONNECTION, PROXY_TYPE_DIRECT, PROXY_TYPE_PROXY, PROXY_TYPE_AUTO_PROXY_URL, PROXY_TYPE_AUTO_DETECT, INTERNET_PER_CONN_PROXY_SERVER, INTERNET_PER_CONN_PROXY_BYPASS, INTERNET_PER_CONN_AUTOCONFIG_URL; } private static class HudsuckrSettings { final String connection, server, bypass, pacUrl; final boolean direct, proxy, pac, wpad; public HudsuckrSettings(String connection, boolean direct, boolean proxy, boolean pac, boolean wpad, String server, String bypass, String pacUrl) { this.connection = connection; this.server = server; this.bypass = bypass; this.pacUrl = pacUrl; this.direct = direct; this.proxy = proxy; this.pac = pac; this.wpad = wpad; } public String[] toStringArray() { String[] result = new String[8]; result[0] = connection; result[1] = Boolean.toString(direct); result[2] = Boolean.toString(proxy); result[3] = Boolean.toString(pac); result[4] = Boolean.toString(wpad); result[5] = server; result[6] = bypass; result[7] = pacUrl; return result; } @Override public String toString() { return Arrays.toString(toStringArray()); } } private static class SuffixFilter implements FileFilter { private final String suffix; public SuffixFilter(String suffix) { this.suffix = suffix; } public boolean accept(File pathname) { boolean result = false; if (null == suffix) { result = true; } else if (pathname.getName().endsWith(suffix)) { result = true; } return result; } } } PK lC>_Gorg/openqa/selenium/browserlaunchers/.svn/text-base/build.desc.svn-base java_library(name = "browserlaunchers", srcs = [ "BrowserLauncher.java", "MacProxyManager.java", "Maps.java", "WindowsProxyManager.java", ], deps = [ "//java/client/src/com/thoughtworks/selenium:api", "//java/client/src/org/openqa/selenium:base", "//java/client/src/org/openqa/selenium/internal:logging", "//java/client/src/org/openqa/selenium:webdriver-api", "//java/client/src/org/openqa/selenium/net", "//java/client/src/org/openqa/selenium/os", "//third_party/java/guava-libraries", ], deps = [ ":launcher-utils", "//java/client/src/com/thoughtworks/selenium:api", "//java/client/src/org/openqa/selenium/browserlaunchers/locators", "//java/client/src/org/openqa/selenium/internal:logging", "//java/client/src/org/openqa/selenium/net", "//java/client/src/org/openqa/selenium/os", ]) java_library(name = "launcher-utils", srcs = [ "AsyncExecute.java", "CapabilityType.java", "DoNotUseProxyPac.java", "LauncherUtils.java", "Proxies.java", ], deps = [ "//java/client/src/com/thoughtworks/selenium:api", "//java/client/src/org/openqa/selenium:webdriver-api", "//java/client/src/org/openqa/selenium/io", "//java/client/src/org/openqa/selenium/net", "//java/client/src/org/openqa/selenium/os", "//java/client/src/org/openqa/selenium/remote:base", "//third_party/java/guava-libraries", ])PK (hC>_/org/openqa/selenium/browserlaunchers/build.desc java_library(name = "browserlaunchers", srcs = [ "BrowserLauncher.java", "MacProxyManager.java", "Maps.java", "WindowsProxyManager.java", ], deps = [ "//java/client/src/com/thoughtworks/selenium:api", "//java/client/src/org/openqa/selenium:base", "//java/client/src/org/openqa/selenium/internal:logging", "//java/client/src/org/openqa/selenium:webdriver-api", "//java/client/src/org/openqa/selenium/net", "//java/client/src/org/openqa/selenium/os", "//third_party/java/guava-libraries", ], deps = [ ":launcher-utils", "//java/client/src/com/thoughtworks/selenium:api", "//java/client/src/org/openqa/selenium/browserlaunchers/locators", "//java/client/src/org/openqa/selenium/internal:logging", "//java/client/src/org/openqa/selenium/net", "//java/client/src/org/openqa/selenium/os", ]) java_library(name = "launcher-utils", srcs = [ "AsyncExecute.java", "CapabilityType.java", "DoNotUseProxyPac.java", "LauncherUtils.java", "Proxies.java", ], deps = [ "//java/client/src/com/thoughtworks/selenium:api", "//java/client/src/org/openqa/selenium:webdriver-api", "//java/client/src/org/openqa/selenium/io", "//java/client/src/org/openqa/selenium/net", "//java/client/src/org/openqa/selenium/os", "//java/client/src/org/openqa/selenium/remote:base", "//third_party/java/guava-libraries", ])PK %^D>T6org/openqa/selenium/iphone/IPhoneSimulatorDriver.class140org/openqa/selenium/iphone/IPhoneSimulatorDriver'org/openqa/selenium/iphone/IPhoneDriverC(Ljava/net/URL;Lorg/openqa/selenium/iphone/IPhoneSimulatorBinary;)V Exceptions java/lang/ExceptionCode 9org/openqa/selenium/iphone/IPhoneSimulatorCommandExecutor    /(Lorg/openqa/selenium/remote/CommandExecutor;)VLineNumberTableLocalVariableTablethis2Lorg/openqa/selenium/iphone/IPhoneSimulatorDriver; iWebDriverUrlLjava/net/URL;iphoneSimulator2Lorg/openqa/selenium/iphone/IPhoneSimulatorBinary;G(Ljava/lang/String;Lorg/openqa/selenium/iphone/IPhoneSimulatorBinary;)V java/net/URL  (Ljava/lang/String;)V Ljava/lang/String;5(Lorg/openqa/selenium/iphone/IPhoneSimulatorBinary;)V$http://localhost:3001/hub &  startClient()V * +,getCommandExecutor.()Lorg/openqa/selenium/remote/CommandExecutor; . '( stopClient 1 /( SourceFileIPhoneSimulatorDriver.java! P* Y+,     P*Y+,    !" @*#+% '( 9 *) -    /( 9 *) 0    23PK %^D>6org/openqa/selenium/iphone/IPhoneSimulatorBinary.class10org/openqa/selenium/iphone/IPhoneSimulatorBinary.org/openqa/selenium/remote/internal/SubProcessLOGLjava/util/logging/Logger;IPHONE_LOG_FILE_PROPERTYLjava/lang/String; ConstantValue webdriver.iphone.logFileIPHONE_SDK_PROPERTYwebdriver.iphone.sdk DEFAULT_SDK3.2SDK_LOCATION_FORMATR/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator%s.sdkSCRIPT_DIRECTORYLjava/io/File; killScriptLjava/lang/ProcessBuilder;()VCode java/lang/Class !getName()Ljava/lang/String; #%$java/util/logging/Logger &' getLogger.(Ljava/lang/String;)Ljava/util/logging/Logger; ) + webdriver- iWebDriver /10*org/openqa/selenium/io/TemporaryFilesystem 23 createTempDir4(Ljava/lang/String;Ljava/lang/String;)Ljava/io/File; 5 LineNumberTableLocalVariableTable(Ljava/io/File;)V Exceptions<java/io/IOException>java/lang/ProcessBuilder@java/lang/StringB /bin/bash D EFcreateRunScript(Ljava/io/File;)Ljava/io/File; HJI java/io/File K!getAbsolutePath =M 8N([Ljava/lang/String;)V P QRcreateOutputStream()Ljava/io/OutputStream; T 8U3(Ljava/lang/ProcessBuilder;Ljava/io/OutputStream;)V H X YZcreateKillScript"(Ljava/lang/String;)Ljava/io/File; \ this2Lorg/openqa/selenium/iphone/IPhoneSimulatorBinary; iWebDriverAppkillScriptFile bdcjava/lang/System ef getProperty&(Ljava/lang/String;)Ljava/lang/String; Hh 8i(Ljava/lang/String;)Vk8org/openqa/selenium/remote/internal/CircularOutputStream jm 89 logFileStringlogFileqjava/lang/Object bs et8(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String; ?v wxformat9(Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/String; Hz {|getCanonicalFile()Ljava/io/File;~java/lang/StringBuilder } 8 #!/bin/bash } append-(Ljava/lang/String;)Ljava/lang/StringBuilder;function shutdown() {  echo "killing iWebDriver..." % /usr/bin/killall "iWebDriver" || : % echo "killing iPhone Simulator..." + /usr/bin/killall "iPhone Simulator" || : }  shutdown export DYLD_ROOT_PATH=%s  export IPHONE_SIMULATOR_ROOT=%s export CFFIXED_USER_HOME=%s trap "shutdown" SIGINT SIGTERM  "%s" -RegisterForSystemEvents & iwebdriver_pid=$! 6echo "Waiting on iWebDriver (pid=$iwebdriver_pid)"... wait $iwebdriver_pid :echo "Finished running iWebDriver (pid=$iwebdriver_pid)"! } !toString  Z writeScript executablesdkRootexe scriptTextecho "killing ..." /usr/bin/killall "" || : #echo "killing iPhone Simulator..." )/usr/bin/killall "iPhone Simulator" || : appName iWebDriver..script H createTempFileB(Ljava/lang/String;Ljava/lang/String;Ljava/io/File;)Ljava/io/File;7%s: ---------------------------------------------- %s # ifinejava/io/FileWriter m iwrite flush close scriptFilewriterLjava/io/FileWriter; getKillScript()Ljava/lang/ProcessBuilder;RuntimeInvisibleAnnotations1Lcom/google/common/annotations/VisibleForTesting;shutdown = start()Ljava/lang/Process; java/lang/Process waitFor()I&org/openqa/selenium/WebDriverException 8(Ljava/lang/Throwable;)V  java/lang/InterruptedExceptione Ljava/lang/InterruptedException;Ljava/io/IOException; SourceFileIPhoneSimulatorBinary.java!       B"(*,.46* ?>%789:;E*=Y?YASY+CGSLOS+VWM*=Y?YASY,GSL[6TU!W)XDY7 E]^E_)` QR\  aK* HY*gLjY+l6\]^7n o EF:;ZpY rSuL*yGM}YpY+SupY+SupY4GSupY,SuN-6fbcbeg#h(k-l2m7n<oApFsKt[ukvxyz{|}~g7* YZ:;;}Y**L+6&  (-2567;6 Z:;@4L(pY+GSY*SuȻY+M,*,,+y6& %.37;7 @ 5./*[67 ]^'*[߶WLY+LY+*  ;6"&7 ']^  PK %^D>'eAorg/openqa/selenium/iphone/IPhoneDriver$IPhoneTargetLocator.class1F;org/openqa/selenium/iphone/IPhoneDriver$IPhoneTargetLocatorjava/lang/Object+org/openqa/selenium/WebDriver$TargetLocatorthis$0)Lorg/openqa/selenium/iphone/IPhoneDriver;,(Lorg/openqa/selenium/iphone/IPhoneDriver;)VCode    ()VLineNumberTableLocalVariableTablethis=Lorg/openqa/selenium/iphone/IPhoneDriver$IPhoneTargetLocator;frame"(I)Lorg/openqa/selenium/WebDriver;'java/lang/UnsupportedOperationException.Frame switching is not supported on the iPhone  (Ljava/lang/String;)V frameIndexI3(Ljava/lang/String;)Lorg/openqa/selenium/WebDriver; frameNameLjava/lang/String;A(Lorg/openqa/selenium/WebElement;)Lorg/openqa/selenium/WebDriver; frameElement Lorg/openqa/selenium/WebElement;window(-Window switching is unsupported on the iPhone windowNamedefaultContent!()Lorg/openqa/selenium/WebDriver; activeElement"()Lorg/openqa/selenium/WebElement;//return document.activeElement || document.body; 132'org/openqa/selenium/iphone/IPhoneDriver 45 executeScript9(Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/Object;7org/openqa/selenium/WebElementalert()Lorg/openqa/selenium/Alert;;alert()i(Lorg/openqa/selenium/iphone/IPhoneDriver;Lorg/openqa/selenium/iphone/IPhoneDriver$IPhoneTargetLocator;)V >  SourceFileIPhoneDriver.java InnerClassesCorg/openqa/selenium/WebDriver TargetLocatorIPhoneTargetLocator    4 *+ *d   F Yhih    F Ynon  !"# F Ytut  $%&  F Y'yzy  )"*+ < Y  ,- C* .06  89 4 Y:   < &*+=d?@ABD 1EPK %^D>i -org/openqa/selenium/iphone/IPhoneDriver.class1i'org/openqa/selenium/iphone/IPhoneDriver*org/openqa/selenium/remote/RemoteWebDriver#org/openqa/selenium/TakesScreenshotDEFAULT_IWEBDRIVER_URLLjava/lang/String; ConstantValue http://localhost:3001/hub/(Lorg/openqa/selenium/remote/CommandExecutor;)VCode .org/openqa/selenium/remote/DesiredCapabilities iphone2()Lorg/openqa/selenium/remote/DesiredCapabilities;  Q(Lorg/openqa/selenium/remote/CommandExecutor;Lorg/openqa/selenium/Capabilities;)VLineNumberTableLocalVariableTablethis)Lorg/openqa/selenium/iphone/IPhoneDriver;executor,Lorg/openqa/selenium/remote/CommandExecutor;(Ljava/net/URL;)V Exceptions!java/lang/Exception # $3(Ljava/net/URL;Lorg/openqa/selenium/Capabilities;)V remoteAddressLjava/net/URL;(Ljava/lang/String;)V) java/net/URL (+ ' - ()V +close2'java/lang/UnsupportedOperationException4Not yet implemented 1+switchTo/()Lorg/openqa/selenium/WebDriver$TargetLocator;9;org/openqa/selenium/iphone/IPhoneDriver$IPhoneTargetLocator 8; <i(Lorg/openqa/selenium/iphone/IPhoneDriver;Lorg/openqa/selenium/iphone/IPhoneDriver$IPhoneTargetLocator;)VgetScreenshotAs4(Lorg/openqa/selenium/OutputType;)Ljava/lang/Object; Signature@(Lorg/openqa/selenium/OutputType;)TX;B screenshot D EFexecute9(Ljava/lang/String;)Lorg/openqa/selenium/remote/Response; HJI#org/openqa/selenium/remote/Response KLgetValue()Ljava/lang/Object;N[BPjava/lang/String OR S([B)V UWVorg/openqa/selenium/OutputType XYconvertFromBase64Png&(Ljava/lang/String;)Ljava/lang/Object;target Lorg/openqa/selenium/OutputType; base64PngpngLocalVariableTypeTable%Lorg/openqa/selenium/OutputType; SourceFileIPhoneDriver.java InnerClassesd+org/openqa/selenium/WebDriver$TargetLocatorforg/openqa/selenium/WebDriver TargetLocatorIPhoneTargetLocator!   A *+ 89    A *+" CD  %& ' E *(Y+*, M N  % . 5* / WX 0.4 1Y35\  674 8Y*:a  =>?@*ACGMMOY,QN+-T *Z[ \N]^ Z_`abceg 8hPK %^D>(Fborg/openqa/selenium/iphone/IPhoneSimulatorCommandExecutor$IPhoneSimulatorNotRunningException.class1\org/openqa/selenium/iphone/IPhoneSimulatorCommandExecutor$IPhoneSimulatorNotRunningException&org/openqa/selenium/WebDriverException()VCode .The iPhone Simulator is not currently running!   (Ljava/lang/String;)VLineNumberTableLocalVariableTablethis^Lorg/openqa/selenium/iphone/IPhoneSimulatorCommandExecutor$IPhoneSimulatorNotRunningException;(Ljava/lang/Throwable;)V  *(Ljava/lang/String;Ljava/lang/Throwable;)VcauseLjava/lang/Throwable;messageLjava/lang/String; SourceFile#IPhoneSimulatorCommandExecutor.java InnerClasses9org/openqa/selenium/iphone/IPhoneSimulatorCommandExecutor"IPhoneSimulatorNotRunningException!5*  rs @*+ vwI*+, z{   PK %^D>DZڙ ?org/openqa/selenium/iphone/IPhoneSimulatorCommandExecutor.class19org/openqa/selenium/iphone/IPhoneSimulatorCommandExecutorjava/lang/Object*org/openqa/selenium/remote/CommandExecutorLOGLjava/util/logging/Logger;delegate,Lorg/openqa/selenium/remote/CommandExecutor;binary2Lorg/openqa/selenium/iphone/IPhoneSimulatorBinary;appUrlLjava/net/URL;()VCode java/lang/Class getName()Ljava/lang/String; java/util/logging/Logger  getLogger.(Ljava/lang/String;)Ljava/util/logging/Logger;  LineNumberTableLocalVariableTableC(Ljava/net/URL;Lorg/openqa/selenium/iphone/IPhoneSimulatorBinary;)V Exceptions&java/lang/Exception ( "*.org/openqa/selenium/remote/HttpCommandExecutor ), "-(Ljava/net/URL;)V / 1 3 this;Lorg/openqa/selenium/iphone/IPhoneSimulatorCommandExecutor;url getBinary4()Lorg/openqa/selenium/iphone/IPhoneSimulatorBinary;RuntimeInvisibleAnnotations1Lcom/google/common/annotations/VisibleForTesting; startClient =?>0org/openqa/selenium/iphone/IPhoneSimulatorBinary @launch D EFwaitForServerToRespond(J)V HJIjava/lang/System KLcurrentTimeMillis()J NPO java/net/URL QRopenConnection()Ljava/net/URLConnection;Tjava/net/HttpURLConnection SV WXsetConnectTimeout(I)VZTRACE S\ ]^setRequestMethod(Ljava/lang/String;)V S` aconnect Sc d disconnectfjava/net/ProtocolExceptionhjava/io/IOExceptiontimeoutInMillisecondsJstart respondingZ connectionLjava/net/HttpURLConnection;eLjava/net/ProtocolException;Ljava/io/IOException; stopClient =u vshutdownexecuteK(Lorg/openqa/selenium/remote/Command;)Lorg/openqa/selenium/remote/Response; =z {| isRunning()Z~\org/openqa/selenium/iphone/IPhoneSimulatorCommandExecutor$IPhoneSimulatorNotRunningException }(  wx java/util/logging/Level WARNINGLjava/util/logging/Level;Connection refused?  logC(Ljava/util/logging/Level;Ljava/lang/String;Ljava/lang/Throwable;)VThe iPhone Simulator died! } "*(Ljava/lang/String;Ljava/lang/Throwable;)Vjava/net/ConnectExceptioncommand$Lorg/openqa/selenium/remote/Command;Ljava/net/ConnectException; SourceFile#IPhoneSimulatorCommandExecutor.java InnerClasses"IPhoneSimulatorNotRunningException!   4  0/ -!"#$%i*'*)Y++.*,0*+2 6789:! 456 789:/*0 =! 45;A*0<*AC ABC! 45EFf GB6i:*2MS:UY[_66:66b.:6$b:bb G!e 03e 0Eg 8WEJW fFGH I KL!M(N-O3P5Q8U=VERGSJUOVWTYU^VcXfUkVpHZ!H45ij|kjylm cno5pqGprs6*0t ]^! 45wx$gA*0y }Y*.+M,*0y}Y,, "a bfgh*i4j?l! A45A#p } PK lC>ST3}}+org/openqa/selenium/iphone/.svn/all-wcpropsK 25 svn:wc:ra_dav:version-url V 68 /svn/!svn/ver/11222/trunk/java/client/src/org/openqa/selenium/iphone END IPhoneSimulatorCommandExecutor.java K 25 svn:wc:ra_dav:version-url V 104 /svn/!svn/ver/11222/trunk/java/client/src/org/openqa/selenium/iphone/IPhoneSimulatorCommandExecutor.java END IPhoneSimulatorBinary.java K 25 svn:wc:ra_dav:version-url V 95 /svn/!svn/ver/11222/trunk/java/client/src/org/openqa/selenium/iphone/IPhoneSimulatorBinary.java END build.desc K 25 svn:wc:ra_dav:version-url V 79 /svn/!svn/ver/11222/trunk/java/client/src/org/openqa/selenium/iphone/build.desc END IPhoneSimulatorDriver.java K 25 svn:wc:ra_dav:version-url V 95 /svn/!svn/ver/11222/trunk/java/client/src/org/openqa/selenium/iphone/IPhoneSimulatorDriver.java END IPhoneDriver.java K 25 svn:wc:ra_dav:version-url V 86 /svn/!svn/ver/11222/trunk/java/client/src/org/openqa/selenium/iphone/IPhoneDriver.java END PK lC>u'org/openqa/selenium/iphone/.svn/entries8 dir 11264 http://selenium.googlecode.com/svn/trunk/java/client/src/org/openqa/selenium/iphone http://selenium.googlecode.com/svn 2011-02-01T12:22:07.764961Z 11222 simon.m.stewart svn:special svn:externals svn:needs-lock 07704840-8298-11de-bf8c-fd130f914ac9 IPhoneSimulatorCommandExecutor.java file 2011-02-03T12:01:17.000000Z eaf704af6f5c1d574bffcd8a708da237 2010-10-16T15:38:20.242544Z 9993 dawagner IPhoneSimulatorBinary.java file 2011-02-03T12:01:17.000000Z c87e9cbe48a67f267657396e203a0cc9 2011-01-17T21:50:09.122540Z 10988 simon.m.stewart build.desc file 2011-02-03T12:01:17.000000Z 9bf97dd78d19506e3dcaf547f2fc7b9b 2011-02-01T12:22:07.764961Z 11222 simon.m.stewart IPhoneSimulatorDriver.java file 2011-02-03T12:01:17.000000Z e5ee3d350f5c0e0f00773e12bee39099 2009-12-17T00:09:20.065436Z 7888 jmleyba IPhoneDriver.java file 2011-02-03T12:01:17.000000Z c3a6ef8de234e6b877aa0812213f7763 2010-12-08T10:35:42.087498Z 10557 jmleyba PK lC>G&org/openqa/selenium/iphone/.svn/format8 PK lC>&Z^PPDorg/openqa/selenium/iphone/.svn/text-base/IPhoneDriver.java.svn-base/* Copyright 2007-2010 WebDriver committers Copyright 2007-2010 Google Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package org.openqa.selenium.iphone; import java.net.URL; import org.openqa.selenium.Alert; import org.openqa.selenium.OutputType; import org.openqa.selenium.TakesScreenshot; import org.openqa.selenium.WebDriver; import org.openqa.selenium.WebElement; import org.openqa.selenium.remote.CommandExecutor; import org.openqa.selenium.remote.DesiredCapabilities; import org.openqa.selenium.remote.DriverCommand; import org.openqa.selenium.remote.RemoteWebDriver; /** * IPhoneDriver is a driver for running tests on Mobile Safari on the iPhone, * iPad and iPod Touch. * * The driver uses WebDriver's remote REST interface to communicate with the * iphone. The iphone (or iphone simulator) must be running the iWebDriver app. */ public class IPhoneDriver extends RemoteWebDriver implements TakesScreenshot { /** * This is the default port and URL for iWebDriver. Eventually it would * be nice to use DNS-SD to detect iWebDriver instances running non * locally or on non-default ports. */ protected static final String DEFAULT_IWEBDRIVER_URL = "http://localhost:3001/hub"; /** * Create an IPhoneDriver that will use the given {@code executor} to * communicate with the iWebDriver app. * * @param executor The executor to use for communicating with the iPhone. */ public IPhoneDriver(CommandExecutor executor) { super(executor, DesiredCapabilities.iphone()); } /** * Create an IPhoneDriver connected to the remote address passed in. * @param remoteAddress The full URL of the remote client (device or * simulator). * @throws Exception * @see #IPhoneDriver(String) */ public IPhoneDriver(URL remoteAddress) throws Exception { super(remoteAddress, DesiredCapabilities.iphone()); } /** * Create an IPhoneDriver connected to the remote address passed in. * @param remoteAddress The full URL of the remote client running iWebDriver. * @throws Exception * @see #IPhoneDriver(URL) */ public IPhoneDriver(String remoteAddress) throws Exception { this(new URL(remoteAddress)); } /** * Create an IPhoneDriver connected to an iphone simulator running on the * local machine. * * @throws Exception */ public IPhoneDriver() throws Exception { this(DEFAULT_IWEBDRIVER_URL); } @Override public void close() { throw new UnsupportedOperationException("Not yet implemented"); } @Override public TargetLocator switchTo() { return new IPhoneTargetLocator(); } private class IPhoneTargetLocator implements TargetLocator { public WebDriver frame(int frameIndex) { // is this even possible to do on the iphone? throw new UnsupportedOperationException( "Frame switching is not supported on the iPhone"); } public WebDriver frame(String frameName) { // is this even possible to do on the iphone? throw new UnsupportedOperationException( "Frame switching is not supported on the iPhone"); } public WebDriver frame(WebElement frameElement) { // is this even possible to do on the iphone? throw new UnsupportedOperationException( "Frame switching is not supported on the iPhone"); } public WebDriver window(String windowName) { throw new UnsupportedOperationException( "Window switching is unsupported on the iPhone"); } public WebDriver defaultContent() { // is this even possible to do on the iphone? throw new UnsupportedOperationException( "Frame switching is not supported on the iPhone"); } public WebElement activeElement() { return (WebElement) executeScript( "return document.activeElement || document.body;"); } public Alert alert() { throw new UnsupportedOperationException("alert()"); } } public X getScreenshotAs(OutputType target) { byte[] base64Png = (byte[]) execute(DriverCommand.SCREENSHOT).getValue(); String png = new String(base64Png); // ... and convert it. return target.convertFromBase64Png(png); } } PK lC>h(Morg/openqa/selenium/iphone/.svn/text-base/IPhoneSimulatorBinary.java.svn-base// // IPhoneSimulatorBinary.java // IPhoneSimulatorBinary // // Created by Jason Leyba on 12/10/09. // Copyright 2009 __MyCompanyName__. All rights reserved. // package org.openqa.selenium.iphone; import java.io.File; import java.io.FileWriter; import java.io.IOException; import java.io.OutputStream; import java.util.logging.Logger; import com.google.common.annotations.VisibleForTesting; import org.openqa.selenium.WebDriverException; import org.openqa.selenium.io.TemporaryFilesystem; import org.openqa.selenium.remote.internal.CircularOutputStream; import org.openqa.selenium.remote.internal.SubProcess; /** * Handles launching the iWebDriver app on the iPhone Simulator in a * subprocess. * *

Only one instance of the iPhone Simulator may be run at once, so all * other instances will be killed before a new one is started. * *

The iPhone Simulator will be run in a headless mode against the SDK * specified by the {@code webdriver.iphone.sdk} system property. A temporary * directory will be used as the user home so the application need not be * pre-installed. * * @author jmleyba@gmail.com (Jason Leyba) */ public class IPhoneSimulatorBinary extends SubProcess { /* TODO: Figure out how to launch iWebDriver on the simulator in a non-headless mode. * (Without using the private iPhoneSimulatorRemoteClient.framework) */ private static final Logger LOG = Logger.getLogger(IPhoneSimulatorBinary.class.getName()); private static final String IPHONE_LOG_FILE_PROPERTY = "webdriver.iphone.logFile"; /** * System property used to specificy which iPhone SDK to run the * iPhone Simulator against. If not specified, will default to * {@link #DEFAULT_SDK}. */ private static final String IPHONE_SDK_PROPERTY = "webdriver.iphone.sdk"; /** The default iPhone SDK to use. */ private static final String DEFAULT_SDK = "3.2"; private static final String SDK_LOCATION_FORMAT = "/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator%s.sdk"; /** * Temporary directory used to store all generated iPhone Simulator scripts. */ private static final File SCRIPT_DIRECTORY = TemporaryFilesystem.createTempDir("webdriver", "iWebDriver"); /** * Utility script used to kill the iWebDriver process when * {@link #shutdown()} is called. This is necessary since * {@link Process#destroy()} sends a {@code SIGKILL} to this binary's * sub process so we cannot trap it and explicitly kill iWebDriver. */ private final ProcessBuilder killScript; /** * Creates a new IPhoneSimulatorBinary that will run the given application on * the iPhone Simulator. The simulator will be run using the SDK specified by * the {@code webdriver.iphone.sdk} system property. * * @param iWebDriverApp Path to the executable to run on the simulator. This * file should specify the executable that is an immedidate child of the * {@code iwebDriver.app} directory. * @throws IOException If an I/O error occurs. */ public IPhoneSimulatorBinary(File iWebDriverApp) throws IOException { super(new ProcessBuilder("/bin/bash", createRunScript(iWebDriverApp).getAbsolutePath()), createOutputStream()); File killScriptFile = createKillScript(iWebDriverApp.getName()); this.killScript = new ProcessBuilder("/bin/bash", killScriptFile.getAbsolutePath()); } private static OutputStream createOutputStream() { String logFileString = System.getProperty(IPHONE_LOG_FILE_PROPERTY); File logFile = logFileString == null ? null : new File(logFileString); return new CircularOutputStream(logFile); } private static File createRunScript(File executable) throws IOException { String sdkRoot = String.format(SDK_LOCATION_FORMAT, System.getProperty(IPHONE_SDK_PROPERTY, DEFAULT_SDK)); String exe = executable.getCanonicalFile().getAbsolutePath(); String scriptText = new StringBuilder() .append("#!/bin/bash\n") // TODO: this will fail spectacularly if the iPhone Simulator is running from Xcode. Need to // TODO: write an AppleScript to test if Xcode is running the simulator and to make it stop. .append("function shutdown() {\n") .append(" echo \"killing iWebDriver...\"\n") .append(" /usr/bin/killall \"iWebDriver\" || :\n") .append(" echo \"killing iPhone Simulator...\"\n") .append(" /usr/bin/killall \"iPhone Simulator\" || :\n") .append("}\n") // We need to make sure iWebDriver and the iPhone Simulator are not running before // attempting to restart the app. .append("shutdown\n") .append(String.format("export DYLD_ROOT_PATH=%s\n", sdkRoot)) .append(String.format("export IPHONE_SIMULATOR_ROOT=%s\n", sdkRoot)) .append(String.format("export CFFIXED_USER_HOME=%s\n", SCRIPT_DIRECTORY.getAbsolutePath())) // Be a good citizen; make sure we quit when #shutdown() is called. .append("trap \"shutdown\" SIGINT SIGTERM\n") .append(String.format("\"%s\" -RegisterForSystemEvents &\n", exe)) .append("iwebdriver_pid=$!\n") .append("echo \"Waiting on iWebDriver (pid=$iwebdriver_pid)\"...\n") .append("wait $iwebdriver_pid\n") .append("echo \"Finished running iWebDriver (pid=$iwebdriver_pid)\"!\n") .toString(); return writeScript(scriptText); } private static File createKillScript(String appName) throws IOException { // TODO: this will fail spectacularly if the iPhone Simulator is running from Xcode. Need to // TODO: write an AppleScript to test if Xcode is running the simulator and to make it stop. String scriptText = new StringBuilder() .append("#!/bin/bash\n") .append("echo \"killing ").append(appName).append("...\"\n") .append("/usr/bin/killall \"").append(appName).append("\" || :\n") .append("echo \"killing iPhone Simulator...\"\n") .append("/usr/bin/killall \"iPhone Simulator\" || :\n") .toString(); return writeScript(scriptText); } private static File writeScript(String scriptText) throws IOException { File scriptFile = File.createTempFile("iWebDriver.", ".script", SCRIPT_DIRECTORY); LOG.fine(String.format("%s:\n----------------------------------------------\n%s\n\n", scriptFile.getAbsolutePath(), scriptText)); FileWriter writer = new FileWriter(scriptFile); writer.write(scriptText); writer.flush(); writer.close(); return scriptFile.getCanonicalFile(); } @VisibleForTesting ProcessBuilder getKillScript() { return killScript; } /** * Kills iWebDriver and the iPhone Simulator. * * @see SubProcess#shutdown() */ @Override public void shutdown() { // This will kill iWebDriver, which will in turn terminate our run script. try { killScript.start().waitFor(); } catch (InterruptedException e) { throw new WebDriverException(e); } catch (IOException e) { throw new WebDriverException(e); } super.shutdown(); } } PK lC>ZZZVorg/openqa/selenium/iphone/.svn/text-base/IPhoneSimulatorCommandExecutor.java.svn-base/* Copyright 2007-2010 WebDriver committers Copyright 2007-2010 Google Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package org.openqa.selenium.iphone; import com.google.common.annotations.VisibleForTesting; import org.openqa.selenium.WebDriverException; import org.openqa.selenium.remote.Command; import org.openqa.selenium.remote.CommandExecutor; import org.openqa.selenium.remote.HttpCommandExecutor; import org.openqa.selenium.remote.Response; import java.io.IOException; import java.net.ConnectException; import java.net.HttpURLConnection; import java.net.ProtocolException; import java.net.URL; import java.util.logging.Level; import java.util.logging.Logger; /** * A {@link CommandExecutor} that communicates with an iPhone Simulator * running on localhost in a subprocess. Before executing each command, the * {@link IPhoneSimulatorCommandExecutor} will verify that the simulator is * still running and throw an {@link IPhoneSimulatorNotRunningException} if it * is not. * * @author jmleyba@gmail.com (Jason Leyba) */ public class IPhoneSimulatorCommandExecutor implements CommandExecutor { private static final Logger LOG = Logger.getLogger(IPhoneSimulatorCommandExecutor.class.getName()); private final CommandExecutor delegate; private final IPhoneSimulatorBinary binary; private final URL appUrl; public IPhoneSimulatorCommandExecutor(URL url, IPhoneSimulatorBinary binary) throws Exception { this.delegate = new HttpCommandExecutor(url); this.binary = binary; this.appUrl = url; } @VisibleForTesting IPhoneSimulatorBinary getBinary() { return binary; } public void startClient() { binary.launch(); waitForServerToRespond(2500); } private void waitForServerToRespond(long timeoutInMilliseconds) { long start = System.currentTimeMillis(); boolean responding = false; while (!responding && (System.currentTimeMillis() - start < timeoutInMilliseconds)) { HttpURLConnection connection = null; try { connection = (HttpURLConnection) appUrl.openConnection(); connection.setConnectTimeout(500); connection.setRequestMethod("TRACE"); connection.connect(); responding = true; } catch (ProtocolException e) { responding = false; } catch (IOException e) { responding = false; } finally { if (connection != null) { connection.disconnect(); } } } } public void stopClient() { binary.shutdown(); } public Response execute(Command command) throws IOException { if (!binary.isRunning()) { throw new IPhoneSimulatorNotRunningException(); } try { return delegate.execute(command); } catch (ConnectException e) { LOG.log(Level.WARNING, "Connection refused?", e); if (!binary.isRunning()) { throw new IPhoneSimulatorNotRunningException("The iPhone Simulator died!", e); } throw e; } } public static class IPhoneSimulatorNotRunningException extends WebDriverException { public IPhoneSimulatorNotRunningException() { super("The iPhone Simulator is not currently running!"); } public IPhoneSimulatorNotRunningException(Throwable cause) { super("The iPhone Simulator is not currently running!", cause); } public IPhoneSimulatorNotRunningException(String message, Throwable cause) { super(message, cause); } } } PK lC>#"wMorg/openqa/selenium/iphone/.svn/text-base/IPhoneSimulatorDriver.java.svn-basepackage org.openqa.selenium.iphone; import java.net.URL; /** * @author jmleyba@gmail.com (Jason Leyba) */ public class IPhoneSimulatorDriver extends IPhoneDriver { public IPhoneSimulatorDriver(URL iWebDriverUrl, IPhoneSimulatorBinary iphoneSimulator) throws Exception { super(new IPhoneSimulatorCommandExecutor(iWebDriverUrl, iphoneSimulator)); } public IPhoneSimulatorDriver(String iWebDriverUrl, IPhoneSimulatorBinary iphoneSimulator) throws Exception { this(new URL(iWebDriverUrl), iphoneSimulator); } public IPhoneSimulatorDriver(IPhoneSimulatorBinary iphoneSimulator) throws Exception { this(DEFAULT_IWEBDRIVER_URL, iphoneSimulator); } @Override protected void startClient() { ((IPhoneSimulatorCommandExecutor) getCommandExecutor()).startClient(); } @Override protected void stopClient() { ((IPhoneSimulatorCommandExecutor) getCommandExecutor()).stopClient(); } } PK lC>Lyy=org/openqa/selenium/iphone/.svn/text-base/build.desc.svn-base java_library(name = "iphone", srcs = [ "*.java" ], deps = [ "//java/client/src/org/openqa/selenium/remote", ])PK (hC>Lyy%org/openqa/selenium/iphone/build.desc java_library(name = "iphone", srcs = [ "*.java" ], deps = [ "//java/client/src/org/openqa/selenium/remote", ])PK &^D>b@com/thoughtworks/selenium/SeleniumCommandTimedOutException.class1:com/thoughtworks/selenium/SeleniumCommandTimedOutExceptionjava/lang/RuntimeException()VCode  LineNumberTableLocalVariableTablethis![[(com/thoughtworks/selenium/Selenium.class1"com/thoughtworks/selenium/Seleniumjava/lang/ObjectsetExtensionJs(Ljava/lang/String;)Vstart()V(Ljava/lang/Object;)VstopshowContextualBanner'(Ljava/lang/String;Ljava/lang/String;)Vclick doubleClick contextMenuclickAt doubleClickAt contextMenuAt fireEventfocuskeyPress shiftKeyDown shiftKeyUp metaKeyDown metaKeyUp altKeyDownaltKeyUpcontrolKeyDown controlKeyUpkeyDownkeyUp mouseOvermouseOut mouseDownmouseDownRight mouseDownAtmouseDownRightAtmouseUp mouseUpRight mouseUpAtmouseUpRightAt mouseMove mouseMoveAttypetypeKeyssetSpeedgetSpeed()Ljava/lang/String;getLogcheckuncheckselect addSelectionremoveSelectionremoveAllSelectionssubmitopen openWindow selectWindow selectPopUp deselectPopUp selectFrame'getWhetherThisFrameMatchFrameExpression'(Ljava/lang/String;Ljava/lang/String;)Z)getWhetherThisWindowMatchWindowExpression waitForPopUpchooseCancelOnNextConfirmationchooseOkOnNextConfirmationanswerOnNextPromptgoBackrefreshcloseisAlertPresent()ZisPromptPresentisConfirmationPresentgetAlertgetConfirmation getPrompt getLocationgetTitle getBodyTextgetValue&(Ljava/lang/String;)Ljava/lang/String;getText highlightgetEval isChecked(Ljava/lang/String;)ZgetTablegetSelectedLabels'(Ljava/lang/String;)[Ljava/lang/String;getSelectedLabelgetSelectedValuesgetSelectedValuegetSelectedIndexesgetSelectedIndexgetSelectedIds getSelectedIdisSomethingSelectedgetSelectOptions getAttribute isTextPresentisElementPresent isVisible isEditable getAllButtons()[Ljava/lang/String; getAllLinks getAllFieldsgetAttributeFromAllWindowsdragdrop setMouseSpeed getMouseSpeed()Ljava/lang/Number; dragAndDropdragAndDropToObject windowFocuswindowMaximizegetAllWindowIdsgetAllWindowNamesgetAllWindowTitles getHtmlSourcesetCursorPositiongetElementIndex&(Ljava/lang/String;)Ljava/lang/Number; isOrderedgetElementPositionLeftgetElementPositionTopgetElementWidthgetElementHeightgetCursorPosition getExpression getXpathCount getCssCountassignIdallowNativeXpathignoreAttributesWithoutValuewaitForCondition setTimeoutwaitForPageToLoadwaitForFrameToLoad getCookiegetCookieByNameisCookiePresent createCookie deleteCookiedeleteAllVisibleCookiessetBrowserLogLevel runScriptaddLocationStrategycaptureEntirePageScreenshotrollup addScript removeScriptuseXpathLibrary setContext attachFilecaptureScreenshotcaptureScreenshotToStringcaptureNetworkTrafficaddCustomRequestHeader#captureEntirePageScreenshotToStringshutDownSeleniumServerretrieveLastRemoteControlLogs keyDownNative keyUpNativekeyPressNative SourceFile Selenium.java             !"#$ % &'( ) *+ , - ./010234 5 6 789 9: ;<=>?@A@B CDEFGHIJKJLJM0N0O0P0Q0R0STUTVWTXYZT[\]T^\_T`\aTb\cTdYe\fTgYhYiYjYklmlnlo\p qrst u vwxlylzl{0| }~@~~~~~T~~   0TY       0T T0PK &^D>:1com/thoughtworks/selenium/SeleniumLogLevels.class1+com/thoughtworks/selenium/SeleniumLogLevelsjava/lang/ObjectDEBUGLjava/lang/String; ConstantValue debugINFO infoWARNwarnERRORerror()VCode  LineNumberTableLocalVariableTablethis-Lcom/thoughtworks/selenium/SeleniumLogLevels; SourceFileSeleniumLogLevels.java!   /* PK &^D>>#"X)X)0com/thoughtworks/selenium/SeleneseTestBase.class1*com/thoughtworks/selenium/SeleneseTestBasejava/lang/ObjectTHIS_IS_WINDOWSZcaptureScreenShotOnFailureselenium$Lcom/thoughtworks/selenium/Selenium;verificationErrorsLjava/lang/StringBuffer;()VCode  java/io/File  pathSeparatorLjava/lang/String;; java/lang/String equals(Ljava/lang/Object;)Z  LineNumberTableLocalVariableTable # ! % 'java/lang/StringBuffer &# * this,Lcom/thoughtworks/selenium/SeleneseTestBase;setUp Exceptions0java/lang/Exception 2 -3(Ljava/lang/String;)V 5 67runtimeBrowserString()Ljava/lang/String; 9 -:'(Ljava/lang/String;Ljava/lang/String;)Vurl=selenium.defaultBrowser ?A@java/lang/System BC getProperty&(Ljava/lang/String;)Ljava/lang/String;E${ G HI startsWith(Ljava/lang/String;)ZK *iexploreM*firefoxdefaultBrowser P QRgetDefaultPort()I T -U((Ljava/lang/String;Ljava/lang/String;I)V browserStringX5org.openqa.selenium.server.RemoteControlConfiguration Z\[java/lang/Class ]^forName%(Ljava/lang/String;)Ljava/lang/Class;Q Za bc getMethod@(Ljava/lang/String;[Ljava/lang/Class;)Ljava/lang/reflect/Method; egfjava/lang/reflect/Method hiinvoke9(Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/Object;kjava/lang/Integer jm nRintValuep selenium.port jr st getInteger((Ljava/lang/String;I)Ljava/lang/Integer;cLjava/lang/Class;Ljava/lang/reflect/Method; portNumberLjava/lang/Integer;eLjava/lang/Exception;}java/lang/StringBuilderhttp://localhost: | !3 | append(I)Ljava/lang/StringBuilder; | 7toString)com/thoughtworks/selenium/DefaultSelenium localhost !:(Ljava/lang/String;ILjava/lang/String;Ljava/lang/String;)V   "com/thoughtworks/selenium/Selenium startportI verifyTrue(Z)V   assertTrue  throwableToString)(Ljava/lang/Throwable;)Ljava/lang/String; & ,(Ljava/lang/String;)Ljava/lang/StringBuffer;java/lang/ErrorbLjava/lang/Error; verifyFalse   assertFalsegetTextthis.page().bodyText() CgetEval verifyEquals'(Ljava/lang/Object;Ljava/lang/Object;)V   assertEqualss1Ljava/lang/Object;s2(ZZ)Vjava/lang/Boolean !  :[Ljava/lang/String;  ((Ljava/lang/String;[Ljava/lang/String;)Vjava/lang/Number  Expected | -(Ljava/lang/Object;)Ljava/lang/StringBuilder; but saw | -(Ljava/lang/String;)Ljava/lang/StringBuilder; sa1sa2j Expected " " but saw " " instead  seleniumEquals'(Ljava/lang/String;Ljava/lang/String;)Z  (Ljava/lang/String;Z)V  join(([Ljava/lang/String;C)Ljava/lang/String;regexp:regex:regexpi:regexi:   handleRegexL(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;I)Ljava/lang/Boolean;  booleanValue()Zexact:   replaceFirst8(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String; ? outLjava/io/PrintStream; expected   to match    java/io/PrintStream 3printlnglob:([\]\[\\{\}$\(\)\|\^\+.])\\$1   replaceAll\*.*\?. !#"java/util/regex/Pattern $%compile.(Ljava/lang/String;I)Ljava/util/regex/Pattern; !' ()matcher3(Ljava/lang/CharSequence;)Ljava/util/regex/Matcher; +-,java/util/regex/Matcher .matches0 expected "2" to match glob "4)" (had transformed the glob into regexp "6"expectedPatternactualtmpLjava/lang/Boolean; expectedExact expectedGlob > ?@valueOf&(Ljava/lang/Object;)Ljava/lang/String;B to match regexp D E:FALSE G H:TRUEprefixflags expectedRegExpLjava/util/regex/Pattern;'(Ljava/lang/Object;Ljava/lang/Object;)Zexpected)([Ljava/lang/String;[Ljava/lang/String;)V R ST(verifyEqualsAndReturnComparisonDumpIfNot:([Ljava/lang/String;[Ljava/lang/String;)Ljava/lang/String;Vjava/lang/AssertionError UX !Y(Ljava/lang/Object;)VcomparisonDumpIfNotEqual \ ]^stringArrayToString'([Ljava/lang/String;)Ljava/lang/String;misMatcha{ &d f } &sasbkjava/io/StringWriter j#njava/io/PrintWriter mp !q(Ljava/io/Writer;)V sutjava/lang/Throwable vwprintStackTrace(Ljava/io/PrintWriter;)V jtLjava/lang/Throwable;swLjava/io/StringWriter;pwLjava/io/PrintWriter; & (C)Ljava/lang/StringBuffer;CverifyNotEquals  assertNotEqualsLjava/lang/AssertionError;#did not expect values to be equal ()  3failobj1obj2message conditionb1b2pause(I)V java/lang/Thread sleep(J)Vjava/lang/InterruptedException millisecscheckForVerificationErrors   clearVerificationErrorsverificationErrorStringtearDown     stopisCaptureScreenShotOnFailuresetCaptureScreenShotOnFailurecaptureScreetShotOnFailure SourceFileSeleneseTestBase.java!  ( 0  ' % ! K*"*$*&Y()1) .2 +,- ./4*1 89 +,-3./B *+*48 D E  +, ;67z*<>L++DFL+ JLLL+"HIJLMN%P(S *+,$N-:./M *+,*OS d e  +, ; VQR0WYL+_Z`M,djN-lLo\ql"#/ijkl#m$n 40+,uvQwxy$ z{-U/+|Y~L*Y,+*%. */+,/;/V/gM*),W +, zgM*),W +, z76 *  +,r+,N*)-W  *+, z$YYN*)-W# *$+,$$ z *+*+*+™*+¸ħ*+Ǚ*+ɸ*Ǚ+*+|*™Z+™S*M+N,-$Y|Yʷ,϶-̶Կ6,2-2,*+ *+ոR*8FTbp~ 4KF :_'|Yٷ*۶+ݶѶ*+߸ & '' C *+,     !+F+F+F +F +M*L,K*+M,,*+M,,*+M,,*+M,,*F9*N-+&|Y+*Ѷ *N-N-N-N-  +&*6|Y/+1*3-5Ѷ j$&(*3<ENW`ir{ >!7!8&93:-;f< d+*F]|Y+*=Ѷ: :,&*(|Y,A+Ѷ CF"%-9Z ^ b >dId7d8dJ%=K-5LM N\ *+*+߬*+լ  O 8 P^*+QM, UY,W ! ZPh+,QN- *)-W%& ') *+,Z STP=*+=>*2+2ߚ= *#|Yʷ*[϶+[Ѷ. ,- . 0123!0*6.7N9 *PPN_  ]^@&Y`bL= +c5*25W*+eW+g& = >?@A#B*>3D;E @h 5i  & ejYlLmY+oM*,r+xIJKL yz{| }~ 1&Y(M>,*2W*d ,W*,gPQ RST#Q,W *1h1u)i  "r+,N*)-WU]^ _a *+, z$YYN*)-WUfgh#j *$+,$$ z b&*+ՙ |Y*ɶѶno%q && 33 UY*Wt   E *xyz    4 }~  F*    <    LYY  N M   +,  ^*)gL*++  +, : *&Y()    +, ./5*L***+**** &/4 5+,/*$ +,>*$  +,PK &^D>$e:com/thoughtworks/selenium/Wait$WaitTimedOutException.class1.4com/thoughtworks/selenium/Wait$WaitTimedOutExceptionjava/lang/RuntimeExceptionserialVersionUIDJ ConstantValuethis$0 Lcom/thoughtworks/selenium/Wait;#(Lcom/thoughtworks/selenium/Wait;)VCode   ()VLineNumberTableLocalVariableTablethis6Lcom/thoughtworks/selenium/Wait$WaitTimedOutException;J(Lcom/thoughtworks/selenium/Wait;Ljava/lang/String;Ljava/lang/Throwable;)V  *(Ljava/lang/String;Ljava/lang/Throwable;)VmessageLjava/lang/String;causeLjava/lang/Throwable;5(Lcom/thoughtworks/selenium/Wait;Ljava/lang/String;)V " #(Ljava/lang/String;)V8(Lcom/thoughtworks/selenium/Wait;Ljava/lang/Throwable;)V & '(Ljava/lang/Throwable;)V SourceFile Wait.java InnerClasses,com/thoughtworks/selenium/WaitWaitTimedOutException!  8 *+* ZY   N *+*,- ^]     C *+*,! ba   $C *+*,% fe  ()* +-PK &^D><$com/thoughtworks/selenium/Wait.class1Ecom/thoughtworks/selenium/Waitjava/lang/ObjectDEFAULT_TIMEOUTJ ConstantValueu0DEFAULT_INTERVAL()VCode  LineNumberTableLocalVariableTablethis Lcom/thoughtworks/selenium/Wait;(Ljava/lang/String;)V  wait(Ljava/lang/String;JJ)VmessageToShowIfTimeoutLjava/lang/String;until()Zmessage(Ljava/lang/String;J)VtimeoutInMilliseconds #%$java/lang/System &'currentTimeMillis()J )  +-,java/lang/Thread ./sleep(J)V1java/lang/RuntimeException 03 4(Ljava/lang/Throwable;)V64com/thoughtworks/selenium/Wait$WaitTimedOutException 58 95(Lcom/thoughtworks/selenium/Wait;Ljava/lang/String;)V;java/lang/InterruptedExceptionintervalInMillisecondsstartende Ljava/lang/InterruptedException; SourceFile Wait.java InnerClassesWaitTimedOutException!   3*   L**+ D *+  0 1   L *+   ; <    ! ="7 a7*(*: 0Y 2"޻5Y*+7:& GH IJLM N*I3QH===!=<8= 2> ?@ ABC 5DPK &^D>Qskߺ-com/thoughtworks/selenium/RemoteCommand.class1 'com/thoughtworks/selenium/RemoteCommandjava/lang/ObjectgetCommandURLString()Ljava/lang/String; SourceFileRemoteCommand.javaPK &^D>/Ynf f 2com/thoughtworks/selenium/ScreenshotListener.class1y,com/thoughtworks/selenium/ScreenshotListenerjava/lang/Object#org/testng/internal/IResultListeneroutputDirectoryLjava/io/File;selenium$Lcom/thoughtworks/selenium/Selenium;5(Ljava/io/File;Lcom/thoughtworks/selenium/Selenium;)VCode  ()V    LineNumberTableLocalVariableTablethis.Lcom/thoughtworks/selenium/ScreenshotListener; onTestFailure(Lorg/testng/ITestResult;)V org/testng/Reporter setCurrentTestResult !#" java/io/File $%mkdirs()Z'java/lang/StringBuilder)TEST- &+ ,(Ljava/lang/String;)V .0/org/testng/ITestResult 12getName()Ljava/lang/String; &4 56append-(Ljava/lang/String;)Ljava/lang/StringBuilder; &8 92toString;.png != >?createTempFileB(Ljava/lang/String;Ljava/lang/String;Ljava/io/File;)Ljava/io/File; !A B%delete !D E2getAbsolutePath GIH"com/thoughtworks/selenium/Selenium J,captureScreenshotL screenshot Q R,log TVUjava/lang/Exception WprintStackTraceYCouldn't create screenshot T[ \2 getMessageresultLorg/testng/ITestResult;outFileeLjava/lang/Exception;onConfigurationFailure d onFinish(Lorg/testng/ITestContext;)VcontextLorg/testng/ITestContext;onStart kmlorg/testng/ITestContext n2getOutputDirectory !+&onTestFailedButWithinSuccessPercentage onTestSkipped onTestStart onTestSuccessonConfigurationSuccessitronConfigurationSkip SourceFileScreenshotListener.java!   Y**+*,    q+* W&Y(*+-37:* +0=F M!R["\#`$e%l(p)*qq]^+0_\`ab >*+c ,-]^ef 50ghif J*!Y+jo 34ghp 56]^q 5:]^r 5<]^s 5>]^t 5Au^v 5Eu^wxPK &^D>B*''4com/thoughtworks/selenium/HttpCommandProcessor.class1.com/thoughtworks/selenium/HttpCommandProcessorjava/lang/Object*com/thoughtworks/selenium/CommandProcessor pathToServletLjava/lang/String;browserStartCommand browserURL sessionId extensionJsrcServerLocation:(Ljava/lang/String;ILjava/lang/String;Ljava/lang/String;)VCode  ()Vjava/lang/StringBuilder java/lang/String valueOf&(Ljava/lang/Object;)Ljava/lang/String;  (Ljava/lang/String;)V : " #$append-(Ljava/lang/String;)Ljava/lang/StringBuilder; &('java/lang/Integer )*toString(I)Ljava/lang/String; , )-()Ljava/lang/String; / 1http://3/selenium-server/driver/ 5  7  9 ; = LineNumberTableLocalVariableTablethis0Lcom/thoughtworks/selenium/HttpCommandProcessor; serverHost serverPortI9(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)VgetRemoteControlServerLocation doCommand9(Ljava/lang/String;[Ljava/lang/String;)Ljava/lang/String;J.com/thoughtworks/selenium/DefaultRemoteCommand IL M((Ljava/lang/String;[Ljava/lang/String;)V IO P-getCommandURLString R STexecuteCommandOnServlet&(Ljava/lang/String;)Ljava/lang/String;Vjava/lang/NullPointerExceptionX%Selenium Bug! result must not be null U[OK ] ^_ startsWith(Ljava/lang/String;)Z a bT%throwAssertionFailureExceptionOrError commandNameargs[Ljava/lang/String;command0Lcom/thoughtworks/selenium/DefaultRemoteCommand;resultj+com/thoughtworks/selenium/SeleniumException imessage n oTgetCommandResponseAsStringqjava/net/ConnectException sutjava/io/IOException v- getMessage ix y*(Ljava/lang/String;Ljava/lang/Exception;)V s{ |printStackTrace~'java/lang/UnsupportedOperationException$Catch body broken: IOException from  ->  #-(Ljava/lang/Object;)Ljava/lang/StringBuilder; } *(Ljava/lang/String;Ljava/lang/Throwable;)VisLjava/io/InputStream;eLjava/io/IOException;stringContentsOfInputStream$(Ljava/io/Reader;)Ljava/lang/String; Exceptionsjava/lang/StringBuffer  #(C)Ljava/lang/StringBuffer; java/io/Reader read()I , closerdrLjava/io/Reader;sbLjava/lang/StringBuffer;cgetHttpUrlConnection,(Ljava/net/URL;)Ljava/net/HttpURLConnection;  java/net/URL openConnection()Ljava/net/URLConnection;java/net/HttpURLConnection urlForServletLjava/net/URL;getOutputStreamWriter.(Ljava/net/HttpURLConnection;)Ljava/io/Writer;java/io/BufferedWriterjava/io/OutputStreamWriter getOutputStream()Ljava/io/OutputStream; (Ljava/io/OutputStream;)V (Ljava/io/Writer;)VconnLjava/net/HttpURLConnection;getInputStreamReader.(Ljava/net/HttpURLConnection;)Ljava/io/Reader;java/io/InputStreamReader getInputStream()Ljava/io/InputStream;UTF-8 *(Ljava/io/InputStream;Ljava/lang/String;)VgetResponseCode(Ljava/net/HttpURLConnection;)I   TbuildCommandBody   Content-Type0application/x-www-form-urlencoded; charset=utf-8 setRequestProperty'(Ljava/lang/String;Ljava/lang/String;)V setInstanceFollowRedirects(Z)V  setDoOutput  java/io/Writer write flush  Location TgetRequestProperty -getResponseMessage    closeResources?(Ljava/net/HttpURLConnection;Ljava/io/Writer;Ljava/io/Reader;)VresponseString responsecodeucwrLjava/io/Writer;body   disconnect  #,(Ljava/lang/String;)Ljava/lang/StringBuffer;   &sessionId= org/openqa/selenium/net/Urls T urlEncodesetExtensionJsstartgetNewBrowserSession  !H getString # $setSessionInProgress optionsString(Ljava/lang/Object;)V , )  optionsObjectLjava/lang/Object;stop . /0hasSessionInProgress()Z2 testComplete 4 GH 6 7length9OK, ; <* substring >@?java/lang/System ABerrLjava/io/PrintStream;DWARNING: getString(F) saw a bad result HJIjava/io/PrintStream KprintlngetStringArray:(Ljava/lang/String;[Ljava/lang/String;)[Ljava/lang/String; O PQparseCSV'(Ljava/lang/String;)[Ljava/lang/String;Sjava/util/ArrayList R V WXcharAt(I)C RZ [\add(Ljava/lang/Object;)Z R^ _size Ra bctoArray(([Ljava/lang/Object;)[Ljava/lang/Object;einputoutputLjava/util/ArrayList;iC getNumber9(Ljava/lang/String;[Ljava/lang/String;)Ljava/lang/Number; monjava/text/NumberFormat pq getInstance()Ljava/text/NumberFormat; ms tuparse&(Ljava/lang/String;)Ljava/lang/Number;wjava/lang/RuntimeException vy z(Ljava/lang/Throwable;)V|java/lang/Long ~java/lang/Number intValue ~  longValue()J & (I)Vjava/text/ParseExceptionnLjava/lang/Number;Ljava/text/ParseException;getNumberArray:(Ljava/lang/String;[Ljava/lang/String;)[Ljava/lang/Number;  LM[Ljava/lang/Number; getBoolean((Ljava/lang/String;[Ljava/lang/String;)Ztrue  \equalsfalse'result was neither 'true' nor 'false': vbZgetBooleanArray)(Ljava/lang/String;[Ljava/lang/String;)[Z java/util/Arrays )'([Ljava/lang/Object;)Ljava/lang/String;[Z SourceFileHttpCommandProcessor.java!     P**Y+!%!+.*Y0*.!2!+4*-6*8*:<>& ;<=<">>?C@IAOB?4P@APBPCDP P Ev**+4*,6*-8*:<>KL MNOP?*@A  F-/*.>S? @AGH7IY+,KN*-NQ: UYWYZ\ *`>W XYZ#\-]4_?47@A7c7de -fg#hbT= iY+k>c? @A lSTCM*+mN-piY-r-w-z}YY+!!-+-s>hjk lmo!p?*C@ACfA :s2YM ,W+Y>,:+:+")>* ux yx{"}&{)|+}/~?42@A2* DDs<+>?@AsGYY+>?@AsBY+˷Ͱ>?@As9+Ҭ>?@AoTs M->:::Y*4:*+:*:ܶ*:*>-*48ȟ*`W$*:*M: * *-\,&>r &.7=CKRW^esz?\ @AfD   h& #, , :- -:++  s s>&  "?*#@A## #T.YM,+W*,W,*W,>)? .@A.f&>*+<> ?@A k'*Y*6SY*8SY*!&?'@A!h+*Y*6SY*8SY* !%*? +@A+%%h&A *+'(> ? @A *+$>*+> ?@Ah,L*- *13W*">? @A/05 *>?  @A!HC*+,3N-585-85:=YC+!E!-!+G:>   @ ?*C@ACcCde<hLMX *+,N-N> ?* @A c deh PQRYTLYM>N*U68,\.+,YWYM*U6,W*5+,YW++]`d>: !8#A$I%L'O(V+]h.q/?4exfgpVhDAijkF*+,Nl-r::vYx{}&Y}>"3678:'<6=C@?HF@AFcFde?h' ?*+,N-~:6$l-2rS:vYx-#&>"DEFH&I(J2F<M?H?@A?c?de8he1+hD( @*+,N- 6- 6vYY-!+>"QSTUW!X$Y'[?>@@A@c@de9h$h*+,N-:6N-2 T5-2 TvYY-!+->2 _` ab c&d)f6g<h?j[ael?>h@Ahchdeahe [UhDPK &^D>vv0com/thoughtworks/selenium/SeleneseTestCase.class1*com/thoughtworks/selenium/SeleneseTestCasejunit/framework/TestCasestb,Lcom/thoughtworks/selenium/SeleneseTestBase;selenium$Lcom/thoughtworks/selenium/Selenium;()VCode  *com/thoughtworks/selenium/SeleneseTestBase   LineNumberTableLocalVariableTablethis,Lcom/thoughtworks/selenium/SeleneseTestCase;(Ljava/lang/String;)V  nameLjava/lang/String;checkForVerificationErrors   clearVerificationErrors !  getText()Ljava/lang/String; % "#pause(I)V ) &' millisecsIsetUp Exceptions/java/lang/Exception 1 , 3  3 6 ,url'(Ljava/lang/String;Ljava/lang/String;)V : ,8 browserString((Ljava/lang/String;Ljava/lang/String;I)V > ,<porttearDown B @  verifyEquals(ZZ)V F CDarg1Zarg2'(Ljava/lang/Object;Ljava/lang/Object;)V L CJs1Ljava/lang/Object;s2)([Ljava/lang/String;[Ljava/lang/String;)V R CP[Ljava/lang/String; verifyFalse(Z)V W TUbverifyNotEquals [ YD ] YJ verifyTrue ` ^U assertEquals c aJ e a8((Ljava/lang/String;[Ljava/lang/String;)V h af j aPassertNotEquals m kDb1b2 q kJobj1obj2seleniumEquals'(Ljava/lang/Object;Ljava/lang/Object;)Z w tuexpectedactual'(Ljava/lang/String;Ljava/lang/String;)Z | tzisCaptureScreetShotOnFailure()Z Deprecated  ~isCaptureScreenShotOnFailure runtimeBrowserString  #setCaptureScreetShotOnFailure  UsetCaptureScreenShotOnFailure setTestContextjava/lang/StringBuilder java/lang/Object getClass()Ljava/lang/Class; java/lang/Class # getSimpleName java/lang/String valueOf&(Ljava/lang/Object;)Ljava/lang/String; . append-(Ljava/lang/String;)Ljava/lang/StringBuilder;  #getName #toString "com/thoughtworks/selenium/Selenium  setContextrunBarejava/lang/Throwable  1  runTest.png captureScreenshot java/lang/System errLjava/io/PrintStream;Saved screenshot java/io/PrintStream printlnCouldn't save screenshot : . # getMessage . printStackTrace BtLjava/lang/Throwable;filenameeLjava/lang/Exception;join(([Ljava/lang/String;C)Ljava/lang/String;  arraycC SourceFileSeleneseTestCase.javaRuntimeVisibleAnnotationsLjava/lang/Deprecated;!"  B* *Y   M*+*Y  6* #$   6*  () "# 2*$- &' A *( 23  *+, -. E*0**249:; ,-. P*+5**24EFG7,8-. [*+,9**24P QR 7;,< f*+,=**24\ ]^*7;?+@ -. 6*A bc CD L *E g h   GH IHCJ L *+,K l m   MN ONCP L *+,Q q r   MS OSTU A *V vw  XHYD L *Z { |   MH OHYJ L *+,\     MN ON^U A *_   XH aJ >*+b MNON a8 >*+d MO af >*+g MOS aP >*+i MSOS kD >l nHoH kJ >*+p rNsN tu :*+vxNyN tz :*+{xy}~ /* ~ 2* # 2* U >* XHU A *   XH  X**4Y** ) * - C****~L*4fY*M*4,YƷ,ȧ*NYͷ,϶-Ѷ-+*ק:**ױ6VY.R 6@YZ|*j6LZ& D+߰ SPK &^D> (1com/thoughtworks/selenium/SeleniumException.class1+com/thoughtworks/selenium/SeleniumExceptionjava/lang/RuntimeException(Ljava/lang/String;)VCode  LineNumberTableLocalVariableTablethis-Lcom/thoughtworks/selenium/SeleniumException;messageLjava/lang/String;(Ljava/lang/Exception;)V  (Ljava/lang/Throwable;)VeLjava/lang/Exception;*(Ljava/lang/String;Ljava/lang/Exception;)V  *(Ljava/lang/String;Ljava/lang/Throwable;)V SourceFileSeleniumException.java!>*+   >*+   I*+, #$  PK &^D>tٳqSS/com/thoughtworks/selenium/DefaultSelenium.class1$)com/thoughtworks/selenium/DefaultSeleniumjava/lang/Object"com/thoughtworks/selenium/SeleniumcommandProcessor,Lcom/thoughtworks/selenium/CommandProcessor;:(Ljava/lang/String;ILjava/lang/String;Ljava/lang/String;)VCode  ()V  detectCommandProcessore(Ljava/lang/String;ILjava/lang/String;Ljava/lang/String;)Lcom/thoughtworks/selenium/CommandProcessor;  LineNumberTableLocalVariableTablethis+Lcom/thoughtworks/selenium/DefaultSelenium; serverHostLjava/lang/String; serverPortIbrowserStartCommand browserURL .com/thoughtworks/selenium/HttpCommandProcessor " /(Lcom/thoughtworks/selenium/CommandProcessor;)V processorsetExtensionJs(Ljava/lang/String;)V (*)*com/thoughtworks/selenium/CommandProcessor %& extensionJsstart (. , 021java/lang/Exception 34 getMessage()Ljava/lang/String;6Connection refused 8:9java/lang/String ;< startsWith(Ljava/lang/String;)Z>java/lang/RuntimeException@java/lang/StringBuilderB;Could not contact Selenium Server; have you started it on ' ?D & (F G4getRemoteControlServerLocation ?I JKappend-(Ljava/lang/String;)Ljava/lang/StringBuilder;MP' ? Read more at http://seleniumhq.org/projects/remote-control/not-started.html ?O P4toString =DS"Could not start Selenium session: =U V*(Ljava/lang/String;Ljava/lang/Throwable;)VeLjava/lang/Exception;message ([ ,&]Connection refused: connect 8_ `aindexOf(Ljava/lang/String;)Ic8Could not contact Selenium Server; have you started it?  optionsString(Ljava/lang/Object;)V O [ optionsObjectLjava/lang/Object;stop (l jshowContextualBanner oqpjava/lang/Thread rs currentThread()Ljava/lang/Thread; ou vw getStackTrace ()[Ljava/lang/StackTraceElement; y{zjava/lang/StackTraceElement |4 getClassName~java.lang.Thread 8 equals(Ljava/lang/Object;)Z y 4 getMethodNamem  m'(Ljava/lang/String;Ljava/lang/String;)V  & setContext[Ljava/lang/StackTraceElement; className methodNamei ? : 8 length()I 8 charAt(I)C java/lang/Character  isUpperCase(C)Z ? J(C)Ljava/lang/StringBuilder;contextLjava/lang/StringBuilder;lastOneWasUpperCaseZnextOneIsUpperCaselenchCclick (  doCommand9(Ljava/lang/String;[Ljava/lang/String;)Ljava/lang/String;locator doubleClick contextMenuclickAt coordString doubleClickAt contextMenuAt fireEvent eventNamefocuskeyPress keySequence shiftKeyDown shiftKeyUp metaKeyDown metaKeyUp altKeyDownaltKeyUpcontrolKeyDown controlKeyUpkeyDownkeyUp mouseOvermouseOut mouseDownmouseDownRight mouseDownAtmouseDownRightAtmouseUp mouseUpRight mouseUpAtmouseUpRightAt mouseMove mouseMoveAttypevaluetypeKeyssetSpeedgetSpeed (  getStringgetLogcheckuncheckselect  selectLocator optionLocator addSelection removeSelectionremoveAllSelectionssubmit formLocatoropenurlignoreResponseCode openWindowwindowID selectWindow selectPopUp deselectPopUp! selectFrame#'getWhetherThisFrameMatchFrameExpression'(Ljava/lang/String;Ljava/lang/String;)Z% () *+ getBoolean((Ljava/lang/String;[Ljava/lang/String;)ZcurrentFrameStringtarget)getWhetherThisWindowMatchWindowExpression.currentWindowString waitForPopUp1timeoutchooseCancelOnNextConfirmation4chooseOkOnNextConfirmation6answerOnNextPrompt8answergoBack;refresh=close?isAlertPresent()ZAisPromptPresentDisConfirmationPresentFgetAlertHgetConfirmationJ getPromptL getLocationNgetTitleP getBodyTextRgetValue&(Ljava/lang/String;)Ljava/lang/String;TgetTextW highlightYgetEval[script isChecked^getTable`tableCellAddressgetSelectedLabels'(Ljava/lang/String;)[Ljava/lang/String;c (g higetStringArray:(Ljava/lang/String;[Ljava/lang/String;)[Ljava/lang/String;getSelectedLabeljgetSelectedValueslgetSelectedValuengetSelectedIndexespgetSelectedIndexrgetSelectedIdst getSelectedIdvisSomethingSelectedxgetSelectOptionsz getAttribute|attributeLocator isTextPresentpatternisElementPresent isVisible isEditable getAllButtons()[Ljava/lang/String; getAllLinks getAllFieldsgetAttributeFromAllWindows attributeNamedragdropmovementsString setMouseSpeedpixels getMouseSpeed()Ljava/lang/Number; (  getNumber9(Ljava/lang/String;[Ljava/lang/String;)Ljava/lang/Number; dragAndDropdragAndDropToObjectlocatorOfObjectToBeDraggedlocatorOfDragDestinationObject windowFocuswindowMaximizegetAllWindowIdsgetAllWindowNamesgetAllWindowTitles getHtmlSourcesetCursorPositionpositiongetElementIndex&(Ljava/lang/String;)Ljava/lang/Number; isOrderedlocator1locator2getElementPositionLeftgetElementPositionTopgetElementWidthgetElementHeightgetCursorPosition getExpression expression getXpathCountxpath getCssCountcssassignId identifierallowNativeXpathallowignoreAttributesWithoutValueignorewaitForCondition setTimeoutwaitForPageToLoadwaitForFrameToLoad frameAddress getCookiegetCookieByNamenameisCookiePresent createCookie nameValuePair deleteCookiedeleteAllVisibleCookiessetBrowserLogLevellogLevel runScriptaddLocationStrategy strategyNamefunctionDefinitioncaptureEntirePageScreenshotfilenamekwargsrollup rollupName addScript scriptContent scriptTagId removeScriptuseXpathLibrary libraryName attachFile fieldLocator fileLocatorcaptureScreenshot captureScreenshotToStringcaptureNetworkTrafficaddCustomRequestHeaderkey#captureEntirePageScreenshotToStringshutDownSeleniumServerretrieveLastRemoteControlLogs keyDownNativekeycode keyUpNativekeyPressNative  SourceFileDefaultSelenium.java!  l* **+-4564 _ Y+-!94      # F * *+=> ?  $%& C *+' M N  +, h*-^L+/M,8,57/=Y?YAC*EHLH+/HNQ=Y?YRC+/HN+T 0& R T UVW8XGWKZg\ h ZWXUY,& Y*+ZNM,/N-(-\^=Y?YbC,/HNQ=Y?YRC,/HN,T 0` cde!f<hXj*YYdJWXEY,e A *+fg mn  hij 8 *k q r  m `ntLMN6:+2x}(+2+2xM+2N +*,- L*UX0>wy z |} ~/2:BE|OXY_>`QW O MAYWXm < ?Y+HHN66,66V,6d,`6 -HW66-W*-NB#+EW^ails}\ uroi ]+H& M*8Y+SW & M*8Y+SW & M*8Y+SW  [*8Y+SY,SW   [*8Y+SY,SW   [*8Y+SY,SW   [*8Y+SY,SW  & M*8Y+SW  [*8Y+SY,SW   ?*8W   ?*8W   ?*8W   ?*8W   ?*8W   ?*8W   ?*8W   ?*8W   [*8Y+SY,SW   [*8Y+SY,SW  & M*8Y+SW & M*8Y+SW & M*8Y+SW & M*8Y+SW  [*8Y+SY,SW   [*8Y+SY,SW  & M*8Y+SW   & M*8Y+SW  [*8Y+SY,SW   [*8Y+SY,SW  & M*8Y+SW  [*8Y+SY,SW    [*8Y+SY,SW #$  [*8Y+SY,SW '( & M*8Y+SW +,4 :*8/ 4 ;*83 & N*8Y+SW 78& N*8Y+SW ;<  \* 8Y+SY,SW ?@     \*8Y+SY,SW CD   \*8Y+SY,SW GH  & N*8Y+SW KL& N*8Y+SW OP \*8Y+SY,SW ST & N*8Y+SW WX \*8Y+SY,SW [\ & N*8Y+SW _`& N* 8Y+SW cd! @*"8W gh #& N*$8Y+SW kl%& W*'8Y+SY,S(o ,-.& W*/8Y+SY,S(s 0-1 \*28Y+SY,SW wx 34 @*58W {| 6 @*78W  8& N*98Y+SW :; @*<8W  = @*>8W  ? @*@8W  AB ;*C8( DB ;*E8( FB ;*G8( H4 ;*I8 J4 ;*K8 L4 ;*M8 N4 ;*O8 P4 ;*Q8 R4 ;*S8 TU I*V8Y+SWU I*X8Y+SY& N*Z8Y+SW [U I*\8Y+S]^< I*_8Y+S(`U I*a8Y+Sbcd I*e8Y+Sf jU I*k8Y+S ld I*m8Y+Sf nU I*o8Y+S pd I*q8Y+Sf rU I*s8Y+S td I*u8Y+Sf vU I*w8Y+S x< I*y8Y+S( zd I*{8Y+Sf |U I*}8Y+S~< I*8Y+S(< I*8Y+S(< I*8Y+S(< I*8Y+S( ;*8f   ;*8f  ;*8f d I*8Y+Sf \*8Y+SY,SW  & N*8Y+SW   ;*8#  \*8Y+SY,SW '(  \*8Y+SY,SW +,  @*8W /0  @*8W 34  ;*8f7  ;*8f;  ;*8f? 4 ;*8C  \*8Y+SY,SW GH  I*8Y+SK& W*8Y+SY,S(O  I*8Y+SS I*8Y+SW I*8Y+S[ I*8Y+S_ I*8Y+ScU I*8Y+Sg I*8Y+Sk I*8Y+So \*8Y+SY,SW st & N*8Y+SW wx& N*8Y+SW {| \*8Y+SY,SW  ]3& N*8Y+SW 3& N*8Y+SW 3 \*8Y+SY,SW  34 ;*8 U I*8Y+S< I*8Y+S( \*8Y+SY,SW  d \*8Y+SY,SW  d @*8W  & N*8Y+SW & N*8Y+SW ] \*8Y+SY,SW   \*8Y+SY,SW   \*8Y+SY,SW   \*8Y+SY,SW  & N*8Y+SW & N*8Y+SW & N*8Y+SW  \* 8Y+SY,SW     & N* 8Y+SW 4 ;*8 U I*8Y+S \*8Y+SY,SW  U I*8Y+S @*8W  4 ;*8 & N*8Y+SW & N*8Y+SW  & N*!8Y+SW "#PK &^D>X(4com/thoughtworks/selenium/DefaultRemoteCommand.class1r.com/thoughtworks/selenium/DefaultRemoteCommandjava/lang/Object'com/thoughtworks/selenium/RemoteCommandNUMARGSINCLUDINGBOUNDARIESI ConstantValue FIRSTINDEX SECONDINDEX THIRDINDEXcommandLjava/lang/String;args[Ljava/lang/String;((Ljava/lang/String;[Ljava/lang/String;)VCode  ()V      selectWindow "$#java/lang/String %&equals(Ljava/lang/Object;)Z(nullLineNumberTableLocalVariableTablethis0Lcom/thoughtworks/selenium/DefaultRemoteCommand;getCommandURLString()Ljava/lang/String;0java/lang/StringBuffer2cmd= /4 5(Ljava/lang/String;)V 798org/openqa/selenium/net/Urls :; urlEncode&(Ljava/lang/String;)Ljava/lang/String; /= >?append,(Ljava/lang/String;)Ljava/lang/StringBuffer; /A B.toString /D >E(C)Ljava/lang/StringBuffer; GIHjava/lang/Integer BJ(I)Ljava/lang/String;sbLjava/lang/StringBuffer;i O -.parse=(Ljava/lang/String;)Lcom/thoughtworks/selenium/RemoteCommand;Sjava/lang/NullPointerExceptionUinputLine can't be null R4X\| "Z [\split'(Ljava/lang/String;)[Ljava/lang/String;^java/lang/IllegalStateException`java/lang/StringBuilderbCannot parse invalid line: _4 _e >f-(Ljava/lang/String;)Ljava/lang/StringBuilder; _h >i(I)Ljava/lang/StringBuilder; _A ]4 m  inputLinevalues SourceFileDefaultRemoteCommand.java!        u#**+*,+!,2,'S)'( )*."0* #+,##-._/Y13L+*6opqPK &^D>S;;4com/thoughtworks/selenium/SeleneseTestNgHelper.class1.com/thoughtworks/selenium/SeleneseTestNgHelper*com/thoughtworks/selenium/SeleneseTestBasestaticSelenium$Lcom/thoughtworks/selenium/Selenium;()VCode  LineNumberTableLocalVariableTablethis0Lcom/thoughtworks/selenium/SeleneseTestNgHelper;setUp'(Ljava/lang/String;Ljava/lang/String;)V Exceptionsjava/lang/ExceptionRuntimeVisibleAnnotations#Lorg/testng/annotations/BeforeTest;#Lorg/testng/annotations/Parameters;value selenium.urlselenium.browser"RuntimeVisibleParameterAnnotations!Lorg/testng/annotations/Optional;   runtimeBrowserString()Ljava/lang/String; "  $ %selenium ' urlLjava/lang/String; browserString getSelenium(Z)V$Lorg/testng/annotations/BeforeClass;selenium.restartSessionfalse 132"com/thoughtworks/selenium/Selenium 4stop 16 7startrestartSessionZsetTestContext(Ljava/lang/reflect/Method;)V%Lorg/testng/annotations/BeforeMethod;>java/lang/StringBuilder @BAjava/lang/reflect/Method CDgetDeclaringClass()Ljava/lang/Class; FHGjava/lang/Class I  getSimpleName KMLjava/lang/String NOvalueOf&(Ljava/lang/Object;)Ljava/lang/String; =Q R(Ljava/lang/String;)VT. =V WXappend-(Ljava/lang/String;)Ljava/lang/StringBuilder; @Z [ getName =] ^ toString 1` aR setContextmethodLjava/lang/reflect/Method;attachScreenshotListener@(Ljava/lang/String;Ljava/lang/String;Lorg/testng/ITestContext;)V$Lorg/testng/annotations/BeforeSuite; selenium.host selenium.port localhost4444i Km noequals(Ljava/lang/Object;)Zq)com/thoughtworks/selenium/DefaultSelenium sutjava/lang/Integer vwparseInt(Ljava/lang/String;)Iy p{ |:(Ljava/lang/String;ILjava/lang/String;Ljava/lang/String;)V~org/testng/TestRunner java/io/File org/testng/ITestContext getOutputDirectory Q,com/thoughtworks/selenium/ScreenshotListener 5(Ljava/io/File;Lcom/thoughtworks/selenium/Selenium;)V }  addListener(Ljava/lang/Object;)VhostportcontextLorg/testng/ITestContext;screenshotTakertrLorg/testng/TestRunner;outputDirectoryLjava/io/File;checkForVerificationErrors$Lorg/testng/annotations/AfterMethod;  selectDefaultWindow alwaysRunnull 1 R selectWindowtearDown"Lorg/testng/annotations/AfterTest;   assertEquals'(Ljava/lang/Object;Ljava/lang/Object;)V  actualLjava/lang/Object;expected  ((Ljava/lang/String;[Ljava/lang/String;)V[Ljava/lang/String;)([Ljava/lang/String;[Ljava/lang/String;)V  seleniumEquals'(Ljava/lang/Object;Ljava/lang/Object;)Z  '(Ljava/lang/String;Ljava/lang/String;)Z   verifyEquals    SourceFileSeleneseTestNgHelper.java!  /*   [ss  e,*M*+,!*#&   ()*)+,-[s. s/ b*&#*#0*#5 %& '(* 89:;< j**#=Y+?EJPSU+YU\_ ./$.)1 **bcdef[sgshsisj Bk+lpY+,rxxz:-}:Y-:Y . 7 8 :;:<"=1>9?>>A@ HBB)B)B&" 1 3* EF  Z E*#*# JKM  Z 3* RS   >+* WX   >+* \] ))  >+* ab )  >+* fg   :+* k   :+* p )) I*,+ uv  I*,+ z{ PK &^D>7//0com/thoughtworks/selenium/CommandProcessor.class1*com/thoughtworks/selenium/CommandProcessorjava/lang/ObjectgetRemoteControlServerLocation()Ljava/lang/String; doCommand9(Ljava/lang/String;[Ljava/lang/String;)Ljava/lang/String;setExtensionJs(Ljava/lang/String;)Vstart()V(Ljava/lang/Object;)Vstop getStringgetStringArray:(Ljava/lang/String;[Ljava/lang/String;)[Ljava/lang/String; getNumber9(Ljava/lang/String;[Ljava/lang/String;)Ljava/lang/Number;getNumberArray:(Ljava/lang/String;[Ljava/lang/String;)[Ljava/lang/Number; getBoolean((Ljava/lang/String;[Ljava/lang/String;)ZgetBooleanArray)(Ljava/lang/String;[Ljava/lang/String;)[Z SourceFileCommandProcessor.java      PK &^D>|ee;com/thoughtworks/selenium/BrowserConfigurationOptions.class15com/thoughtworks/selenium/BrowserConfigurationOptionsjava/lang/Object PROXY_CONFIGLjava/lang/String; ConstantValue proxy PROFILE_NAME profile SINGLE_WINDOW singleWindow MULTI_WINDOW multiWindowBROWSER_EXECUTABLE_PATHexecutablePathTIMEOUT_IN_SECONDStimeoutInSeconds BROWSER_MODEmodeCOMMAND_LINE_FLAGScommandLineFlagsDEFAULT_TIMEOUT_IN_SECONDSIoptionsLjava/util/Map; Signature5Ljava/util/Map;()VCode * &',java/util/HashMap +* / "#LineNumberTableLocalVariableTablethis7Lcom/thoughtworks/selenium/BrowserConfigurationOptions; hasOptions()Z 798 java/util/Map :;size()I serialize()Ljava/lang/String;?java/lang/StringBuilder >* 7B CDkeySet()Ljava/util/Set; FHG java/util/Set IJiterator()Ljava/util/Iterator; LNMjava/util/Iterator OPnext()Ljava/lang/Object;Rjava/lang/String >T UVappend(C)Ljava/lang/StringBuilder; >X UY-(Ljava/lang/String;)Ljava/lang/StringBuilder; 7[ \]get&(Ljava/lang/Object;)Ljava/lang/Object; L_ `5hasNext >b c=toStringsbLjava/lang/StringBuilder;firstZkey setProfileK(Ljava/lang/String;)Lcom/thoughtworks/selenium/BrowserConfigurationOptions; l mnput'(Ljava/lang/String;Ljava/lang/String;)V getProfileisSingleWindow r stisSet(Ljava/lang/String;)Z isMultiWindowsetSingleWindow9()Lcom/thoughtworks/selenium/BrowserConfigurationOptions;ytrue 7{ m|8(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object; 7~ ]removesetMultiWindowgetBrowserExecutablePathsetBrowserExecutablePathsetTimeoutInSeconds:(I)Lcom/thoughtworks/selenium/BrowserConfigurationOptions; Q valueOf(I)Ljava/lang/String;timeoutgetTimeoutInSeconds java/lang/Integer parseInt(Ljava/lang/String;)IvaluesetBrowserModegetBrowserModesetCommandLineFlags cmdLineFlagsgetCommandLineFlags  \&(Ljava/lang/String;)Ljava/lang/String;canUse Q equals(Ljava/lang/Object;)Z  tresultset](Ljava/lang/String;Ljava/lang/String;)Lcom/thoughtworks/selenium/BrowserConfigurationOptions;  <= SourceFile BrowserConfigurationOptions.java!     !"#$%&'(B*)*+Y-.0  1 2345(:*.60(1 23<=(b>Y@L=*.AE:9KQN= +;SW+-W=S*.-ZQWW^+a0& 12 3(4,51789S3];1*b23Zde Xfg(+hij(A * +k*0 FG1 23 o=(9*. ZQ0K1 23p5(? *q0U V X1  23u5(? *q0a b d1  23vw(u+*.YL*.xzW*.}W+ç+ÿ*#&&(&0klm!k)o1 +23w(u+*.YL*.xzW*.}W+ç+ÿ*#&&(&0vwx!v)z1 +23=(9*.ZQ0~1 23j(A *+k*0 1 23 (D *k*0  1 23 ;(X*.ZQL++0123 j(A *+k*0 1 23 =(9*.ZQ01 23j(A *+k*0 1 23 =(1*01 23t(E++0123mn([*,*.+,zW01 23hst(&=*.YN*.+Z=-ç-ÿ !!#!0 $1 &23&h$g\(B*.+ZQ0123h(X,*.+,zW*01 23hc=(/*01 23PK lC>K *com/thoughtworks/selenium/.svn/all-wcpropsK 25 svn:wc:ra_dav:version-url V 67 /svn/!svn/ver/11226/trunk/java/client/src/com/thoughtworks/selenium END SeleneseTestCase.java K 25 svn:wc:ra_dav:version-url V 89 /svn/!svn/ver/11226/trunk/java/client/src/com/thoughtworks/selenium/SeleneseTestCase.java END DefaultRemoteCommand.java K 25 svn:wc:ra_dav:version-url V 93 /svn/!svn/ver/11226/trunk/java/client/src/com/thoughtworks/selenium/DefaultRemoteCommand.java END SeleniumException.java K 25 svn:wc:ra_dav:version-url V 90 /svn/!svn/ver/11226/trunk/java/client/src/com/thoughtworks/selenium/SeleniumException.java END Wait.java K 25 svn:wc:ra_dav:version-url V 77 /svn/!svn/ver/11226/trunk/java/client/src/com/thoughtworks/selenium/Wait.java END SeleniumCommandTimedOutException.java K 25 svn:wc:ra_dav:version-url V 105 /svn/!svn/ver/11226/trunk/java/client/src/com/thoughtworks/selenium/SeleniumCommandTimedOutException.java END CommandProcessor.java K 25 svn:wc:ra_dav:version-url V 89 /svn/!svn/ver/11226/trunk/java/client/src/com/thoughtworks/selenium/CommandProcessor.java END HttpCommandProcessor.java K 25 svn:wc:ra_dav:version-url V 93 /svn/!svn/ver/11226/trunk/java/client/src/com/thoughtworks/selenium/HttpCommandProcessor.java END Selenium.java K 25 svn:wc:ra_dav:version-url V 81 /svn/!svn/ver/11226/trunk/java/client/src/com/thoughtworks/selenium/Selenium.java END ScreenshotListener.java K 25 svn:wc:ra_dav:version-url V 91 /svn/!svn/ver/11226/trunk/java/client/src/com/thoughtworks/selenium/ScreenshotListener.java END DefaultSelenium.java K 25 svn:wc:ra_dav:version-url V 88 /svn/!svn/ver/11226/trunk/java/client/src/com/thoughtworks/selenium/DefaultSelenium.java END BrowserConfigurationOptions.java K 25 svn:wc:ra_dav:version-url V 100 /svn/!svn/ver/11226/trunk/java/client/src/com/thoughtworks/selenium/BrowserConfigurationOptions.java END SeleneseTestNgHelper.java K 25 svn:wc:ra_dav:version-url V 93 /svn/!svn/ver/11226/trunk/java/client/src/com/thoughtworks/selenium/SeleneseTestNgHelper.java END RemoteCommand.java K 25 svn:wc:ra_dav:version-url V 86 /svn/!svn/ver/11226/trunk/java/client/src/com/thoughtworks/selenium/RemoteCommand.java END build.desc K 25 svn:wc:ra_dav:version-url V 78 /svn/!svn/ver/11226/trunk/java/client/src/com/thoughtworks/selenium/build.desc END SeleneseTestBase.java K 25 svn:wc:ra_dav:version-url V 89 /svn/!svn/ver/11226/trunk/java/client/src/com/thoughtworks/selenium/SeleneseTestBase.java END SeleniumLogLevels.java K 25 svn:wc:ra_dav:version-url V 90 /svn/!svn/ver/11226/trunk/java/client/src/com/thoughtworks/selenium/SeleniumLogLevels.java END PK lC>^R R &com/thoughtworks/selenium/.svn/entries8 dir 11264 http://selenium.googlecode.com/svn/trunk/java/client/src/com/thoughtworks/selenium http://selenium.googlecode.com/svn 2011-02-01T13:59:17.176547Z 11226 simon.m.stewart svn:special svn:externals svn:needs-lock 07704840-8298-11de-bf8c-fd130f914ac9 SeleneseTestCase.java file 2011-02-03T12:01:18.000000Z 9bb7fb682669080258d3e6a791fd17ff 2011-01-06T18:44:29.987723Z 10876 simon.m.stewart DefaultRemoteCommand.java file 2011-02-03T12:01:18.000000Z 9a3b67fe9f33d53fce347e46b8f51261 2011-01-18T15:33:27.442373Z 11003 simon.m.stewart has-props SeleniumException.java file 2011-02-03T12:01:18.000000Z 06d33c19a553e5d177ded1a80e6aa7b6 2009-11-22T22:12:05.475545Z 7681 simon.m.stewart has-props Wait.java file 2011-02-03T12:01:18.000000Z cf96c455f5ff90ca2bca0445d5634c45 2011-01-06T18:44:29.987723Z 10876 simon.m.stewart condition dir SeleniumCommandTimedOutException.java file 2011-02-03T12:01:18.000000Z 11fefa2d5c41d03948b56c6c801d7c57 2011-01-07T12:19:58.058512Z 10882 simon.m.stewart CommandProcessor.java file 2011-02-03T12:01:18.000000Z 79836b6dd18ec9502f720ee06a3fee39 2009-11-22T22:12:05.475545Z 7681 simon.m.stewart has-props HttpCommandProcessor.java file 2011-02-03T12:01:18.000000Z b4f0b003fb8dad23e1fec15353673776 2011-01-18T15:33:27.442373Z 11003 simon.m.stewart Selenium.java file 2011-02-03T12:01:18.000000Z 4c6600a9c54db1e208f194f2b4c89665 2010-12-29T16:22:33.247900Z 10792 adam_goucher@hotmail.com ScreenshotListener.java file 2011-02-03T12:01:18.000000Z 5db0fec50c3295de16696f9afeff1381 2011-01-06T18:44:29.987723Z 10876 simon.m.stewart DefaultSelenium.java file 2011-02-03T12:01:18.000000Z 2ee6cdea3e6d87aa6575e600bac15728 2011-01-17T16:20:15.233500Z 10978 simon.m.stewart BrowserConfigurationOptions.java file 2011-02-03T12:01:18.000000Z f520a882bfc357538b7b85dccdfa3c07 2011-01-17T16:20:15.233500Z 10978 simon.m.stewart SeleneseTestNgHelper.java file 2011-02-03T12:01:18.000000Z 8d518d57d1c2dfa0a27b6e28b59dd15c 2011-01-06T18:44:29.987723Z 10876 simon.m.stewart RemoteCommand.java file 2011-02-03T12:01:18.000000Z 7e8420bbc48f4c933c3ab5ca3035e9b4 2011-01-06T18:44:29.987723Z 10876 simon.m.stewart build.desc file 2011-02-03T12:01:18.000000Z 890c90f34133422ecf528e0b0397527c 2011-02-01T13:59:17.176547Z 11226 simon.m.stewart SeleniumLogLevels.java file 2011-02-03T12:01:18.000000Z 0a4992286074e9c1d47c6a9361b8cad9 2011-01-06T18:44:29.987723Z 10876 simon.m.stewart SeleneseTestBase.java file 2011-02-03T12:01:18.000000Z 8f05fa5d3b9265d04e80c0201bd8127f 2011-01-06T18:44:29.987723Z 10876 simon.m.stewart PK lC>G%com/thoughtworks/selenium/.svn/format8 PK lC> 8QQGcom/thoughtworks/selenium/.svn/prop-base/CommandProcessor.java.svn-baseK 13 svn:eol-style V 6 native K 12 svn:keywords V 23 Author Date Id Revision END PK lC> 8QQKcom/thoughtworks/selenium/.svn/prop-base/DefaultRemoteCommand.java.svn-baseK 13 svn:eol-style V 6 native K 12 svn:keywords V 23 Author Date Id Revision END PK lC> 8QQHcom/thoughtworks/selenium/.svn/prop-base/SeleniumException.java.svn-baseK 13 svn:eol-style V 6 native K 12 svn:keywords V 23 Author Date Id Revision END PK lC>xǥRcom/thoughtworks/selenium/.svn/text-base/BrowserConfigurationOptions.java.svn-basepackage com.thoughtworks.selenium; import java.util.HashMap; import java.util.Map; /** * Contains parameters for a single Selenium browser session. * * BrowserConfigurationOptions is used as an argument to {@code Selenium.start()}. * The parameters set within will override any command-line parameters set for the same option. * * @author jbevan, chandrap * */ public class BrowserConfigurationOptions { public static final String PROXY_CONFIG = "proxy"; public static final String PROFILE_NAME = "profile"; public static final String SINGLE_WINDOW = "singleWindow"; public static final String MULTI_WINDOW = "multiWindow"; public static final String BROWSER_EXECUTABLE_PATH = "executablePath"; public static final String TIMEOUT_IN_SECONDS = "timeoutInSeconds"; public static final String BROWSER_MODE = "mode"; public static final String COMMAND_LINE_FLAGS = "commandLineFlags"; public static final int DEFAULT_TIMEOUT_IN_SECONDS = 30 * 60; // identical to RemoteControlConfiguration; private Map options = new HashMap(); /** * Instantiate a blank BrowserConfigurationOptions instance. */ public BrowserConfigurationOptions() {} /** * Returns true if any options are set in this instance. * * @return true if any options are set in this instance. */ public boolean hasOptions() { return options.size() > 0; } /** * Serializes to the format "name=value;name=value". * * @return String with the above format. */ public String serialize() { StringBuilder sb = new StringBuilder(); boolean first = true; for (String key : options.keySet()) { if (first) { first = false; } else { sb.append(';'); } sb.append(key).append('=').append(options.get(key)); } return sb.toString(); } /** * Sets the name of the profile, which must exist in the -profilesLocation directory, * to use for this browser session. * * @param profile the name of the profile. * @return this BrowserConfigurationOptions object. */ public BrowserConfigurationOptions setProfile(String profile) { put(PROFILE_NAME, profile); return this; } protected String getProfile() { return options.get(PROFILE_NAME); } /** * Returns true if the {@code SINGLE_WINDOW} field is set. * * @return true if {@code SINGLE_WINDOW} is set. */ protected boolean isSingleWindow() { if (isSet(SINGLE_WINDOW)) { return true; } return false; } /** * Returns true if the {@code MULTI_WINDOW} field is set. * * @return true if {@code MULTI_WINDOW} is set. */ protected boolean isMultiWindow() { if (isSet(MULTI_WINDOW)) { return true; } return false; } /** * Sets {@code SINGLE_WINDOW} and unsets {@code MULTI_WINDOW}. */ public BrowserConfigurationOptions setSingleWindow() { synchronized (options) { options.put(SINGLE_WINDOW, "true"); // "true" string used for serialization options.remove(MULTI_WINDOW); } return this; } /** * Sets {@code MULTI_WINDOW} and unsets {@code SINGLE_WINDOW} */ public BrowserConfigurationOptions setMultiWindow() { synchronized (options) { options.put(MULTI_WINDOW, "true"); // "true" string used for serialization options.remove(SINGLE_WINDOW); } return this; } protected String getBrowserExecutablePath() { return options.get(BROWSER_EXECUTABLE_PATH); } /** * Sets the full path for the browser executable. * * @param executablePath the full path for the browser executable. */ public BrowserConfigurationOptions setBrowserExecutablePath(String executablePath) { put(BROWSER_EXECUTABLE_PATH, executablePath); return this; } /** * Sets the timeout, in seconds, for all commands. * * @param timeout the timeout for all commands * @return this BrowserConfigurationOptions instance. */ public BrowserConfigurationOptions setTimeoutInSeconds(int timeout) { put(TIMEOUT_IN_SECONDS, String.valueOf(timeout)); return this; } protected int getTimeoutInSeconds() { String value = options.get(TIMEOUT_IN_SECONDS); if (value == null) return DEFAULT_TIMEOUT_IN_SECONDS; return Integer.parseInt(value); } /** * Sets the "mode" for the browser. * * Historically, the 'browser' argument for getNewBrowserSession implied the mode for the browser. For * example, *iehta indicated HTA mode for IE, whereas *iexplore indicated the default user mode. Using * this method allows a browser mode to be specified independently of the base browser, eg. "HTA" or * "PROXY". * * Note that absolutely no publication nor synchronization of these hard-coded strings such as "HTA" has * yet been done. Use at your own risk until this is rectified. * * @param mode */ public BrowserConfigurationOptions setBrowserMode(String mode) { put(BROWSER_MODE, mode); return this; } protected String getBrowserMode() { return options.get(BROWSER_MODE); } public BrowserConfigurationOptions setCommandLineFlags(String cmdLineFlags) { put(COMMAND_LINE_FLAGS, cmdLineFlags); return this; } public String getCommandLineFlags() { return get(COMMAND_LINE_FLAGS); } protected boolean canUse(String value) { return (value != null && !"".equals(value)); } private void put(String key, String value) { if (canUse(value)) { options.put(key, value); } } public boolean isSet(String key) { boolean result = false; synchronized (options) { result = (null != options.get(key)); } return result; } public String get(String key) { return options.get(key); } /** * Sets the given key to the given value unless the value is null. * In that case, no entry for the key is made. * * @param key the name of the key * @param value the value for the key */ public BrowserConfigurationOptions set(String key, String value) { if (value != null) { options.put(key, value); } return this; } /** * Returns the serialization of this object, as defined by the serialize() * method. */ @Override public String toString() { return serialize(); } } PK lC>Si Gcom/thoughtworks/selenium/.svn/text-base/CommandProcessor.java.svn-base/* * Copyright 2006 ThoughtWorks, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package com.thoughtworks.selenium; /** *

Provides a doCommand method, which sends the command to the browser * to be performed.

* * * @author Paul Hammant * @version $Revision$ */ public interface CommandProcessor { /** * The URL that the RemoteControl instance is allegedly running on * @return the URL */ String getRemoteControlServerLocation(); /** Send the specified remote command to the browser to be performed * * @param command - the remote command verb * @param args - the arguments to the remote command (depends on the verb) * @return - the command result, defined by the remote JavaScript. "getX" style * commands may return data from the browser; other "doX" style commands may just * return "OK" or an error message. */ String doCommand(String command, String[] args); /** Sets extension Javascript for the session */ public void setExtensionJs(String extensionJs); /** Starts a new Selenium testing session */ public void start(); /** Starts a new Selenium testing session with a String, representing a configuration */ public void start(String optionsString); /** Starts a new Selenium testing session with a configuration options object */ public void start(Object optionsObject); /** Ends the current Selenium testing session (normally killing the browser) */ public void stop(); String getString(String string, String[] strings); String[] getStringArray(String string, String[] strings); Number getNumber(String string, String[] strings); Number[] getNumberArray(String string, String[] strings); boolean getBoolean(String string, String[] strings); boolean[] getBooleanArray(String string, String[] strings); } PK lC>T*P P Kcom/thoughtworks/selenium/.svn/text-base/DefaultRemoteCommand.java.svn-base/* * Copyright 2006 ThoughtWorks, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package com.thoughtworks.selenium; import org.openqa.selenium.net.Urls; /** * The default implementation of the RemoteCommand interface * * @see com.thoughtworks.selenium.RemoteCommand * @author Paul Hammant * @version $Revision$ */ public class DefaultRemoteCommand implements RemoteCommand { // as we have beginning and ending pipes, we will have 1 more entry than we need private static final int NUMARGSINCLUDINGBOUNDARIES = 4; private static final int FIRSTINDEX = 1; private static final int SECONDINDEX = 2; private static final int THIRDINDEX = 3; private final String command; private final String[] args; public DefaultRemoteCommand(String command, String[] args) { this.command = command; this.args = args; if ("selectWindow".equals(command) && args[0]==null) { // hackylicious I know, but what a dorky interface! Users naturally give us too much credit, and submit a null argument // instead of a string "null". Our code elsewhere assumes that all arguments are non-null, so // I fix this up here in order to avoid trouble later: args[0] = "null"; } } public String getCommandURLString() { StringBuffer sb = new StringBuffer("cmd="); sb.append(Urls.urlEncode(command)); if (args == null) return sb.toString(); for (int i = 0; i < args.length; i++) { sb.append('&'); sb.append(Integer.toString(i+1)); sb.append('='); sb.append(Urls.urlEncode(args[i])); } return sb.toString(); } public String toString() { return getCommandURLString(); } /** Factory method to create a RemoteCommand from a wiki-style input string */ public static RemoteCommand parse(String inputLine) { if (null == inputLine) throw new NullPointerException("inputLine can't be null"); String[] values = inputLine.split("\\|"); if (values.length != NUMARGSINCLUDINGBOUNDARIES) { throw new IllegalStateException("Cannot parse invalid line: " + inputLine + values.length); } return new DefaultRemoteCommand(values[FIRSTINDEX], new String[] {values[SECONDINDEX], values[THIRDINDEX]}); } } PK lC>9kkFcom/thoughtworks/selenium/.svn/text-base/DefaultSelenium.java.svn-base/* * Copyright 2006 ThoughtWorks, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package com.thoughtworks.selenium; /** The default implementation of the Selenium interface; end users will primarily interact with this object. */ public class DefaultSelenium implements Selenium { protected CommandProcessor commandProcessor; /** Uses a CommandBridgeClient, specifying a server host/port, a command to launch the browser, and a starting URL for the browser. * *

browserStartCommand may be any one of the following: *

    *
  • *firefox [absolute path] - Automatically launch a new Firefox process using a custom Firefox profile. * This profile will be automatically configured to use the Selenium Server as a proxy and to have all annoying prompts * ("save your password?" "forms are insecure" "make Firefox your default browser?" disabled. You may optionally specify * an absolute path to your firefox executable, or just say "*firefox". If no absolute path is specified, we'll look for * firefox.exe in a default location (normally c:\program files\mozilla firefox\firefox.exe), which you can override by * setting the Java system property firefoxDefaultPath to the correct path to Firefox.
  • *
  • *iexplore [absolute path] - Automatically launch a new Internet Explorer process using custom Windows registry settings. * This process will be automatically configured to use the Selenium Server as a proxy and to have all annoying prompts * ("save your password?" "forms are insecure" "make Firefox your default browser?" disabled. You may optionally specify * an absolute path to your iexplore executable, or just say "*iexplore". If no absolute path is specified, we'll look for * iexplore.exe in a default location (normally c:\program files\internet explorer\iexplore.exe), which you can override by * setting the Java system property iexploreDefaultPath to the correct path to Internet Explorer.
  • *
  • /path/to/my/browser [other arguments] - You may also simply specify the absolute path to your browser * executable, or use a relative path to your executable (which we'll try to find on your path). Warning: If you * specify your own custom browser, it's up to you to configure it correctly. At a minimum, you'll need to configure your * browser to use the Selenium Server as a proxy, and disable all browser-specific prompting. *
* * @param serverHost the host name on which the Selenium Server resides * @param serverPort the port on which the Selenium Server is listening * @param browserStartCommand the command string used to launch the browser, e.g. "*firefox", "*iexplore" or "c:\\program files\\internet explorer\\iexplore.exe" * @param browserURL the starting URL including just a domain name. We'll start the browser pointing at the Selenium resources on this URL, * e.g. "http://www.google.com" would send the browser to "http://www.google.com/selenium-server/SeleneseRunner.html" */ public DefaultSelenium(String serverHost, int serverPort, String browserStartCommand, String browserURL) { this.commandProcessor = detectCommandProcessor(serverHost, serverPort, browserStartCommand, browserURL); } private CommandProcessor detectCommandProcessor(String serverHost, int serverPort, String browserStartCommand, String browserURL) { return new HttpCommandProcessor(serverHost, serverPort, browserStartCommand, browserURL); } /** Uses an arbitrary CommandProcessor */ public DefaultSelenium(CommandProcessor processor) { this.commandProcessor = processor; } /** * Allows javascript to be specified for the test on a per-browser session * basis. The javascript will be in-play the next time a session is created; * that is, typically the next time start() is invoked (and * getNewBrowserSession is sent to the RC under the sheets). * * @param extensionJs a string representing the extra extension javascript * to include in the browser session. This is in * addition to any specified via the -userExtensions * switch when starting the RC. */ public void setExtensionJs(String extensionJs) { commandProcessor.setExtensionJs(extensionJs); } public void start() { try { commandProcessor.start(); } catch (Exception e) { final String message = e.getMessage(); if (message != null && message.startsWith("Connection refused")) { throw new RuntimeException("Could not contact Selenium Server; have you started it on '"+commandProcessor.getRemoteControlServerLocation() + "' ?\nRead more at http://seleniumhq.org/projects/remote-control/not-started.html\n" + e.getMessage()); } throw new RuntimeException("Could not start Selenium session: " + e.getMessage(), e); } } public void start(String optionsString) { try { commandProcessor.start(optionsString); } //TODO: EB Add exception catching for bad BrowserConfigurationOptions (i.e. Extension Not Found) catch (Exception e) { final String message = e.getMessage(); if (message != null && message.indexOf("Connection refused: connect") != -1) { throw new RuntimeException("Could not contact Selenium Server; have you started it?\n" + e.getMessage()); } throw new RuntimeException("Could not start Selenium session: " + e.getMessage(), e); } } public void start(Object optionsObject) { start(optionsObject.toString()); } public void stop() { commandProcessor.stop(); } public void showContextualBanner() { try { StackTraceElement[] e =Thread.currentThread().getStackTrace(); String className = null; String methodName = null; for (int i = 0; i < e.length; i++) { if(e[i].getClassName().equals("java.lang.Thread") || e[i].getMethodName().equals("showContextualBanner") ) { continue; } className = e[i].getClassName(); methodName = e[i].getMethodName(); break; } showContextualBanner(className, methodName); } catch (Exception e) { this.setContext(""); } } public void showContextualBanner(String className, String methodName) { StringBuilder context = new StringBuilder().append(className).append(": "); boolean lastOneWasUpperCase = false; boolean nextOneIsUpperCase = false; int len = methodName.length(); for (int i = 0; i < len; i++) { char ch = methodName.charAt(i); nextOneIsUpperCase = i < len-1 ? Character.isUpperCase(methodName.charAt(i+1)) : true; if ((Character.isUpperCase(ch) && (!lastOneWasUpperCase || !nextOneIsUpperCase))) { context.append(" "); lastOneWasUpperCase = true; } if (!Character.isUpperCase(ch)) { lastOneWasUpperCase = false; } context.append(ch); } this.setContext(context.toString()); } public void click(String locator) { commandProcessor.doCommand("click", new String[] {locator,}); } public void doubleClick(String locator) { commandProcessor.doCommand("doubleClick", new String[] {locator,}); } public void contextMenu(String locator) { commandProcessor.doCommand("contextMenu", new String[] {locator,}); } public void clickAt(String locator,String coordString) { commandProcessor.doCommand("clickAt", new String[] {locator,coordString,}); } public void doubleClickAt(String locator,String coordString) { commandProcessor.doCommand("doubleClickAt", new String[] {locator,coordString,}); } public void contextMenuAt(String locator,String coordString) { commandProcessor.doCommand("contextMenuAt", new String[] {locator,coordString,}); } public void fireEvent(String locator,String eventName) { commandProcessor.doCommand("fireEvent", new String[] {locator,eventName,}); } public void focus(String locator) { commandProcessor.doCommand("focus", new String[] {locator,}); } public void keyPress(String locator,String keySequence) { commandProcessor.doCommand("keyPress", new String[] {locator,keySequence,}); } public void shiftKeyDown() { commandProcessor.doCommand("shiftKeyDown", new String[] {}); } public void shiftKeyUp() { commandProcessor.doCommand("shiftKeyUp", new String[] {}); } public void metaKeyDown() { commandProcessor.doCommand("metaKeyDown", new String[] {}); } public void metaKeyUp() { commandProcessor.doCommand("metaKeyUp", new String[] {}); } public void altKeyDown() { commandProcessor.doCommand("altKeyDown", new String[] {}); } public void altKeyUp() { commandProcessor.doCommand("altKeyUp", new String[] {}); } public void controlKeyDown() { commandProcessor.doCommand("controlKeyDown", new String[] {}); } public void controlKeyUp() { commandProcessor.doCommand("controlKeyUp", new String[] {}); } public void keyDown(String locator,String keySequence) { commandProcessor.doCommand("keyDown", new String[] {locator,keySequence,}); } public void keyUp(String locator,String keySequence) { commandProcessor.doCommand("keyUp", new String[] {locator,keySequence,}); } public void mouseOver(String locator) { commandProcessor.doCommand("mouseOver", new String[] {locator,}); } public void mouseOut(String locator) { commandProcessor.doCommand("mouseOut", new String[] {locator,}); } public void mouseDown(String locator) { commandProcessor.doCommand("mouseDown", new String[] {locator,}); } public void mouseDownRight(String locator) { commandProcessor.doCommand("mouseDownRight", new String[] {locator,}); } public void mouseDownAt(String locator,String coordString) { commandProcessor.doCommand("mouseDownAt", new String[] {locator,coordString,}); } public void mouseDownRightAt(String locator,String coordString) { commandProcessor.doCommand("mouseDownRightAt", new String[] {locator,coordString,}); } public void mouseUp(String locator) { commandProcessor.doCommand("mouseUp", new String[] {locator,}); } public void mouseUpRight(String locator) { commandProcessor.doCommand("mouseUpRight", new String[] {locator,}); } public void mouseUpAt(String locator,String coordString) { commandProcessor.doCommand("mouseUpAt", new String[] {locator,coordString,}); } public void mouseUpRightAt(String locator,String coordString) { commandProcessor.doCommand("mouseUpRightAt", new String[] {locator,coordString,}); } public void mouseMove(String locator) { commandProcessor.doCommand("mouseMove", new String[] {locator,}); } public void mouseMoveAt(String locator,String coordString) { commandProcessor.doCommand("mouseMoveAt", new String[] {locator,coordString,}); } public void type(String locator,String value) { commandProcessor.doCommand("type", new String[] {locator,value,}); } public void typeKeys(String locator,String value) { commandProcessor.doCommand("typeKeys", new String[] {locator,value,}); } public void setSpeed(String value) { commandProcessor.doCommand("setSpeed", new String[] {value,}); } public String getSpeed() { return commandProcessor.getString("getSpeed", new String[] {}); } public String getLog() { return commandProcessor.getString("getLog", new String[] {}); } public void check(String locator) { commandProcessor.doCommand("check", new String[] {locator,}); } public void uncheck(String locator) { commandProcessor.doCommand("uncheck", new String[] {locator,}); } public void select(String selectLocator,String optionLocator) { commandProcessor.doCommand("select", new String[] {selectLocator,optionLocator,}); } public void addSelection(String locator,String optionLocator) { commandProcessor.doCommand("addSelection", new String[] {locator,optionLocator,}); } public void removeSelection(String locator,String optionLocator) { commandProcessor.doCommand("removeSelection", new String[] {locator,optionLocator,}); } public void removeAllSelections(String locator) { commandProcessor.doCommand("removeAllSelections", new String[] {locator,}); } public void submit(String formLocator) { commandProcessor.doCommand("submit", new String[] {formLocator,}); } public void open(String url, String ignoreResponseCode) { commandProcessor.doCommand("open", new String[] {url,ignoreResponseCode}); } public void open(String url) { commandProcessor.doCommand("open", new String[] {url,}); } public void openWindow(String url,String windowID) { commandProcessor.doCommand("openWindow", new String[] {url,windowID,}); } public void selectWindow(String windowID) { commandProcessor.doCommand("selectWindow", new String[] {windowID,}); } public void selectPopUp(String windowID) { commandProcessor.doCommand("selectPopUp", new String[] {windowID,}); } public void deselectPopUp() { commandProcessor.doCommand("deselectPopUp", new String[] {}); } public void selectFrame(String locator) { commandProcessor.doCommand("selectFrame", new String[] {locator,}); } public boolean getWhetherThisFrameMatchFrameExpression(String currentFrameString,String target) { return commandProcessor.getBoolean("getWhetherThisFrameMatchFrameExpression", new String[] {currentFrameString,target,}); } public boolean getWhetherThisWindowMatchWindowExpression(String currentWindowString,String target) { return commandProcessor.getBoolean("getWhetherThisWindowMatchWindowExpression", new String[] {currentWindowString,target,}); } public void waitForPopUp(String windowID,String timeout) { commandProcessor.doCommand("waitForPopUp", new String[] {windowID,timeout,}); } public void chooseCancelOnNextConfirmation() { commandProcessor.doCommand("chooseCancelOnNextConfirmation", new String[] {}); } public void chooseOkOnNextConfirmation() { commandProcessor.doCommand("chooseOkOnNextConfirmation", new String[] {}); } public void answerOnNextPrompt(String answer) { commandProcessor.doCommand("answerOnNextPrompt", new String[] {answer,}); } public void goBack() { commandProcessor.doCommand("goBack", new String[] {}); } public void refresh() { commandProcessor.doCommand("refresh", new String[] {}); } public void close() { commandProcessor.doCommand("close", new String[] {}); } public boolean isAlertPresent() { return commandProcessor.getBoolean("isAlertPresent", new String[] {}); } public boolean isPromptPresent() { return commandProcessor.getBoolean("isPromptPresent", new String[] {}); } public boolean isConfirmationPresent() { return commandProcessor.getBoolean("isConfirmationPresent", new String[] {}); } public String getAlert() { return commandProcessor.getString("getAlert", new String[] {}); } public String getConfirmation() { return commandProcessor.getString("getConfirmation", new String[] {}); } public String getPrompt() { return commandProcessor.getString("getPrompt", new String[] {}); } public String getLocation() { return commandProcessor.getString("getLocation", new String[] {}); } public String getTitle() { return commandProcessor.getString("getTitle", new String[] {}); } public String getBodyText() { return commandProcessor.getString("getBodyText", new String[] {}); } public String getValue(String locator) { return commandProcessor.getString("getValue", new String[] {locator,}); } public String getText(String locator) { return commandProcessor.getString("getText", new String[] {locator,}); } public void highlight(String locator) { commandProcessor.doCommand("highlight", new String[] {locator,}); } public String getEval(String script) { return commandProcessor.getString("getEval", new String[] {script,}); } public boolean isChecked(String locator) { return commandProcessor.getBoolean("isChecked", new String[] {locator,}); } public String getTable(String tableCellAddress) { return commandProcessor.getString("getTable", new String[] {tableCellAddress,}); } public String[] getSelectedLabels(String selectLocator) { return commandProcessor.getStringArray("getSelectedLabels", new String[] {selectLocator,}); } public String getSelectedLabel(String selectLocator) { return commandProcessor.getString("getSelectedLabel", new String[] {selectLocator,}); } public String[] getSelectedValues(String selectLocator) { return commandProcessor.getStringArray("getSelectedValues", new String[] {selectLocator,}); } public String getSelectedValue(String selectLocator) { return commandProcessor.getString("getSelectedValue", new String[] {selectLocator,}); } public String[] getSelectedIndexes(String selectLocator) { return commandProcessor.getStringArray("getSelectedIndexes", new String[] {selectLocator,}); } public String getSelectedIndex(String selectLocator) { return commandProcessor.getString("getSelectedIndex", new String[] {selectLocator,}); } public String[] getSelectedIds(String selectLocator) { return commandProcessor.getStringArray("getSelectedIds", new String[] {selectLocator,}); } public String getSelectedId(String selectLocator) { return commandProcessor.getString("getSelectedId", new String[] {selectLocator,}); } public boolean isSomethingSelected(String selectLocator) { return commandProcessor.getBoolean("isSomethingSelected", new String[] {selectLocator,}); } public String[] getSelectOptions(String selectLocator) { return commandProcessor.getStringArray("getSelectOptions", new String[] {selectLocator,}); } public String getAttribute(String attributeLocator) { return commandProcessor.getString("getAttribute", new String[] {attributeLocator,}); } public boolean isTextPresent(String pattern) { return commandProcessor.getBoolean("isTextPresent", new String[] {pattern,}); } public boolean isElementPresent(String locator) { return commandProcessor.getBoolean("isElementPresent", new String[] {locator,}); } public boolean isVisible(String locator) { return commandProcessor.getBoolean("isVisible", new String[] {locator,}); } public boolean isEditable(String locator) { return commandProcessor.getBoolean("isEditable", new String[] {locator,}); } public String[] getAllButtons() { return commandProcessor.getStringArray("getAllButtons", new String[] {}); } public String[] getAllLinks() { return commandProcessor.getStringArray("getAllLinks", new String[] {}); } public String[] getAllFields() { return commandProcessor.getStringArray("getAllFields", new String[] {}); } public String[] getAttributeFromAllWindows(String attributeName) { return commandProcessor.getStringArray("getAttributeFromAllWindows", new String[] {attributeName,}); } public void dragdrop(String locator,String movementsString) { commandProcessor.doCommand("dragdrop", new String[] {locator,movementsString,}); } public void setMouseSpeed(String pixels) { commandProcessor.doCommand("setMouseSpeed", new String[] {pixels,}); } public Number getMouseSpeed() { return commandProcessor.getNumber("getMouseSpeed", new String[] {}); } public void dragAndDrop(String locator,String movementsString) { commandProcessor.doCommand("dragAndDrop", new String[] {locator,movementsString,}); } public void dragAndDropToObject(String locatorOfObjectToBeDragged,String locatorOfDragDestinationObject) { commandProcessor.doCommand("dragAndDropToObject", new String[] {locatorOfObjectToBeDragged,locatorOfDragDestinationObject,}); } public void windowFocus() { commandProcessor.doCommand("windowFocus", new String[] {}); } public void windowMaximize() { commandProcessor.doCommand("windowMaximize", new String[] {}); } public String[] getAllWindowIds() { return commandProcessor.getStringArray("getAllWindowIds", new String[] {}); } public String[] getAllWindowNames() { return commandProcessor.getStringArray("getAllWindowNames", new String[] {}); } public String[] getAllWindowTitles() { return commandProcessor.getStringArray("getAllWindowTitles", new String[] {}); } public String getHtmlSource() { return commandProcessor.getString("getHtmlSource", new String[] {}); } public void setCursorPosition(String locator,String position) { commandProcessor.doCommand("setCursorPosition", new String[] {locator,position,}); } public Number getElementIndex(String locator) { return commandProcessor.getNumber("getElementIndex", new String[] {locator,}); } public boolean isOrdered(String locator1,String locator2) { return commandProcessor.getBoolean("isOrdered", new String[] {locator1,locator2,}); } public Number getElementPositionLeft(String locator) { return commandProcessor.getNumber("getElementPositionLeft", new String[] {locator,}); } public Number getElementPositionTop(String locator) { return commandProcessor.getNumber("getElementPositionTop", new String[] {locator,}); } public Number getElementWidth(String locator) { return commandProcessor.getNumber("getElementWidth", new String[] {locator,}); } public Number getElementHeight(String locator) { return commandProcessor.getNumber("getElementHeight", new String[] {locator,}); } public Number getCursorPosition(String locator) { return commandProcessor.getNumber("getCursorPosition", new String[] {locator,}); } public String getExpression(String expression) { return commandProcessor.getString("getExpression", new String[] {expression,}); } public Number getXpathCount(String xpath) { return commandProcessor.getNumber("getXpathCount", new String[] {xpath,}); } public Number getCssCount(String css) { return commandProcessor.getNumber("getCssCount", new String[] {css,}); } public void assignId(String locator,String identifier) { commandProcessor.doCommand("assignId", new String[] {locator,identifier,}); } public void allowNativeXpath(String allow) { commandProcessor.doCommand("allowNativeXpath", new String[] {allow,}); } public void ignoreAttributesWithoutValue(String ignore) { commandProcessor.doCommand("ignoreAttributesWithoutValue", new String[] {ignore,}); } public void waitForCondition(String script,String timeout) { commandProcessor.doCommand("waitForCondition", new String[] {script,timeout,}); } public void setTimeout(String timeout) { commandProcessor.doCommand("setTimeout", new String[] {timeout,}); } public void waitForPageToLoad(String timeout) { commandProcessor.doCommand("waitForPageToLoad", new String[] {timeout,}); } public void waitForFrameToLoad(String frameAddress,String timeout) { commandProcessor.doCommand("waitForFrameToLoad", new String[] {frameAddress,timeout,}); } public String getCookie() { return commandProcessor.getString("getCookie", new String[] {}); } public String getCookieByName(String name) { return commandProcessor.getString("getCookieByName", new String[] {name,}); } public boolean isCookiePresent(String name) { return commandProcessor.getBoolean("isCookiePresent", new String[] {name,}); } public void createCookie(String nameValuePair,String optionsString) { commandProcessor.doCommand("createCookie", new String[] {nameValuePair,optionsString,}); } public void deleteCookie(String name,String optionsString) { commandProcessor.doCommand("deleteCookie", new String[] {name,optionsString,}); } public void deleteAllVisibleCookies() { commandProcessor.doCommand("deleteAllVisibleCookies", new String[] {}); } public void setBrowserLogLevel(String logLevel) { commandProcessor.doCommand("setBrowserLogLevel", new String[] {logLevel,}); } public void runScript(String script) { commandProcessor.doCommand("runScript", new String[] {script,}); } public void addLocationStrategy(String strategyName,String functionDefinition) { commandProcessor.doCommand("addLocationStrategy", new String[] {strategyName,functionDefinition,}); } public void captureEntirePageScreenshot(String filename,String kwargs) { commandProcessor.doCommand("captureEntirePageScreenshot", new String[] {filename,kwargs,}); } public void rollup(String rollupName,String kwargs) { commandProcessor.doCommand("rollup", new String[] {rollupName,kwargs,}); } public void addScript(String scriptContent,String scriptTagId) { commandProcessor.doCommand("addScript", new String[] {scriptContent,scriptTagId,}); } public void removeScript(String scriptTagId) { commandProcessor.doCommand("removeScript", new String[] {scriptTagId,}); } public void useXpathLibrary(String libraryName) { commandProcessor.doCommand("useXpathLibrary", new String[] {libraryName,}); } public void setContext(String context) { commandProcessor.doCommand("setContext", new String[] {context,}); } public void attachFile(String fieldLocator,String fileLocator) { commandProcessor.doCommand("attachFile", new String[] {fieldLocator,fileLocator,}); } public void captureScreenshot(String filename) { commandProcessor.doCommand("captureScreenshot", new String[] {filename,}); } public String captureScreenshotToString() { return commandProcessor.getString("captureScreenshotToString", new String[] {}); } public String captureNetworkTraffic(String type) { return commandProcessor.getString("captureNetworkTraffic", new String[] {type}); } public void addCustomRequestHeader(String key, String value) { commandProcessor.getString("addCustomRequestHeader", new String[] {key, value}); } public String captureEntirePageScreenshotToString(String kwargs) { return commandProcessor.getString("captureEntirePageScreenshotToString", new String[] {kwargs,}); } public void shutDownSeleniumServer() { commandProcessor.doCommand("shutDownSeleniumServer", new String[] {}); } public String retrieveLastRemoteControlLogs() { return commandProcessor.getString("retrieveLastRemoteControlLogs", new String[] {}); } public void keyDownNative(String keycode) { commandProcessor.doCommand("keyDownNative", new String[] {keycode,}); } public void keyUpNative(String keycode) { commandProcessor.doCommand("keyUpNative", new String[] {keycode,}); } public void keyPressNative(String keycode) { commandProcessor.doCommand("keyPressNative", new String[] {keycode,}); } } PK lC>d=F55Kcom/thoughtworks/selenium/.svn/text-base/HttpCommandProcessor.java.svn-base/* * Copyright 2006 ThoughtWorks, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package com.thoughtworks.selenium; import org.openqa.selenium.net.Urls; import java.io.BufferedWriter; import java.io.IOException; import java.io.InputStream; import java.io.InputStreamReader; import java.io.OutputStreamWriter; import java.io.Reader; import java.io.Writer; import java.net.HttpURLConnection; import java.net.URL; import java.net.ConnectException; import java.text.NumberFormat; import java.text.ParseException; import java.util.ArrayList; import java.util.Arrays; /** * Sends commands and retrieves results via HTTP. * @author Ben Griffiths, Jez Humble */ public class HttpCommandProcessor implements CommandProcessor { private String pathToServlet; private String browserStartCommand; private String browserURL; private String sessionId; private String extensionJs; private String rcServerLocation; /** Specifies a server host/port, a command to launch the browser, and a starting URL for the browser. * * @param serverHost - the host name on which the Selenium Server resides * @param serverPort - the port on which the Selenium Server is listening * @param browserStartCommand - the command string used to launch the browser, e.g. "*firefox" or "c:\\program files\\internet explorer\\iexplore.exe" * @param browserURL - the starting URL including just a domain name. We'll start the browser pointing at the Selenium resources on this URL, * @param extensionJs - extension Javascript for this session * e.g. "http://www.google.com" would send the browser to "http://www.google.com/selenium-server/core/RemoteRunner.html" */ public HttpCommandProcessor(String serverHost, int serverPort, String browserStartCommand, String browserURL) { rcServerLocation = serverHost + ":"+ Integer.toString(serverPort); this.pathToServlet = "http://" + rcServerLocation + "/selenium-server/driver/"; this.browserStartCommand = browserStartCommand; this.browserURL = browserURL; this.extensionJs = ""; } /** Specifies the URL to the CommandBridge servlet, a command to launch the browser, and a starting URL for the browser. * * @param pathToServlet - the URL of the Selenium Server Driver, e.g. "http://localhost:4444/selenium-server/driver/" (don't forget the final slash!) * @param browserStartCommand - the command string used to launch the browser, e.g. "*firefox" or "c:\\program files\\internet explorer\\iexplore.exe" * @param browserURL - the starting URL including just a domain name. We'll start the browser pointing at the Selenium resources on this URL, * @param extensionJs - extension Javascript for this session */ public HttpCommandProcessor(String pathToServlet, String browserStartCommand, String browserURL) { this.pathToServlet = pathToServlet; this.browserStartCommand = browserStartCommand; this.browserURL = browserURL; this.extensionJs = ""; } public String getRemoteControlServerLocation() { return rcServerLocation; } public String doCommand(String commandName, String[] args) { DefaultRemoteCommand command = new DefaultRemoteCommand(commandName,args); String result = executeCommandOnServlet(command.getCommandURLString()); if (result == null) { throw new NullPointerException("Selenium Bug! result must not be null"); } if (!result.startsWith("OK")) { return throwAssertionFailureExceptionOrError(result); } return result; } protected String throwAssertionFailureExceptionOrError(String message) { throw new SeleniumException(message); } /** Sends the specified command string to the bridge servlet */ public String executeCommandOnServlet(String command) { InputStream is = null; try { return getCommandResponseAsString(command); } catch (IOException e) { if (e instanceof ConnectException) { throw new SeleniumException(e.getMessage(),e); } e.printStackTrace(); throw new UnsupportedOperationException("Catch body broken: IOException from " + command + " -> " + e, e); } } private String stringContentsOfInputStream(Reader rdr) throws IOException { StringBuffer sb = new StringBuffer(); int c; try { while ((c = rdr.read()) != -1) { sb.append((char) c); } return sb.toString(); } finally { rdr.close(); } } // for testing protected HttpURLConnection getHttpUrlConnection(URL urlForServlet) throws IOException { return (HttpURLConnection) urlForServlet.openConnection(); } // for testing protected Writer getOutputStreamWriter(HttpURLConnection conn) throws IOException { return new BufferedWriter(new OutputStreamWriter(conn.getOutputStream())); } // for testing protected Reader getInputStreamReader(HttpURLConnection conn) throws IOException { return new InputStreamReader(conn.getInputStream(), "UTF-8"); } // for testing protected int getResponseCode(HttpURLConnection conn) throws IOException { return conn.getResponseCode(); } protected String getCommandResponseAsString(String command) throws IOException { String responseString = null; int responsecode = HttpURLConnection.HTTP_MOVED_PERM; HttpURLConnection uc = null; Writer wr = null; Reader rdr = null; while (responsecode == HttpURLConnection.HTTP_MOVED_PERM) { URL result = new URL(pathToServlet); String body = buildCommandBody(command); try { uc = getHttpUrlConnection(result); uc.setRequestProperty("Content-Type", "application/x-www-form-urlencoded; charset=utf-8"); uc.setInstanceFollowRedirects(false); uc.setDoOutput(true); wr = getOutputStreamWriter(uc);; wr.write(body); wr.flush(); responsecode = getResponseCode(uc); if (responsecode == HttpURLConnection.HTTP_MOVED_PERM) { pathToServlet = uc.getRequestProperty("Location"); } else if (responsecode != HttpURLConnection.HTTP_OK) { throwAssertionFailureExceptionOrError(uc.getResponseMessage()); } else { rdr = getInputStreamReader(uc); responseString = stringContentsOfInputStream(rdr); } } finally { closeResources(uc, wr, rdr); } } return responseString; } protected void closeResources(HttpURLConnection conn, Writer wr, Reader rdr) { try { if (null != wr) { wr.close(); } } catch (IOException ioe) { // ignore } try { if (null != rdr) { rdr.close(); } } catch (IOException ioe) { // ignore } if (null != conn) { conn.disconnect(); } } private String buildCommandBody(String command) { StringBuffer sb = new StringBuffer(); sb.append(command); if (sessionId != null) { sb.append("&sessionId="); sb.append(Urls.urlEncode(sessionId)); } return sb.toString(); } /** * This should be invoked before start(). * * @param extensionJs the extra extension Javascript to include in this * browser session. */ public void setExtensionJs(String extensionJs) { this.extensionJs = extensionJs; } public void start() { String result = getString("getNewBrowserSession", new String[]{browserStartCommand, browserURL, extensionJs}); setSessionInProgress(result); } public void start(String optionsString) { String result = getString("getNewBrowserSession", new String[]{browserStartCommand, browserURL, extensionJs, optionsString}); setSessionInProgress(result); } /** * Wraps the version of start() that takes a String parameter, sending it * the result of calling toString() on optionsObject, which will likely be * a BrowserConfigurationOptions instance. * * @param optionsObject */ public void start(Object optionsObject) { start(optionsObject.toString()); } protected void setSessionInProgress(String result) { sessionId = result; } public void stop() { if (hasSessionInProgress()) { doCommand("testComplete", null); } setSessionInProgress(null); } public boolean hasSessionInProgress() { return null != sessionId; } public String getString(String commandName, String[] args) { String result = doCommand(commandName, args); if (result.length() >= "OK,".length()) { return result.substring("OK,".length()); } System.err.println("WARNING: getString(" + commandName + ") saw a bad result " + result); return ""; } public String[] getStringArray(String commandName, String[] args) { String result = getString(commandName, args); return parseCSV(result); } /** Convert backslash-escaped comma-delimited string into String array. As described in SRC-CDP * spec section 5.2.1.2, these strings are comma-delimited, but commas * can be escaped with a backslash "\". Backslashes can also be escaped * as a double-backslash. * @param input the unparsed string, e.g. "veni\, vidi\, vici,c:\\foo\\bar,c:\\I came\, I \\saw\\\, I conquered" * @return the string array resulting from parsing this string */ public static String[] parseCSV(String input) { ArrayList output = new ArrayList(); StringBuffer sb = new StringBuffer(); for(int i = 0; i < input.length(); i++) { char c = input.charAt(i); switch (c) { case ',': output.add(sb.toString()); sb = new StringBuffer(); continue; case '\\': i++; c = input.charAt(i); // fall through to: default: sb.append(c); } } output.add(sb.toString()); return (String[]) output.toArray(new String[output.size()]); } public Number getNumber(String commandName, String[] args) { String result = getString(commandName, args); Number n; try { n = NumberFormat.getInstance().parse(result); } catch (ParseException e) { throw new RuntimeException(e); } if (n instanceof Long) { // SRC-315 we should return Integers if possible if (n.intValue() == n.longValue()) { return new Integer(n.intValue()); } } return n; } public Number[] getNumberArray(String commandName, String[] args) { String[] result = getStringArray(commandName, args); Number[] n = new Number[result.length]; for (int i = 0; i < result.length; i++) { try { n[i] = NumberFormat.getInstance().parse(result[i]); } catch (ParseException e) { throw new RuntimeException(e); } } return n; } public boolean getBoolean(String commandName, String[] args) { String result = getString(commandName, args); boolean b; if ("true".equals(result)) { b = true; return b; } if ("false".equals(result)) { b = false; return b; } throw new RuntimeException("result was neither 'true' nor 'false': " + result); } public boolean[] getBooleanArray(String commandName, String[] args) { String[] result = getStringArray(commandName, args); boolean[] b = new boolean[result.length]; for (int i = 0; i < result.length; i++) { if ("true".equals(result[i])) { b[i] = true; continue; } if ("false".equals(result[i])) { b[i] = false; continue; } throw new RuntimeException("result was neither 'true' nor 'false': " + Arrays.toString(result)); } return b; } } PK lC>SttDcom/thoughtworks/selenium/.svn/text-base/RemoteCommand.java.svn-base/* * Copyright 2006 ThoughtWorks, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package com.thoughtworks.selenium; /** * Represents a single remote action * @version $Id: $ */ public interface RemoteCommand { /** Return the URL query string which will be sent to the browser */ String getCommandURLString(); } PK lC>SOёIcom/thoughtworks/selenium/.svn/text-base/ScreenshotListener.java.svn-basepackage com.thoughtworks.selenium; import java.io.File; import org.testng.ITestContext; import org.testng.ITestResult; import org.testng.Reporter; import org.testng.internal.IResultListener; import com.thoughtworks.selenium.Selenium; public class ScreenshotListener implements IResultListener { File outputDirectory; Selenium selenium; public ScreenshotListener(File outputDirectory, Selenium selenium) { this.outputDirectory = outputDirectory; this.selenium = selenium; } public void onTestFailure(ITestResult result) { Reporter.setCurrentTestResult(result); try { outputDirectory.mkdirs(); File outFile = File.createTempFile("TEST-"+result.getName(), ".png", outputDirectory); outFile.delete(); selenium.captureScreenshot(outFile.getAbsolutePath()); Reporter.log("screenshot"); } catch (Exception e) { e.printStackTrace(); Reporter.log("Couldn't create screenshot"); Reporter.log(e.getMessage()); } Reporter.setCurrentTestResult(null); } public void onConfigurationFailure(ITestResult result) { onTestFailure(result); } public void onFinish(ITestContext context) {} public void onStart(ITestContext context) { outputDirectory = new File(context.getOutputDirectory()); } public void onTestFailedButWithinSuccessPercentage(ITestResult result) {} public void onTestSkipped(ITestResult result) {} public void onTestStart(ITestResult result) {} public void onTestSuccess(ITestResult result) {} public void onConfigurationSuccess(ITestResult itr) { } public void onConfigurationSkip(ITestResult itr) { } } PK lC>L!@@Gcom/thoughtworks/selenium/.svn/text-base/SeleneseTestBase.java.svn-base/* * Copyright 2004 ThoughtWorks, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package com.thoughtworks.selenium; import java.io.File; import java.io.PrintWriter; import java.io.StringWriter; import java.lang.reflect.Method; import java.util.regex.Pattern; /** * Provides a base class that implements some handy functionality * for Selenium testing (you are not required to extend this class). * *

This class adds a number of "verify" commands, which are like "assert" commands, * but they don't stop the test when they fail. Instead, verification errors are all * thrown at once during tearDown.

* * @author Nelson Sproul (nsproul@bea.com) Mar 13-06 */ public class SeleneseTestBase { private static final boolean THIS_IS_WINDOWS = File.pathSeparator.equals(";"); private boolean captureScreenShotOnFailure = false; /** Use this object to run all of your selenium tests */ protected Selenium selenium; protected StringBuffer verificationErrors = new StringBuffer(); public SeleneseTestBase() { super(); } /** Calls this.setUp(null) * @see #setUp(String) */ public void setUp() throws Exception { this.setUp(null); } /** * Calls this.setUp with the specified url and a default browser. On Windows, the default browser is *iexplore; otherwise, the default browser is *firefox. * @see #setUp(String, String) * @param url the baseUrl to use for your Selenium tests * @throws Exception * */ public void setUp(String url) throws Exception { setUp(url, runtimeBrowserString()); } protected String runtimeBrowserString() { String defaultBrowser = System.getProperty("selenium.defaultBrowser"); if (null != defaultBrowser && defaultBrowser.startsWith("${")) { defaultBrowser = null; } if (defaultBrowser == null) { if(THIS_IS_WINDOWS){ defaultBrowser = "*iexplore"; } else{ defaultBrowser = "*firefox"; } } return defaultBrowser; } /** * Creates a new DefaultSelenium object and starts it using the specified * baseUrl and browser string. The port is selected as follows: if the * server package's RemoteControlConfiguration class is on the classpath, * that class' default port is used. Otherwise, if the "server.port" system * property is specified, that is used - failing that, the default of 4444 * is used. * * @see #setUp(String, String, int) * @param url the baseUrl for your tests * @param browserString the browser to use, e.g. *firefox * @throws Exception */ public void setUp(String url, String browserString) throws Exception { setUp(url, browserString, getDefaultPort()); } protected int getDefaultPort() { try { Class c = Class.forName("org.openqa.selenium.server.RemoteControlConfiguration"); Method getDefaultPort = c.getMethod("getDefaultPort", new Class[0]); Integer portNumber = (Integer)getDefaultPort.invoke(null, new Object[0]); return portNumber.intValue(); } catch (Exception e) { return Integer.getInteger("selenium.port", 4444).intValue(); } } /** * Creates a new DefaultSelenium object and starts it using the specified * baseUrl and browser string. The port is selected as follows: if the * server package's RemoteControlConfiguration class is on the classpath, * that class' default port is used. Otherwise, if the "server.port" system * property is specified, that is used - failing that, the default of 4444 * is used. * * @see #setUp(String, String, int) * @param url the baseUrl for your tests * @param browserString the browser to use, e.g. *firefox * @param port the port that you want to run your tests on * @throws Exception */ public void setUp(String url, String browserString, int port) { if (url == null) { url = "http://localhost:" + port; } selenium = new DefaultSelenium("localhost", port, browserString, url); selenium.start(); } /** Like assertTrue, but fails at the end of the test (during tearDown) */ public void verifyTrue(boolean b) { try { assertTrue(b); } catch (Error e) { verificationErrors.append(throwableToString(e)); } } /** Like assertFalse, but fails at the end of the test (during tearDown) */ public void verifyFalse(boolean b) { try { assertFalse(b); } catch (Error e) { verificationErrors.append(throwableToString(e)); } } /** Returns the body text of the current page */ public String getText() { return selenium.getEval("this.page().bodyText()"); } /** Like assertEquals, but fails at the end of the test (during tearDown) */ public void verifyEquals(Object s1, Object s2) { try { assertEquals(s1, s2); } catch (Error e) { verificationErrors.append(throwableToString(e)); } } /** Like assertEquals, but fails at the end of the test (during tearDown) */ public void verifyEquals(boolean s1, boolean s2) { try { assertEquals(new Boolean(s1), new Boolean(s2)); } catch (Error e) { verificationErrors.append(throwableToString(e)); } } /** Like JUnit's Assert.assertEquals, but knows how to compare string arrays */ public static void assertEquals(Object s1, Object s2) { if (s1 instanceof String && s2 instanceof String) { assertEquals((String)s1, (String)s2); } else if (s1 instanceof String && s2 instanceof String[]) { assertEquals((String)s1, (String[])s2); } else if (s1 instanceof String && s2 instanceof Number) { assertEquals((String)s1, s2.toString()); } else if (s1 instanceof Number && s2 instanceof String) { assertEquals(s1.toString(), (String)s2); } else if (s1 instanceof String[] && s2 instanceof String[]) { String[] sa1 = (String[]) s1; String[] sa2 = (String[]) s2; if (sa1.length!=sa2.length) { throw new Error("Expected " + sa1 + " but saw " + sa2); } for (int j = 0; j < sa1.length; j++) { assertEquals(sa1[j], sa2[j]); } } else if (s1 == null) { assertTrue(s2 == null); } else { assertTrue(s1.equals(s2)); } } /** Like JUnit's Assert.assertEquals, but handles "regexp:" strings like HTML Selenese */ public static void assertEquals(String s1, String s2) { assertTrue("Expected \"" + s1 + "\" but saw \"" + s2 + "\" instead", seleniumEquals(s1, s2)); } /** Like JUnit's Assert.assertEquals, but joins the string array with commas, and * handles "regexp:" strings like HTML Selenese */ public static void assertEquals(String s1, String[] s2) { assertEquals(s1, join(s2, ',')); } /** Compares two strings, but handles "regexp:" strings like HTML Selenese * * @param expectedPattern * @param actual * @return true if actual matches the expectedPattern, or false otherwise */ public static boolean seleniumEquals(String expectedPattern, String actual) { if (actual.startsWith("regexp:") || actual.startsWith("regex:") || actual.startsWith("regexpi:") || actual.startsWith("regexi:")) { // swap 'em String tmp = actual; actual = expectedPattern; expectedPattern = tmp; } Boolean b; b = handleRegex("regexp:", expectedPattern, actual, 0); if (b != null) { return b.booleanValue(); } b = handleRegex("regex:", expectedPattern, actual, 0); if (b != null) { return b.booleanValue(); } b = handleRegex("regexpi:", expectedPattern, actual, Pattern.CASE_INSENSITIVE); if (b != null) { return b.booleanValue(); } b = handleRegex("regexi:", expectedPattern, actual, Pattern.CASE_INSENSITIVE); if (b != null) { return b.booleanValue(); } if (expectedPattern.startsWith("exact:")) { String expectedExact = expectedPattern.replaceFirst("exact:", ""); if (!expectedExact.equals(actual)) { System.out.println("expected " + actual + " to match " + expectedPattern); return false; } return true; } String expectedGlob = expectedPattern.replaceFirst("glob:", ""); expectedGlob = expectedGlob.replaceAll("([\\]\\[\\\\{\\}$\\(\\)\\|\\^\\+.])", "\\\\$1"); expectedGlob = expectedGlob.replaceAll("\\*", ".*"); expectedGlob = expectedGlob.replaceAll("\\?", "."); if (!Pattern.compile(expectedGlob, Pattern.DOTALL).matcher(actual).matches()) { System.out.println("expected \"" + actual + "\" to match glob \"" + expectedPattern + "\" (had transformed the glob into regexp \"" + expectedGlob + "\""); return false; } return true; } private static Boolean handleRegex(String prefix, String expectedPattern, String actual, int flags) { if (expectedPattern.startsWith(prefix)) { String expectedRegEx = expectedPattern.replaceFirst(prefix, ".*") + ".*"; Pattern p = Pattern.compile(expectedRegEx, flags); if (!p.matcher(actual).matches()) { System.out.println("expected " + actual + " to match regexp " + expectedPattern); return Boolean.FALSE; } return Boolean.TRUE; } return null; } /** Compares two objects, but handles "regexp:" strings like HTML Selenese * @see #seleniumEquals(String, String) * @return true if actual matches the expectedPattern, or false otherwise */ public static boolean seleniumEquals(Object expected, Object actual) { if (expected instanceof String && actual instanceof String) { return seleniumEquals((String)expected, (String)actual); } return expected.equals(actual); } /** Asserts that two string arrays have identical string contents */ public static void assertEquals(String[] s1, String[] s2) { String comparisonDumpIfNotEqual = verifyEqualsAndReturnComparisonDumpIfNot(s1, s2); if (comparisonDumpIfNotEqual!=null) { throw new AssertionError(comparisonDumpIfNotEqual); } } /** Asserts that two string arrays have identical string contents (fails at the end of the test, during tearDown) */ public void verifyEquals(String[] s1, String[] s2) { String comparisonDumpIfNotEqual = verifyEqualsAndReturnComparisonDumpIfNot(s1, s2); if (comparisonDumpIfNotEqual!=null) { verificationErrors.append(comparisonDumpIfNotEqual); } } private static String verifyEqualsAndReturnComparisonDumpIfNot(String[] s1, String[] s2) { boolean misMatch = false; if (s1.length != s2.length) { misMatch = true; } for (int j = 0; j < s1.length; j++) { if (!seleniumEquals(s1[j], s2[j])) { misMatch = true; break; } } if (misMatch) { return "Expected " + stringArrayToString(s1) + " but saw " + stringArrayToString(s2); } return null; } private static String stringArrayToString(String[] sa) { StringBuffer sb = new StringBuffer("{"); for (int j = 0; j < sa.length; j++) { sb.append(" ") .append("\"") .append(sa[j]) .append("\""); } sb.append(" }"); return sb.toString(); } private static String throwableToString(Throwable t) { StringWriter sw = new StringWriter(); PrintWriter pw = new PrintWriter(sw); t.printStackTrace(pw); return sw.toString(); } public static String join(String[] sa, char c) { StringBuffer sb = new StringBuffer(); for (int j = 0; j < sa.length; j++) { sb.append(sa[j]); if (j < sa.length -1) { sb.append(c); } } return sb.toString(); } /** Like assertNotEquals, but fails at the end of the test (during tearDown) */ public void verifyNotEquals(Object s1, Object s2) { try { assertNotEquals(s1, s2); } catch (AssertionError e) { verificationErrors.append(throwableToString(e)); } } /** Like assertNotEquals, but fails at the end of the test (during tearDown) */ public void verifyNotEquals(boolean s1, boolean s2) { try { assertNotEquals(new Boolean(s1), new Boolean(s2)); } catch (AssertionError e) { verificationErrors.append(throwableToString(e)); } } /** Asserts that two objects are not the same (compares using .equals()) */ public static void assertNotEquals(Object obj1, Object obj2) { if (obj1.equals(obj2)) { fail("did not expect values to be equal (" + obj1.toString() + ")"); } } public static void fail(String message) { throw new AssertionError(message); } static public void assertTrue(String message, boolean condition) { if (!condition) fail(message); } static public void assertTrue(boolean condition) { assertTrue(null, condition); } static public void assertFalse(String message, boolean condition) { assertTrue(message, !condition); } static public void assertFalse(boolean condition) { assertTrue(null, !condition); } /** Asserts that two booleans are not the same */ public static void assertNotEquals(boolean b1, boolean b2) { assertNotEquals(new Boolean(b1), new Boolean(b2)); } /** Sleeps for the specified number of milliseconds */ public void pause(int millisecs) { try { Thread.sleep(millisecs); } catch (InterruptedException e) { } } /** Asserts that there were no verification errors during the current test, failing immediately if any are found */ public void checkForVerificationErrors() { String verificationErrorString = verificationErrors.toString(); clearVerificationErrors(); if (!"".equals(verificationErrorString)) { fail(verificationErrorString); } } /** Clears out the list of verification errors */ public void clearVerificationErrors() { verificationErrors = new StringBuffer(); } /** checks for verification errors and stops the browser */ public void tearDown() throws Exception { try { checkForVerificationErrors(); } finally { if (selenium != null) { selenium.stop(); selenium = null; } } } protected boolean isCaptureScreenShotOnFailure() { return captureScreenShotOnFailure; } protected void setCaptureScreenShotOnFailure(boolean captureScreetShotOnFailure) { this.captureScreenShotOnFailure = captureScreetShotOnFailure; } } PK lC>k [ݎ!!Gcom/thoughtworks/selenium/.svn/text-base/SeleneseTestCase.java.svn-basepackage com.thoughtworks.selenium; import junit.framework.TestCase; /** * Provides a JUnit TestCase base class that implements some handy functionality * for Selenium testing (you are not required to extend this class). * *

This class adds a number of "verify" commands, which are like "assert" commands, * but they don't stop the test when they fail. Instead, verification errors are all * thrown at once during tearDown.

* * @author Nelson Sproul (nsproul@bea.com) Mar 13-06 * @deprecated Please consider updating to junit 4 or above */ @Deprecated public class SeleneseTestCase extends TestCase { private SeleneseTestBase stb = new SeleneseTestBase(); /** Use this object to run all of your selenium tests */ protected Selenium selenium; public SeleneseTestCase() { super(); } public SeleneseTestCase(String name) { super(name); } /** Asserts that there were no verification errors during the current test, failing immediately if any are found */ public void checkForVerificationErrors() { stb.checkForVerificationErrors(); } /** Clears out the list of verification errors */ public void clearVerificationErrors() { stb.clearVerificationErrors(); } /** Returns the body text of the current page */ public String getText() { return stb.getText(); } /** Sleeps for the specified number of milliseconds */ public void pause(int millisecs) { stb.pause(millisecs); } /** Calls this.setUp(null) * @see #setUp(String) */ public void setUp() throws Exception { stb.setUp(); selenium = stb.selenium; } /** * Calls this.setUp with the specified url and a default browser. On Windows, the default browser is *iexplore; otherwise, the default browser is *firefox. * @see #setUp(String, String) * @param url the baseUrl to use for your Selenium tests * @throws Exception * */ public void setUp(String url) throws Exception { stb.setUp(url); selenium = stb.selenium; } /** * Creates a new DefaultSelenium object and starts it using the specified baseUrl and browser string * @param url the baseUrl for your tests * @param browserString the browser to use, e.g. *firefox * @throws Exception */ public void setUp(String url, String browserString) throws Exception { stb.setUp(url, browserString); selenium = stb.selenium; } /** * Creates a new DefaultSelenium object and starts it using the specified baseURL, browser string and port * @param url the baseUrl for your tests * @param browserString the browser to use, e.g. *firefox * @param port the port of Selenium RC * @throws Exception */ public void setUp(String url, String browserString, int port){ stb.setUp(url, browserString, port); selenium = stb.selenium; } /** checks for verification errors and stops the browser */ public void tearDown() throws Exception { stb.tearDown(); } /** Like assertEquals, but fails at the end of the test (during tearDown) */ public void verifyEquals(boolean arg1, boolean arg2) { stb.verifyEquals(arg1, arg2); } /** Like assertEquals, but fails at the end of the test (during tearDown) */ public void verifyEquals(Object s1, Object s2) { stb.verifyEquals(s1, s2); } /** Like assertEquals, but fails at the end of the test (during tearDown) */ public void verifyEquals(String[] s1, String[] s2) { stb.verifyEquals(s1, s2); } /** Like assertFalse, but fails at the end of the test (during tearDown) */ public void verifyFalse(boolean b) { stb.verifyFalse(b); } /** Like assertNotEquals, but fails at the end of the test (during tearDown) */ public void verifyNotEquals(boolean s1, boolean s2) { stb.verifyNotEquals(s1, s2); } /** Like assertNotEquals, but fails at the end of the test (during tearDown) */ public void verifyNotEquals(Object s1, Object s2) { stb.verifyNotEquals(s1, s2); } /** Like assertTrue, but fails at the end of the test (during tearDown) */ public void verifyTrue(boolean b) { stb.verifyTrue(b); } /** Like JUnit's Assert.assertEquals, but knows how to compare string arrays */ public static void assertEquals(Object s1, Object s2) { SeleneseTestBase.assertEquals(s1, s2); } /** Like JUnit's Assert.assertEquals, but handles "regexp:" strings like HTML Selenese */ public static void assertEquals(String s1, String s2) { SeleneseTestBase.assertEquals(s1, s2); } /** Like JUnit's Assert.assertEquals, but joins the string array with commas, and * handles "regexp:" strings like HTML Selenese */ public static void assertEquals(String s1, String[] s2) { SeleneseTestBase.assertEquals(s1, s2); } /** Asserts that two string arrays have identical string contents */ public static void assertEquals(String[] s1, String[] s2) { SeleneseTestBase.assertEquals(s1, s2); } /** Asserts that two booleans are not the same */ public static void assertNotEquals(boolean b1, boolean b2) { SeleneseTestBase.assertNotEquals(b1, b2); } /** Asserts that two objects are not the same (compares using .equals()) */ public static void assertNotEquals(Object obj1, Object obj2) { SeleneseTestBase.assertNotEquals(obj1, obj2); } /** Compares two objects, but handles "regexp:" strings like HTML Selenese * @see #seleniumEquals(String, String) * @return true if actual matches the expectedPattern, or false otherwise */ public static boolean seleniumEquals(Object expected, Object actual) { return SeleneseTestBase.seleniumEquals(expected, actual); } /** Compares two strings, but handles "regexp:" strings like HTML Selenese * * @param expectedPattern * @param actual * @return true if actual matches the expectedPattern, or false otherwise */ public static boolean seleniumEquals(String expected, String actual) { return SeleneseTestBase.seleniumEquals(expected, actual); } /** * @deprecated Use {@link #isCaptureScreenShotOnFailure()} instead */ protected boolean isCaptureScreetShotOnFailure() { return isCaptureScreenShotOnFailure(); } protected boolean isCaptureScreenShotOnFailure() { return stb.isCaptureScreenShotOnFailure(); } protected String runtimeBrowserString() { return stb.runtimeBrowserString(); } /** * @deprecated Use {@link #setCaptureScreenShotOnFailure(boolean)} instead */ protected void setCaptureScreetShotOnFailure(boolean b) { setCaptureScreenShotOnFailure(b); } protected void setCaptureScreenShotOnFailure(boolean b) { stb.setCaptureScreenShotOnFailure(b); } protected void setTestContext() { selenium.setContext(this.getClass().getSimpleName() + "." + getName()); } /** * Runs the bare test sequence, capturing a screenshot if a test fails * @exception Throwable if any exception is thrown */ // @Override public void runBare() throws Throwable { if (!isCaptureScreenShotOnFailure()) { super.runBare(); return; } setUp(); try { runTest(); } catch (Throwable t) { if (selenium != null) { String filename = getName() + ".png"; try { selenium.captureScreenshot(filename); System.err.println("Saved screenshot " + filename); } catch (Exception e) { System.err.println("Couldn't save screenshot " + filename + ": " + e.getMessage()); e.printStackTrace(); } throw t; } } finally { tearDown(); } } public String join(String[] array, char c) { return stb.join(array, c); } } PK lC>bKcom/thoughtworks/selenium/.svn/text-base/SeleneseTestNgHelper.java.svn-basepackage com.thoughtworks.selenium; import org.testng.ITestContext; import org.testng.TestRunner; import org.testng.annotations.AfterMethod; import org.testng.annotations.AfterTest; import org.testng.annotations.BeforeClass; import org.testng.annotations.BeforeMethod; import org.testng.annotations.BeforeSuite; import org.testng.annotations.BeforeTest; import org.testng.annotations.Optional; import org.testng.annotations.Parameters; import org.testng.internal.IResultListener; import java.io.File; import java.lang.reflect.Method; public class SeleneseTestNgHelper extends SeleneseTestBase { private static Selenium staticSelenium; @BeforeTest @Override @Parameters({"selenium.url", "selenium.browser"}) public void setUp(@Optional String url, @Optional String browserString) throws Exception { if (browserString == null) { browserString = runtimeBrowserString(); } super.setUp(url, browserString); staticSelenium = selenium; } @BeforeClass @Parameters({"selenium.restartSession"}) public void getSelenium(@Optional("false") boolean restartSession) { selenium = staticSelenium; if (restartSession) { selenium.stop(); selenium.start(); } } @BeforeMethod public void setTestContext(Method method) { selenium.setContext( method.getDeclaringClass().getSimpleName() + "." + method.getName()); } @BeforeSuite @Parameters({"selenium.host", "selenium.port"}) public void attachScreenshotListener(@Optional("localhost") String host, @Optional("4444") String port, ITestContext context) { if (!"localhost".equals(host)) { return; } Selenium screenshotTaker = new DefaultSelenium(host, Integer.parseInt(port), "", ""); TestRunner tr = (TestRunner) context; File outputDirectory = new File(context.getOutputDirectory()); tr.addListener((IResultListener) new ScreenshotListener(outputDirectory, screenshotTaker)); } @AfterMethod @Override public void checkForVerificationErrors() { super.checkForVerificationErrors(); } @AfterMethod(alwaysRun = true) public void selectDefaultWindow() { if (selenium != null) { selenium.selectWindow("null"); } } @AfterTest(alwaysRun = true) @Override public void tearDown() throws Exception { super.tearDown(); } //@Override static method of super class (which assumes JUnit conventions) public static void assertEquals(Object actual, Object expected) { SeleneseTestBase.assertEquals(expected, actual); } //@Override static method of super class (which assumes JUnit conventions) public static void assertEquals(String actual, String expected) { SeleneseTestBase.assertEquals(expected, actual); } //@Override static method of super class (which assumes JUnit conventions) public static void assertEquals(String actual, String[] expected) { SeleneseTestBase.assertEquals(expected, actual); } //@Override static method of super class (which assumes JUnit conventions) public static void assertEquals(String[] actual, String[] expected) { SeleneseTestBase.assertEquals(expected, actual); } //@Override static method of super class (which assumes JUnit conventions) public static boolean seleniumEquals(Object actual, Object expected) { return SeleneseTestBase.seleniumEquals(expected, actual); } //@Override static method of super class (which assumes JUnit conventions) public static boolean seleniumEquals(String actual, String expected) { return SeleneseTestBase.seleniumEquals(expected, actual); } @Override public void verifyEquals(Object actual, Object expected) { super.verifyEquals(expected, actual); } @Override public void verifyEquals(String[] actual, String[] expected) { super.verifyEquals(expected, actual); } } PK lC>ZZ?com/thoughtworks/selenium/.svn/text-base/Selenium.java.svn-base/* * Copyright 2006 ThoughtWorks, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package com.thoughtworks.selenium; /** Defines an object that runs Selenium commands.

Element Locators

Element Locators tell Selenium which HTML element a command refers to. The format of a locator is:

locatorType=argument

We support the following strategies for locating elements:

  • identifier=id: Select the element with the specified @id attribute. If no match is found, select the first element whose @name attribute is id. (This is normally the default; see below.)
  • id=id: Select the element with the specified @id attribute.
  • name=name: Select the first element with the specified @name attribute.
    • username
    • name=username

    The name may optionally be followed by one or more element-filters, separated from the name by whitespace. If the filterType is not specified, value is assumed.

    • name=flavour value=chocolate
  • dom=javascriptExpression: Find an element by evaluating the specified string. This allows you to traverse the HTML Document Object Model using JavaScript. Note that you must not return a value in this string; simply make it the last expression in the block.
    • dom=document.forms['myForm'].myDropdown
    • dom=document.images[56]
    • dom=function foo() { return document.links[1]; }; foo();
  • xpath=xpathExpression: Locate an element using an XPath expression.
    • xpath=//img[@alt='The image alt text']
    • xpath=//table[@id='table1']//tr[4]/td[2]
    • xpath=//a[contains(@href,'#id1')]
    • xpath=//a[contains(@href,'#id1')]/@class
    • xpath=(//table[@class='stylee'])//th[text()='theHeaderText']/../td
    • xpath=//input[@name='name2' and @value='yes']
    • xpath=//*[text()="right"]
  • link=textPattern: Select the link (anchor) element which contains text matching the specified pattern.
    • link=The link text
  • css=cssSelectorSyntax: Select the element using css selectors. Please refer to CSS2 selectors, CSS3 selectors for more information. You can also check the TestCssLocators test in the selenium test suite for an example of usage, which is included in the downloaded selenium core package.
    • css=a[href="#id3"]
    • css=span#firstChild + span

    Currently the css selector locator supports all css1, css2 and css3 selectors except namespace in css3, some pseudo classes(:nth-of-type, :nth-last-of-type, :first-of-type, :last-of-type, :only-of-type, :visited, :hover, :active, :focus, :indeterminate) and pseudo elements(::first-line, ::first-letter, ::selection, ::before, ::after).

  • ui=uiSpecifierString: Locate an element by resolving the UI specifier string to another locator, and evaluating it. See the Selenium UI-Element Reference for more details.
    • ui=loginPages::loginButton()
    • ui=settingsPages::toggle(label=Hide Email)
    • ui=forumPages::postBody(index=2)//a[2]

Without an explicit locator prefix, Selenium uses the following default strategies:

  • dom, for locators starting with "document."
  • xpath, for locators starting with "//"
  • identifier, otherwise

Element Filters

Element filters can be used with a locator to refine a list of candidate elements. They are currently used only in the 'name' element-locator.

Filters look much like locators, ie.

filterType=argument

Supported element-filters are:

value=valuePattern

Matches elements based on their values. This is particularly useful for refining a list of similarly-named toggle-buttons.

index=index

Selects a single element based on its position in the list (offset from zero).

String-match Patterns

Various Pattern syntaxes are available for matching string values:

  • glob:pattern: Match a string against a "glob" (aka "wildmat") pattern. "Glob" is a kind of limited regular-expression syntax typically used in command-line shells. In a glob pattern, "*" represents any sequence of characters, and "?" represents any single character. Glob patterns match against the entire string.
  • regexp:regexp: Match a string using a regular-expression. The full power of JavaScript regular-expressions is available.
  • regexpi:regexpi: Match a string using a case-insensitive regular-expression.
  • exact:string: Match a string exactly, verbatim, without any of that fancy wildcard stuff.

If no pattern prefix is specified, Selenium assumes that it's a "glob" pattern.

For commands that return multiple values (such as verifySelectOptions), the string being matched is a comma-separated list of the return values, where both commas and backslashes in the values are backslash-escaped. When providing a pattern, the optional matching syntax (i.e. glob, regexp, etc.) is specified once, as usual, at the beginning of the pattern.

*/ public interface Selenium { /** Sets the per-session extension Javascript */ void setExtensionJs(String extensionJs); /** Launches the browser with a new Selenium session */ void start(); /** Starts a new Selenium testing session with a String, representing a configuration */ public void start(String optionsString); /** Starts a new Selenium testing session with a configuration options object */ public void start(Object optionsObject); /** Ends the test session, killing the browser */ void stop(); /** Shows in the RemoteRunner a banner for the current test * The banner is 'classname : methodname' where those two are derived from the caller * The method name will be unCamelCased with the insertion of spaces at word boundaries */ void showContextualBanner(); /** Shows in the RemoteRunner a banner for the current test * The banner is 'classname : methodname' * The method name will be unCamelCased with the insertion of spaces at word boundaries */ void showContextualBanner(String className, String methodName); /** Clicks on a link, button, checkbox or radio button. If the click action causes a new page to load (like a link usually does), call waitForPageToLoad. @param locator an element locator */ void click(String locator); /** Double clicks on a link, button, checkbox or radio button. If the double click action causes a new page to load (like a link usually does), call waitForPageToLoad. @param locator an element locator */ void doubleClick(String locator); /** Simulates opening the context menu for the specified element (as might happen if the user "right-clicked" on the element). @param locator an element locator */ void contextMenu(String locator); /** Clicks on a link, button, checkbox or radio button. If the click action causes a new page to load (like a link usually does), call waitForPageToLoad. @param locator an element locator @param coordString specifies the x,y position (i.e. - 10,20) of the mouse event relative to the element returned by the locator. */ void clickAt(String locator,String coordString); /** Doubleclicks on a link, button, checkbox or radio button. If the action causes a new page to load (like a link usually does), call waitForPageToLoad. @param locator an element locator @param coordString specifies the x,y position (i.e. - 10,20) of the mouse event relative to the element returned by the locator. */ void doubleClickAt(String locator,String coordString); /** Simulates opening the context menu for the specified element (as might happen if the user "right-clicked" on the element). @param locator an element locator @param coordString specifies the x,y position (i.e. - 10,20) of the mouse event relative to the element returned by the locator. */ void contextMenuAt(String locator,String coordString); /** Explicitly simulate an event, to trigger the corresponding "onevent" handler. @param locator an element locator @param eventName the event name, e.g. "focus" or "blur" */ void fireEvent(String locator,String eventName); /** Move the focus to the specified element; for example, if the element is an input field, move the cursor to that field. @param locator an element locator */ void focus(String locator); /** Simulates a user pressing and releasing a key. @param locator an element locator @param keySequence Either be a string("\" followed by the numeric keycode of the key to be pressed, normally the ASCII value of that key), or a single character. For example: "w", "\119". */ void keyPress(String locator,String keySequence); /** Press the shift key and hold it down until doShiftUp() is called or a new page is loaded. */ void shiftKeyDown(); /** Release the shift key. */ void shiftKeyUp(); /** Press the meta key and hold it down until doMetaUp() is called or a new page is loaded. */ void metaKeyDown(); /** Release the meta key. */ void metaKeyUp(); /** Press the alt key and hold it down until doAltUp() is called or a new page is loaded. */ void altKeyDown(); /** Release the alt key. */ void altKeyUp(); /** Press the control key and hold it down until doControlUp() is called or a new page is loaded. */ void controlKeyDown(); /** Release the control key. */ void controlKeyUp(); /** Simulates a user pressing a key (without releasing it yet). @param locator an element locator @param keySequence Either be a string("\" followed by the numeric keycode of the key to be pressed, normally the ASCII value of that key), or a single character. For example: "w", "\119". */ void keyDown(String locator,String keySequence); /** Simulates a user releasing a key. @param locator an element locator @param keySequence Either be a string("\" followed by the numeric keycode of the key to be pressed, normally the ASCII value of that key), or a single character. For example: "w", "\119". */ void keyUp(String locator,String keySequence); /** Simulates a user hovering a mouse over the specified element. @param locator an element locator */ void mouseOver(String locator); /** Simulates a user moving the mouse pointer away from the specified element. @param locator an element locator */ void mouseOut(String locator); /** Simulates a user pressing the left mouse button (without releasing it yet) on the specified element. @param locator an element locator */ void mouseDown(String locator); /** Simulates a user pressing the right mouse button (without releasing it yet) on the specified element. @param locator an element locator */ void mouseDownRight(String locator); /** Simulates a user pressing the left mouse button (without releasing it yet) at the specified location. @param locator an element locator @param coordString specifies the x,y position (i.e. - 10,20) of the mouse event relative to the element returned by the locator. */ void mouseDownAt(String locator,String coordString); /** Simulates a user pressing the right mouse button (without releasing it yet) at the specified location. @param locator an element locator @param coordString specifies the x,y position (i.e. - 10,20) of the mouse event relative to the element returned by the locator. */ void mouseDownRightAt(String locator,String coordString); /** Simulates the event that occurs when the user releases the mouse button (i.e., stops holding the button down) on the specified element. @param locator an element locator */ void mouseUp(String locator); /** Simulates the event that occurs when the user releases the right mouse button (i.e., stops holding the button down) on the specified element. @param locator an element locator */ void mouseUpRight(String locator); /** Simulates the event that occurs when the user releases the mouse button (i.e., stops holding the button down) at the specified location. @param locator an element locator @param coordString specifies the x,y position (i.e. - 10,20) of the mouse event relative to the element returned by the locator. */ void mouseUpAt(String locator,String coordString); /** Simulates the event that occurs when the user releases the right mouse button (i.e., stops holding the button down) at the specified location. @param locator an element locator @param coordString specifies the x,y position (i.e. - 10,20) of the mouse event relative to the element returned by the locator. */ void mouseUpRightAt(String locator,String coordString); /** Simulates a user pressing the mouse button (without releasing it yet) on the specified element. @param locator an element locator */ void mouseMove(String locator); /** Simulates a user pressing the mouse button (without releasing it yet) on the specified element. @param locator an element locator @param coordString specifies the x,y position (i.e. - 10,20) of the mouse event relative to the element returned by the locator. */ void mouseMoveAt(String locator,String coordString); /** Sets the value of an input field, as though you typed it in.

Can also be used to set the value of combo boxes, check boxes, etc. In these cases, value should be the value of the option selected, not the visible text.

@param locator an element locator @param value the value to type */ void type(String locator,String value); /** Simulates keystroke events on the specified element, as though you typed the value key-by-key.

This is a convenience method for calling keyDown, keyUp, keyPress for every character in the specified string; this is useful for dynamic UI widgets (like auto-completing combo boxes) that require explicit key events.

Unlike the simple "type" command, which forces the specified value into the page directly, this command may or may not have any visible effect, even in cases where typing keys would normally have a visible effect. For example, if you use "typeKeys" on a form element, you may or may not see the results of what you typed in the field.

In some cases, you may need to use the simple "type" command to set the value of the field and then the "typeKeys" command to send the keystroke events corresponding to what you just typed.

@param locator an element locator @param value the value to type */ void typeKeys(String locator,String value); /** Set execution speed (i.e., set the millisecond length of a delay which will follow each selenium operation). By default, there is no such delay, i.e., the delay is 0 milliseconds. @param value the number of milliseconds to pause after operation */ void setSpeed(String value); /** Get execution speed (i.e., get the millisecond length of the delay following each selenium operation). By default, there is no such delay, i.e., the delay is 0 milliseconds. See also setSpeed. @return the execution speed in milliseconds. */ String getSpeed(); /** Get RC logs associated with this session. @return the remote control logs associated with this session */ String getLog(); /** Check a toggle-button (checkbox/radio) @param locator an element locator */ void check(String locator); /** Uncheck a toggle-button (checkbox/radio) @param locator an element locator */ void uncheck(String locator); /** Select an option from a drop-down using an option locator.

Option locators provide different ways of specifying options of an HTML Select element (e.g. for selecting a specific option, or for asserting that the selected option satisfies a specification). There are several forms of Select Option Locator.

  • label=labelPattern: matches options based on their labels, i.e. the visible text. (This is the default.)
    • label=regexp:^[Oo]ther
  • value=valuePattern: matches options based on their values.
    • value=other
  • id=id: matches options based on their ids.
    • id=option1
  • index=index: matches an option based on its index (offset from zero).
    • index=2

If no option locator prefix is provided, the default behaviour is to match on label.

@param selectLocator an element locator identifying a drop-down menu @param optionLocator an option locator (a label by default) */ void select(String selectLocator,String optionLocator); /** Add a selection to the set of selected options in a multi-select element using an option locator. @see #doSelect for details of option locators @param locator an element locator identifying a multi-select box @param optionLocator an option locator (a label by default) */ void addSelection(String locator,String optionLocator); /** Remove a selection from the set of selected options in a multi-select element using an option locator. @see #doSelect for details of option locators @param locator an element locator identifying a multi-select box @param optionLocator an option locator (a label by default) */ void removeSelection(String locator,String optionLocator); /** Unselects all of the selected options in a multi-select element. @param locator an element locator identifying a multi-select box */ void removeAllSelections(String locator); /** Submit the specified form. This is particularly useful for forms without submit buttons, e.g. single-input "Search" forms. @param formLocator an element locator for the form you want to submit */ void submit(String formLocator); /** Opens an URL in the test frame. This accepts both relative and absolute URLs. The "open" command waits for the page to load before proceeding, ie. the "AndWait" suffix is implicit. Note: The URL must be on the same domain as the runner HTML due to security restrictions in the browser (Same Origin Policy). If you need to open an URL on another domain, use the Selenium Server to start a new browser session on that domain. @param url the URL to open; may be relative or absolute @param ignoreResponseCode if set to true, ignores http response code. */ void open(String url, String ignoreResponseCode); /** Opens an URL in the test frame. This accepts both relative and absolute URLs. The "open" command waits for the page to load before proceeding, ie. the "AndWait" suffix is implicit. Note: The URL must be on the same domain as the runner HTML due to security restrictions in the browser (Same Origin Policy). If you need to open an URL on another domain, use the Selenium Server to start a new browser session on that domain. @param url the URL to open; may be relative or absolute */ void open(String url); /** Opens a popup window (if a window with that ID isn't already open). After opening the window, you'll need to select it using the selectWindow command.

This command can also be a useful workaround for bug SEL-339. In some cases, Selenium will be unable to intercept a call to window.open (if the call occurs during or before the "onLoad" event, for example). In those cases, you can force Selenium to notice the open window's name by using the Selenium openWindow command, using an empty (blank) url, like this: openWindow("", "myFunnyWindow").

@param url the URL to open, which can be blank @param windowID the JavaScript window ID of the window to select */ void openWindow(String url,String windowID); /** Selects a popup window using a window locator; once a popup window has been selected, all commands go to that window. To select the main window again, use null as the target.

Window locators provide different ways of specifying the window object: by title, by internal JavaScript "name," or by JavaScript variable.

  • title=My Special Window: Finds the window using the text that appears in the title bar. Be careful; two windows can share the same title. If that happens, this locator will just pick one.
  • name=myWindow: Finds the window using its internal JavaScript "name" property. This is the second parameter "windowName" passed to the JavaScript method window.open(url, windowName, windowFeatures, replaceFlag) (which Selenium intercepts).
  • var=variableName: Some pop-up windows are unnamed (anonymous), but are associated with a JavaScript variable name in the current application window, e.g. "window.foo = window.open(url);". In those cases, you can open the window using "var=foo".

If no window locator prefix is provided, we'll try to guess what you mean like this:

1.) if windowID is null, (or the string "null") then it is assumed the user is referring to the original window instantiated by the browser).

2.) if the value of the "windowID" parameter is a JavaScript variable name in the current application window, then it is assumed that this variable contains the return value from a call to the JavaScript window.open() method.

3.) Otherwise, selenium looks in a hash it maintains that maps string names to window "names".

4.) If that fails, we'll try looping over all of the known windows to try to find the appropriate "title". Since "title" is not necessarily unique, this may have unexpected behavior.

If you're having trouble figuring out the name of a window that you want to manipulate, look at the Selenium log messages which identify the names of windows created via window.open (and therefore intercepted by Selenium). You will see messages like the following for each window as it is opened:

debug: window.open call intercepted; window ID (which you can use with selectWindow()) is "myNewWindow"

In some cases, Selenium will be unable to intercept a call to window.open (if the call occurs during or before the "onLoad" event, for example). (This is bug SEL-339.) In those cases, you can force Selenium to notice the open window's name by using the Selenium openWindow command, using an empty (blank) url, like this: openWindow("", "myFunnyWindow").

@param windowID the JavaScript window ID of the window to select */ void selectWindow(String windowID); /** Simplifies the process of selecting a popup window (and does not offer functionality beyond what selectWindow() already provides).
  • If windowID is either not specified, or specified as "null", the first non-top window is selected. The top window is the one that would be selected by selectWindow() without providing a windowID . This should not be used when more than one popup window is in play.
  • Otherwise, the window will be looked up considering windowID as the following in order: 1) the "name" of the window, as specified to window.open(); 2) a javascript variable which is a reference to a window; and 3) the title of the window. This is the same ordered lookup performed by selectWindow .
@param windowID an identifier for the popup window, which can take on a number of different meanings */ void selectPopUp(String windowID); /** Selects the main window. Functionally equivalent to using selectWindow() and specifying no value for windowID. */ void deselectPopUp(); /** Selects a frame within the current window. (You may invoke this command multiple times to select nested frames.) To select the parent frame, use "relative=parent" as a locator; to select the top frame, use "relative=top". You can also select a frame by its 0-based index number; select the first frame with "index=0", or the third frame with "index=2".

You may also use a DOM expression to identify the frame you want directly, like this: dom=frames["main"].frames["subframe"]

@param locator an element locator identifying a frame or iframe */ void selectFrame(String locator); /** Determine whether current/locator identify the frame containing this running code.

This is useful in proxy injection mode, where this code runs in every browser frame and window, and sometimes the selenium server needs to identify the "current" frame. In this case, when the test calls selectFrame, this routine is called for each frame to figure out which one has been selected. The selected frame will return true, while all others will return false.

@param currentFrameString starting frame @param target new frame (which might be relative to the current one) @return true if the new frame is this code's window */ boolean getWhetherThisFrameMatchFrameExpression(String currentFrameString,String target); /** Determine whether currentWindowString plus target identify the window containing this running code.

This is useful in proxy injection mode, where this code runs in every browser frame and window, and sometimes the selenium server needs to identify the "current" window. In this case, when the test calls selectWindow, this routine is called for each window to figure out which one has been selected. The selected window will return true, while all others will return false.

@param currentWindowString starting window @param target new window (which might be relative to the current one, e.g., "_parent") @return true if the new window is this code's window */ boolean getWhetherThisWindowMatchWindowExpression(String currentWindowString,String target); /** Waits for a popup window to appear and load up. @param windowID the JavaScript window "name" of the window that will appear (not the text of the title bar) If unspecified, or specified as "null", this command will wait for the first non-top window to appear (don't rely on this if you are working with multiple popups simultaneously). @param timeout a timeout in milliseconds, after which the action will return with an error. If this value is not specified, the default Selenium timeout will be used. See the setTimeout() command. */ void waitForPopUp(String windowID,String timeout); /**

By default, Selenium's overridden window.confirm() function will return true, as if the user had manually clicked OK; after running this command, the next call to confirm() will return false, as if the user had clicked Cancel. Selenium will then resume using the default behavior for future confirmations, automatically returning true (OK) unless/until you explicitly call this command for each confirmation.

Take note - every time a confirmation comes up, you must consume it with a corresponding getConfirmation, or else the next selenium operation will fail.

*/ void chooseCancelOnNextConfirmation(); /**

Undo the effect of calling chooseCancelOnNextConfirmation. Note that Selenium's overridden window.confirm() function will normally automatically return true, as if the user had manually clicked OK, so you shouldn't need to use this command unless for some reason you need to change your mind prior to the next confirmation. After any confirmation, Selenium will resume using the default behavior for future confirmations, automatically returning true (OK) unless/until you explicitly call chooseCancelOnNextConfirmation for each confirmation.

Take note - every time a confirmation comes up, you must consume it with a corresponding getConfirmation, or else the next selenium operation will fail.

*/ void chooseOkOnNextConfirmation(); /** Instructs Selenium to return the specified answer string in response to the next JavaScript prompt [window.prompt()]. @param answer the answer to give in response to the prompt pop-up */ void answerOnNextPrompt(String answer); /** Simulates the user clicking the "back" button on their browser. */ void goBack(); /** Simulates the user clicking the "Refresh" button on their browser. */ void refresh(); /** Simulates the user clicking the "close" button in the titlebar of a popup window or tab. */ void close(); /** Has an alert occurred?

This function never throws an exception

@return true if there is an alert */ boolean isAlertPresent(); /** Has a prompt occurred?

This function never throws an exception

@return true if there is a pending prompt */ boolean isPromptPresent(); /** Has confirm() been called?

This function never throws an exception

@return true if there is a pending confirmation */ boolean isConfirmationPresent(); /** Retrieves the message of a JavaScript alert generated during the previous action, or fail if there were no alerts.

Getting an alert has the same effect as manually clicking OK. If an alert is generated but you do not consume it with getAlert, the next Selenium action will fail.

Under Selenium, JavaScript alerts will NOT pop up a visible alert dialog.

Selenium does NOT support JavaScript alerts that are generated in a page's onload() event handler. In this case a visible dialog WILL be generated and Selenium will hang until someone manually clicks OK.

@return The message of the most recent JavaScript alert */ String getAlert(); /** Retrieves the message of a JavaScript confirmation dialog generated during the previous action.

By default, the confirm function will return true, having the same effect as manually clicking OK. This can be changed by prior execution of the chooseCancelOnNextConfirmation command.

If an confirmation is generated but you do not consume it with getConfirmation, the next Selenium action will fail.

NOTE: under Selenium, JavaScript confirmations will NOT pop up a visible dialog.

NOTE: Selenium does NOT support JavaScript confirmations that are generated in a page's onload() event handler. In this case a visible dialog WILL be generated and Selenium will hang until you manually click OK.

@return the message of the most recent JavaScript confirmation dialog */ String getConfirmation(); /** Retrieves the message of a JavaScript question prompt dialog generated during the previous action.

Successful handling of the prompt requires prior execution of the answerOnNextPrompt command. If a prompt is generated but you do not get/verify it, the next Selenium action will fail.

NOTE: under Selenium, JavaScript prompts will NOT pop up a visible dialog.

NOTE: Selenium does NOT support JavaScript prompts that are generated in a page's onload() event handler. In this case a visible dialog WILL be generated and Selenium will hang until someone manually clicks OK.

@return the message of the most recent JavaScript question prompt */ String getPrompt(); /** Gets the absolute URL of the current page. @return the absolute URL of the current page */ String getLocation(); /** Gets the title of the current page. @return the title of the current page */ String getTitle(); /** Gets the entire text of the page. @return the entire text of the page */ String getBodyText(); /** Gets the (whitespace-trimmed) value of an input field (or anything else with a value parameter). For checkbox/radio elements, the value will be "on" or "off" depending on whether the element is checked or not. @param locator an element locator @return the element value, or "on/off" for checkbox/radio elements */ String getValue(String locator); /** Gets the text of an element. This works for any element that contains text. This command uses either the textContent (Mozilla-like browsers) or the innerText (IE-like browsers) of the element, which is the rendered text shown to the user. @param locator an element locator @return the text of the element */ String getText(String locator); /** Briefly changes the backgroundColor of the specified element yellow. Useful for debugging. @param locator an element locator */ void highlight(String locator); /** Gets the result of evaluating the specified JavaScript snippet. The snippet may have multiple lines, but only the result of the last line will be returned.

Note that, by default, the snippet will run in the context of the "selenium" object itself, so this will refer to the Selenium object. Use window to refer to the window of your application, e.g. window.document.getElementById('foo')

If you need to use a locator to refer to a single element in your application page, you can use this.browserbot.findElement("id=foo") where "id=foo" is your locator.

@param script the JavaScript snippet to run @return the results of evaluating the snippet */ String getEval(String script); /** Gets whether a toggle-button (checkbox/radio) is checked. Fails if the specified element doesn't exist or isn't a toggle-button. @param locator an element locator pointing to a checkbox or radio button @return true if the checkbox is checked, false otherwise */ boolean isChecked(String locator); /** Gets the text from a cell of a table. The cellAddress syntax tableLocator.row.column, where row and column start at 0. @param tableCellAddress a cell address, e.g. "foo.1.4" @return the text from the specified cell */ String getTable(String tableCellAddress); /** Gets all option labels (visible text) for selected options in the specified select or multi-select element. @param selectLocator an element locator identifying a drop-down menu @return an array of all selected option labels in the specified select drop-down */ String[] getSelectedLabels(String selectLocator); /** Gets option label (visible text) for selected option in the specified select element. @param selectLocator an element locator identifying a drop-down menu @return the selected option label in the specified select drop-down */ String getSelectedLabel(String selectLocator); /** Gets all option values (value attributes) for selected options in the specified select or multi-select element. @param selectLocator an element locator identifying a drop-down menu @return an array of all selected option values in the specified select drop-down */ String[] getSelectedValues(String selectLocator); /** Gets option value (value attribute) for selected option in the specified select element. @param selectLocator an element locator identifying a drop-down menu @return the selected option value in the specified select drop-down */ String getSelectedValue(String selectLocator); /** Gets all option indexes (option number, starting at 0) for selected options in the specified select or multi-select element. @param selectLocator an element locator identifying a drop-down menu @return an array of all selected option indexes in the specified select drop-down */ String[] getSelectedIndexes(String selectLocator); /** Gets option index (option number, starting at 0) for selected option in the specified select element. @param selectLocator an element locator identifying a drop-down menu @return the selected option index in the specified select drop-down */ String getSelectedIndex(String selectLocator); /** Gets all option element IDs for selected options in the specified select or multi-select element. @param selectLocator an element locator identifying a drop-down menu @return an array of all selected option IDs in the specified select drop-down */ String[] getSelectedIds(String selectLocator); /** Gets option element ID for selected option in the specified select element. @param selectLocator an element locator identifying a drop-down menu @return the selected option ID in the specified select drop-down */ String getSelectedId(String selectLocator); /** Determines whether some option in a drop-down menu is selected. @param selectLocator an element locator identifying a drop-down menu @return true if some option has been selected, false otherwise */ boolean isSomethingSelected(String selectLocator); /** Gets all option labels in the specified select drop-down. @param selectLocator an element locator identifying a drop-down menu @return an array of all option labels in the specified select drop-down */ String[] getSelectOptions(String selectLocator); /** Gets the value of an element attribute. The value of the attribute may differ across browsers (this is the case for the "style" attribute, for example). @param attributeLocator an element locator followed by an @ sign and then the name of the attribute, e.g. "foo@bar" @return the value of the specified attribute */ String getAttribute(String attributeLocator); /** Verifies that the specified text pattern appears somewhere on the rendered page shown to the user. @param pattern a pattern to match with the text of the page @return true if the pattern matches the text, false otherwise */ boolean isTextPresent(String pattern); /** Verifies that the specified element is somewhere on the page. @param locator an element locator @return true if the element is present, false otherwise */ boolean isElementPresent(String locator); /** Determines if the specified element is visible. An element can be rendered invisible by setting the CSS "visibility" property to "hidden", or the "display" property to "none", either for the element itself or one if its ancestors. This method will fail if the element is not present. @param locator an element locator @return true if the specified element is visible, false otherwise */ boolean isVisible(String locator); /** Determines whether the specified input element is editable, ie hasn't been disabled. This method will fail if the specified element isn't an input element. @param locator an element locator @return true if the input element is editable, false otherwise */ boolean isEditable(String locator); /** Returns the IDs of all buttons on the page.

If a given button has no ID, it will appear as "" in this array.

@return the IDs of all buttons on the page */ String[] getAllButtons(); /** Returns the IDs of all links on the page.

If a given link has no ID, it will appear as "" in this array.

@return the IDs of all links on the page */ String[] getAllLinks(); /** Returns the IDs of all input fields on the page.

If a given field has no ID, it will appear as "" in this array.

@return the IDs of all field on the page */ String[] getAllFields(); /** Returns every instance of some attribute from all known windows. @param attributeName name of an attribute on the windows @return the set of values of this attribute from all known windows. */ String[] getAttributeFromAllWindows(String attributeName); /** deprecated - use dragAndDrop instead @param locator an element locator @param movementsString offset in pixels from the current location to which the element should be moved, e.g., "+70,-300" */ void dragdrop(String locator,String movementsString); /** Configure the number of pixels between "mousemove" events during dragAndDrop commands (default=10).

Setting this value to 0 means that we'll send a "mousemove" event to every single pixel in between the start location and the end location; that can be very slow, and may cause some browsers to force the JavaScript to timeout.

If the mouse speed is greater than the distance between the two dragged objects, we'll just send one "mousemove" at the start location and then one final one at the end location.

@param pixels the number of pixels between "mousemove" events */ void setMouseSpeed(String pixels); /** Returns the number of pixels between "mousemove" events during dragAndDrop commands (default=10). @return the number of pixels between "mousemove" events during dragAndDrop commands (default=10) */ Number getMouseSpeed(); /** Drags an element a certain distance and then drops it @param locator an element locator @param movementsString offset in pixels from the current location to which the element should be moved, e.g., "+70,-300" */ void dragAndDrop(String locator,String movementsString); /** Drags an element and drops it on another element @param locatorOfObjectToBeDragged an element to be dragged @param locatorOfDragDestinationObject an element whose location (i.e., whose center-most pixel) will be the point where locatorOfObjectToBeDragged is dropped */ void dragAndDropToObject(String locatorOfObjectToBeDragged,String locatorOfDragDestinationObject); /** Gives focus to the currently selected window */ void windowFocus(); /** Resize currently selected window to take up the entire screen */ void windowMaximize(); /** Returns the IDs of all windows that the browser knows about. @return the IDs of all windows that the browser knows about. */ String[] getAllWindowIds(); /** Returns the names of all windows that the browser knows about. @return the names of all windows that the browser knows about. */ String[] getAllWindowNames(); /** Returns the titles of all windows that the browser knows about. @return the titles of all windows that the browser knows about. */ String[] getAllWindowTitles(); /** Returns the entire HTML source between the opening and closing "html" tags. @return the entire HTML source */ String getHtmlSource(); /** Moves the text cursor to the specified position in the given input element or textarea. This method will fail if the specified element isn't an input element or textarea. @param locator an element locator pointing to an input element or textarea @param position the numerical position of the cursor in the field; position should be 0 to move the position to the beginning of the field. You can also set the cursor to -1 to move it to the end of the field. */ void setCursorPosition(String locator,String position); /** Get the relative index of an element to its parent (starting from 0). The comment node and empty text node will be ignored. @param locator an element locator pointing to an element @return of relative index of the element to its parent (starting from 0) */ Number getElementIndex(String locator); /** Check if these two elements have same parent and are ordered siblings in the DOM. Two same elements will not be considered ordered. @param locator1 an element locator pointing to the first element @param locator2 an element locator pointing to the second element @return true if element1 is the previous sibling of element2, false otherwise */ boolean isOrdered(String locator1,String locator2); /** Retrieves the horizontal position of an element @param locator an element locator pointing to an element OR an element itself @return of pixels from the edge of the frame. */ Number getElementPositionLeft(String locator); /** Retrieves the vertical position of an element @param locator an element locator pointing to an element OR an element itself @return of pixels from the edge of the frame. */ Number getElementPositionTop(String locator); /** Retrieves the width of an element @param locator an element locator pointing to an element @return width of an element in pixels */ Number getElementWidth(String locator); /** Retrieves the height of an element @param locator an element locator pointing to an element @return height of an element in pixels */ Number getElementHeight(String locator); /** Retrieves the text cursor position in the given input element or textarea; beware, this may not work perfectly on all browsers.

Specifically, if the cursor/selection has been cleared by JavaScript, this command will tend to return the position of the last location of the cursor, even though the cursor is now gone from the page. This is filed as SEL-243.

This method will fail if the specified element isn't an input element or textarea, or there is no cursor in the element. @param locator an element locator pointing to an input element or textarea @return the numerical position of the cursor in the field */ Number getCursorPosition(String locator); /** Returns the specified expression.

This is useful because of JavaScript preprocessing. It is used to generate commands like assertExpression and waitForExpression.

@param expression the value to return @return the value passed in */ String getExpression(String expression); /** Returns the number of nodes that match the specified xpath, eg. "//table" would give the number of tables. @param xpath the xpath expression to evaluate. do NOT wrap this expression in a 'count()' function; we will do that for you. @return the number of nodes that match the specified xpath */ Number getXpathCount(String xpath); /** Returns the number of nodes that match the specified css selector, eg. "css=table" would give the number of tables. @param css the css selector to evaluate. do NOT wrap this expression in a 'count()' function; we will do that for you. @return the number of nodes that match the specified selector */ Number getCssCount(String css); /** Temporarily sets the "id" attribute of the specified element, so you can locate it in the future using its ID rather than a slow/complicated XPath. This ID will disappear once the page is reloaded. @param locator an element locator pointing to an element @param identifier a string to be used as the ID of the specified element */ void assignId(String locator,String identifier); /** Specifies whether Selenium should use the native in-browser implementation of XPath (if any native version is available); if you pass "false" to this function, we will always use our pure-JavaScript xpath library. Using the pure-JS xpath library can improve the consistency of xpath element locators between different browser vendors, but the pure-JS version is much slower than the native implementations. @param allow boolean, true means we'll prefer to use native XPath; false means we'll only use JS XPath */ void allowNativeXpath(String allow); /** Specifies whether Selenium will ignore xpath attributes that have no value, i.e. are the empty string, when using the non-native xpath evaluation engine. You'd want to do this for performance reasons in IE. However, this could break certain xpaths, for example an xpath that looks for an attribute whose value is NOT the empty string. The hope is that such xpaths are relatively rare, but the user should have the option of using them. Note that this only influences xpath evaluation when using the ajaxslt engine (i.e. not "javascript-xpath"). @param ignore boolean, true means we'll ignore attributes without value at the expense of xpath "correctness"; false means we'll sacrifice speed for correctness. */ void ignoreAttributesWithoutValue(String ignore); /** Runs the specified JavaScript snippet repeatedly until it evaluates to "true". The snippet may have multiple lines, but only the result of the last line will be considered.

Note that, by default, the snippet will be run in the runner's test window, not in the window of your application. To get the window of your application, you can use the JavaScript snippet selenium.browserbot.getCurrentWindow(), and then run your JavaScript in there

@param script the JavaScript snippet to run @param timeout a timeout in milliseconds, after which this command will return with an error */ void waitForCondition(String script,String timeout); /** Specifies the amount of time that Selenium will wait for actions to complete.

Actions that require waiting include "open" and the "waitFor*" actions.

The default timeout is 30 seconds. @param timeout a timeout in milliseconds, after which the action will return with an error */ void setTimeout(String timeout); /** Waits for a new page to load.

You can use this command instead of the "AndWait" suffixes, "clickAndWait", "selectAndWait", "typeAndWait" etc. (which are only available in the JS API).

Selenium constantly keeps track of new pages loading, and sets a "newPageLoaded" flag when it first notices a page load. Running any other Selenium command after turns the flag to false. Hence, if you want to wait for a page to load, you must wait immediately after a Selenium command that caused a page-load.

@param timeout a timeout in milliseconds, after which this command will return with an error */ void waitForPageToLoad(String timeout); /** Waits for a new frame to load.

Selenium constantly keeps track of new pages and frames loading, and sets a "newPageLoaded" flag when it first notices a page load.

See waitForPageToLoad for more information. @param frameAddress FrameAddress from the server side @param timeout a timeout in milliseconds, after which this command will return with an error */ void waitForFrameToLoad(String frameAddress,String timeout); /** Return all cookies of the current page under test. @return all cookies of the current page under test */ String getCookie(); /** Returns the value of the cookie with the specified name, or throws an error if the cookie is not present. @param name the name of the cookie @return the value of the cookie */ String getCookieByName(String name); /** Returns true if a cookie with the specified name is present, or false otherwise. @param name the name of the cookie @return true if a cookie with the specified name is present, or false otherwise. */ boolean isCookiePresent(String name); /** Create a new cookie whose path and domain are same with those of current page under test, unless you specified a path for this cookie explicitly. @param nameValuePair name and value of the cookie in a format "name=value" @param optionsString options for the cookie. Currently supported options include 'path', 'max_age' and 'domain'. the optionsString's format is "path=/path/, max_age=60, domain=.foo.com". The order of options are irrelevant, the unit of the value of 'max_age' is second. Note that specifying a domain that isn't a subset of the current domain will usually fail. */ void createCookie(String nameValuePair,String optionsString); /** Delete a named cookie with specified path and domain. Be careful; to delete a cookie, you need to delete it using the exact same path and domain that were used to create the cookie. If the path is wrong, or the domain is wrong, the cookie simply won't be deleted. Also note that specifying a domain that isn't a subset of the current domain will usually fail. Since there's no way to discover at runtime the original path and domain of a given cookie, we've added an option called 'recurse' to try all sub-domains of the current domain with all paths that are a subset of the current path. Beware; this option can be slow. In big-O notation, it operates in O(n*m) time, where n is the number of dots in the domain name and m is the number of slashes in the path. @param name the name of the cookie to be deleted @param optionsString options for the cookie. Currently supported options include 'path', 'domain' and 'recurse.' The optionsString's format is "path=/path/, domain=.foo.com, recurse=true". The order of options are irrelevant. Note that specifying a domain that isn't a subset of the current domain will usually fail. */ void deleteCookie(String name,String optionsString); /** Calls deleteCookie with recurse=true on all cookies visible to the current page. As noted on the documentation for deleteCookie, recurse=true can be much slower than simply deleting the cookies using a known domain/path. */ void deleteAllVisibleCookies(); /** Sets the threshold for browser-side logging messages; log messages beneath this threshold will be discarded. Valid logLevel strings are: "debug", "info", "warn", "error" or "off". To see the browser logs, you need to either show the log window in GUI mode, or enable browser-side logging in Selenium RC. @param logLevel one of the following: "debug", "info", "warn", "error" or "off" */ void setBrowserLogLevel(String logLevel); /** Creates a new "script" tag in the body of the current test window, and adds the specified text into the body of the command. Scripts run in this way can often be debugged more easily than scripts executed using Selenium's "getEval" command. Beware that JS exceptions thrown in these script tags aren't managed by Selenium, so you should probably wrap your script in try/catch blocks if there is any chance that the script will throw an exception. @param script the JavaScript snippet to run */ void runScript(String script); /** Defines a new function for Selenium to locate elements on the page. For example, if you define the strategy "foo", and someone runs click("foo=blah"), we'll run your function, passing you the string "blah", and click on the element that your function returns, or throw an "Element not found" error if your function returns null. We'll pass three arguments to your function:
  • locator: the string the user passed in
  • inWindow: the currently selected window
  • inDocument: the currently selected document
The function must return null if the element can't be found. @param strategyName the name of the strategy to define; this should use only letters [a-zA-Z] with no spaces or other punctuation. @param functionDefinition a string defining the body of a function in JavaScript. For example: return inDocument.getElementById(locator); */ void addLocationStrategy(String strategyName,String functionDefinition); /** Saves the entire contents of the current window canvas to a PNG file. Contrast this with the captureScreenshot command, which captures the contents of the OS viewport (i.e. whatever is currently being displayed on the monitor), and is implemented in the RC only. Currently this only works in Firefox when running in chrome mode, and in IE non-HTA using the EXPERIMENTAL "Snapsie" utility. The Firefox implementation is mostly borrowed from the Screengrab! Firefox extension. Please see http://www.screengrab.org and http://snapsie.sourceforge.net/ for details. @param filename the path to the file to persist the screenshot as. No filename extension will be appended by default. Directories will not be created if they do not exist, and an exception will be thrown, possibly by native code. @param kwargs a kwargs string that modifies the way the screenshot is captured. Example: "background=#CCFFDD" . Currently valid options:
background
the background CSS for the HTML document. This may be useful to set for capturing screenshots of less-than-ideal layouts, for example where absolute positioning causes the calculation of the canvas dimension to fail and a black background is exposed (possibly obscuring black text).
*/ void captureEntirePageScreenshot(String filename,String kwargs); /** Executes a command rollup, which is a series of commands with a unique name, and optionally arguments that control the generation of the set of commands. If any one of the rolled-up commands fails, the rollup is considered to have failed. Rollups may also contain nested rollups. @param rollupName the name of the rollup command @param kwargs keyword arguments string that influences how the rollup expands into commands */ void rollup(String rollupName,String kwargs); /** Loads script content into a new script tag in the Selenium document. This differs from the runScript command in that runScript adds the script tag to the document of the AUT, not the Selenium document. The following entities in the script content are replaced by the characters they represent: < > & The corresponding remove command is removeScript. @param scriptContent the Javascript content of the script to add @param scriptTagId (optional) the id of the new script tag. If specified, and an element with this id already exists, this operation will fail. */ void addScript(String scriptContent,String scriptTagId); /** Removes a script tag from the Selenium document identified by the given id. Does nothing if the referenced tag doesn't exist. @param scriptTagId the id of the script element to remove. */ void removeScript(String scriptTagId); /** Allows choice of one of the available libraries. @param libraryName name of the desired library Only the following three can be chosen:
  • "ajaxslt" - Google's library
  • "javascript-xpath" - Cybozu Labs' faster library
  • "default" - The default library. Currently the default library is "ajaxslt" .
If libraryName isn't one of these three, then no change will be made. */ void useXpathLibrary(String libraryName); /** Writes a message to the status bar and adds a note to the browser-side log. @param context the message to be sent to the browser */ void setContext(String context); /** Sets a file input (upload) field to the file listed in fileLocator @param fieldLocator an element locator @param fileLocator a URL pointing to the specified file. Before the file can be set in the input field (fieldLocator), Selenium RC may need to transfer the file to the local machine before attaching the file in a web page form. This is common in selenium grid configurations where the RC server driving the browser is not the same machine that started the test. Supported Browsers: Firefox ("*chrome") only. */ void attachFile(String fieldLocator,String fileLocator); /** Captures a PNG screenshot to the specified file. @param filename the absolute path to the file to be written, e.g. "c:\blah\screenshot.png" */ void captureScreenshot(String filename); /** Capture a PNG screenshot. It then returns the file as a base 64 encoded string. @return The base 64 encoded string of the screen shot (PNG file) */ String captureScreenshotToString(); /** Returns the network traffic seen by the browser, including headers, AJAX requests, status codes, and timings. When this function is called, the traffic log is cleared, so the returned content is only the traffic seen since the last call. @param type The type of data to return the network traffic as. Valid values are: json, xml, or plain. @return A string representation in the defined type of the network traffic seen by the browser. */ String captureNetworkTraffic(String type); /** Tells the Selenium server to add the specificed key and value as a custom outgoing request header. This only works if the browser is configured to use the built in Selenium proxy. @param key the header name. @param value the header value. */ void addCustomRequestHeader(String key, String value); /** Downloads a screenshot of the browser current window canvas to a based 64 encoded PNG file. The entire windows canvas is captured, including parts rendered outside of the current view port. Currently this only works in Mozilla and when running in chrome mode. @param kwargs A kwargs string that modifies the way the screenshot is captured. Example: "background=#CCFFDD". This may be useful to set for capturing screenshots of less-than-ideal layouts, for example where absolute positioning causes the calculation of the canvas dimension to fail and a black background is exposed (possibly obscuring black text). @return The base 64 encoded string of the page screenshot (PNG file) */ String captureEntirePageScreenshotToString(String kwargs); /** Kills the running Selenium Server and all browser sessions. After you run this command, you will no longer be able to send commands to the server; you can't remotely start the server once it has been stopped. Normally you should prefer to run the "stop" command, which terminates the current browser session, rather than shutting down the entire server. */ void shutDownSeleniumServer(); /** Retrieve the last messages logged on a specific remote control. Useful for error reports, especially when running multiple remote controls in a distributed environment. The maximum number of log messages that can be retrieve is configured on remote control startup. @return The last N log messages as a multi-line string. */ String retrieveLastRemoteControlLogs(); /** Simulates a user pressing a key (without releasing it yet) by sending a native operating system keystroke. This function uses the java.awt.Robot class to send a keystroke; this more accurately simulates typing a key on the keyboard. It does not honor settings from the shiftKeyDown, controlKeyDown, altKeyDown and metaKeyDown commands, and does not target any particular HTML element. To send a keystroke to a particular element, focus on the element first before running this command. @param keycode an integer keycode number corresponding to a java.awt.event.KeyEvent; note that Java keycodes are NOT the same thing as JavaScript keycodes! */ void keyDownNative(String keycode); /** Simulates a user releasing a key by sending a native operating system keystroke. This function uses the java.awt.Robot class to send a keystroke; this more accurately simulates typing a key on the keyboard. It does not honor settings from the shiftKeyDown, controlKeyDown, altKeyDown and metaKeyDown commands, and does not target any particular HTML element. To send a keystroke to a particular element, focus on the element first before running this command. @param keycode an integer keycode number corresponding to a java.awt.event.KeyEvent; note that Java keycodes are NOT the same thing as JavaScript keycodes! */ void keyUpNative(String keycode); /** Simulates a user pressing and releasing a key by sending a native operating system keystroke. This function uses the java.awt.Robot class to send a keystroke; this more accurately simulates typing a key on the keyboard. It does not honor settings from the shiftKeyDown, controlKeyDown, altKeyDown and metaKeyDown commands, and does not target any particular HTML element. To send a keystroke to a particular element, focus on the element first before running this command. @param keycode an integer keycode number corresponding to a java.awt.event.KeyEvent; note that Java keycodes are NOT the same thing as JavaScript keycodes! */ void keyPressNative(String keycode); } PK lC>FppWcom/thoughtworks/selenium/.svn/text-base/SeleniumCommandTimedOutException.java.svn-base/* * Copyright 2006 ThoughtWorks, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package com.thoughtworks.selenium; /** *

Thrown to indicate that the remote process failed to respond within a specified * timeout.

* *

This typically happens when the browser fails to call us back, but if the driver * is using a proxy or a CommandBridge, the remote driver may have failed to give us * a new command in time.

* *

When a SeleniumCommandTimedOutException is thrown, we have to assume that the * command queue is out-of-sync with the remote process (e.g. browser). When this * happens, the browser should be stopped (killed) and the queue should be flushed. * * * @see com.thoughtworks.selenium.outbedded.CommandBridge * * @author paul * */ public class SeleniumCommandTimedOutException extends RuntimeException { } PK lC>%S)##Hcom/thoughtworks/selenium/.svn/text-base/SeleniumException.java.svn-base/* * Copyright 2006 ThoughtWorks, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package com.thoughtworks.selenium; /** * Thrown when a Selenium command fails. * * @author Aslak Hellesøy * @version $Revision$ */ public class SeleniumException extends RuntimeException { public SeleniumException(String message) { super(message); } public SeleniumException(Exception e) { super(e); } public SeleniumException(String message, Exception e) { super(message, e); } } PK lC>ݦfHcom/thoughtworks/selenium/.svn/text-base/SeleniumLogLevels.java.svn-base/* * Copyright 2006 ThoughtWorks, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package com.thoughtworks.selenium; /** * An enumeration of logging levels * * * @author nelsons * */ public class SeleniumLogLevels { public static final String DEBUG = "debug"; public static final String INFO = "info"; public static final String WARN = "warn"; public static final String ERROR = "error"; } PK lC>`Y ;com/thoughtworks/selenium/.svn/text-base/Wait.java.svn-base/* * Created on Oct 24, 2006 * */ package com.thoughtworks.selenium; /** * A utility class, designed to help the user automatically wait until a * condition turns true. * * Use it like this: * *

new Wait("Couldn't find close button!") {
*     boolean until() {
*         return selenium.isElementPresent("button_Close");
*     }
* };

* * * @author Dan Fabulich * */ public abstract class Wait { public Wait() { } public Wait(String messageToShowIfTimeout) { wait(messageToShowIfTimeout, DEFAULT_TIMEOUT, DEFAULT_INTERVAL); } /** Returns true when it's time to stop waiting */ public abstract boolean until(); /** The amount of time to wait before giving up; the default is 30 seconds */ public static final long DEFAULT_TIMEOUT = 30000l; /** The interval to pause between checking; the default is 500 milliseconds */ public static final long DEFAULT_INTERVAL = 500l; /** Wait until the "until" condition returns true or time runs out. * * @param message the failure message * @param timeoutInMilliseconds the amount of time to wait before giving up * @throws WaitTimedOutException if "until" doesn't return true until the timeout * @see #until() */ public void wait(String message) { wait(message, DEFAULT_TIMEOUT, DEFAULT_INTERVAL); } /** Wait until the "until" condition returns true or time runs out. * * @param message the failure message * @param timeoutInMilliseconds the amount of time to wait before giving up * @throws WaitTimedOutException if "until" doesn't return true until the timeout * @see #until() */ public void wait(String message, long timeoutInMilliseconds) { wait(message, timeoutInMilliseconds, DEFAULT_INTERVAL); } /** Wait until the "until" condition returns true or time runs out. * * @param message the failure message * @param timeoutInMilliseconds the amount of time to wait before giving up * @param intervalInMilliseconds the interval to pause between checking "until" * @throws WaitTimedOutException if "until" doesn't return true until the timeout * @see #until() */ public void wait(String message, long timeoutInMilliseconds, long intervalInMilliseconds) { long start = System.currentTimeMillis(); long end = start + timeoutInMilliseconds; while (System.currentTimeMillis() < end) { if (until()) return; try { Thread.sleep(intervalInMilliseconds); } catch (InterruptedException e) { throw new RuntimeException(e); } } throw new WaitTimedOutException(message); } public class WaitTimedOutException extends RuntimeException { private static final long serialVersionUID = 1L; public WaitTimedOutException() { super(); } public WaitTimedOutException(String message, Throwable cause) { super(message, cause); } public WaitTimedOutException(String message) { super(message); } public WaitTimedOutException(Throwable cause) { super(cause); } } } PK lC>a&&<com/thoughtworks/selenium/.svn/text-base/build.desc.svn-base # The SelenimCommandTimedOutException never seems to be thrown. # TODO(simon): Investigate deleting this. java_library(name = "api", srcs = [ "CommandProcessor.java", "Selenium.java", "SeleniumCommandTimedOutException.java", "SeleniumException.java", ]) # TODO(simon): Break dependency of selenium on webdriver java_library(name = "selenium", srcs = [ "BrowserConfigurationOptions.java", "DefaultRemoteCommand.java", "DefaultSelenium.java", "HttpCommandProcessor.java", "RemoteCommand.java", "ScreenshotListener.java", "SeleneseTestBase.java", "SeleneseTestCase.java", "SeleneseTestNgHelper.java", "SeleniumLogLevels.java", ], deps = [ ":api", ":wait", "//java/client/src/com/thoughtworks/selenium/condition", "//java/client/src/org/openqa/selenium/net", "//third_party/java/junit", "//third_party/java/testng", ]) java_library(name = "wait", srcs = [ "Wait.java", ], deps = [ ":api", "//java/client/src/com/thoughtworks/selenium/condition", ]) PK )hC>a&&$com/thoughtworks/selenium/build.desc # The SelenimCommandTimedOutException never seems to be thrown. # TODO(simon): Investigate deleting this. java_library(name = "api", srcs = [ "CommandProcessor.java", "Selenium.java", "SeleniumCommandTimedOutException.java", "SeleniumException.java", ]) # TODO(simon): Break dependency of selenium on webdriver java_library(name = "selenium", srcs = [ "BrowserConfigurationOptions.java", "DefaultRemoteCommand.java", "DefaultSelenium.java", "HttpCommandProcessor.java", "RemoteCommand.java", "ScreenshotListener.java", "SeleneseTestBase.java", "SeleneseTestCase.java", "SeleneseTestNgHelper.java", "SeleniumLogLevels.java", ], deps = [ ":api", ":wait", "//java/client/src/com/thoughtworks/selenium/condition", "//java/client/src/org/openqa/selenium/net", "//third_party/java/junit", "//third_party/java/testng", ]) java_library(name = "wait", srcs = [ "Wait.java", ], deps = [ ":api", "//java/client/src/com/thoughtworks/selenium/condition", ]) PK %^D>ΨP  Morg/openqa/selenium/support/pagefactory/internal/LocatingElementHandler.class1CGorg/openqa/selenium/support/pagefactory/internal/LocatingElementHandlerjava/lang/Object#java/lang/reflect/InvocationHandlerlocator8Lorg/openqa/selenium/support/pagefactory/ElementLocator;;(Lorg/openqa/selenium/support/pagefactory/ElementLocator;)VCode  ()V  LineNumberTableLocalVariableTablethisILorg/openqa/selenium/support/pagefactory/internal/LocatingElementHandler;invokeS(Ljava/lang/Object;Ljava/lang/reflect/Method;[Ljava/lang/Object;)Ljava/lang/Object; Exceptionsjava/lang/Throwable 6org/openqa/selenium/support/pagefactory/ElementLocator  findElement"()Lorg/openqa/selenium/WebElement;!getWrappedElement #%$java/lang/reflect/Method &'getName()Ljava/lang/String; )+*java/lang/String ,-equals(Ljava/lang/Object;)Z #/ 09(Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/Object; 243+java/lang/reflect/InvocationTargetException 56getCause()Ljava/lang/Throwable;objectLjava/lang/Object;methodLjava/lang/reflect/Method;objects[Ljava/lang/Object;element Lorg/openqa/selenium/WebElement;e-Ljava/lang/reflect/InvocationTargetException; SourceFileLocatingElementHandler.java!  F * *+    **: ,"(,-.:1!"2# %&*"+$->**78*9:*;< =>$?@ABPK lC>??Aorg/openqa/selenium/support/pagefactory/internal/.svn/all-wcpropsK 25 svn:wc:ra_dav:version-url V 90 /svn/!svn/ver/11224/trunk/java/client/src/org/openqa/selenium/support/pagefactory/internal END LocatingElementHandler.java K 25 svn:wc:ra_dav:version-url V 118 /svn/!svn/ver/11224/trunk/java/client/src/org/openqa/selenium/support/pagefactory/internal/LocatingElementHandler.java END PK lC> =org/openqa/selenium/support/pagefactory/internal/.svn/entries8 dir 11264 http://selenium.googlecode.com/svn/trunk/java/client/src/org/openqa/selenium/support/pagefactory/internal http://selenium.googlecode.com/svn 2009-09-28T12:36:18.534445Z 7353 simon.m.stewart svn:special svn:externals svn:needs-lock 07704840-8298-11de-bf8c-fd130f914ac9 LocatingElementHandler.java file 2011-02-03T12:01:18.000000Z e716fc388ff8b2cc6b56390840aa731e 2009-09-28T12:36:18.534445Z 7353 simon.m.stewart PK lC>G<org/openqa/selenium/support/pagefactory/internal/.svn/format8 PK lC>Ddorg/openqa/selenium/support/pagefactory/internal/.svn/text-base/LocatingElementHandler.java.svn-base/* Copyright 2007-2009 WebDriver committers Copyright 2007-2009 Google Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package org.openqa.selenium.support.pagefactory.internal; import org.openqa.selenium.WebElement; import org.openqa.selenium.support.pagefactory.ElementLocator; import java.lang.reflect.InvocationHandler; import java.lang.reflect.InvocationTargetException; import java.lang.reflect.Method; public class LocatingElementHandler implements InvocationHandler { private final ElementLocator locator; public LocatingElementHandler(ElementLocator locator) { this.locator = locator; } public Object invoke(Object object, Method method, Object[] objects) throws Throwable { WebElement element = locator.findElement(); if ("getWrappedElement".equals(method.getName())) { return element; } try { return method.invoke(element, objects); } catch (InvocationTargetException e) { // Unwrap the underlying exception throw e.getCause(); } } } PK lC>3#W]]org/openqa/.svn/all-wcpropsK 25 svn:wc:ra_dav:version-url V 52 /svn/!svn/ver/11261/trunk/java/client/src/org/openqa END PK lC>NAmorg/openqa/.svn/entries8 dir 11264 http://selenium.googlecode.com/svn/trunk/java/client/src/org/openqa http://selenium.googlecode.com/svn 2011-02-02T20:36:39.437809Z 11261 simon.m.stewart svn:special svn:externals svn:needs-lock 07704840-8298-11de-bf8c-fd130f914ac9 selenium dir PK lC>Gorg/openqa/.svn/format8 PK %^D>^# Norg/openqa/selenium/internal/seleniumemulation/CaptureScreenshotToString.class13Horg/openqa/selenium/internal/seleniumemulation/CaptureScreenshotToString>org/openqa/selenium/internal/seleniumemulation/SeleneseCommand()VCode  LineNumberTableLocalVariableTablethisJLorg/openqa/selenium/internal/seleniumemulation/CaptureScreenshotToString;handleSeleneseCommandW(Lorg/openqa/selenium/WebDriver;Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;#org/openqa/selenium/TakesScreenshot org/openqa/selenium/OutputType BASE64 Lorg/openqa/selenium/OutputType;  getScreenshotAs4(Lorg/openqa/selenium/OutputType;)Ljava/lang/Object;java/lang/String'java/lang/UnsupportedOperationException!+WebDriver does not implement TakeScreenshot # $(Ljava/lang/String;)VdriverLorg/openqa/selenium/WebDriver;locatorLjava/lang/String;valuetsDriver%Lorg/openqa/selenium/TakesScreenshot;W(Lorg/openqa/selenium/WebDriver;Ljava/lang/String;Ljava/lang/String;)Ljava/lang/Object; .  SourceFileCaptureScreenshotToString.java SignatureTLorg/openqa/selenium/internal/seleniumemulation/SeleneseCommand;!/*   %++:Y "    4% %%&%'(%)( *+D,(*+,--  /012PK %^D>E=JbZZGorg/openqa/selenium/internal/seleniumemulation/NameLookupStrategy.class1Aorg/openqa/selenium/internal/seleniumemulation/NameLookupStrategyjava/lang/Object=org/openqa/selenium/internal/seleniumemulation/LookupStrategyNAME_AND_VALUE_PATTERNLjava/util/regex/Pattern;filterFunctionsLjava/util/Map; SignaturebLjava/util/Map;()VCode^(\p{Alpha}+)=(.+) java/util/regex/Pattern compile-(Ljava/lang/String;)Ljava/util/regex/Pattern;  LineNumberTableLocalVariableTable   java/util/HashMap  # %value'Borg/openqa/selenium/internal/seleniumemulation/ValueFilterFunction & *,+ java/util/Map -.put8(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;0name2Aorg/openqa/selenium/internal/seleniumemulation/NameFilterFunction 15index7Borg/openqa/selenium/internal/seleniumemulation/IndexFilterFunction 6thisCLorg/openqa/selenium/internal/seleniumemulation/NameLookupStrategy;findS(Lorg/openqa/selenium/WebDriver;Ljava/lang/String;)Lorg/openqa/selenium/WebElement;> @BAjava/lang/String CDsplit'(Ljava/lang/String;)[Ljava/lang/String; FHGorg/openqa/selenium/By 0I,(Ljava/lang/String;)Lorg/openqa/selenium/By; KMLorg/openqa/selenium/WebDriver NO findElements*(Lorg/openqa/selenium/By;)Ljava/util/List; QSRjava/util/List TUiterator()Ljava/util/Iterator; WYXjava/util/Iterator Z[next()Ljava/lang/Object;]org/openqa/selenium/WebElement \_ `a getAttribute&(Ljava/lang/String;)Ljava/lang/String; @c deequals(Ljava/lang/Object;)Z Wg hremove Wj klhasNext()Z n opgetFilterFunctionS(Ljava/lang/String;)Lorg/openqa/selenium/internal/seleniumemulation/FilterFunction;r+com/thoughtworks/selenium/SeleniumExceptiontjava/lang/StringBuilder @v wxvalueOf&(Ljava/lang/Object;)Ljava/lang/String; sz {(Ljava/lang/String;)V}$ not found. Cannot find filter for: s append-(Ljava/lang/String;)Ljava/lang/StringBuilder; s toString()Ljava/lang/String; qz  agetFilterValue =org/openqa/selenium/internal/seleniumemulation/FilterFunction filterElements4(Ljava/util/List;Ljava/lang/String;)Ljava/util/List; Q size()I Q get(I)Ljava/lang/Object; not founddriverLorg/openqa/selenium/WebDriver;useLjava/lang/String;parts[Ljava/lang/String; allElementsLjava/util/List;Ljava/util/Iterator;element Lorg/openqa/selenium/WebElement;iIfilterBy?Lorg/openqa/selenium/internal/seleniumemulation/FilterFunction; filterValueLocalVariableTypeTable2Ljava/util/List;6Ljava/util/Iterator;  matcher3(Ljava/lang/CharSequence;)Ljava/util/regex/Matcher; java/util/regex/Matcher lmatches group(I)Ljava/lang/String;originalFilterValueLjava/util/regex/Matcher; * &(Ljava/lang/Object;)Ljava/lang/Object;originalFilter filterName SourceFileNameLookupStrategy.java!    -  "!I**Y!"*"$&Y()W*"/1Y3)W*"46Y8)W%#&"'5(H) I9:;< ,=?N+-2EJ:P:(V\:-2/^b fi6N*-2m:%qYsY,uy|~-2~*-2::-\qYsY,uy~J,.12!3-4?5F2P8V9`;e<?@8CDFf 9:T-SU`> Taa+M, ,+JKLN 9:op~&$M+N- -M*",RT UVY*&9:&# PK %^D>==Norg/openqa/selenium/internal/seleniumemulation/LabelOptionSelectStrategy.class1"Horg/openqa/selenium/internal/seleniumemulation/LabelOptionSelectStrategyGorg/openqa/selenium/internal/seleniumemulation/BaseOptionSelectStrategy()VCode  LineNumberTableLocalVariableTablethisJLorg/openqa/selenium/internal/seleniumemulation/LabelOptionSelectStrategy; selectOption5(Lorg/openqa/selenium/WebElement;Ljava/lang/String;)Z org/openqa/selenium/WebElement getText()Ljava/lang/String; java/lang/String equals(Ljava/lang/Object;)Zoption Lorg/openqa/selenium/WebElement; selectThisLjava/lang/String; SourceFileLabelOptionSelectStrategy.java!/*   I ,+     !PK %^D>z}-TTGorg/openqa/selenium/internal/seleniumemulation/NameFilterFunction.class1$Aorg/openqa/selenium/internal/seleniumemulation/NameFilterFunctionAorg/openqa/selenium/internal/seleniumemulation/BaseFilterFunction()VCode  LineNumberTableLocalVariableTablethisCLorg/openqa/selenium/internal/seleniumemulation/NameFilterFunction; shouldAdd5(Lorg/openqa/selenium/WebElement;Ljava/lang/String;)Zname org/openqa/selenium/WebElement  getAttribute&(Ljava/lang/String;)Ljava/lang/String; java/lang/String equals(Ljava/lang/Object;)Zelement Lorg/openqa/selenium/WebElement; filterValueLjava/lang/String; SourceFileNameFilterFunction.java!/*   [+N,-   *  ! !"#PK %^D>Ri9org/openqa/selenium/internal/seleniumemulation/Open.class1F3org/openqa/selenium/internal/seleniumemulation/Open>org/openqa/selenium/internal/seleniumemulation/SeleneseCommandbaseUrlLjava/lang/String;(Ljava/lang/String;)VCode   ()V  LineNumberTableLocalVariableTablethis5Lorg/openqa/selenium/internal/seleniumemulation/Open;handleSeleneseCommandU(Lorg/openqa/selenium/WebDriver;Ljava/lang/String;Ljava/lang/String;)Ljava/lang/Void;:// java/lang/String indexOf(Ljava/lang/String;)Ijava/lang/StringBuilder  !"valueOf&(Ljava/lang/Object;)Ljava/lang/String; $ &/ ( )* startsWith(Ljava/lang/String;)Z, . /0append-(Ljava/lang/String;)Ljava/lang/StringBuilder; 2 34toString()Ljava/lang/String; 687org/openqa/selenium/WebDriver 9getdriverLorg/openqa/selenium/WebDriver;urlignored urlToOpenW(Lorg/openqa/selenium/WebDriver;Ljava/lang/String;Ljava/lang/String;)Ljava/lang/Object; A  SourceFile Open.java SignatureRLorg/openqa/selenium/internal/seleniumemulation/SeleneseCommand;! F * *+     B,.Y* #,%'%+-,-1,:+5 !5"6 8$@&4BB:;B<B=8 >D? (*+,-@BCDEPK %^D>W9h9=org/openqa/selenium/internal/seleniumemulation/KeyState.class17org/openqa/selenium/internal/seleniumemulation/KeyStatejava/lang/Object metaKeyDownZ altKeyDowncontrolKeyDown shiftKeyDown()VCode  LineNumberTableLocalVariableTablethis9Lorg/openqa/selenium/internal/seleniumemulation/KeyState; SourceFile KeyState.java!   /*  PK %^D>+?org/openqa/selenium/internal/seleniumemulation/OpenWindow.class139org/openqa/selenium/internal/seleniumemulation/OpenWindow>org/openqa/selenium/internal/seleniumemulation/SeleneseCommandopener8Lorg/openqa/selenium/internal/seleniumemulation/GetEval;;(Lorg/openqa/selenium/internal/seleniumemulation/GetEval;)VCode   ()V  LineNumberTableLocalVariableTablethis;Lorg/openqa/selenium/internal/seleniumemulation/OpenWindow;handleSeleneseCommandU(Lorg/openqa/selenium/WebDriver;Ljava/lang/String;Ljava/lang/String;)Ljava/lang/Void;java/lang/Stringwindow.open('%s', '%s');java/lang/Object  format9(Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/String; "!6org/openqa/selenium/internal/seleniumemulation/GetEval #$applyF(Lorg/openqa/selenium/WebDriver;[Ljava/lang/String;)Ljava/lang/Object;driverLorg/openqa/selenium/WebDriver;urlLjava/lang/String;windowIDargs[Ljava/lang/String;W(Lorg/openqa/selenium/WebDriver;Ljava/lang/String;Ljava/lang/String;)Ljava/lang/Object; .  SourceFileOpenWindow.java SignatureRLorg/openqa/selenium/internal/seleniumemulation/SeleneseCommand;! F * *+     'YY,SY-SS:* +W!%#4''%&''(')( *+D, (*+,--/012PK %^D>6 I=org/openqa/selenium/internal/seleniumemulation/AltKeyUp.class1'7org/openqa/selenium/internal/seleniumemulation/AltKeyUp>org/openqa/selenium/internal/seleniumemulation/SeleneseCommandkeyState9Lorg/openqa/selenium/internal/seleniumemulation/KeyState;<(Lorg/openqa/selenium/internal/seleniumemulation/KeyState;)VCode   ()V  LineNumberTableLocalVariableTablethis9Lorg/openqa/selenium/internal/seleniumemulation/AltKeyUp;handleSeleneseCommandU(Lorg/openqa/selenium/WebDriver;Ljava/lang/String;Ljava/lang/String;)Ljava/lang/Void; 7org/openqa/selenium/internal/seleniumemulation/KeyState  altKeyDownZdriverLorg/openqa/selenium/WebDriver;locatorLjava/lang/String;valueW(Lorg/openqa/selenium/WebDriver;Ljava/lang/String;Ljava/lang/String;)Ljava/lang/Object; "  SourceFile AltKeyUp.java SignatureRLorg/openqa/selenium/internal/seleniumemulation/SeleneseCommand;! F * *+     V *  *    D  (*+,-!#$%&PK %^D>J=p;;Horg/openqa/selenium/internal/seleniumemulation/XPathLookupStrategy.class14Borg/openqa/selenium/internal/seleniumemulation/XPathLookupStrategyjava/lang/Object=org/openqa/selenium/internal/seleniumemulation/LookupStrategy()VCode  LineNumberTableLocalVariableTablethisDLorg/openqa/selenium/internal/seleniumemulation/XPathLookupStrategy;findS(Lorg/openqa/selenium/WebDriver;Ljava/lang/String;)Lorg/openqa/selenium/WebElement;/ java/lang/String endsWith(Ljava/lang/String;)Z  length()I  ! substring(II)Ljava/lang/String; #%$org/openqa/selenium/By &'xpath,(Ljava/lang/String;)Lorg/openqa/selenium/By; )+*org/openqa/selenium/WebDriver ,- findElement:(Lorg/openqa/selenium/By;)Lorg/openqa/selenium/WebElement;driverLorg/openqa/selenium/WebDriver;useLjava/lang/String; SourceFileXPathLookupStrategy.java! /*    f ,,,dM+,"(     ./ 0123PK %^D>N=eeKorg/openqa/selenium/internal/seleniumemulation/IdOptionSelectStrategy.class1$Eorg/openqa/selenium/internal/seleniumemulation/IdOptionSelectStrategyGorg/openqa/selenium/internal/seleniumemulation/BaseOptionSelectStrategy()VCode  LineNumberTableLocalVariableTablethisGLorg/openqa/selenium/internal/seleniumemulation/IdOptionSelectStrategy; selectOption5(Lorg/openqa/selenium/WebElement;Ljava/lang/String;)Zid org/openqa/selenium/WebElement  getAttribute&(Ljava/lang/String;)Ljava/lang/String; java/lang/String equals(Ljava/lang/Object;)Zoption Lorg/openqa/selenium/WebElement; selectThisLjava/lang/String; SourceFileIdOptionSelectStrategy.java!/*   [+N,-   *  ! !"#PK %^D>-q`77Jorg/openqa/selenium/internal/seleniumemulation/AddLocationStrategy$1.class17Dorg/openqa/selenium/internal/seleniumemulation/AddLocationStrategy$1java/lang/Object=org/openqa/selenium/internal/seleniumemulation/LookupStrategythis$0DLorg/openqa/selenium/internal/seleniumemulation/AddLocationStrategy;val$functionDefinitionLjava/lang/String;Y(Lorg/openqa/selenium/internal/seleniumemulation/AddLocationStrategy;Ljava/lang/String;)VCode     ()VLineNumberTableLocalVariableTablethisFLorg/openqa/selenium/internal/seleniumemulation/AddLocationStrategy$1;findS(Lorg/openqa/selenium/WebDriver;Ljava/lang/String;)Lorg/openqa/selenium/WebElement;&org/openqa/selenium/JavascriptExecutorR(function(locator, inWindow, inDocument) { %s }).call(this,'%s', window, document) "!java/lang/String #$format9(Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/String; & '( executeScript9(Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/Object;*org/openqa/selenium/WebElementdriverLorg/openqa/selenium/WebDriver;use SourceFileAddLocationStrategy.javaEnclosingMethod2Borg/openqa/selenium/internal/seleniumemulation/AddLocationStrategy 45handleSeleneseCommandU(Lorg/openqa/selenium/WebDriver;Ljava/lang/String;Ljava/lang/String;)Ljava/lang/Void; InnerClasses    =*+*,*  !  s%+Y*SY,S%)#% &$# %%+,%- ./0136 PK %^D>0\  Horg/openqa/selenium/internal/seleniumemulation/AddLocationStrategy.class1-Borg/openqa/selenium/internal/seleniumemulation/AddLocationStrategy>org/openqa/selenium/internal/seleniumemulation/SeleneseCommand elementFinder>Lorg/openqa/selenium/internal/seleniumemulation/ElementFinder;A(Lorg/openqa/selenium/internal/seleniumemulation/ElementFinder;)VCode   ()V  LineNumberTableLocalVariableTablethisDLorg/openqa/selenium/internal/seleniumemulation/AddLocationStrategy;handleSeleneseCommandU(Lorg/openqa/selenium/WebDriver;Ljava/lang/String;Ljava/lang/String;)Ljava/lang/Void;Dorg/openqa/selenium/internal/seleniumemulation/AddLocationStrategy$1  Y(Lorg/openqa/selenium/internal/seleniumemulation/AddLocationStrategy;Ljava/lang/String;)V ; InnerClasses! F * *+     _* ,Y*- !** !"#$#D% (*+,-&()*+, PK %^D>@org/openqa/selenium/internal/seleniumemulation/SelectFrame.class1':org/openqa/selenium/internal/seleniumemulation/SelectFrame>org/openqa/selenium/internal/seleniumemulation/SeleneseCommandwindows8Lorg/openqa/selenium/internal/seleniumemulation/Windows;;(Lorg/openqa/selenium/internal/seleniumemulation/Windows;)VCode   ()V  LineNumberTableLocalVariableTablethis;! F * *+     W * +,  !*    D  (*+,-!#$%&PK %^D>ceGorg/openqa/selenium/internal/seleniumemulation/GetAllWindowTitles.class1`Aorg/openqa/selenium/internal/seleniumemulation/GetAllWindowTitles>org/openqa/selenium/internal/seleniumemulation/SeleneseCommand()VCode  LineNumberTableLocalVariableTablethisCLorg/openqa/selenium/internal/seleniumemulation/GetAllWindowTitles;handleSeleneseCommandX(Lorg/openqa/selenium/WebDriver;Ljava/lang/String;Ljava/lang/String;)[Ljava/lang/String; org/openqa/selenium/WebDriver getWindowHandle()Ljava/lang/String;java/util/ArrayList   getWindowHandles()Ljava/util/Set;   java/util/Set !"iterator()Ljava/util/Iterator; $&%java/util/Iterator '(next()Ljava/lang/Object;*java/lang/String , -.switchTo/()Lorg/openqa/selenium/WebDriver$TargetLocator; 021+org/openqa/selenium/WebDriver$TargetLocator 34window3(Ljava/lang/String;)Lorg/openqa/selenium/WebDriver; 6 7getTitle 9;:java/util/List <=add(Ljava/lang/Object;)Z $? @AhasNext()Z 9C DEsize()I 9G HItoArray(([Ljava/lang/Object;)[Ljava/lang/Object;K[Ljava/lang/String;driverLorg/openqa/selenium/WebDriver;ignoredLjava/lang/String; alsoIgnoredcurrent attributesLjava/util/List;handleLocalVariableTypeTable$Ljava/util/List;W(Lorg/openqa/selenium/WebDriver;Ljava/lang/String;Ljava/lang/String;)Ljava/lang/Object; Y  SourceFileGetAllWindowTitles.java SignatureULorg/openqa/selenium/internal/seleniumemulation/SeleneseCommand<[Ljava/lang/String;>; InnerClasses TargetLocator!/*    v+:Y:+:+#):++/W+58W>++/WB)FJ "- ;!IS$a& Hv vLMvNOvPOnQOeRS-TOU eRVDW(*+,-X  Z[\]^ 0_ PK %^D>kIorg/openqa/selenium/internal/seleniumemulation/TextMatchingStrategy.class1 Corg/openqa/selenium/internal/seleniumemulation/TextMatchingStrategyjava/lang/ObjectisAMatch'(Ljava/lang/String;Ljava/lang/String;)Z SourceFileTextMatchingStrategy.javaPK %^D>*f99Corg/openqa/selenium/internal/seleniumemulation/WaitForPopup$1.class1M=org/openqa/selenium/internal/seleniumemulation/WaitForPopup$1com/thoughtworks/selenium/Waitthis$0=Lorg/openqa/selenium/internal/seleniumemulation/WaitForPopup; val$windowIDLjava/lang/String; val$driverLorg/openqa/selenium/WebDriver;q(Lorg/openqa/selenium/internal/seleniumemulation/WaitForPopup;Ljava/lang/String;Lorg/openqa/selenium/WebDriver;)VCode       ()VLineNumberTableLocalVariableTablethis?Lorg/openqa/selenium/internal/seleniumemulation/WaitForPopup$1;until()Z_blank "!java/lang/String #$equals(Ljava/lang/Object;)Z &(';org/openqa/selenium/internal/seleniumemulation/WaitForPopup )*access$1w(Lorg/openqa/selenium/internal/seleniumemulation/WaitForPopup;)Lorg/openqa/selenium/internal/seleniumemulation/Windows; ,.-6org/openqa/selenium/internal/seleniumemulation/Windows /0selectBlankWindow"(Lorg/openqa/selenium/WebDriver;)V 243org/openqa/selenium/WebDriver 56switchTo/()Lorg/openqa/selenium/WebDriver$TargetLocator; 8:9+org/openqa/selenium/WebDriver$TargetLocator ;<window3(Ljava/lang/String;)Lorg/openqa/selenium/WebDriver;> about:blank 2@ AB getCurrentUrl()Ljava/lang/String;D+com/thoughtworks/selenium/SeleniumException SourceFileWaitForPopup.javaEnclosingMethod IJhandleSeleneseCommandU(Lorg/openqa/selenium/WebDriver;Ljava/lang/String;Ljava/lang/String;)Ljava/lang/Void; InnerClasses TargetLocator    B*+*,*-* $  J**%*+*1*7W=*?LFGC( )+&,0.G/H2 JEFG&HK82L PK %^D>U7Aorg/openqa/selenium/internal/seleniumemulation/WaitForPopup.class1Q;org/openqa/selenium/internal/seleniumemulation/WaitForPopup>org/openqa/selenium/internal/seleniumemulation/SeleneseCommandwindows8Lorg/openqa/selenium/internal/seleniumemulation/Windows;;(Lorg/openqa/selenium/internal/seleniumemulation/Windows;)VCode   ()V  LineNumberTableLocalVariableTablethis=Lorg/openqa/selenium/internal/seleniumemulation/WaitForPopup;handleSeleneseCommandU(Lorg/openqa/selenium/WebDriver;Ljava/lang/String;Ljava/lang/String;)Ljava/lang/Void; java/lang/Long  parseLong(Ljava/lang/String;)J org/openqa/selenium/WebDriver  getWindowHandle()Ljava/lang/String;"=org/openqa/selenium/internal/seleniumemulation/WaitForPopup$1 !$ %q(Lorg/openqa/selenium/internal/seleniumemulation/WaitForPopup;Ljava/lang/String;Lorg/openqa/selenium/WebDriver;)V'#Timed out waiting for %s. Waited %s)java/lang/Object +-,java/lang/String ./format9(Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/String; !1 23wait(Ljava/lang/String;J)V 5 67switchTo/()Lorg/openqa/selenium/WebDriver$TargetLocator; 9;:+org/openqa/selenium/WebDriver$TargetLocator <=window3(Ljava/lang/String;)Lorg/openqa/selenium/WebDriver;driverLorg/openqa/selenium/WebDriver;windowIDLjava/lang/String;timeoutmillisJcurrentW(Lorg/openqa/selenium/WebDriver;Ljava/lang/String;Ljava/lang/String;)Ljava/lang/Object; H access$1w(Lorg/openqa/selenium/internal/seleniumemulation/WaitForPopup;)Lorg/openqa/selenium/internal/seleniumemulation/Windows; SourceFileWaitForPopup.java SignatureRLorg/openqa/selenium/internal/seleniumemulation/SeleneseCommand; InnerClasses TargetLocator! F * *+     >-7+:!Y*,+#&(Y,SY-S*0+48W!"$4.6<8>>>>?>@A>BA8CD0EADF (*+,-GIJ %* KLMNO9P !PK %^D> 7==Horg/openqa/selenium/internal/seleniumemulation/ValueFilterFunction.class1#Borg/openqa/selenium/internal/seleniumemulation/ValueFilterFunctionAorg/openqa/selenium/internal/seleniumemulation/BaseFilterFunction()VCode  LineNumberTableLocalVariableTablethisDLorg/openqa/selenium/internal/seleniumemulation/ValueFilterFunction; shouldAdd5(Lorg/openqa/selenium/WebElement;Ljava/lang/String;)Z org/openqa/selenium/WebElement getValue()Ljava/lang/String; java/lang/String equals(Ljava/lang/Object;)Zelement Lorg/openqa/selenium/WebElement; filterValueLjava/lang/String;value SourceFileValueFilterFunction.java!/*   Y +N,-  *   !"PK %^D>9J}llCorg/openqa/selenium/internal/seleniumemulation/FireNamedEvent.class1:=org/openqa/selenium/internal/seleniumemulation/FireNamedEvent>org/openqa/selenium/internal/seleniumemulation/SeleneseCommand elementFinder>Lorg/openqa/selenium/internal/seleniumemulation/ElementFinder;jsBLorg/openqa/selenium/internal/seleniumemulation/JavascriptLibrary;nameLjava/lang/String;(Lorg/openqa/selenium/internal/seleniumemulation/ElementFinder;Lorg/openqa/selenium/internal/seleniumemulation/JavascriptLibrary;Ljava/lang/String;)VCode  ()V      LineNumberTableLocalVariableTablethis?Lorg/openqa/selenium/internal/seleniumemulation/FireNamedEvent;handleSeleneseCommandU(Lorg/openqa/selenium/WebDriver;Ljava/lang/String;Ljava/lang/String;)Ljava/lang/Void;  ;!   l**+*,*-  *  ~$*+,:*+#%Y*S'$ %"'4$$-.$/ $0  12D3 (*+,-46789PK %^D>4?wwEorg/openqa/selenium/internal/seleniumemulation/GetSelectOptions.class1A?org/openqa/selenium/internal/seleniumemulation/GetSelectOptions>org/openqa/selenium/internal/seleniumemulation/SeleneseCommandselect?Lorg/openqa/selenium/internal/seleniumemulation/SeleniumSelect;B(Lorg/openqa/selenium/internal/seleniumemulation/SeleniumSelect;)VCode   ()V  LineNumberTableLocalVariableTablethisALorg/openqa/selenium/internal/seleniumemulation/GetSelectOptions;handleSeleneseCommandX(Lorg/openqa/selenium/WebDriver;Ljava/lang/String;Ljava/lang/String;)[Ljava/lang/String; Forg/openqa/selenium/internal/seleniumemulation/SeleniumSelect$Property TEXTHLorg/openqa/selenium/internal/seleniumemulation/SeleniumSelect$Property; =org/openqa/selenium/internal/seleniumemulation/SeleniumSelect   getOptions(Lorg/openqa/selenium/WebDriver;Ljava/lang/String;Lorg/openqa/selenium/internal/seleniumemulation/SeleniumSelect$Property;Z)Ljava/util/List; "$#java/util/List %&size()I(java/lang/String "* +,toArray(([Ljava/lang/Object;)[Ljava/lang/Object;.[Ljava/lang/String;driverLorg/openqa/selenium/WebDriver; selectLocatorLjava/lang/String;ignored allOptionsLjava/util/List;LocalVariableTypeTable$Ljava/util/List;W(Lorg/openqa/selenium/WebDriver;Ljava/lang/String;Ljava/lang/String;)Ljava/lang/Object; :  SourceFileGetSelectOptions.java SignatureULorg/openqa/selenium/internal/seleniumemulation/SeleneseCommand<[Ljava/lang/String;>; InnerClassesProperty! F * *+     $* +,:!')- #%4$$/0$12$32456 47D8 (*+,-9;<=>? @@PK %^D>OQBBMorg/openqa/selenium/internal/seleniumemulation/SetNextConfirmationState.class1,Gorg/openqa/selenium/internal/seleniumemulation/SetNextConfirmationState>org/openqa/selenium/internal/seleniumemulation/SeleneseCommandresultZ(Z)VCode   ()V  LineNumberTableLocalVariableTablethisILorg/openqa/selenium/internal/seleniumemulation/SetNextConfirmationState;handleSeleneseCommandW(Lorg/openqa/selenium/WebDriver;Ljava/lang/String;Ljava/lang/String;)Ljava/lang/Object;&org/openqa/selenium/JavascriptExecutor,window.__webdriverNextConfirm = arguments[0]java/lang/Object java/lang/Boolean  valueOf(Z)Ljava/lang/Boolean; " #$ executeScript9(Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/Object;driverLorg/openqa/selenium/WebDriver;locatorLjava/lang/String;value SourceFileSetNextConfirmationState.java! F * *     p+Y* S!W ! "*%&'()(*+PK %^D>IZ< Dorg/openqa/selenium/internal/seleniumemulation/CompoundMutator.class1>org/openqa/selenium/internal/seleniumemulation/CompoundMutatorjava/lang/Object;(Ljava/lang/String;)VCode  ()V com/google/common/collect/Lists  newArrayList()Ljava/util/ArrayList;  Borg/openqa/selenium/internal/seleniumemulation/VariableDeclarationseleniumvar selenium = {};  !'(Ljava/lang/String;Ljava/lang/String;)V # $% addMutatorA(Lorg/openqa/selenium/internal/seleniumemulation/ScriptMutator;)V'selenium.browserbot)selenium.browserbot = {};+selenium.browserbot.baseUrl-java/lang/StringBuilder/selenium.browserbot.baseUrl = ' ,1 ,3 45append-(Ljava/lang/String;)Ljava/lang/StringBuilder;7'; ,9 :;toString()Ljava/lang/String;=Borg/openqa/selenium/internal/seleniumemulation/FunctionDeclaration? selenium.pageASif (!selenium.browserbot) { selenium.browserbot = {} }; return selenium.browserbot; < D$selenium.browserbot.getCurrentWindowFreturn window;H selenium.page().getCurrentWindowJselenium.browserbot.getDocumentLreturn document;Nselenium.page().getDocumentP@org/openqa/selenium/internal/seleniumemulation/JavascriptLibrary OS>org/openqa/selenium/internal/seleniumemulation/SeleniumMutatorUselenium.isElementPresentWisElementPresent.js OY Z[getSeleniumScript&(Ljava/lang/String;)Ljava/lang/String; R ^selenium.isTextPresent`isTextPresent.jsbselenium.isVisibled isVisible.jsfselenium.browserbot.findElementhfindElement.jsLineNumberTableLocalVariableTablethis@Lorg/openqa/selenium/internal/seleniumemulation/CompoundMutator;baseUrlLjava/lang/String;libraryBLorg/openqa/selenium/internal/seleniumemulation/JavascriptLibrary; rtsjava/util/List uvadd(Ljava/lang/Object;)Zmutator>Lorg/openqa/selenium/internal/seleniumemulation/ScriptMutator;mutate.(Ljava/lang/String;Ljava/lang/StringBuilder;)V , r} ~iterator()Ljava/util/Iterator; java/util/Iterator next()Ljava/lang/Object;  yz hasNext()Z return eval('  [escape');scriptoutputToLjava/lang/StringBuilder;nested\\\ java/lang/String replaceD(Ljava/lang/CharSequence;Ljava/lang/CharSequence;)Ljava/lang/String; \n'\'escapee SourceFileCompoundMutator.java!    ***Y"*Y&("*Y*,Y.0+2628"*@B"*j kl wxyz \,Y{N*|::+--2+2W,2W,*-82W,2Wi& AC"D+C5F@HGITJ[Kj4\kl\n\T" wx[ [+iNOPQNjklnPK %^D>Cm=org/openqa/selenium/internal/seleniumemulation/GetValue.class1H7org/openqa/selenium/internal/seleniumemulation/GetValue>org/openqa/selenium/internal/seleniumemulation/SeleneseCommandfinder>Lorg/openqa/selenium/internal/seleniumemulation/ElementFinder;A(Lorg/openqa/selenium/internal/seleniumemulation/ElementFinder;)VCode   ()V  LineNumberTableLocalVariableTablethis9Lorg/openqa/selenium/internal/seleniumemulation/GetValue;handleSeleneseCommandW(Lorg/openqa/selenium/WebDriver;Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String; ;! F * *+     E* +,:!#&)+/#1+357 $+%7&:(=,4EE:;E<=E>= :?@DA (*+,-BDEFGPK %^D>|@Aorg/openqa/selenium/internal/seleniumemulation/GetAttribute.class1B;org/openqa/selenium/internal/seleniumemulation/GetAttribute>org/openqa/selenium/internal/seleniumemulation/SeleneseCommandfinder>Lorg/openqa/selenium/internal/seleniumemulation/ElementFinder;A(Lorg/openqa/selenium/internal/seleniumemulation/ElementFinder;)VCode   ()V  LineNumberTableLocalVariableTablethis=Lorg/openqa/selenium/internal/seleniumemulation/GetAttribute;handleSeleneseCommandW(Lorg/openqa/selenium/WebDriver;Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;@ java/lang/String  lastIndexOf(Ljava/lang/String;)I    substring(II)Ljava/lang/String; " #(I)Ljava/lang/String; %'&;! F * *+     1,6,:,`!:* +$:* !"%'&R1101123143)56 7383' 9:D; (*+,-<>?@APK %^D>Horg/openqa/selenium/internal/seleniumemulation/VariableDeclaration.class1RBorg/openqa/selenium/internal/seleniumemulation/VariableDeclarationjava/lang/Object'(Ljava/lang/String;Ljava/lang/String;)VCode  ()V  .\s*\.\s* java/lang/String replaceD(Ljava/lang/CharSequence;Ljava/lang/CharSequence;)Ljava/lang/String;( \(")$\)&java/lang/StringBuilder(.* %* +(Ljava/lang/String;)V %- ./append-(Ljava/lang/String;)Ljava/lang/StringBuilder; %1 23toString()Ljava/lang/String; 576java/util/regex/Pattern 89compile-(Ljava/lang/String;)Ljava/util/regex/Pattern; ; LineNumberTableLocalVariableTablethisDLorg/openqa/selenium/internal/seleniumemulation/VariableDeclaration;rawmutate.(Ljava/lang/String;Ljava/lang/StringBuilder;)V 5D EFmatcher3(Ljava/lang/CharSequence;)Ljava/util/regex/Matcher; HJIjava/util/regex/Matcher KLmatches()ZscriptoutputToLjava/lang/StringBuilder; SourceFileVariableDeclaration.java!   =**,+!#L*%Y')+,',04:<" !" $<%= =>?=@ = AB c*:+CG,*,W<(),-= >?M NOPQPK %^D>r9oQorg/openqa/selenium/internal/seleniumemulation/FindSelectedOptionProperties.class1AKorg/openqa/selenium/internal/seleniumemulation/FindSelectedOptionProperties>org/openqa/selenium/internal/seleniumemulation/SeleneseCommandselect?Lorg/openqa/selenium/internal/seleniumemulation/SeleniumSelect;propertyHLorg/openqa/selenium/internal/seleniumemulation/SeleniumSelect$Property;(Lorg/openqa/selenium/internal/seleniumemulation/SeleniumSelect;Lorg/openqa/selenium/internal/seleniumemulation/SeleniumSelect$Property;)VCode  ()V    LineNumberTableLocalVariableTablethisMLorg/openqa/selenium/internal/seleniumemulation/FindSelectedOptionProperties;handleSeleneseCommandX(Lorg/openqa/selenium/WebDriver;Ljava/lang/String;Ljava/lang/String;)[Ljava/lang/String; =org/openqa/selenium/internal/seleniumemulation/SeleniumSelect  getOptions(Lorg/openqa/selenium/WebDriver;Ljava/lang/String;Lorg/openqa/selenium/internal/seleniumemulation/SeleniumSelect$Property;Z)Ljava/util/List; "!java/util/List #$size()I&java/lang/String ( )*toArray(([Ljava/lang/Object;)[Ljava/lang/Object;,[Ljava/lang/String;driverLorg/openqa/selenium/WebDriver; selectLocatorLjava/lang/String;ignoredoptionsLjava/util/List;LocalVariableTypeTable$Ljava/util/List;W(Lorg/openqa/selenium/WebDriver;Ljava/lang/String;Ljava/lang/String;)Ljava/lang/Object; 8  SourceFile!FindSelectedOptionProperties.java SignatureULorg/openqa/selenium/internal/seleniumemulation/SeleneseCommand<[Ljava/lang/String;>; InnerClasses?Forg/openqa/selenium/internal/seleniumemulation/SeleniumSelect$PropertyProperty!  Y* *+*,   %*+,*:%'+ #$4%%-.%/0%10234 25D6 (*+,-79:;<= >@@PK %^D>iEKKAorg/openqa/selenium/internal/seleniumemulation/GetAllFields.class1h;org/openqa/selenium/internal/seleniumemulation/GetAllFields>org/openqa/selenium/internal/seleniumemulation/SeleneseCommand()VCode  LineNumberTableLocalVariableTablethis=Lorg/openqa/selenium/internal/seleniumemulation/GetAllFields;handleSeleneseCommandX(Lorg/openqa/selenium/WebDriver;Ljava/lang/String;Ljava/lang/String;)[Ljava/lang/String;//input org/openqa/selenium/By xpath,(Ljava/lang/String;)Lorg/openqa/selenium/By; org/openqa/selenium/WebDriver  findElements*(Lorg/openqa/selenium/By;)Ljava/util/List;java/util/ArrayList  "$#java/util/List %&iterator()Ljava/util/Iterator; (*)java/util/Iterator +,next()Ljava/lang/Object;.org/openqa/selenium/WebElement0type -2 34 getAttribute&(Ljava/lang/String;)Ljava/lang/String; 687java/lang/String 9: toLowerCase()Ljava/lang/String;<text 6> ?@equals(Ljava/lang/Object;)ZBid "D E@add (G HIhasNext()Z "K LMsize()I "O PQtoArray(([Ljava/lang/Object;)[Ljava/lang/Object;S[Ljava/lang/String;driverLorg/openqa/selenium/WebDriver;locatorLjava/lang/String;value allInputsLjava/util/List;idsinput Lorg/openqa/selenium/WebElement;LocalVariableTypeTable2Ljava/util/List;$Ljava/util/List;W(Lorg/openqa/selenium/WebDriver;Ljava/lang/String;Ljava/lang/String;)Ljava/lang/Object; c  SourceFileGetAllFields.java SignatureULorg/openqa/selenium/internal/seleniumemulation/SeleneseCommand<[Ljava/lang/String;>;!/*    v+:Y :!:8'-:/15:;=A1CWFJ6NR " !."<#F$W!a' Rv vTUvVWvXW iYZ`[Z.)\]<0W^ iY_`[`Da(*+,-b  defgPK %^D>}p@org/openqa/selenium/internal/seleniumemulation/GetLocation.class1":org/openqa/selenium/internal/seleniumemulation/GetLocation>org/openqa/selenium/internal/seleniumemulation/SeleneseCommand()VCode  LineNumberTableLocalVariableTablethis;!/*   O+  * D(*+,-   !PK %^D>' <org/openqa/selenium/internal/seleniumemulation/Uncheck.class1<6org/openqa/selenium/internal/seleniumemulation/Uncheck>org/openqa/selenium/internal/seleniumemulation/SeleneseCommand alertOverride>Lorg/openqa/selenium/internal/seleniumemulation/AlertOverride;finder>Lorg/openqa/selenium/internal/seleniumemulation/ElementFinder;(Lorg/openqa/selenium/internal/seleniumemulation/AlertOverride;Lorg/openqa/selenium/internal/seleniumemulation/ElementFinder;)VCode  ()V    LineNumberTableLocalVariableTablethis8Lorg/openqa/selenium/internal/seleniumemulation/Uncheck;handleSeleneseCommandU(Lorg/openqa/selenium/WebDriver;Ljava/lang/String;Ljava/lang/String;)Ljava/lang/Void; ;!  Y* *+*,   '*+*+,:% +W"$%&%(4''./'01'2134D5 (*+,-689:;PK %^D>׈=org/openqa/selenium/internal/seleniumemulation/AssignId.class157org/openqa/selenium/internal/seleniumemulation/AssignId>org/openqa/selenium/internal/seleniumemulation/SeleneseCommandjsBLorg/openqa/selenium/internal/seleniumemulation/JavascriptLibrary;finder>Lorg/openqa/selenium/internal/seleniumemulation/ElementFinder;(Lorg/openqa/selenium/internal/seleniumemulation/JavascriptLibrary;Lorg/openqa/selenium/internal/seleniumemulation/ElementFinder;)VCode  ()V    LineNumberTableLocalVariableTablethis9Lorg/openqa/selenium/internal/seleniumemulation/AssignId;handleSeleneseCommandU(Lorg/openqa/selenium/WebDriver;Ljava/lang/String;Ljava/lang/String;)Ljava/lang/Void;arguments[0].id = arguments[1]java/lang/Object  ;!  Y* *+*,   u !*+Y*+,SY-S#W! "!$*!!)*!+,!-,D. (*+,-/1234PK %^D>QÔ:org/openqa/selenium/internal/seleniumemulation/Check.class164org/openqa/selenium/internal/seleniumemulation/Check>org/openqa/selenium/internal/seleniumemulation/SeleneseCommand alertOverride>Lorg/openqa/selenium/internal/seleniumemulation/AlertOverride;finder>Lorg/openqa/selenium/internal/seleniumemulation/ElementFinder;(Lorg/openqa/selenium/internal/seleniumemulation/AlertOverride;Lorg/openqa/selenium/internal/seleniumemulation/ElementFinder;)VCode  ()V    LineNumberTableLocalVariableTablethis6Lorg/openqa/selenium/internal/seleniumemulation/Check;handleSeleneseCommandU(Lorg/openqa/selenium/WebDriver;Ljava/lang/String;Ljava/lang/String;)Ljava/lang/Void; ;!  Y* *+*,   h*+*+,%!#%**+,-.-D/ (*+,-02345PK %^D>ƷlooOorg/openqa/selenium/internal/seleniumemulation/DomTraversalLookupStrategy.class17Iorg/openqa/selenium/internal/seleniumemulation/DomTraversalLookupStrategyjava/lang/Object=org/openqa/selenium/internal/seleniumemulation/LookupStrategy()VCode  LineNumberTableLocalVariableTablethisKLorg/openqa/selenium/internal/seleniumemulation/DomTraversalLookupStrategy;findS(Lorg/openqa/selenium/WebDriver;Ljava/lang/String;)Lorg/openqa/selenium/WebElement;&org/openqa/selenium/JavascriptExecutor'java/lang/UnsupportedOperationException9DOM lookups only work when the driver supports Javascript  (Ljava/lang/String;)V  isJavascriptEnabled()Z 2DOM lookup failed: driver does not have JS enabled" return %s $&%java/lang/String '(format9(Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/String; * +, executeScript9(Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/Object;.org/openqa/selenium/WebElementdriverLorg/openqa/selenium/WebDriver;useLjava/lang/String;executor(Lorg/openqa/selenium/JavascriptExecutor; SourceFileDomTraversalLookupStrategy.java! /*    D+ Y+N- Y-!Y,S#)- *    !"##%")& *DD/0D12.3456PK %^D>zForg/openqa/selenium/internal/seleniumemulation/JavascriptLibrary.class1@org/openqa/selenium/internal/seleniumemulation/JavascriptLibraryjava/lang/ObjectPREFIXLjava/lang/String; ConstantValue /scripts/selenium/injectableSelenium E/org/openqa/selenium/internal/seleniumemulation/injectableSelenium.js htmlUtils()VCode  LineNumberTableLocalVariableTablethisBLorg/openqa/selenium/internal/seleniumemulation/JavascriptLibrary;getSeleniumScript&(Ljava/lang/String;)Ljava/lang/String;java/lang/StringBuilder  (Ljava/lang/String;)V ! "#append-(Ljava/lang/String;)Ljava/lang/StringBuilder; % &'toString()Ljava/lang/String; ) * readScript,1function() { return (%s).apply(null, arguments);} .0/java/lang/String 12format9(Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/String;name rawFunctioncallEmbeddedSeleniumg(Lorg/openqa/selenium/WebDriver;Ljava/lang/String;Lorg/openqa/selenium/WebElement;[Ljava/lang/Object;)V8return browserbot.:.apply(browserbot, arguments);<java/util/ArrayList ; ?A@java/util/List BCadd(Ljava/lang/Object;)Z EGFjava/util/Arrays HIasList%([Ljava/lang/Object;)Ljava/util/List; ?K LMaddAll(Ljava/util/Collection;)ZO&org/openqa/selenium/JavascriptExecutor ?Q RStoArray()[Ljava/lang/Object; NU VW executeScript9(Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/Object;driverLorg/openqa/selenium/WebDriver; functionNameelement Lorg/openqa/selenium/WebElement;values[Ljava/lang/Object;builderLjava/lang/StringBuilder;argsLjava/util/List;LocalVariableTypeTable$Ljava/util/List;callEmbeddedHtmlUtilsx(Lorg/openqa/selenium/WebDriver;Ljava/lang/String;Lorg/openqa/selenium/WebElement;[Ljava/lang/Object;)Ljava/lang/Object;hreturn htmlutils.j.apply(htmlutils, arguments);X(Lorg/openqa/selenium/WebDriver;Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/Object;m'java/lang/UnsupportedOperationExceptionoGThe underlying WebDriver instance does not support executing javascript lscript s tugetClass()Ljava/lang/Class; wyxjava/lang/Class z{ getResource"(Ljava/lang/String;)Ljava/net/URL;}java/lang/RuntimeExceptionCannot locate | com/google/common/base/Charsets UTF_8Ljava/nio/charset/Charset; com/google/common/io/Resources &<(Ljava/net/URL;Ljava/nio/charset/Charset;)Ljava/lang/String; !com/google/common/base/Throwables  propagate3(Ljava/lang/Throwable;)Ljava/lang/RuntimeException;java/io/IOExceptionurlLjava/net/URL;eLjava/io/IOException; SourceFileJavascriptLibrary.java!   /*" m#*Y+ $(M+Y,S-2454 ##3456VY* (:7 , 9 W;Y=:->WDJW+N$PTW:; =)>2??AUBHVVXYVZV[\V]^G_`)-abc )-adefUY*(:g , i W;Y=:->WDJW+N$PTEG I)J2K?MHUUXYUZU[\U]^F_`),abc ),adVku+N+N,-TlYnpQRUVU*XYqa^*3*r+vM,|YY~+ $,N-%,-Z \ ]%a-b.c*33q *.PK %^D>GE{{Corg/openqa/selenium/internal/seleniumemulation/FilterFunction.class1 =org/openqa/selenium/internal/seleniumemulation/FilterFunctionjava/lang/ObjectfilterElements4(Ljava/util/List;Ljava/lang/String;)Ljava/util/List; Signaturex(Ljava/util/List;Ljava/lang/String;)Ljava/util/List; SourceFileFilterFunction.java  PK %^D>wCorg/openqa/selenium/internal/seleniumemulation/LookupStrategy.class1 =org/openqa/selenium/internal/seleniumemulation/LookupStrategyjava/lang/ObjectfindS(Lorg/openqa/selenium/WebDriver;Ljava/lang/String;)Lorg/openqa/selenium/WebElement; SourceFileLookupStrategy.javaPK %^D>E/AAHorg/openqa/selenium/internal/seleniumemulation/FunctionDeclaration.class1VBorg/openqa/selenium/internal/seleniumemulation/FunctionDeclarationjava/lang/Object'(Ljava/lang/String;Ljava/lang/String;)VCode  ()V.\s*\.\s* java/lang/String replaceD(Ljava/lang/CharSequence;Ljava/lang/CharSequence;)Ljava/lang/String;java/lang/StringBuilder.*  !(Ljava/lang/String;)V # $%append-(Ljava/lang/String;)Ljava/lang/StringBuilder;' \s*\(\s*\).* ) *+toString()Ljava/lang/String; -/.java/util/regex/Pattern 01compile-(Ljava/lang/String;)Ljava/util/regex/Pattern; 3  5 67valueOf&(Ljava/lang/Object;)Ljava/lang/String;9 = function() { ; }; = LineNumberTableLocalVariableTablethisDLorg/openqa/selenium/internal/seleniumemulation/FunctionDeclaration;rawresultbasemutate.(Ljava/lang/String;Ljava/lang/StringBuilder;)V -H IJmatcher3(Ljava/lang/CharSequence;)Ljava/util/regex/Matcher; LNMjava/util/regex/Matcher OPmatches()ZscriptoutputToLjava/lang/StringBuilder; SourceFileFunctionDeclaration.java!   J*+N*Y-"&"(,2*Y+48",":"(<>#$ &)(I)?*J@AJB JC  =D EF c*2+GK,*<"W>,-01? @AQ RSTUPK %^D>3 =org/openqa/selenium/internal/seleniumemulation/GetTable.class1v7org/openqa/selenium/internal/seleniumemulation/GetTable>org/openqa/selenium/internal/seleniumemulation/SeleneseCommand TABLE_PARTSLjava/util/regex/Pattern;finder>Lorg/openqa/selenium/internal/seleniumemulation/ElementFinder;jsBLorg/openqa/selenium/internal/seleniumemulation/JavascriptLibrary;()VCode(.*)\.(\d+)\.(\d+) java/util/regex/Pattern compile-(Ljava/lang/String;)Ljava/util/regex/Pattern;  LineNumberTableLocalVariableTable(Lorg/openqa/selenium/internal/seleniumemulation/ElementFinder;Lorg/openqa/selenium/internal/seleniumemulation/JavascriptLibrary;)V     ! this9Lorg/openqa/selenium/internal/seleniumemulation/GetTable;handleSeleneseCommandW(Lorg/openqa/selenium/WebDriver;Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String; ' ()matcher3(Ljava/lang/CharSequence;)Ljava/util/regex/Matcher; +-,java/util/regex/Matcher ./matches()Z1+com/thoughtworks/selenium/SeleniumException3CInvalid target format. Correct format is tableName.rowNum.columnNum 05 6(Ljava/lang/String;)V +8 9:group(I)Ljava/lang/String; <>=java/lang/Long ?@ parseLong(Ljava/lang/String;)J BDC table.rows.length) { return "Cannot access row " + row + " - table has " + table.rows.length + " rows"; }if (col > table.rows[row].cells.length) { return "Cannot access column " + col + " - table row has " + table.rows[row].cells.length + " columns"; }return table.rows[row].cells[col];Jjava/lang/Object <L MNvalueOf(J)Ljava/lang/Long; PRQ@org/openqa/selenium/internal/seleniumemulation/JavascriptLibrary ST executeScriptX(Lorg/openqa/selenium/WebDriver;Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/Object;Vorg/openqa/selenium/WebElement UX YZgetText()Ljava/lang/String; \^]java/lang/String _ZtrimdriverLorg/openqa/selenium/WebDriver;tableCellAddressLjava/lang/String;ignoredLjava/util/regex/Matcher; tableNamerowJcoltable Lorg/openqa/selenium/WebElement;scriptvalueLjava/lang/Object;W(Lorg/openqa/selenium/WebDriver;Ljava/lang/String;Ljava/lang/String;)Ljava/lang/Object; q $% SourceFile GetTable.java SignatureTLorg/openqa/selenium/internal/seleniumemulation/SeleneseCommand;!   -   Y**+*,  ! "# "# $% O ,&:* 0Y247:7;77;7*+A: G: * + IY SYKSYKSO:  U UW[0Y \46 ' (),#-..90E3G2I8n9v:=p "#`abcdc (e#nfc.cgh9XihELjk IHlc n#mn D$o (*+,-prstuPK %^D>%yKDorg/openqa/selenium/internal/seleniumemulation/GetElementIndex.class1:>org/openqa/selenium/internal/seleniumemulation/GetElementIndex>org/openqa/selenium/internal/seleniumemulation/SeleneseCommandfinder>Lorg/openqa/selenium/internal/seleniumemulation/ElementFinder;jsBLorg/openqa/selenium/internal/seleniumemulation/JavascriptLibrary;(Lorg/openqa/selenium/internal/seleniumemulation/ElementFinder;Lorg/openqa/selenium/internal/seleniumemulation/JavascriptLibrary;)VCode  ()V    LineNumberTableLocalVariableTablethis@Lorg/openqa/selenium/internal/seleniumemulation/GetElementIndex;handleSeleneseCommandW(Lorg/openqa/selenium/WebDriver;Ljava/lang/String;Ljava/lang/String;)Ljava/lang/Number; ;!  Y* *+*,   &*+,::*+!YS#)" % $3>&&+,&-.&/. 012.D3 (*+,-46789PK %^D>e\ \ Borg/openqa/selenium/internal/seleniumemulation/AlertOverride.class1A()VCode  LineNumberTableLocalVariableTablethis>Lorg/openqa/selenium/internal/seleniumemulation/AlertOverride;replaceAlertMethod"(Lorg/openqa/selenium/WebDriver;)V&org/openqa/selenium/JavascriptExecutorif (window.__webdriverAlerts) { return; } window.__webdriverAlerts = []; window.alert = function(msg) { window.__webdriverAlerts.push(msg); }; window.__webdriverConfirms = []; window.__webdriverNextConfirm = true; window.confirm = function(msg) { window.__webdriverConfirms.push(msg); var res = window.__webdriverNextConfirm; window.__webdriverNextConfirm = true; return res; };   executeScript9(Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/Object;driverLorg/openqa/selenium/WebDriver; getNextAlert3(Lorg/openqa/selenium/WebDriver;)Ljava/lang/String;if (!window.__webdriverAlerts) { return null }; var t = window.__webdriverAlerts.shift();if (t) { t = t.replace(/\n/g, ' '); } return t;java/lang/String!+com/thoughtworks/selenium/SeleniumException#There were no alerts % &(Ljava/lang/String;)VresultLjava/lang/String;isAlertPresent"(Lorg/openqa/selenium/WebDriver;)Z ,.-java/lang/Boolean /0TRUELjava/lang/Boolean;2Greturn window.__webdriverAlerts && window.__webdriverAlerts.length > 0; ,4 56equals(Ljava/lang/Object;)ZgetNextConfirmation9\if (!window.__webdriverConfirms) { return null; } return window.__webdriverConfirms.shift();;There were no confirmationsisConfirmationPresent>Kreturn window.__webdriverConfirms && window.__webdriverConfirms.length > 0; SourceFileAlertOverride.java!/*   Q+W  '  u#+M, Y"$, *+ *12!5 # #'()*R++13 9: 9  7u#+8M, Y:$, ?@ ?DE!H # #'(<*R++=3 LM L  ?@PK %^D> Oorg/openqa/selenium/internal/seleniumemulation/GetAttributeFromAllWindows.class1hIorg/openqa/selenium/internal/seleniumemulation/GetAttributeFromAllWindows>org/openqa/selenium/internal/seleniumemulation/SeleneseCommand()VCode  LineNumberTableLocalVariableTablethisKLorg/openqa/selenium/internal/seleniumemulation/GetAttributeFromAllWindows;handleSeleneseCommandX(Lorg/openqa/selenium/WebDriver;Ljava/lang/String;Ljava/lang/String;)[Ljava/lang/String; org/openqa/selenium/WebDriver getWindowHandle()Ljava/lang/String;java/util/ArrayList   getWindowHandles()Ljava/util/Set;   java/util/Set !"iterator()Ljava/util/Iterator; $&%java/util/Iterator '(next()Ljava/lang/Object;*java/lang/String , -.switchTo/()Lorg/openqa/selenium/WebDriver$TargetLocator; 021+org/openqa/selenium/WebDriver$TargetLocator 34window3(Ljava/lang/String;)Lorg/openqa/selenium/WebDriver;6&org/openqa/selenium/JavascriptExecutor8!return '' + window[arguments[0]];:java/lang/Object 5< => executeScript9(Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/Object; @BAjava/util/List CDadd(Ljava/lang/Object;)Z $F GHhasNext()Z @J KLsize()I @N OPtoArray(([Ljava/lang/Object;)[Ljava/lang/Object;R[Ljava/lang/String;driverLorg/openqa/selenium/WebDriver; attributeNameLjava/lang/String;ignoredcurrent attributesLjava/util/List;handlevalueLocalVariableTypeTable$Ljava/util/List;W(Lorg/openqa/selenium/WebDriver;Ljava/lang/String;Ljava/lang/String;)Ljava/lang/Object; a  SourceFileGetAttributeFromAllWindows.java SignatureULorg/openqa/selenium/internal/seleniumemulation/SeleneseCommand<[Ljava/lang/String;>; InnerClasses TargetLocator!/*   4 +:Y:+:?#):++/W+579Y,S;):?WE++/WI)MQ .  -!;"?#I"S$] g'u) R STUVWVXVyYZ-0[VS \V] yY^D_(*+,-`  bcdef 0g PK %^D>l,[[Dorg/openqa/selenium/internal/seleniumemulation/GetElementWidth.class1;>org/openqa/selenium/internal/seleniumemulation/GetElementWidth>org/openqa/selenium/internal/seleniumemulation/SeleneseCommandfinder>Lorg/openqa/selenium/internal/seleniumemulation/ElementFinder;A(Lorg/openqa/selenium/internal/seleniumemulation/ElementFinder;)VCode   ()V  LineNumberTableLocalVariableTablethis@Lorg/openqa/selenium/internal/seleniumemulation/GetElementWidth;handleSeleneseCommandW(Lorg/openqa/selenium/WebDriver;Ljava/lang/String;Ljava/lang/String;)Ljava/lang/Number; ;! F * *+     r* +,:!' !"4-./010 23D4 (*+,-5789:PK %^D>u77Norg/openqa/selenium/internal/seleniumemulation/IndexOptionSelectStrategy.class1<Horg/openqa/selenium/internal/seleniumemulation/IndexOptionSelectStrategyjava/lang/ObjectCorg/openqa/selenium/internal/seleniumemulation/OptionSelectStrategy()VCode  LineNumberTableLocalVariableTablethisJLorg/openqa/selenium/internal/seleniumemulation/IndexOptionSelectStrategy;select'(Ljava/util/List;Ljava/lang/String;ZZ)Z SignatureI(Ljava/util/List;Ljava/lang/String;ZZ)Z java/lang/Integer parseInt(Ljava/lang/String;)I java/util/List get(I)Ljava/lang/Object;!org/openqa/selenium/WebElement # $ setSelected & '( isSelected()Z * +(toggle-java/lang/Exception fromOptionsLjava/util/List; selectThisLjava/lang/String;ZallowMultipleSelectindexIoption Lorg/openqa/selenium/WebElement;LocalVariableTypeTable2Ljava/util/List; SourceFileIndexOptionSelectStrategy.java! /*    9,6+ : "% )W:35, & ! +!3#5$7' H99./9019$2932/45"678 9.9:;PK %^D>*j]Dorg/openqa/selenium/internal/seleniumemulation/IsCookiePresent.class10>org/openqa/selenium/internal/seleniumemulation/IsCookiePresent>org/openqa/selenium/internal/seleniumemulation/SeleneseCommand()VCode  LineNumberTableLocalVariableTablethis@Lorg/openqa/selenium/internal/seleniumemulation/IsCookiePresent;handleSeleneseCommandX(Lorg/openqa/selenium/WebDriver;Ljava/lang/String;Ljava/lang/String;)Ljava/lang/Boolean; org/openqa/selenium/WebDriver manage)()Lorg/openqa/selenium/WebDriver$Options; %org/openqa/selenium/WebDriver$Options getCookieNamed0(Ljava/lang/String;)Lorg/openqa/selenium/Cookie; java/lang/Boolean !valueOf(Z)Ljava/lang/Boolean;driverLorg/openqa/selenium/WebDriver;nameLjava/lang/String;ignoredW(Lorg/openqa/selenium/WebDriver;Ljava/lang/String;Ljava/lang/String;)Ljava/lang/Object; )  SourceFileIsCookiePresent.java SignatureULorg/openqa/selenium/internal/seleniumemulation/SeleneseCommand; InnerClassesOptions!/*   `+,  * "#$%&%D'(*+,-(  *+,-. / PK %^D>`x>>Norg/openqa/selenium/internal/seleniumemulation/ValueOptionSelectStrategy.class1"Horg/openqa/selenium/internal/seleniumemulation/ValueOptionSelectStrategyGorg/openqa/selenium/internal/seleniumemulation/BaseOptionSelectStrategy()VCode  LineNumberTableLocalVariableTablethisJLorg/openqa/selenium/internal/seleniumemulation/ValueOptionSelectStrategy; selectOption5(Lorg/openqa/selenium/WebElement;Ljava/lang/String;)Z org/openqa/selenium/WebElement getValue()Ljava/lang/String; java/lang/String equals(Ljava/lang/Object;)Zoption Lorg/openqa/selenium/WebElement; selectThisLjava/lang/String; SourceFileValueOptionSelectStrategy.java!/*   I ,+     !PK %^D>#a7hh?org/openqa/selenium/internal/seleniumemulation/SetTimeout.class179org/openqa/selenium/internal/seleniumemulation/SetTimeout>org/openqa/selenium/internal/seleniumemulation/SeleneseCommandtimer6Lorg/openqa/selenium/internal/seleniumemulation/Timer;9(Lorg/openqa/selenium/internal/seleniumemulation/Timer;)VCode   ()V  LineNumberTableLocalVariableTablethis;Lorg/openqa/selenium/internal/seleniumemulation/SetTimeout;handleSeleneseCommandU(Lorg/openqa/selenium/WebDriver;Ljava/lang/String;Ljava/lang/String;)Ljava/lang/Void;0 java/lang/String equals(Ljava/lang/Object;)Z "!4org/openqa/selenium/internal/seleniumemulation/Timer #$ setTimeout(J)V &('java/lang/Long )* parseLong(Ljava/lang/String;)JdriverLorg/openqa/selenium/WebDriver;timeoutLjava/lang/String;ignoredW(Lorg/openqa/selenium/WebDriver;Ljava/lang/String;Ljava/lang/String;)Ljava/lang/Object; 2  SourceFileSetTimeout.java SignatureRLorg/openqa/selenium/internal/seleniumemulation/SeleneseCommand;! F * *+     w#,* * ,%# $&!(*##+,#-.#/.D0 (*+,-13456PK %^D>huӅ=org/openqa/selenium/internal/seleniumemulation/GetTitle.class1"7org/openqa/selenium/internal/seleniumemulation/GetTitle>org/openqa/selenium/internal/seleniumemulation/SeleneseCommand()VCode  LineNumberTableLocalVariableTablethis9Lorg/openqa/selenium/internal/seleniumemulation/GetTitle;handleSeleneseCommandW(Lorg/openqa/selenium/WebDriver;Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String; org/openqa/selenium/WebDriver getTitle()Ljava/lang/String;driverLorg/openqa/selenium/WebDriver;ignoredLjava/lang/String; alsoIgnoredW(Lorg/openqa/selenium/WebDriver;Ljava/lang/String;Ljava/lang/String;)Ljava/lang/Object;   SourceFile GetTitle.java SignatureTLorg/openqa/selenium/internal/seleniumemulation/SeleneseCommand;!/*   O+  * D(*+,-   !PK %^D>2`:org/openqa/selenium/internal/seleniumemulation/Close.class1!4org/openqa/selenium/internal/seleniumemulation/Close>org/openqa/selenium/internal/seleniumemulation/SeleneseCommand()VCode  LineNumberTableLocalVariableTablethis6Lorg/openqa/selenium/internal/seleniumemulation/Close;handleSeleneseCommandU(Lorg/openqa/selenium/WebDriver;Ljava/lang/String;Ljava/lang/String;)Ljava/lang/Void; org/openqa/selenium/WebDriver closedriverLorg/openqa/selenium/WebDriver;ignoredLjava/lang/String; alsoIgnoredW(Lorg/openqa/selenium/WebDriver;Ljava/lang/String;Ljava/lang/String;)Ljava/lang/Object;   SourceFile Close.java SignatureRLorg/openqa/selenium/internal/seleniumemulation/SeleneseCommand;!/*   T+  * D(*+,-   PK %^D>EPTTMorg/openqa/selenium/internal/seleniumemulation/BaseOptionSelectStrategy.class1DGorg/openqa/selenium/internal/seleniumemulation/BaseOptionSelectStrategyjava/lang/ObjectCorg/openqa/selenium/internal/seleniumemulation/OptionSelectStrategy()VCode  LineNumberTableLocalVariableTablethisILorg/openqa/selenium/internal/seleniumemulation/BaseOptionSelectStrategy;select'(Ljava/util/List;Ljava/lang/String;ZZ)Z SignatureI(Ljava/util/List;Ljava/lang/String;ZZ)Z java/util/List iterator()Ljava/util/Iterator; java/util/Iterator next()Ljava/lang/Object;!org/openqa/selenium/WebElement # $% selectOption5(Lorg/openqa/selenium/WebElement;Ljava/lang/String;)Z ' ( setSelected * +, isSelected()Z . /,toggle 1 2,hasNext fromOptionsLjava/util/List; selectThisLjava/lang/String;ZallowMultipleSelect matchMade allOptionsLjava/util/Iterator;option Lorg/openqa/selenium/WebElement; matchThisTimeLocalVariableTypeTable2Ljava/util/List;6Ljava/util/Iterator; SourceFileBaseOptionSelectStrategy.java! /*    6 h6+:P :*,"6# &) -W6 0 >  #!(",#6$@%H(O*Y+[e. \ hh34h56h(7h87e97 ]:;A<=#8>7?h3@ ]:A$%BCPK %^D>žAorg/openqa/selenium/internal/seleniumemulation/SelectWindow.class1';org/openqa/selenium/internal/seleniumemulation/SelectWindow>org/openqa/selenium/internal/seleniumemulation/SeleneseCommandwindows8Lorg/openqa/selenium/internal/seleniumemulation/Windows;;(Lorg/openqa/selenium/internal/seleniumemulation/Windows;)VCode   ()V  LineNumberTableLocalVariableTablethis=Lorg/openqa/selenium/internal/seleniumemulation/SelectWindow;handleSeleneseCommandU(Lorg/openqa/selenium/WebDriver;Ljava/lang/String;Ljava/lang/String;)Ljava/lang/Void; 6org/openqa/selenium/internal/seleniumemulation/Windows  selectWindow4(Lorg/openqa/selenium/WebDriver;Ljava/lang/String;)VdriverLorg/openqa/selenium/WebDriver;windowIDLjava/lang/String;ignoredW(Lorg/openqa/selenium/WebDriver;Ljava/lang/String;Ljava/lang/String;)Ljava/lang/Object; "  SourceFileSelectWindow.java SignatureRLorg/openqa/selenium/internal/seleniumemulation/SeleneseCommand;! F * *+     W * +,  !*    D  (*+,-!#$%&PK %^D> \Torg/openqa/selenium/internal/seleniumemulation/FindFirstSelectedOptionProperty.class1;Norg/openqa/selenium/internal/seleniumemulation/FindFirstSelectedOptionProperty>org/openqa/selenium/internal/seleniumemulation/SeleneseCommandselect?Lorg/openqa/selenium/internal/seleniumemulation/SeleniumSelect;propertyHLorg/openqa/selenium/internal/seleniumemulation/SeleniumSelect$Property;(Lorg/openqa/selenium/internal/seleniumemulation/SeleniumSelect;Lorg/openqa/selenium/internal/seleniumemulation/SeleniumSelect$Property;)VCode  ()V    LineNumberTableLocalVariableTablethisPLorg/openqa/selenium/internal/seleniumemulation/FindFirstSelectedOptionProperty;handleSeleneseCommandW(Lorg/openqa/selenium/WebDriver;Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String; =org/openqa/selenium/internal/seleniumemulation/SeleniumSelect  getOptions(Lorg/openqa/selenium/WebDriver;Ljava/lang/String;Lorg/openqa/selenium/internal/seleniumemulation/SeleniumSelect$Property;Z)Ljava/util/List; "!java/util/List #$get(I)Ljava/lang/Object;&java/lang/StringdriverLorg/openqa/selenium/WebDriver; selectLocatorLjava/lang/String;ignoredoptionsLjava/util/List;LocalVariableTypeTable$Ljava/util/List;W(Lorg/openqa/selenium/WebDriver;Ljava/lang/String;Ljava/lang/String;)Ljava/lang/Object; 2  SourceFile$FindFirstSelectedOptionProperty.java SignatureTLorg/openqa/selenium/internal/seleniumemulation/SeleneseCommand; InnerClasses9Forg/openqa/selenium/internal/seleniumemulation/SeleniumSelect$PropertyProperty!  Y* *+*,   *+,*:% #$4'()*+* ,-.  ,/D0 (*+,-134567 8:@PK %^D>0dd@org/openqa/selenium/internal/seleniumemulation/WindowFocus.class1+:org/openqa/selenium/internal/seleniumemulation/WindowFocus>org/openqa/selenium/internal/seleniumemulation/SeleneseCommandjsBLorg/openqa/selenium/internal/seleniumemulation/JavascriptLibrary;E(Lorg/openqa/selenium/internal/seleniumemulation/JavascriptLibrary;)VCode   ()V  LineNumberTableLocalVariableTablethis;! F * *+     ]* +W !* !"#"D$ (*+,-%'()*PK %^D>cէ=org/openqa/selenium/internal/seleniumemulation/GetAlert.class1"7org/openqa/selenium/internal/seleniumemulation/GetAlert>org/openqa/selenium/internal/seleniumemulation/SeleneseCommand alertOverride>Lorg/openqa/selenium/internal/seleniumemulation/AlertOverride;A(Lorg/openqa/selenium/internal/seleniumemulation/AlertOverride;)VCode   ()V  LineNumberTableLocalVariableTablethis9Lorg/openqa/selenium/internal/seleniumemulation/GetAlert;handleSeleneseCommandW(Lorg/openqa/selenium/WebDriver;Ljava/lang/String;Ljava/lang/String;)Ljava/lang/Object; ۀ슱Lorg/openqa/selenium/internal/seleniumemulation/DeleteAllVisibleCookies.class1)Forg/openqa/selenium/internal/seleniumemulation/DeleteAllVisibleCookies>org/openqa/selenium/internal/seleniumemulation/SeleneseCommand()VCode  LineNumberTableLocalVariableTablethisHLorg/openqa/selenium/internal/seleniumemulation/DeleteAllVisibleCookies;handleSeleneseCommandU(Lorg/openqa/selenium/WebDriver;Ljava/lang/String;Ljava/lang/String;)Ljava/lang/Void; org/openqa/selenium/WebDriver manage)()Lorg/openqa/selenium/WebDriver$Options; %org/openqa/selenium/WebDriver$Options deleteAllCookiesdriverLorg/openqa/selenium/WebDriver;locatorLjava/lang/String;valueW(Lorg/openqa/selenium/WebDriver;Ljava/lang/String;Ljava/lang/String;)Ljava/lang/Object; "  SourceFileDeleteAllVisibleCookies.java SignatureRLorg/openqa/selenium/internal/seleniumemulation/SeleneseCommand; InnerClassesOptions!/*   Y +   *   D (*+,-!  #$%&' ( PK %^D>+eeMorg/openqa/selenium/internal/seleniumemulation/GlobTextMatchingStrategy.class1JGorg/openqa/selenium/internal/seleniumemulation/GlobTextMatchingStrategyjava/lang/ObjectCorg/openqa/selenium/internal/seleniumemulation/TextMatchingStrategy()VCode  LineNumberTableLocalVariableTablethisILorg/openqa/selenium/internal/seleniumemulation/GlobTextMatchingStrategy;isAMatch'(Ljava/lang/String;Ljava/lang/String;)Z.\. java/lang/String replaceD(Ljava/lang/CharSequence;Ljava/lang/CharSequence;)Ljava/lang/String;*.*!?#.? %'&java/util/regex/Pattern ()compile.(Ljava/lang/String;I)Ljava/util/regex/Pattern;+ - / 01 replaceAll8(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String; %3 45matcher3(Ljava/lang/CharSequence;)Ljava/util/regex/Matcher; 798java/util/regex/Matcher :;find()Z = >?contains(Ljava/lang/CharSequence;)Z compareThisLjava/lang/String;withregexpatternLjava/util/regex/Pattern; mutatedWithLjava/util/regex/Matcher; SourceFileGlobTextMatchingStrategy.java! /*    F+ "N-$:,*,.:2:6 ,+< )2 HFF@AFBA/CA'DE)FA24GHIPK %^D>T4OooAorg/openqa/selenium/internal/seleniumemulation/MouseEventAt.class1:;org/openqa/selenium/internal/seleniumemulation/MouseEventAt>org/openqa/selenium/internal/seleniumemulation/SeleneseCommandfinder>Lorg/openqa/selenium/internal/seleniumemulation/ElementFinder;jsBLorg/openqa/selenium/internal/seleniumemulation/JavascriptLibrary;typeLjava/lang/String;(Lorg/openqa/selenium/internal/seleniumemulation/ElementFinder;Lorg/openqa/selenium/internal/seleniumemulation/JavascriptLibrary;Ljava/lang/String;)VCode  ()V      LineNumberTableLocalVariableTablethis=Lorg/openqa/selenium/internal/seleniumemulation/MouseEventAt;handleSeleneseCommandU(Lorg/openqa/selenium/WebDriver;Ljava/lang/String;Ljava/lang/String;)Ljava/lang/Void;  ;!   l**+*,*-  *  (*+,:*+#%Y*SY-S'$ %&'4((-.(/ (0  12D3 (*+,-46789PK %^D>GL@org/openqa/selenium/internal/seleniumemulation/GetBodyText.class10:org/openqa/selenium/internal/seleniumemulation/GetBodyText>org/openqa/selenium/internal/seleniumemulation/SeleneseCommand()VCode  LineNumberTableLocalVariableTablethis;!/*   Y+  * $%&'('D)(*+,-*  ,-./PK %^D>Q~~Dorg/openqa/selenium/internal/seleniumemulation/SeleneseCommand.class12>org/openqa/selenium/internal/seleniumemulation/SeleneseCommandjava/lang/Object()VCode  LineNumberTableLocalVariableTablethis@Lorg/openqa/selenium/internal/seleniumemulation/SeleneseCommand;LocalVariableTypeTableELorg/openqa/selenium/internal/seleniumemulation/SeleneseCommand;applyF(Lorg/openqa/selenium/WebDriver;[Ljava/lang/String;)Ljava/lang/Object; Signature7(Lorg/openqa/selenium/WebDriver;[Ljava/lang/String;)TT;  handleSeleneseCommandW(Lorg/openqa/selenium/WebDriver;Ljava/lang/String;Ljava/lang/String;)Ljava/lang/Object;+com/thoughtworks/selenium/SeleniumExceptionjava/lang/StringBuilderToo many arguments!   (Ljava/lang/String;)V " #$append(I)Ljava/lang/StringBuilder; & '(toString()Ljava/lang/String; driverLorg/openqa/selenium/WebDriver;args[Ljava/lang/String;H(Lorg/openqa/selenium/WebDriver;Ljava/lang/String;Ljava/lang/String;)TT; SourceFileSeleneseCommand.java(Ljava/lang/Object;!A*     S,8",*+*+,2*+,2,2YY,!%) $.!:$ S S*+S,- S ./01PK %^D>;org/openqa/selenium/internal/seleniumemulation/GoBack.class1)5org/openqa/selenium/internal/seleniumemulation/GoBack>org/openqa/selenium/internal/seleniumemulation/SeleneseCommand()VCode  LineNumberTableLocalVariableTablethis7Lorg/openqa/selenium/internal/seleniumemulation/GoBack;handleSeleneseCommandU(Lorg/openqa/selenium/WebDriver;Ljava/lang/String;Ljava/lang/String;)Ljava/lang/Void; org/openqa/selenium/WebDriver navigate,()Lorg/openqa/selenium/WebDriver$Navigation; (org/openqa/selenium/WebDriver$Navigation backdriverLorg/openqa/selenium/WebDriver;ignoredLjava/lang/String; alsoIgnoredW(Lorg/openqa/selenium/WebDriver;Ljava/lang/String;Ljava/lang/String;)Ljava/lang/Object; "  SourceFile GoBack.java SignatureRLorg/openqa/selenium/internal/seleniumemulation/SeleneseCommand; InnerClasses Navigation!/*   Y +   *   D (*+,-!  #$%&' ( PK %^D>I*iiBorg/openqa/selenium/internal/seleniumemulation/IsTextPresent.class1Norg/openqa/selenium/internal/seleniumemulation/SeleneseCommandjsBLorg/openqa/selenium/internal/seleniumemulation/JavascriptLibrary;E(Lorg/openqa/selenium/internal/seleniumemulation/JavascriptLibrary;)VCode   ()V  LineNumberTableLocalVariableTablethis>Lorg/openqa/selenium/internal/seleniumemulation/IsTextPresent;handleSeleneseCommandX(Lorg/openqa/selenium/WebDriver;Ljava/lang/String;Ljava/lang/String;)Ljava/lang/Boolean;isTextPresent.js @org/openqa/selenium/internal/seleniumemulation/JavascriptLibrary getSeleniumScript&(Ljava/lang/String;)Ljava/lang/String;&org/openqa/selenium/JavascriptExecutor java/lang/StringBuilder"return ( $ %(Ljava/lang/String;)V ' ()append-(Ljava/lang/String;)Ljava/lang/StringBuilder;+)(arguments[0]); - ./toString()Ljava/lang/String;1java/lang/Object 3 45 executeScript9(Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/Object;7java/lang/Boolean 69 :;TRUELjava/lang/Boolean; 6= >?valueOf(Z)Ljava/lang/Boolean;driverLorg/openqa/selenium/WebDriver;patternLjava/lang/String;ignoredscriptresultW(Lorg/openqa/selenium/WebDriver;Ljava/lang/String;Ljava/lang/String;)Ljava/lang/Object; I  SourceFileIsTextPresent.java SignatureULorg/openqa/selenium/internal/seleniumemulation/SeleneseCommand;! F * *+     I* :+Y!#&*&,0Y,S26:8<< "#-"7&>II@AIBCIDC >EC7F;DG (*+,-HJKLMPK %^D>8  9org/openqa/selenium/internal/seleniumemulation/Type.class13org/openqa/selenium/internal/seleniumemulation/Type>org/openqa/selenium/internal/seleniumemulation/SeleneseCommand alertOverride>Lorg/openqa/selenium/internal/seleniumemulation/AlertOverride;jsBLorg/openqa/selenium/internal/seleniumemulation/JavascriptLibrary;finder>Lorg/openqa/selenium/internal/seleniumemulation/ElementFinder;state9Lorg/openqa/selenium/internal/seleniumemulation/KeyState;(Lorg/openqa/selenium/internal/seleniumemulation/AlertOverride;Lorg/openqa/selenium/internal/seleniumemulation/JavascriptLibrary;Lorg/openqa/selenium/internal/seleniumemulation/ElementFinder;Lorg/openqa/selenium/internal/seleniumemulation/KeyState;)VCode  ()V       LineNumberTableLocalVariableTablethis5Lorg/openqa/selenium/internal/seleniumemulation/Type;handleSeleneseCommandU(Lorg/openqa/selenium/WebDriver;Ljava/lang/String;Ljava/lang/String;)Ljava/lang/Void; "$#@?java/lang/String AB toUpperCase()Ljava/lang/String; DFEW XB toLowerCase >Z [\equals(Ljava/lang/Object;)Z^file`java/lang/CharSequence Jb cdsendKeys([Ljava/lang/CharSequence;)Vf&org/openqa/selenium/JavascriptExecutor eh ijisJavascriptEnabled()Zl replaceTextnjava/lang/Object prq@org/openqa/selenium/internal/seleniumemulation/JavascriptLibrary stcallEmbeddedSeleniumg(Lorg/openqa/selenium/WebDriver;Ljava/lang/String;Lorg/openqa/selenium/WebElement;[Ljava/lang/Object;)VdriverLorg/openqa/selenium/WebDriver;locatorLjava/lang/String;valueelement Lorg/openqa/selenium/WebElement;tagName elementTypeW(Lorg/openqa/selenium/WebDriver;Ljava/lang/String;Ljava/lang/String;)Ljava/lang/Object;    SourceFile Type.java SignatureRLorg/openqa/selenium/internal/seleniumemulation/SeleneseCommand;!   **+*,*-* !"#$4   x*+!*'*- *0 3Y57*: -=-:*+,C:I:NP:TVY&!]VY_Y-Sa+e'+eg*+kmYSo_YSa>(*&+0-D/O2X3c4p567:;=@RuvwxyxDOxOz{Xx|xcm}xD~(*+,-PK %^D>ۋ#Borg/openqa/selenium/internal/seleniumemulation/ScriptMutator.class1 67bBorg/openqa/selenium/internal/seleniumemulation/GetXpathCount.class13org/openqa/selenium/internal/seleniumemulation/SeleneseCommand()VCode  LineNumberTableLocalVariableTablethis>Lorg/openqa/selenium/internal/seleniumemulation/GetXpathCount;handleSeleneseCommandW(Lorg/openqa/selenium/WebDriver;Ljava/lang/String;Ljava/lang/String;)Ljava/lang/Number; org/openqa/selenium/By xpath,(Ljava/lang/String;)Lorg/openqa/selenium/By; org/openqa/selenium/WebDriver  findElements*(Lorg/openqa/selenium/By;)Ljava/util/List; java/util/List !size()I #%$java/lang/Integer &'valueOf(I)Ljava/lang/Integer;driverLorg/openqa/selenium/WebDriver;Ljava/lang/String;ignoredW(Lorg/openqa/selenium/WebDriver;Ljava/lang/String;Ljava/lang/String;)Ljava/lang/Object; .  SourceFileGetXpathCount.java SignatureTLorg/openqa/selenium/internal/seleniumemulation/SeleneseCommand;!/*   [+,"  * ()*+*D,(*+,--  /012PK %^D>7p4gg9org/openqa/selenium/internal/seleniumemulation/NoOp.class13org/openqa/selenium/internal/seleniumemulation/NoOp>org/openqa/selenium/internal/seleniumemulation/SeleneseCommand returnValueLjava/lang/Object;(Ljava/lang/Object;)VCode   ()V  LineNumberTableLocalVariableTablethis5Lorg/openqa/selenium/internal/seleniumemulation/NoOp;handleSeleneseCommandW(Lorg/openqa/selenium/WebDriver;Ljava/lang/String;Ljava/lang/String;)Ljava/lang/Object;driverLorg/openqa/selenium/WebDriver;locatorLjava/lang/String;value SourceFile NoOp.java SignatureTLorg/openqa/selenium/internal/seleniumemulation/SeleneseCommand;! F * *+     M* *PK %^D>>*Norg/openqa/selenium/internal/seleniumemulation/ExactTextMatchingStrategy.class1Horg/openqa/selenium/internal/seleniumemulation/ExactTextMatchingStrategyjava/lang/ObjectCorg/openqa/selenium/internal/seleniumemulation/TextMatchingStrategy()VCode  LineNumberTableLocalVariableTablethisJLorg/openqa/selenium/internal/seleniumemulation/ExactTextMatchingStrategy;isAMatch'(Ljava/lang/String;Ljava/lang/String;)Z java/lang/String contains(Ljava/lang/CharSequence;)Z compareThisLjava/lang/String;with SourceFileExactTextMatchingStrategy.java! /*    D,+  PK %^D>]hEorg/openqa/selenium/internal/seleniumemulation/IdLookupStrategy.class1$?org/openqa/selenium/internal/seleniumemulation/IdLookupStrategyjava/lang/Object=org/openqa/selenium/internal/seleniumemulation/LookupStrategy()VCode  LineNumberTableLocalVariableTablethisALorg/openqa/selenium/internal/seleniumemulation/IdLookupStrategy;findS(Lorg/openqa/selenium/WebDriver;Ljava/lang/String;)Lorg/openqa/selenium/WebElement; org/openqa/selenium/By id,(Ljava/lang/String;)Lorg/openqa/selenium/By; org/openqa/selenium/WebDriver  findElement:(Lorg/openqa/selenium/By;)Lorg/openqa/selenium/WebElement;driverLorg/openqa/selenium/WebDriver;useLjava/lang/String; SourceFileIdLookupStrategy.java! /*    I +,     !"#PK %^D>M^Dorg/openqa/selenium/internal/seleniumemulation/GetConfirmation.class1">org/openqa/selenium/internal/seleniumemulation/GetConfirmation>org/openqa/selenium/internal/seleniumemulation/SeleneseCommand alertOverride>Lorg/openqa/selenium/internal/seleniumemulation/AlertOverride;A(Lorg/openqa/selenium/internal/seleniumemulation/AlertOverride;)VCode   ()V  LineNumberTableLocalVariableTablethis@Lorg/openqa/selenium/internal/seleniumemulation/GetConfirmation;handleSeleneseCommandW(Lorg/openqa/selenium/WebDriver;Ljava/lang/String;Ljava/lang/String;)Ljava/lang/Object; ' ff@org/openqa/selenium/internal/seleniumemulation/GetAllLinks.class1b:org/openqa/selenium/internal/seleniumemulation/GetAllLinks>org/openqa/selenium/internal/seleniumemulation/SeleneseCommand()VCode  LineNumberTableLocalVariableTablethishasNext()Z @ ABsize()IDjava/lang/String F GHtoArray(([Ljava/lang/Object;)[Ljava/lang/Object;J[Ljava/lang/String;driverLorg/openqa/selenium/WebDriver;locatorLjava/lang/String;valueallLinksLjava/util/List;iLjava/util/Iterator;linkslink Lorg/openqa/selenium/WebElement;LocalVariableTypeTable2Ljava/util/List;6Ljava/util/Iterator;$Ljava/util/List;W(Lorg/openqa/selenium/WebDriver;Ljava/lang/String;Ljava/lang/String;)Ljava/lang/Object; ]  SourceFileGetAllLinks.java SignatureULorg/openqa/selenium/internal/seleniumemulation/SeleneseCommand<[Ljava/lang/String;>;!/*   < t+::$Y&:6'-:/1:57W 7W;?CEI .  !""#.$9%>&K(U"_+ \ t tKLtMNtON gPQ^RSUTQ.'UV90NW  gPX^RYUTZD[(*+,-\  ^_`aPK %^D>gLˁBorg/openqa/selenium/internal/seleniumemulation/GetAllButtons.class1lorg/openqa/selenium/internal/seleniumemulation/SeleneseCommand()VCode  LineNumberTableLocalVariableTablethis>Lorg/openqa/selenium/internal/seleniumemulation/GetAllButtons;handleSeleneseCommandX(Lorg/openqa/selenium/WebDriver;Ljava/lang/String;Ljava/lang/String;)[Ljava/lang/String;//input org/openqa/selenium/By xpath,(Ljava/lang/String;)Lorg/openqa/selenium/By; org/openqa/selenium/WebDriver  findElements*(Lorg/openqa/selenium/By;)Ljava/util/List;java/util/ArrayList  "$#java/util/List %&iterator()Ljava/util/Iterator; (*)java/util/Iterator +,next()Ljava/lang/Object;.org/openqa/selenium/WebElement0type -2 34 getAttribute&(Ljava/lang/String;)Ljava/lang/String; 687java/lang/String 9: toLowerCase()Ljava/lang/String;<button 6> ?@equals(Ljava/lang/Object;)ZBsubmitDresetFid "H I@add (K LMhasNext()Z "O PQsize()I "S TUtoArray(([Ljava/lang/Object;)[Ljava/lang/Object;W[Ljava/lang/String;driverLorg/openqa/selenium/WebDriver;ignoredLjava/lang/String; alsoIgnored allInputsLjava/util/List;idsinput Lorg/openqa/selenium/WebElement;LocalVariableTypeTable2Ljava/util/List;$Ljava/util/List;W(Lorg/openqa/selenium/WebDriver;Ljava/lang/String;Ljava/lang/String;)Ljava/lang/Object; g  SourceFileGetAllButtons.java SignatureULorg/openqa/selenium/internal/seleniumemulation/SeleneseCommand<[Ljava/lang/String;>;!/*   2 +:Y :!:L'-:/15:;=A= C=E1GWJN6RV " !."<#Z$k!u' R XYZ[\[ }]^t_^.=`a</0[b }]ct_dDe(*+,-f  hijkPK %^D>^^Horg/openqa/selenium/internal/seleniumemulation/DragAndDropToObject.class10Borg/openqa/selenium/internal/seleniumemulation/DragAndDropToObject>org/openqa/selenium/internal/seleniumemulation/SeleneseCommandfinder>Lorg/openqa/selenium/internal/seleniumemulation/ElementFinder;A(Lorg/openqa/selenium/internal/seleniumemulation/ElementFinder;)VCode   ()V  LineNumberTableLocalVariableTablethisDLorg/openqa/selenium/internal/seleniumemulation/DragAndDropToObject;handleSeleneseCommandU(Lorg/openqa/selenium/WebDriver;Ljava/lang/String;Ljava/lang/String;)Ljava/lang/Void; ;! F * *+     '* +,:* +-:"!"!#$#&%(>''!"'#$'%$&' ('D) (*+,-*,-./PK %^D>yB?org/openqa/selenium/internal/seleniumemulation/ShiftKeyUp.class1'9org/openqa/selenium/internal/seleniumemulation/ShiftKeyUp>org/openqa/selenium/internal/seleniumemulation/SeleneseCommandkeyState9Lorg/openqa/selenium/internal/seleniumemulation/KeyState;<(Lorg/openqa/selenium/internal/seleniumemulation/KeyState;)VCode   ()V  LineNumberTableLocalVariableTablethis;Lorg/openqa/selenium/internal/seleniumemulation/ShiftKeyUp;handleSeleneseCommandU(Lorg/openqa/selenium/WebDriver;Ljava/lang/String;Ljava/lang/String;)Ljava/lang/Void; 7org/openqa/selenium/internal/seleniumemulation/KeyState  shiftKeyDownZdriverLorg/openqa/selenium/WebDriver;locatorLjava/lang/String;valueW(Lorg/openqa/selenium/WebDriver;Ljava/lang/String;Ljava/lang/String;)Ljava/lang/Object; "  SourceFileShiftKeyUp.java SignatureRLorg/openqa/selenium/internal/seleniumemulation/SeleneseCommand;! F * *+     V *  *    D  (*+,-!#$%&PK %^D>=org/openqa/selenium/internal/seleniumemulation/TypeKeys.class1e7org/openqa/selenium/internal/seleniumemulation/TypeKeys>org/openqa/selenium/internal/seleniumemulation/SeleneseCommand alertOverride>Lorg/openqa/selenium/internal/seleniumemulation/AlertOverride;finder>Lorg/openqa/selenium/internal/seleniumemulation/ElementFinder;(Lorg/openqa/selenium/internal/seleniumemulation/AlertOverride;Lorg/openqa/selenium/internal/seleniumemulation/ElementFinder;)VCode  ()V    LineNumberTableLocalVariableTablethis9Lorg/openqa/selenium/internal/seleniumemulation/TypeKeys;handleSeleneseCommandU(Lorg/openqa/selenium/WebDriver;Ljava/lang/String;Ljava/lang/String;)Ljava/lang/Void; ;!  Y* *+*,   f*+-!'N--/'N-24'N-79'N-<>'N-AC'N-FH'N*+,KQY-SS* "$%&&'0(:)D*N,d.*ffYZf[\f]\D^ (*+,-_abcdPK %^D>ClAorg/openqa/selenium/internal/seleniumemulation/ControlKeyUp.class1';org/openqa/selenium/internal/seleniumemulation/ControlKeyUp>org/openqa/selenium/internal/seleniumemulation/SeleneseCommandkeyState9Lorg/openqa/selenium/internal/seleniumemulation/KeyState;<(Lorg/openqa/selenium/internal/seleniumemulation/KeyState;)VCode   ()V  LineNumberTableLocalVariableTablethis=Lorg/openqa/selenium/internal/seleniumemulation/ControlKeyUp;handleSeleneseCommandU(Lorg/openqa/selenium/WebDriver;Ljava/lang/String;Ljava/lang/String;)Ljava/lang/Void; 7org/openqa/selenium/internal/seleniumemulation/KeyState controlKeyDownZdriverLorg/openqa/selenium/WebDriver;locatorLjava/lang/String;valueW(Lorg/openqa/selenium/WebDriver;Ljava/lang/String;Ljava/lang/String;)Ljava/lang/Object; "  SourceFileControlKeyUp.java SignatureRLorg/openqa/selenium/internal/seleniumemulation/SeleneseCommand;! F * *+     V *   *    D  (*+,-!#$%&PK %^D>H<org/openqa/selenium/internal/seleniumemulation/Windows.class16org/openqa/selenium/internal/seleniumemulation/Windowsjava/lang/Object lastFrameLjava/util/Map; Signature5Ljava/util/Map;originalWindowHandleLjava/lang/String;"(Lorg/openqa/selenium/WebDriver;)VCode  ()V com/google/common/collect/Maps  newHashMap()Ljava/util/HashMap;   org/openqa/selenium/WebDriver getWindowHandle()Ljava/lang/String;  LineNumberTableLocalVariableTablethis8Lorg/openqa/selenium/internal/seleniumemulation/Windows;driverLorg/openqa/selenium/WebDriver; selectWindow4(Lorg/openqa/selenium/WebDriver;Ljava/lang/String;)V*null ,.-java/lang/String /0equals(Ljava/lang/Object;)Z 2 34switchTo/()Lorg/openqa/selenium/WebDriver$TargetLocator; 687+org/openqa/selenium/WebDriver$TargetLocator 9:window3(Ljava/lang/String;)Lorg/openqa/selenium/WebDriver;<_blank > ? selectBlankWindowAtitle= ,C DE startsWith(Ljava/lang/String;)Z ,G HIlength()I ,K LM substring(I)Ljava/lang/String; O P(selectWindowWithTitleRname= TVU java/util/Map W0 containsKey TY Z[get&(Ljava/lang/Object;)Ljava/lang/Object; ] ^( selectFrame T` a[removec)org/openqa/selenium/NoSuchWindowExceptione+com/thoughtworks/selenium/SeleniumExceptionwindowIDe+Lorg/openqa/selenium/NoSuchWindowException;-Lcom/thoughtworks/selenium/SeleniumException;k relative=top 6m nodefaultContent!()Lorg/openqa/selenium/WebDriver; Tq rsput8(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object; 6u v:frame xzy(org/openqa/selenium/NoSuchFrameException { getMessage d} ~*(Ljava/lang/String;Ljava/lang/Exception;)Vlocator*Lorg/openqa/selenium/NoSuchFrameException;  getWindowHandles()Ljava/util/Set;  java/util/Set iterator()Ljava/util/Iterator; java/util/Iterator next()Ljava/lang/Object;  getTitle hasNext()Zjava/lang/StringBuilder$Unable to select window with title: (Ljava/lang/String;)V append-(Ljava/lang/String;)Ljava/lang/StringBuilder; toString dtitlecurrenthandlejava/util/ArrayList (Ljava/util/Collection;)V java/util/List&org/openqa/selenium/JavascriptExecutorreturn window.name;  executeScript9(Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/Object;Unable to select window _blankhandlesLjava/util/List;valueLocalVariableTypeTable$Ljava/util/List; SourceFile Windows.java InnerClasses TargetLocator!   V***+!# $%"#$%&'( S),++1*5WV;,+ *+=E,@B*+,@FJN,QB ,QFJM+1,5W N*+,N*+S.*+*+X,\N*+_WXehbd!J( )*+%,-.6/D0E3N4X8h9i:o>ABCF"4#$%&f ighgi^( Vj,+ +1lW*+_W*+,pW+1,tWNdY-w-|&DGx!& I JK%L&P7QGRHSUV"*V#$V%&V H gP( n+N+:+,:+15W,+++1-5WdYY,!& YZ#[1\>]?ZIaObVc"4n#$n%&n g # ?  ,+MY+N-:P,:*+5+15W+,: ++1,5WdY!6 wyz,~8;IX]lmzw">#$%& y,A ]  y 6 PK %^D>A>org/openqa/selenium/internal/seleniumemulation/GetCookie.class1N8org/openqa/selenium/internal/seleniumemulation/GetCookie>org/openqa/selenium/internal/seleniumemulation/SeleneseCommand()VCode  LineNumberTableLocalVariableTablethis:Lorg/openqa/selenium/internal/seleniumemulation/GetCookie;handleSeleneseCommandW(Lorg/openqa/selenium/WebDriver;Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;java/lang/StringBuilder  org/openqa/selenium/WebDriver manage)()Lorg/openqa/selenium/WebDriver$Options; %org/openqa/selenium/WebDriver$Options  getCookies()Ljava/util/Set; "! java/util/Set #$iterator()Ljava/util/Iterator; &('java/util/Iterator )*next()Ljava/lang/Object;,org/openqa/selenium/Cookie +. /0toString()Ljava/lang/String; 2 34append-(Ljava/lang/String;)Ljava/lang/StringBuilder;6; &8 9:hasNext()Z .driverLorg/openqa/selenium/WebDriver;ignoredLjava/lang/String; alsoIgnoredbuilderLjava/lang/StringBuilder;cLorg/openqa/selenium/Cookie;W(Lorg/openqa/selenium/WebDriver;Ljava/lang/String;Ljava/lang/String;)Ljava/lang/Object; G  SourceFileGetCookie.java SignatureTLorg/openqa/selenium/internal/seleniumemulation/SeleneseCommand; InnerClassesOptions!/*   MY:+:"%+:-1W51W7;  *5=G >M M<=M>?M@? DAB*CDDE(*+,-F  HIJKL M PK %^D>pCorg/openqa/selenium/internal/seleniumemulation/ControlKeyDown.class1'=org/openqa/selenium/internal/seleniumemulation/ControlKeyDown>org/openqa/selenium/internal/seleniumemulation/SeleneseCommandkeyState9Lorg/openqa/selenium/internal/seleniumemulation/KeyState;<(Lorg/openqa/selenium/internal/seleniumemulation/KeyState;)VCode   ()V  LineNumberTableLocalVariableTablethis?Lorg/openqa/selenium/internal/seleniumemulation/ControlKeyDown;handleSeleneseCommandU(Lorg/openqa/selenium/WebDriver;Ljava/lang/String;Ljava/lang/String;)Ljava/lang/Void; 7org/openqa/selenium/internal/seleniumemulation/KeyState controlKeyDownZdriverLorg/openqa/selenium/WebDriver;locatorLjava/lang/String;valueW(Lorg/openqa/selenium/WebDriver;Ljava/lang/String;Ljava/lang/String;)Ljava/lang/Object; "  SourceFileControlKeyDown.java SignatureRLorg/openqa/selenium/internal/seleniumemulation/SeleneseCommand;! F * *+     V *   *    D  (*+,-!#$%&PK %^D>h@org/openqa/selenium/internal/seleniumemulation/MetaKeyDown.class1':org/openqa/selenium/internal/seleniumemulation/MetaKeyDown>org/openqa/selenium/internal/seleniumemulation/SeleneseCommandkeyState9Lorg/openqa/selenium/internal/seleniumemulation/KeyState;<(Lorg/openqa/selenium/internal/seleniumemulation/KeyState;)VCode   ()V  LineNumberTableLocalVariableTablethis;! F * *+     V *  *    D  (*+,-!#$%&PK %^D>ffKorg/openqa/selenium/internal/seleniumemulation/GetElementPositionLeft.class1;Eorg/openqa/selenium/internal/seleniumemulation/GetElementPositionLeft>org/openqa/selenium/internal/seleniumemulation/SeleneseCommandfinder>Lorg/openqa/selenium/internal/seleniumemulation/ElementFinder;A(Lorg/openqa/selenium/internal/seleniumemulation/ElementFinder;)VCode   ()V  LineNumberTableLocalVariableTablethisGLorg/openqa/selenium/internal/seleniumemulation/GetElementPositionLeft;handleSeleneseCommandW(Lorg/openqa/selenium/WebDriver;Ljava/lang/String;Ljava/lang/String;)Ljava/lang/Number; ;! F * *+     r* +,:!' !"4-./010 23D4 (*+,-5789:PK %^D>J[[Dorg/openqa/selenium/internal/seleniumemulation/GetCookieByName.class12>org/openqa/selenium/internal/seleniumemulation/GetCookieByName>org/openqa/selenium/internal/seleniumemulation/SeleneseCommand()VCode  LineNumberTableLocalVariableTablethis@Lorg/openqa/selenium/internal/seleniumemulation/GetCookieByName;handleSeleneseCommandW(Lorg/openqa/selenium/WebDriver;Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String; org/openqa/selenium/WebDriver manage)()Lorg/openqa/selenium/WebDriver$Options; %org/openqa/selenium/WebDriver$Options getCookieNamed0(Ljava/lang/String;)Lorg/openqa/selenium/Cookie; org/openqa/selenium/Cookie !getValue()Ljava/lang/String;driverLorg/openqa/selenium/WebDriver;nameLjava/lang/String;ignoredcookieLorg/openqa/selenium/Cookie;W(Lorg/openqa/selenium/WebDriver;Ljava/lang/String;Ljava/lang/String;)Ljava/lang/Object; +  SourceFileGetCookieByName.java SignatureTLorg/openqa/selenium/internal/seleniumemulation/SeleneseCommand; InnerClassesOptions!/*   s+,:  4 "#$%&%'(D)(*+,-*  ,-./0 1 PK %^D>AuCCIorg/openqa/selenium/internal/seleniumemulation/OptionSelectStrategy.class1 Corg/openqa/selenium/internal/seleniumemulation/OptionSelectStrategyjava/lang/Objectselect'(Ljava/util/List;Ljava/lang/String;ZZ)Z SignatureI(Ljava/util/List;Ljava/lang/String;ZZ)Z SourceFileOptionSelectStrategy.java  PK %^D>$ECorg/openqa/selenium/internal/seleniumemulation/WindowMaximize.class1+=org/openqa/selenium/internal/seleniumemulation/WindowMaximize>org/openqa/selenium/internal/seleniumemulation/SeleneseCommandjsBLorg/openqa/selenium/internal/seleniumemulation/JavascriptLibrary;E(Lorg/openqa/selenium/internal/seleniumemulation/JavascriptLibrary;)VCode   ()V  LineNumberTableLocalVariableTablethis?Lorg/openqa/selenium/internal/seleniumemulation/WindowMaximize;handleSeleneseCommandU(Lorg/openqa/selenium/WebDriver;Ljava/lang/String;Ljava/lang/String;)Ljava/lang/Void;qif (window.screen) { window.moveTo(0, 0); window.resizeTo(window.screen.availWidth, window.screen.availHeight);};java/lang/Object @org/openqa/selenium/internal/seleniumemulation/JavascriptLibrary  executeScriptX(Lorg/openqa/selenium/WebDriver;Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/Object;driverLorg/openqa/selenium/WebDriver;ignoredLjava/lang/String; alsoIgnoredW(Lorg/openqa/selenium/WebDriver;Ljava/lang/String;Ljava/lang/String;)Ljava/lang/Object; &  SourceFileWindowMaximize.java SignatureRLorg/openqa/selenium/internal/seleniumemulation/SeleneseCommand;! F * *+     e* +W "* !"#"D$ (*+,-%'()*PK %^D>=nccAorg/openqa/selenium/internal/seleniumemulation/SelectOption.class10;org/openqa/selenium/internal/seleniumemulation/SelectOption>org/openqa/selenium/internal/seleniumemulation/SeleneseCommand alertOverride>Lorg/openqa/selenium/internal/seleniumemulation/AlertOverride;select?Lorg/openqa/selenium/internal/seleniumemulation/SeleniumSelect;(Lorg/openqa/selenium/internal/seleniumemulation/AlertOverride;Lorg/openqa/selenium/internal/seleniumemulation/SeleniumSelect;)VCode  ()V    LineNumberTableLocalVariableTablethis=Lorg/openqa/selenium/internal/seleniumemulation/SelectOption;handleSeleneseCommandU(Lorg/openqa/selenium/WebDriver;Ljava/lang/String;Ljava/lang/String;)Ljava/lang/Void; ;!  Y* *+*,   f*+*+,-!#%*$%&'('D) (*+,-*,-./PK %^D> RRHorg/openqa/selenium/internal/seleniumemulation/IsSomethingSelected.class1?Borg/openqa/selenium/internal/seleniumemulation/IsSomethingSelected>org/openqa/selenium/internal/seleniumemulation/SeleneseCommandselect?Lorg/openqa/selenium/internal/seleniumemulation/SeleniumSelect;B(Lorg/openqa/selenium/internal/seleniumemulation/SeleniumSelect;)VCode   ()V  LineNumberTableLocalVariableTablethisDLorg/openqa/selenium/internal/seleniumemulation/IsSomethingSelected;handleSeleneseCommandX(Lorg/openqa/selenium/WebDriver;Ljava/lang/String;Ljava/lang/String;)Ljava/lang/Boolean; Forg/openqa/selenium/internal/seleniumemulation/SeleniumSelect$Property VALUEHLorg/openqa/selenium/internal/seleniumemulation/SeleniumSelect$Property; =org/openqa/selenium/internal/seleniumemulation/SeleniumSelect   getOptions(Lorg/openqa/selenium/WebDriver;Ljava/lang/String;Lorg/openqa/selenium/internal/seleniumemulation/SeleniumSelect$Property;Z)Ljava/util/List; "$#java/util/List %&size()I (*)java/lang/Boolean +,valueOf(Z)Ljava/lang/Boolean;driverLorg/openqa/selenium/WebDriver; selectLocatorLjava/lang/String;ignoredvaluesLjava/util/List;LocalVariableTypeTable$Ljava/util/List;W(Lorg/openqa/selenium/WebDriver;Ljava/lang/String;Ljava/lang/String;)Ljava/lang/Object; 8  SourceFileIsSomethingSelected.java SignatureULorg/openqa/selenium/internal/seleniumemulation/SeleneseCommand; InnerClassesProperty! F * *+     #* +,:!'' #%4##-.#/0#10234 25D6 (*+,-79:;<= >@PK %^D>L!Dorg/openqa/selenium/internal/seleniumemulation/RemoveSelection.class1=>org/openqa/selenium/internal/seleniumemulation/RemoveSelection>org/openqa/selenium/internal/seleniumemulation/SeleneseCommand elementFinder>Lorg/openqa/selenium/internal/seleniumemulation/ElementFinder;select?Lorg/openqa/selenium/internal/seleniumemulation/SeleniumSelect;(Lorg/openqa/selenium/internal/seleniumemulation/ElementFinder;Lorg/openqa/selenium/internal/seleniumemulation/SeleniumSelect;)VCode  ()V    LineNumberTableLocalVariableTablethis@Lorg/openqa/selenium/internal/seleniumemulation/RemoveSelection;handleSeleneseCommandU(Lorg/openqa/selenium/WebDriver;Ljava/lang/String;Ljava/lang/String;)Ljava/lang/Void; ;!  Y* *+*,   /*+,:* %Y')*+,-,# $%!'-)4///0/12/32 $45D6 (*+,-79:;aaKorg/openqa/selenium/internal/seleniumemulation/ImplicitLookupStrategy.class1/Eorg/openqa/selenium/internal/seleniumemulation/ImplicitLookupStrategyjava/lang/Object=org/openqa/selenium/internal/seleniumemulation/LookupStrategy()VCode  LineNumberTableLocalVariableTablethisGLorg/openqa/selenium/internal/seleniumemulation/ImplicitLookupStrategy;findS(Lorg/openqa/selenium/WebDriver;Ljava/lang/String;)Lorg/openqa/selenium/WebElement; document. java/lang/String  startsWith(Ljava/lang/String;)ZIorg/openqa/selenium/internal/seleniumemulation/DomTraversalLookupStrategy    //"Borg/openqa/selenium/internal/seleniumemulation/XPathLookupStrategy ! !&Gorg/openqa/selenium/internal/seleniumemulation/IdentifierLookupStrategy % %driverLorg/openqa/selenium/WebDriver;useLjava/lang/String; SourceFileImplicitLookupStrategy.java! /*    9,Y+,,!Y#+,$%Y'+,(  , 99)*9+,-.PK %^D>Norg/openqa/selenium/internal/seleniumemulation/RegExTextMatchingStrategy.class1*Horg/openqa/selenium/internal/seleniumemulation/RegExTextMatchingStrategyjava/lang/ObjectCorg/openqa/selenium/internal/seleniumemulation/TextMatchingStrategy()VCode  LineNumberTableLocalVariableTablethisJLorg/openqa/selenium/internal/seleniumemulation/RegExTextMatchingStrategy;isAMatch'(Ljava/lang/String;Ljava/lang/String;)Z java/util/regex/Pattern compile.(Ljava/lang/String;I)Ljava/util/regex/Pattern;  matcher3(Ljava/lang/CharSequence;)Ljava/util/regex/Matcher; java/util/regex/Matcher !find()Z compareThisLjava/lang/String;withpatternLjava/util/regex/Pattern;Ljava/util/regex/Matcher; SourceFileRegExTextMatchingStrategy.java! /*    n+N-,:  4"#$# %&'()PK %^D>1AACorg/openqa/selenium/internal/seleniumemulation/IsAlertPresent.class1(=org/openqa/selenium/internal/seleniumemulation/IsAlertPresent>org/openqa/selenium/internal/seleniumemulation/SeleneseCommand alertOverride>Lorg/openqa/selenium/internal/seleniumemulation/AlertOverride;A(Lorg/openqa/selenium/internal/seleniumemulation/AlertOverride;)VCode   ()V  LineNumberTableLocalVariableTablethis?Lorg/openqa/selenium/internal/seleniumemulation/IsAlertPresent;handleSeleneseCommandW(Lorg/openqa/selenium/WebDriver;Ljava/lang/String;Ljava/lang/String;)Ljava/lang/Object; J?mmLorg/openqa/selenium/internal/seleniumemulation/Timer$SeleneseTimerTask.class1#Forg/openqa/selenium/internal/seleniumemulation/Timer$SeleneseTimerTaskjava/util/TimerTaskthreadLjava/lang/Thread;this$06Lorg/openqa/selenium/internal/seleniumemulation/Timer;K(Lorg/openqa/selenium/internal/seleniumemulation/Timer;Ljava/lang/Thread;)VCode    ()V  LineNumberTableLocalVariableTablethisHLorg/openqa/selenium/internal/seleniumemulation/Timer$SeleneseTimerTask;run java/lang/Thread  interrupt SourceFile Timer.java InnerClasses!4org/openqa/selenium/internal/seleniumemulation/TimerSeleneseTimerTask   K*+ **,VT U ]*YL*+ç+ÿZ[Z]   "PK %^D>gu :org/openqa/selenium/internal/seleniumemulation/Timer.class14org/openqa/selenium/internal/seleniumemulation/Timerjava/lang/ObjecttimerLjava/util/Timer;timeoutJ(J)VCode  ()Vjava/util/Timer     LineNumberTableLocalVariableTablethis6Lorg/openqa/selenium/internal/seleniumemulation/Timer;run(Lorg/openqa/selenium/internal/seleniumemulation/SeleneseCommand;Lorg/openqa/selenium/WebDriver;[Ljava/lang/String;)Ljava/lang/Object; Signature(Lorg/openqa/selenium/internal/seleniumemulation/SeleneseCommand;Lorg/openqa/selenium/WebDriver;[Ljava/lang/String;)TT; ! java/lang/Thread "# currentThread()Ljava/lang/Thread;%Forg/openqa/selenium/internal/seleniumemulation/Timer$SeleneseTimerTask $' (K(Lorg/openqa/selenium/internal/seleniumemulation/Timer;Ljava/lang/Thread;)V * +,schedule(Ljava/util/TimerTask;J)V . /0 interrupted()Z2java/io/StringWriter 1 5java/io/PrintWriter 47 8(Ljava/io/Writer;)V :<;java/lang/IllegalStateException =>printStackTrace(Ljava/io/PrintWriter;)V 1@ ABtoString()Ljava/lang/String;Djava/lang/NullPointerExceptionFjava/lang/StringBuilderH:Illegal attempt to execute a command after calling stop() EJ K(Ljava/lang/String;)V EM NOappend-(Ljava/lang/String;)Ljava/lang/StringBuilder; E@ CJ SUT>org/openqa/selenium/internal/seleniumemulation/SeleneseCommand VWapplyF(Lorg/openqa/selenium/WebDriver;[Ljava/lang/String;)Ljava/lang/Object; $Y Z0cancel \^]java/lang/RuntimeException _`getCause()Ljava/lang/Throwable;bjava/lang/InterruptedExceptiond+com/thoughtworks/selenium/SeleniumExceptionf&Timed out waiting for action to finish ch i*(Ljava/lang/String;Ljava/lang/Exception;)Vcommand@Lorg/openqa/selenium/internal/seleniumemulation/SeleneseCommand;driverLorg/openqa/selenium/WebDriver;args[Ljava/lang/String;threadLjava/lang/Thread; myTimerTaskHLorg/openqa/selenium/internal/seleniumemulation/Timer$SeleneseTimerTask;e!Ljava/lang/IllegalStateException;writerLjava/io/StringWriter;stackLjava/lang/String;reLjava/lang/RuntimeException;causeLjava/lang/Throwable;LocalVariableTypeTableELorg/openqa/selenium/internal/seleniumemulation/SeleneseCommand; setTimeoutstop  Z SourceFile Timer.java InnerClassesSeleneseTimerTask!B  U* *Y* !  :$Y*&:**)@:-W1Y3:4Y69?:CYEYGILPQ-W+,-R: XW :[:acYeg:XW!:bjs\bjs^$%(!)#*'203>4E5I6Z5^:b=jEp=s>u?|@ACDEFp jklmnopqrs#;tu0.vwExyuz{||}~ j  >* JK 6* NO  $PK %^D>Borg/openqa/selenium/internal/seleniumemulation/GetExpression.class1org/openqa/selenium/internal/seleniumemulation/SeleneseCommand()VCode  LineNumberTableLocalVariableTablethis>Lorg/openqa/selenium/internal/seleniumemulation/GetExpression;handleSeleneseCommandW(Lorg/openqa/selenium/WebDriver;Ljava/lang/String;Ljava/lang/String;)Ljava/lang/Object;driverLorg/openqa/selenium/WebDriver;locatorLjava/lang/String;value SourceFileGetExpression.java!/*   J,  * PK %^D>2s Gorg/openqa/selenium/internal/seleniumemulation/LinkLookupStrategy.class1Aorg/openqa/selenium/internal/seleniumemulation/LinkLookupStrategyjava/lang/Object=org/openqa/selenium/internal/seleniumemulation/LookupStrategy(TEXT_MATCHING_STRATEGY_AND_VALUE_PATTERNLjava/util/regex/Pattern;textMatchingStrategiesLjava/util/Map; SignaturehLjava/util/Map;()VCode^(\p{Alpha}+):(.*) java/util/regex/Pattern compile-(Ljava/lang/String;)Ljava/util/regex/Pattern;  LineNumberTableLocalVariableTable   java/util/HashMap  # %implicit'Gorg/openqa/selenium/internal/seleniumemulation/GlobTextMatchingStrategy & *,+ java/util/Map -.put8(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;0glob2regexp4Horg/openqa/selenium/internal/seleniumemulation/RegExTextMatchingStrategy 37exact9Horg/openqa/selenium/internal/seleniumemulation/ExactTextMatchingStrategy 8thisCLorg/openqa/selenium/internal/seleniumemulation/LinkLookupStrategy;findS(Lorg/openqa/selenium/WebDriver;Ljava/lang/String;)Lorg/openqa/selenium/WebElement;@//a BDCorg/openqa/selenium/By EFxpath,(Ljava/lang/String;)Lorg/openqa/selenium/By; HJIorg/openqa/selenium/WebDriver KL findElements*(Lorg/openqa/selenium/By;)Ljava/util/List; N OPmatcher3(Ljava/lang/CharSequence;)Ljava/util/regex/Matcher; RTSjava/util/regex/Matcher UVmatches()Z RX YZgroup(I)Ljava/lang/String; *\ ]^get&(Ljava/lang/Object;)Ljava/lang/Object;`Corg/openqa/selenium/internal/seleniumemulation/TextMatchingStrategy bdcjava/util/List efiterator()Ljava/util/Iterator; hjijava/util/Iterator klnext()Ljava/lang/Object;norg/openqa/selenium/WebElement mp qrgetText()Ljava/lang/String; _t uvisAMatch'(Ljava/lang/String;Ljava/lang/String;)Z hx yremove h{ |VhasNext b~ size()I b ](I)Ljava/lang/Object;+com/thoughtworks/selenium/SeleniumExceptionjava/lang/StringBuilder java/lang/String valueOf&(Ljava/lang/Object;)Ljava/lang/String; (Ljava/lang/String;)V not found append-(Ljava/lang/String;)Ljava/lang/StringBuilder; rtoString driverLorg/openqa/selenium/WebDriver;useLjava/lang/String;elementsLjava/util/List; strategyNameLjava/util/regex/Matcher;strategyELorg/openqa/selenium/internal/seleniumemulation/TextMatchingStrategy;allLinksLjava/util/Iterator;link Lorg/openqa/selenium/WebElement;LocalVariableTypeTable2Ljava/util/List;6Ljava/util/Iterator; SourceFileLinkLookupStrategy.java!    -  "!\**Y!"*"$&Y()W*"/&Y()W*"13Y5)W*"68Y:)W%#&"'5(H)[* \;<=>{ +?AGN$:,M:QW:WM*"[_:-a:(gm:,os wz-}-mYY,B- /01!2)305@7H8K9W:i;p8z>?@\ ;< O@iHaW HaPK %^D>I+  Borg/openqa/selenium/internal/seleniumemulation/ElementFinder.class1;()VCode^(\p{Alpha}+)=(.*) java/util/regex/Pattern compile-(Ljava/lang/String;)Ljava/util/regex/Pattern;  LineNumberTableLocalVariableTable    com/google/common/collect/Maps !" newHashMap()Ljava/util/HashMap; $  & ' setUpElementFindingStrategiesthis>Lorg/openqa/selenium/internal/seleniumemulation/ElementFinder; findElementS(Lorg/openqa/selenium/WebDriver;Ljava/lang/String;)Lorg/openqa/selenium/WebElement; - ./ findStrategyS(Ljava/lang/String;)Lorg/openqa/selenium/internal/seleniumemulation/LookupStrategy; 1 23determineWebDriverLocator&(Ljava/lang/String;)Ljava/lang/String; 576=org/openqa/selenium/internal/seleniumemulation/LookupStrategy 8+find:+com/thoughtworks/selenium/SeleniumException<java/lang/StringBuilder>Element ;@ A(Ljava/lang/String;)V ;C DEappend-(Ljava/lang/String;)Ljava/lang/StringBuilder;G not found ;I JKtoString()Ljava/lang/String; 9@N*org/openqa/selenium/NoSuchElementExceptiondriverLorg/openqa/selenium/WebDriver;locatorLjava/lang/String;strategy?Lorg/openqa/selenium/internal/seleniumemulation/LookupStrategy;usee,Lorg/openqa/selenium/NoSuchElementException;addT(Ljava/lang/String;Lorg/openqa/selenium/internal/seleniumemulation/LookupStrategy;)V []\ java/util/Map ^_put8(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object; strategyNamelookupStrategycimplicit e fgmatcher3(Ljava/lang/CharSequence;)Ljava/util/regex/Matcher; ikjjava/util/regex/Matcher lmmatches()Z io pqgroup(I)Ljava/lang/String; [s tuget&(Ljava/lang/Object;)Ljava/lang/Object;wNo matcher found for Ljava/util/regex/Matcher;zalt|@org/openqa/selenium/internal/seleniumemulation/AltLookupStrategy {classBorg/openqa/selenium/internal/seleniumemulation/ClassLookupStrategy css@org/openqa/selenium/internal/seleniumemulation/CssLookupStrategy id?org/openqa/selenium/internal/seleniumemulation/IdLookupStrategy  identifierGorg/openqa/selenium/internal/seleniumemulation/IdentifierLookupStrategy Eorg/openqa/selenium/internal/seleniumemulation/ImplicitLookupStrategy linkAorg/openqa/selenium/internal/seleniumemulation/LinkLookupStrategy nameAorg/openqa/selenium/internal/seleniumemulation/NameLookupStrategy xpathBorg/openqa/selenium/internal/seleniumemulation/XPathLookupStrategy domIorg/openqa/selenium/internal/seleniumemulation/DomTraversalLookupStrategy  SourceFileElementFinder.java!    -     F**#*%#! $% ()*+ 6*,,N*,0:-+4:9Y;Y=?,BFBHL M() ,-.>6()6OP6QR0ST )URVWXY O *#+,ZW 3 4  () `R aT./ GbM+dN-h -nM*#,r5:9Y;Yv?,BHL"79 :;>'?,@DB4G()GQRD`R <fx' ST23 q+M+dN-h -nM,FH IJM*()QRUR fx'  *#y{Y}ZW*#~YZW*#YZW*#YZW*#YZW*#bYZW*#YZW*#YZW*#YZW*#YZW. QR&S9TLU_VrWXYZ[ ()PK %^D>z]]Jorg/openqa/selenium/internal/seleniumemulation/IsConfirmationPresent.class1(Dorg/openqa/selenium/internal/seleniumemulation/IsConfirmationPresent>org/openqa/selenium/internal/seleniumemulation/SeleneseCommand alertOverride>Lorg/openqa/selenium/internal/seleniumemulation/AlertOverride;A(Lorg/openqa/selenium/internal/seleniumemulation/AlertOverride;)VCode   ()V  LineNumberTableLocalVariableTablethisFLorg/openqa/selenium/internal/seleniumemulation/IsConfirmationPresent;handleSeleneseCommandW(Lorg/openqa/selenium/WebDriver;Ljava/lang/String;Ljava/lang/String;)Ljava/lang/Object; %{Forg/openqa/selenium/internal/seleniumemulation/CssLookupStrategy.class1$@org/openqa/selenium/internal/seleniumemulation/CssLookupStrategyjava/lang/Object=org/openqa/selenium/internal/seleniumemulation/LookupStrategy()VCode  LineNumberTableLocalVariableTablethisBLorg/openqa/selenium/internal/seleniumemulation/CssLookupStrategy;findS(Lorg/openqa/selenium/WebDriver;Ljava/lang/String;)Lorg/openqa/selenium/WebElement; org/openqa/selenium/By  cssSelector,(Ljava/lang/String;)Lorg/openqa/selenium/By; org/openqa/selenium/WebDriver  findElement:(Lorg/openqa/selenium/By;)Lorg/openqa/selenium/WebElement;driverLorg/openqa/selenium/WebDriver;useLjava/lang/String; SourceFileCssLookupStrategy.java! /*    I +,     !"#PK %^D>0Z:org/openqa/selenium/internal/seleniumemulation/Click.class194org/openqa/selenium/internal/seleniumemulation/Click>org/openqa/selenium/internal/seleniumemulation/SeleneseCommand alertOverride>Lorg/openqa/selenium/internal/seleniumemulation/AlertOverride;finder>Lorg/openqa/selenium/internal/seleniumemulation/ElementFinder;(Lorg/openqa/selenium/internal/seleniumemulation/AlertOverride;Lorg/openqa/selenium/internal/seleniumemulation/ElementFinder;)VCode  ()V    LineNumberTableLocalVariableTablethis6Lorg/openqa/selenium/internal/seleniumemulation/Click; elementFinderhandleSeleneseCommandU(Lorg/openqa/selenium/WebDriver;Ljava/lang/String;Ljava/lang/String;)Ljava/lang/Void; ;!  Y* *+*,   z*+*+, :&"$%&4+,-./. 01D2 (*+,-35678PK %^D>95RbbDorg/openqa/selenium/internal/seleniumemulation/SeleniumMutator.class1S>org/openqa/selenium/internal/seleniumemulation/SeleniumMutatorjava/lang/Object'(Ljava/lang/String;Ljava/lang/String;)VCode  ()Vjava/lang/StringBuilder.*  (Ljava/lang/String;)V.\s*\.\s*  java/lang/String !"replaceD(Ljava/lang/CharSequence;Ljava/lang/CharSequence;)Ljava/lang/String; $ %&append-(Ljava/lang/String;)Ljava/lang/StringBuilder; ( )*toString()Ljava/lang/String; ,.-java/util/regex/Pattern /0compile-(Ljava/lang/String;)Ljava/util/regex/Pattern; 2  4 6 LineNumberTableLocalVariableTablethis@Lorg/openqa/selenium/internal/seleniumemulation/SeleniumMutator;rawmutate.(Ljava/lang/String;Ljava/lang/StringBuilder;)V ,? @Amatcher3(Ljava/lang/CharSequence;)Ljava/util/regex/Matcher; CEDjava/util/regex/Matcher FGmatches()ZI7%s = function() { return (%s).apply(null, arguments);}; K LMformat9(Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/String;scriptappendToLjava/lang/StringBuilder; SourceFileSeleniumMutator.java!   4*Y+##'N*-+1*+3*,57 !!)".#3$8*49:4 4 !; <=~,*1+>B,HY*3SY*5SJ#W7'(,-$,+.8 ,9:,N ,OPQRPK %^D>]dLorg/openqa/selenium/internal/seleniumemulation/SeleniumSelect$Property.class1:Forg/openqa/selenium/internal/seleniumemulation/SeleniumSelect$Propertyjava/lang/EnumIDHLorg/openqa/selenium/internal/seleniumemulation/SeleniumSelect$Property;INDEXTEXTVALUE ENUM$VALUESI[Lorg/openqa/selenium/internal/seleniumemulation/SeleniumSelect$Property;()VCode  (Ljava/lang/String;I)V          LineNumberTableLocalVariableTable thisvaluesK()[Lorg/openqa/selenium/internal/seleniumemulation/SeleniumSelect$Property; (*)java/lang/System +, arraycopy*(Ljava/lang/Object;ILjava/lang/Object;II)VvalueOf\(Ljava/lang/String;)Lorg/openqa/selenium/internal/seleniumemulation/SeleniumSelect$Property; 0 -15(Ljava/lang/Class;Ljava/lang/String;)Ljava/lang/Enum; SourceFileSeleniumSelect.java SignatureZLjava/lang/Enum; InnerClasses8=org/openqa/selenium/internal/seleniumemulation/SeleniumSelectProperty@1@@@@   TYYYYYSYSYSYS!* +,'-4)"1*+#!)" $ %&6YK*Y<YM',!" -.* */!"23456 79@PK %^D>9Corg/openqa/selenium/internal/seleniumemulation/SeleniumSelect.class1=org/openqa/selenium/internal/seleniumemulation/SeleniumSelectjava/lang/ObjectoptionSelectStrategiesLjava/util/Map; SignaturehLjava/util/Map;finder>Lorg/openqa/selenium/internal/seleniumemulation/ElementFinder;T$SWITCH_TABLE$org$openqa$selenium$internal$seleniumemulation$SeleniumSelect$Property[IA(Lorg/openqa/selenium/internal/seleniumemulation/ElementFinder;)VCode  ()V com/google/common/collect/Maps  newHashMap()Ljava/util/HashMap;     setUpOptionFindingStrategiesLineNumberTableLocalVariableTablethis?Lorg/openqa/selenium/internal/seleniumemulation/SeleniumSelect; getOptions(Lorg/openqa/selenium/WebDriver;Ljava/lang/String;Lorg/openqa/selenium/internal/seleniumemulation/SeleniumSelect$Property;Z)Ljava/util/List;(Lorg/openqa/selenium/WebDriver;Ljava/lang/String;Lorg/openqa/selenium/internal/seleniumemulation/SeleniumSelect$Property;Z)Ljava/util/List; (*)=java/util/List ?@size()IB+com/thoughtworks/selenium/SeleniumExceptionD2Specified element is not a Select (has no options) AF G(Ljava/lang/String;)VIjava/util/ArrayList H <L MNiterator()Ljava/util/Iterator; PRQjava/util/Iterator STnext()Ljava/lang/Object; 6V WX isSelected()Z Z [()[I ]_^Forg/openqa/selenium/internal/seleniumemulation/SeleniumSelect$Property `@ordinal 6b cdgetText()Ljava/lang/String; <f ghadd(Ljava/lang/Object;)Z 6j kdgetValuemid 6o pq getAttribute&(Ljava/lang/String;)Ljava/lang/String;s&org/openqa/selenium/JavascriptExecutorureturn arguments[0].index rw xy executeScript9(Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/Object; {}|java/lang/String ~valueOf&(Ljava/lang/Object;)Ljava/lang/String; P XhasNextdriverLorg/openqa/selenium/WebDriver; selectLocatorLjava/lang/String;propertyHLorg/openqa/selenium/internal/seleniumemulation/SeleniumSelect$Property;fetchAllZelement Lorg/openqa/selenium/WebElement;optionsLjava/util/List;selectedOptionsresultLjava/lang/Object;LocalVariableTypeTable2Ljava/util/List;$Ljava/util/List; isMultiple#(Lorg/openqa/selenium/WebElement;)Zmultiplefalse { hequals theSelectselectH(Lorg/openqa/selenium/WebDriver;Ljava/lang/String;Ljava/lang/String;ZZ)V  Borg/openqa/selenium/internal/seleniumemulation/RemoveAllSelections  applyF(Lorg/openqa/selenium/WebDriver;[Ljava/lang/String;)Ljava/lang/Object; ( STRATEGY_AND_VALUE_PATTERNLjava/util/regex/Pattern; java/util/regex/Pattern matcher3(Ljava/lang/CharSequence;)Ljava/util/regex/Matcher;implicit java/util/regex/Matcher Xmatches group(I)Ljava/lang/String;  java/util/Map get&(Ljava/lang/Object;)Ljava/lang/Object;Corg/openqa/selenium/internal/seleniumemulation/OptionSelectStrategyjava/lang/StringBuilder F (from append-(Ljava/lang/String;)Ljava/lang/StringBuilder;') is not a method for selecting options dtoString '(Ljava/util/List;Ljava/lang/String;ZZ)Z is not an option optionLocator setSelected onlyOneOption allOptionsLjava/util/regex/Matcher; strategyNameusestrategyELorg/openqa/selenium/internal/seleniumemulation/OptionSelectStrategy;Horg/openqa/selenium/internal/seleniumemulation/LabelOptionSelectStrategy  put8(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;Eorg/openqa/selenium/internal/seleniumemulation/IdOptionSelectStrategy indexHorg/openqa/selenium/internal/seleniumemulation/IndexOptionSelectStrategy labelvalueHorg/openqa/selenium/internal/seleniumemulation/ValueOptionSelectStrategy   ] valuesK()[Lorg/openqa/selenium/internal/seleniumemulation/SeleniumSelect$Property; ] ID ] INDEX ]  TEXT ]  VALUEjava/lang/NoSuchFieldError SourceFileSeleniumSelect.java InnerClassesProperty!   Y***+* $! %&'!"# $%& *+,':-/5:; AYCEHYJ:K:  O6: UY-\.zCW1aeWLieW:lneW&+rtYSv:  zeW \ V1 24#5-86:N;]<`<>?BCFGKLKM:S!f "# 6N. 6u'+nM,,, W YZ[%]! '"#'  *+,':-/5:*6 Y*+{Y,SW-: : -:   :  :  : * :  (AYY zͶ-Ӷ϶շE  AYY-z۶϶շE ^a bd!f+gCjFkJjLlPmSo[pcqkspttwxyzy}~! "# !L P S X `*YW*lYW*YW*YW*YW &9L_! `"# [JYW K*\OW*\OW*\OW* \OW*Y&)*367@C  ! ]@PK %^D>I>org/openqa/selenium/internal/seleniumemulation/FireEvent.class178org/openqa/selenium/internal/seleniumemulation/FireEvent>org/openqa/selenium/internal/seleniumemulation/SeleneseCommand elementFinder>Lorg/openqa/selenium/internal/seleniumemulation/ElementFinder;jsBLorg/openqa/selenium/internal/seleniumemulation/JavascriptLibrary;(Lorg/openqa/selenium/internal/seleniumemulation/ElementFinder;Lorg/openqa/selenium/internal/seleniumemulation/JavascriptLibrary;)VCode  ()V    LineNumberTableLocalVariableTablethis:Lorg/openqa/selenium/internal/seleniumemulation/FireEvent;handleSeleneseCommandU(Lorg/openqa/selenium/WebDriver;Ljava/lang/String;Ljava/lang/String;)Ljava/lang/Void; ;!  Y* *+*,   {!*+,:*+!Y-S#" #%4!!)*!+,!-, ./D0 (*+,-13456PK %^D> 2AAGorg/openqa/selenium/internal/seleniumemulation/BaseFilterFunction.class1@Aorg/openqa/selenium/internal/seleniumemulation/BaseFilterFunctionjava/lang/Object=org/openqa/selenium/internal/seleniumemulation/FilterFunction()VCode  LineNumberTableLocalVariableTablethisCLorg/openqa/selenium/internal/seleniumemulation/BaseFilterFunction;filterElements4(Ljava/util/List;Ljava/lang/String;)Ljava/util/List; Signaturex(Ljava/util/List;Ljava/lang/String;)Ljava/util/List;java/util/ArrayList  java/util/List iterator()Ljava/util/Iterator;  java/util/Iterator !"next()Ljava/lang/Object;$org/openqa/selenium/WebElement & '( shouldAdd5(Lorg/openqa/selenium/WebElement;Ljava/lang/String;)Z * +,add(Ljava/lang/Object;)Z . /0hasNext()Z allElementsLjava/util/List; filterValueLjava/lang/String;toReturnLjava/util/ArrayList;Ljava/util/Iterator;element Lorg/openqa/selenium/WebElement;LocalVariableTypeTable2Ljava/util/List;7Ljava/util/ArrayList;6Ljava/util/Iterator; SourceFileBaseFilterFunction.java! /*    <YN+: #:*,% -)W-- " !")#0 :& ><<12<34456,789: <1;45<,='(>?PK %^D>I@org/openqa/selenium/internal/seleniumemulation/DoubleClick.class1.:org/openqa/selenium/internal/seleniumemulation/DoubleClick>org/openqa/selenium/internal/seleniumemulation/SeleneseCommandfinder>Lorg/openqa/selenium/internal/seleniumemulation/ElementFinder;A(Lorg/openqa/selenium/internal/seleniumemulation/ElementFinder;)VCode   ()V  LineNumberTableLocalVariableTablethis;! F * *+     y* +,:! "#$4 !"#$# %&D' (*+,-(*+,-PK %^D>`E=org/openqa/selenium/internal/seleniumemulation/KeyEvent.class1O7org/openqa/selenium/internal/seleniumemulation/KeyEvent>org/openqa/selenium/internal/seleniumemulation/SeleneseCommand elementFinder>Lorg/openqa/selenium/internal/seleniumemulation/ElementFinder;jsBLorg/openqa/selenium/internal/seleniumemulation/JavascriptLibrary;state9Lorg/openqa/selenium/internal/seleniumemulation/KeyState; eventNameLjava/lang/String;(Lorg/openqa/selenium/internal/seleniumemulation/ElementFinder;Lorg/openqa/selenium/internal/seleniumemulation/JavascriptLibrary;Lorg/openqa/selenium/internal/seleniumemulation/KeyState;Ljava/lang/String;)VCode  ()V       LineNumberTableLocalVariableTablethis9Lorg/openqa/selenium/internal/seleniumemulation/KeyEvent;handleSeleneseCommandU(Lorg/openqa/selenium/WebDriver;Ljava/lang/String;Ljava/lang/String;)Ljava/lang/Void; "$#;!   **+*,*-*  !4   S*+**+,!'Y-SY*)/SY*5/SY*8/SY*;/S>%&N%Q(*SSDESF SG DH(*+,-IKLMNPK %^D><org/openqa/selenium/internal/seleniumemulation/Refresh.class1)6org/openqa/selenium/internal/seleniumemulation/Refresh>org/openqa/selenium/internal/seleniumemulation/SeleneseCommand()VCode  LineNumberTableLocalVariableTablethis8Lorg/openqa/selenium/internal/seleniumemulation/Refresh;handleSeleneseCommandU(Lorg/openqa/selenium/WebDriver;Ljava/lang/String;Ljava/lang/String;)Ljava/lang/Void; org/openqa/selenium/WebDriver navigate,()Lorg/openqa/selenium/WebDriver$Navigation; (org/openqa/selenium/WebDriver$Navigation refreshdriverLorg/openqa/selenium/WebDriver;ignoredLjava/lang/String; alsoIgnoredW(Lorg/openqa/selenium/WebDriver;Ljava/lang/String;Ljava/lang/String;)Ljava/lang/Object; "  SourceFile Refresh.java SignatureRLorg/openqa/selenium/internal/seleniumemulation/SeleneseCommand; InnerClasses Navigation!/*   Y +   *   D (*+,-!  #$%&' ( PK %^D>x 99Forg/openqa/selenium/internal/seleniumemulation/MethodDeclaration.class1V@org/openqa/selenium/internal/seleniumemulation/MethodDeclarationjava/lang/Object'(Ljava/lang/String;Ljava/lang/String;)VCode  ()V.\s*\.\s* java/lang/String replaceD(Ljava/lang/CharSequence;Ljava/lang/CharSequence;)Ljava/lang/String;java/lang/StringBuilder.*  !(Ljava/lang/String;)V # $%append-(Ljava/lang/String;)Ljava/lang/StringBuilder;' \s*\(\s*\).* ) *+toString()Ljava/lang/String; -/.java/util/regex/Pattern 01compile-(Ljava/lang/String;)Ljava/util/regex/Pattern; 3  5 67valueOf&(Ljava/lang/Object;)Ljava/lang/String;9 = function() { ; } = LineNumberTableLocalVariableTablethisBLorg/openqa/selenium/internal/seleniumemulation/MethodDeclaration;rawresultbasemutate.(Ljava/lang/String;Ljava/lang/StringBuilder;)V -H IJmatcher3(Ljava/lang/CharSequence;)Ljava/util/regex/Matcher; LNMjava/util/regex/Matcher OPmatches()ZscriptoutputToLjava/lang/StringBuilder; SourceFileMethodDeclaration.java!   J*+N*Y-"&"(,2*Y+48",":"(<> )I ?*J@AJB JC  =D EF c*2+GK,*<"W>#$'(? @AQ RSTUPK %^D>.9&Aorg/openqa/selenium/internal/seleniumemulation/ShiftKeyDown.class1';org/openqa/selenium/internal/seleniumemulation/ShiftKeyDown>org/openqa/selenium/internal/seleniumemulation/SeleneseCommandkeyState9Lorg/openqa/selenium/internal/seleniumemulation/KeyState;<(Lorg/openqa/selenium/internal/seleniumemulation/KeyState;)VCode   ()V  LineNumberTableLocalVariableTablethis=Lorg/openqa/selenium/internal/seleniumemulation/ShiftKeyDown;handleSeleneseCommandU(Lorg/openqa/selenium/WebDriver;Ljava/lang/String;Ljava/lang/String;)Ljava/lang/Void; 7org/openqa/selenium/internal/seleniumemulation/KeyState  shiftKeyDownZdriverLorg/openqa/selenium/WebDriver;locatorLjava/lang/String;valueW(Lorg/openqa/selenium/WebDriver;Ljava/lang/String;Ljava/lang/String;)Ljava/lang/Object; "  SourceFileShiftKeyDown.java SignatureRLorg/openqa/selenium/internal/seleniumemulation/SeleneseCommand;! F * *+     V *  *    D  (*+,-!#$%&PK %^D>_E66Horg/openqa/selenium/internal/seleniumemulation/IndexFilterFunction.class1LBorg/openqa/selenium/internal/seleniumemulation/IndexFilterFunctionjava/lang/Object=org/openqa/selenium/internal/seleniumemulation/FilterFunction()VCode  LineNumberTableLocalVariableTablethisDLorg/openqa/selenium/internal/seleniumemulation/IndexFilterFunction;filterElements4(Ljava/util/List;Ljava/lang/String;)Ljava/util/List; Signaturex(Ljava/util/List;Ljava/lang/String;)Ljava/util/List; java/lang/Integer parseInt(Ljava/lang/String;)I java/util/List size()I ! "#get(I)Ljava/lang/Object;%org/openqa/selenium/WebElement ')(java/util/Collections *+ singletonList$(Ljava/lang/Object;)Ljava/util/List;-+com/thoughtworks/selenium/SeleniumException/java/lang/StringBuilder1Element with index .3 4(Ljava/lang/String;)V .6 78append-(Ljava/lang/String;)Ljava/lang/StringBuilder;: not found .< =>toString()Ljava/lang/String; ,3Ajava/lang/NumberFormatException allElementsLjava/util/List; filterValueLjava/lang/String;indexILocalVariableTypeTable2Ljava/util/List; SourceFileIndexFilterFunction.java! /*    ;,>++ $&N,Y.Y02,595;?@  !% *;;BC;DEFGH ;BIJKPK %^D>< Horg/openqa/selenium/internal/seleniumemulation/RemoveAllSelections.class1dBorg/openqa/selenium/internal/seleniumemulation/RemoveAllSelections>org/openqa/selenium/internal/seleniumemulation/SeleneseCommandfinder>Lorg/openqa/selenium/internal/seleniumemulation/ElementFinder;A(Lorg/openqa/selenium/internal/seleniumemulation/ElementFinder;)VCode   ()V  LineNumberTableLocalVariableTablethisDLorg/openqa/selenium/internal/seleniumemulation/RemoveAllSelections;handleSeleneseCommandU(Lorg/openqa/selenium/WebDriver;Ljava/lang/String;Ljava/lang/String;)Ljava/lang/Void; ; Signature5(Ljava/util/List;)V IKJjava/util/List LMiterator()Ljava/util/Iterator; OQPjava/util/Iterator RSnext()Ljava/lang/Object; $U VW isSelected()Z $Y ZWtoggle O\ ]WhasNextW(Lorg/openqa/selenium/WebDriver;Ljava/lang/String;Ljava/lang/String;)Ljava/lang/Object; `  SourceFileRemoveAllSelections.javaRLorg/openqa/selenium/internal/seleniumemulation/SeleneseCommand;! F * *+     =* +,:#:)+: /1*7# $&$'3(5+;-H==;<==>=?> 2@A$BC$*>D $BE9:FG .+HN-N$M,T ,XW-[123$1-5 ..BCAD .BED^ (*+,-_abFcPK %^D>ccJorg/openqa/selenium/internal/seleniumemulation/GetElementPositionTop.class1;Dorg/openqa/selenium/internal/seleniumemulation/GetElementPositionTop>org/openqa/selenium/internal/seleniumemulation/SeleneseCommandfinder>Lorg/openqa/selenium/internal/seleniumemulation/ElementFinder;A(Lorg/openqa/selenium/internal/seleniumemulation/ElementFinder;)VCode   ()V  LineNumberTableLocalVariableTablethisFLorg/openqa/selenium/internal/seleniumemulation/GetElementPositionTop;handleSeleneseCommandW(Lorg/openqa/selenium/WebDriver;Ljava/lang/String;Ljava/lang/String;)Ljava/lang/Number; ;! F * *+     r* +,:!' !"4-./010 23D4 (*+,-5789:PK %^D>0aRR;org/openqa/selenium/internal/seleniumemulation/Submit.class1,5org/openqa/selenium/internal/seleniumemulation/Submit>org/openqa/selenium/internal/seleniumemulation/SeleneseCommandfinder>Lorg/openqa/selenium/internal/seleniumemulation/ElementFinder;A(Lorg/openqa/selenium/internal/seleniumemulation/ElementFinder;)VCode   ()V  LineNumberTableLocalVariableTablethis7Lorg/openqa/selenium/internal/seleniumemulation/Submit;handleSeleneseCommandU(Lorg/openqa/selenium/WebDriver;Ljava/lang/String;Ljava/lang/String;)Ljava/lang/Void; ;! F * *+     \* +, !* !"#$#D% (*+,-&()*+PK %^D>J@org/openqa/selenium/internal/seleniumemulation/DragAndDrop.class1D:org/openqa/selenium/internal/seleniumemulation/DragAndDrop>org/openqa/selenium/internal/seleniumemulation/SeleneseCommandfinder>Lorg/openqa/selenium/internal/seleniumemulation/ElementFinder;A(Lorg/openqa/selenium/internal/seleniumemulation/ElementFinder;)VCode   ()V  LineNumberTableLocalVariableTablethis;! F * *+     8-:2!62!6* +,'-/ !"!$6&H8834856876 /89#:;!<;D= (*+,->@ABCPK %^D>9>Eorg/openqa/selenium/internal/seleniumemulation/IsElementPresent.class11?org/openqa/selenium/internal/seleniumemulation/IsElementPresent>org/openqa/selenium/internal/seleniumemulation/SeleneseCommandfinder>Lorg/openqa/selenium/internal/seleniumemulation/ElementFinder;A(Lorg/openqa/selenium/internal/seleniumemulation/ElementFinder;)VCode   ()V  LineNumberTableLocalVariableTablethisALorg/openqa/selenium/internal/seleniumemulation/IsElementPresent;handleSeleneseCommandX(Lorg/openqa/selenium/WebDriver;Ljava/lang/String;Ljava/lang/String;)Ljava/lang/Boolean; ;! F * *+     |* +,W:!! "#$4#$%&'&()D* (*+,-+-./0PK %^D>GNHorg/openqa/selenium/internal/seleniumemulation/WaitForPageToLoad$1.class1DBorg/openqa/selenium/internal/seleniumemulation/WaitForPageToLoad$1com/thoughtworks/selenium/WaitstartedJthis$0BLorg/openqa/selenium/internal/seleniumemulation/WaitForPageToLoad; val$driverLorg/openqa/selenium/WebDriver;d(Lorg/openqa/selenium/internal/seleniumemulation/WaitForPageToLoad;Lorg/openqa/selenium/WebDriver;)VCode     ()V java/lang/System currentTimeMillis()J  LineNumberTableLocalVariableTablethisDLorg/openqa/selenium/internal/seleniumemulation/WaitForPageToLoad$1;until()Z$&org/openqa/selenium/JavascriptExecutor&Hreturn document['readyState'] ? 'complete' == document.readyState : true(java/lang/Object #* +, executeScript9(Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/Object;.java/lang/Boolean -0 1" booleanValue 354@org/openqa/selenium/internal/seleniumemulation/WaitForPageToLoad 67access$1E(Lorg/openqa/selenium/internal/seleniumemulation/WaitForPageToLoad;)I9java/lang/ExceptionresultLjava/lang/Object;now SourceFileWaitForPageToLoad.javaEnclosingMethod ABhandleSeleneseCommandU(Lorg/openqa/selenium/WebDriver;Ljava/lang/String;Ljava/lang/String;)Ljava/lang/Void; InnerClasses    H*+*,** ./  !" M*#%')L+,+-%+-/A *e*2*L>J8@GJ8* 34 35(6,7>8@;J=K@ M 7:;,<=>?3@C PK %^D>7jHHForg/openqa/selenium/internal/seleniumemulation/WaitForPageToLoad.class1B@org/openqa/selenium/internal/seleniumemulation/WaitForPageToLoad>org/openqa/selenium/internal/seleniumemulation/SeleneseCommand timeToWaitI()VCode    LineNumberTableLocalVariableTablethisBLorg/openqa/selenium/internal/seleniumemulation/WaitForPageToLoad; setTimeToWait(I)VhandleSeleneseCommandU(Lorg/openqa/selenium/WebDriver;Ljava/lang/String;Ljava/lang/String;)Ljava/lang/Void;&org/openqa/selenium/JavascriptExecutor java/lang/Long  parseLong(Ljava/lang/String;)JBorg/openqa/selenium/internal/seleniumemulation/WaitForPageToLoad$1 ! "d(Lorg/openqa/selenium/internal/seleniumemulation/WaitForPageToLoad;Lorg/openqa/selenium/WebDriver;)V$ Failed to load page within %s ms&java/lang/Object (*)java/lang/String +,format9(Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/String; . /0wait(Ljava/lang/String;J)VdriverLorg/openqa/selenium/WebDriver;timeoutLjava/lang/String;ignoredtimeoutInMillisJW(Lorg/openqa/selenium/WebDriver;Ljava/lang/String;Ljava/lang/String;)Ljava/lang/Object; : access$1E(Lorg/openqa/selenium/internal/seleniumemulation/WaitForPageToLoad;)I SourceFileWaitForPageToLoad.java SignatureRLorg/openqa/selenium/internal/seleniumemulation/SeleneseCommand; InnerClasses! = * *d     >*  !" ,+,7Y*+ #%Y,S'-') ,.B*D4,,12,34,5467D8 (*+,-9;< %* =>?@A PK %^D>qBorg/openqa/selenium/internal/seleniumemulation/GetHtmlSource.class1"org/openqa/selenium/internal/seleniumemulation/SeleneseCommand()VCode  LineNumberTableLocalVariableTablethis>Lorg/openqa/selenium/internal/seleniumemulation/GetHtmlSource;handleSeleneseCommandW(Lorg/openqa/selenium/WebDriver;Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String; org/openqa/selenium/WebDriver  getPageSource()Ljava/lang/String;driverLorg/openqa/selenium/WebDriver;locatorLjava/lang/String;valueW(Lorg/openqa/selenium/WebDriver;Ljava/lang/String;Ljava/lang/String;)Ljava/lang/Object;   SourceFileGetHtmlSource.java SignatureTLorg/openqa/selenium/internal/seleniumemulation/SeleneseCommand;!/*   O+  * D(*+,-   !PK %^D>ǎ >org/openqa/selenium/internal/seleniumemulation/IsOrdered.class1E8org/openqa/selenium/internal/seleniumemulation/IsOrdered>org/openqa/selenium/internal/seleniumemulation/SeleneseCommandfinder>Lorg/openqa/selenium/internal/seleniumemulation/ElementFinder;jsBLorg/openqa/selenium/internal/seleniumemulation/JavascriptLibrary;(Lorg/openqa/selenium/internal/seleniumemulation/ElementFinder;Lorg/openqa/selenium/internal/seleniumemulation/JavascriptLibrary;)VCode  ()V    LineNumberTableLocalVariableTablethis:Lorg/openqa/selenium/internal/seleniumemulation/IsOrdered;handleSeleneseCommandX(Lorg/openqa/selenium/WebDriver;Ljava/lang/String;Ljava/lang/String;)Ljava/lang/Boolean; ;!  Y* *+*,   N*+,:*+-::*+!YSYS#):+//" #&%172RNN34N56N76 C898:94;67<=D> (*+,-?ABCDPK %^D>v7uDDAorg/openqa/selenium/internal/seleniumemulation/DeleteCookie.class10;org/openqa/selenium/internal/seleniumemulation/DeleteCookie>org/openqa/selenium/internal/seleniumemulation/SeleneseCommand()VCode  LineNumberTableLocalVariableTablethis=Lorg/openqa/selenium/internal/seleniumemulation/DeleteCookie;handleSeleneseCommandU(Lorg/openqa/selenium/WebDriver;Ljava/lang/String;Ljava/lang/String;)Ljava/lang/Void; org/openqa/selenium/WebDriver manage)()Lorg/openqa/selenium/WebDriver$Options; %org/openqa/selenium/WebDriver$Options getCookieNamed0(Ljava/lang/String;)Lorg/openqa/selenium/Cookie;  deleteCookieNamed(Ljava/lang/String;)VdriverLorg/openqa/selenium/WebDriver;nameLjava/lang/String;ignoredcookieLorg/openqa/selenium/Cookie;W(Lorg/openqa/selenium/WebDriver;Ljava/lang/String;Ljava/lang/String;)Ljava/lang/Object; )  SourceFileDeleteCookie.java SignatureRLorg/openqa/selenium/internal/seleniumemulation/SeleneseCommand; InnerClassesOptions!/*   !+,:+,  4! ! !!"#!$#%&D'(*+,-(  *+,-. / PK %^D><org/openqa/selenium/internal/seleniumemulation/GetText.class1E6org/openqa/selenium/internal/seleniumemulation/GetText>org/openqa/selenium/internal/seleniumemulation/SeleneseCommandlibraryBLorg/openqa/selenium/internal/seleniumemulation/JavascriptLibrary;E(Lorg/openqa/selenium/internal/seleniumemulation/JavascriptLibrary;)VCode   ()V  LineNumberTableLocalVariableTablethis8Lorg/openqa/selenium/internal/seleniumemulation/GetText;handleSeleneseCommandW(Lorg/openqa/selenium/WebDriver;Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String; getText.js @org/openqa/selenium/internal/seleniumemulation/JavascriptLibrary getSeleniumScript&(Ljava/lang/String;)Ljava/lang/String;&org/openqa/selenium/JavascriptExecutor java/lang/StringBuilder"return ( $ %(Ljava/lang/String;)V ' ()append-(Ljava/lang/String;)Ljava/lang/StringBuilder;+)(arguments[0]); - ./toString()Ljava/lang/String;1java/lang/Object 3 45 executeScript9(Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/Object;7java/lang/StringdriverLorg/openqa/selenium/WebDriver;locatorLjava/lang/String;ignoredgetTextW(Lorg/openqa/selenium/WebDriver;Ljava/lang/String;Ljava/lang/String;)Ljava/lang/Object; @  SourceFile GetText.java SignatureTLorg/openqa/selenium/internal/seleniumemulation/SeleneseCommand;! F * *+     6* :+Y!#&*&,0Y,S26 "#-"466896:;6<; +=;D> (*+,-?ABCDPK %^D>1Ni>org/openqa/selenium/internal/seleniumemulation/Highlight.class158org/openqa/selenium/internal/seleniumemulation/Highlight>org/openqa/selenium/internal/seleniumemulation/SeleneseCommandjsBLorg/openqa/selenium/internal/seleniumemulation/JavascriptLibrary;finder>Lorg/openqa/selenium/internal/seleniumemulation/ElementFinder;(Lorg/openqa/selenium/internal/seleniumemulation/ElementFinder;Lorg/openqa/selenium/internal/seleniumemulation/JavascriptLibrary;)VCode  ()V    LineNumberTableLocalVariableTablethis:Lorg/openqa/selenium/internal/seleniumemulation/Highlight;handleSeleneseCommandW(Lorg/openqa/selenium/WebDriver;Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String; highlight ;!  Y* *,*+   f*+*+,!#W !#*)*+,-,D. (*+,-/1234PK %^D>~-->org/openqa/selenium/internal/seleniumemulation/RunScript.class188org/openqa/selenium/internal/seleniumemulation/RunScript>org/openqa/selenium/internal/seleniumemulation/SeleneseCommandmutator>Lorg/openqa/selenium/internal/seleniumemulation/ScriptMutator;A(Lorg/openqa/selenium/internal/seleniumemulation/ScriptMutator;)VCode   ()V  LineNumberTableLocalVariableTablethis:Lorg/openqa/selenium/internal/seleniumemulation/RunScript;handleSeleneseCommandU(Lorg/openqa/selenium/WebDriver;Ljava/lang/String;Ljava/lang/String;)Ljava/lang/Void;java/lang/StringBuilder  ;! F * *+     *Y:* ,+ $&W" #%('4***+*,-*.- !/0D1 (*+,-24567PK %^D>=ӻ>org/openqa/selenium/internal/seleniumemulation/MetaKeyUp.class1'8org/openqa/selenium/internal/seleniumemulation/MetaKeyUp>org/openqa/selenium/internal/seleniumemulation/SeleneseCommandkeyState9Lorg/openqa/selenium/internal/seleniumemulation/KeyState;<(Lorg/openqa/selenium/internal/seleniumemulation/KeyState;)VCode   ()V  LineNumberTableLocalVariableTablethis:Lorg/openqa/selenium/internal/seleniumemulation/MetaKeyUp;handleSeleneseCommandU(Lorg/openqa/selenium/WebDriver;Ljava/lang/String;Ljava/lang/String;)Ljava/lang/Void; 7org/openqa/selenium/internal/seleniumemulation/KeyState  metaKeyDownZdriverLorg/openqa/selenium/WebDriver;locatorLjava/lang/String;valueW(Lorg/openqa/selenium/WebDriver;Ljava/lang/String;Ljava/lang/String;)Ljava/lang/Object; "  SourceFileMetaKeyUp.java SignatureRLorg/openqa/selenium/internal/seleniumemulation/SeleneseCommand;! F * *+     V *  *    D  (*+,-!#$%&PK %^D>Aorg/openqa/selenium/internal/seleniumemulation/AddSelection.class1>;org/openqa/selenium/internal/seleniumemulation/AddSelection>org/openqa/selenium/internal/seleniumemulation/SeleneseCommandfinder>Lorg/openqa/selenium/internal/seleniumemulation/ElementFinder;select?Lorg/openqa/selenium/internal/seleniumemulation/SeleniumSelect;(Lorg/openqa/selenium/internal/seleniumemulation/ElementFinder;Lorg/openqa/selenium/internal/seleniumemulation/SeleniumSelect;)VCode  ()V    LineNumberTableLocalVariableTablethis=Lorg/openqa/selenium/internal/seleniumemulation/AddSelection; elementFinderhandleSeleneseCommandU(Lorg/openqa/selenium/WebDriver;Ljava/lang/String;Ljava/lang/String;)Ljava/lang/Void; ;!  Y* *+*,   /*+,:* &Y(**+,--# $%!'-(4//01/23/43 $56D7 (*+,-8:;<=PK %^D>~rMorg/openqa/selenium/internal/seleniumemulation/IdentifierLookupStrategy.class1%Gorg/openqa/selenium/internal/seleniumemulation/IdentifierLookupStrategyjava/lang/Object=org/openqa/selenium/internal/seleniumemulation/LookupStrategy()VCode  LineNumberTableLocalVariableTablethisILorg/openqa/selenium/internal/seleniumemulation/IdentifierLookupStrategy;findS(Lorg/openqa/selenium/WebDriver;Ljava/lang/String;)Lorg/openqa/selenium/WebElement;?org/openqa/selenium/internal/seleniumemulation/IdLookupStrategy   Aorg/openqa/selenium/internal/seleniumemulation/NameLookupStrategy  *org/openqa/selenium/NoSuchElementExceptiondriverLorg/openqa/selenium/WebDriver;useLjava/lang/String;e,Lorg/openqa/selenium/NoSuchElementException; SourceFileIdentifierLookupStrategy.java! /*    sY+,NY+,    *  !"#$PK %^D>VWhhHorg/openqa/selenium/internal/seleniumemulation/ClassLookupStrategy.class15Borg/openqa/selenium/internal/seleniumemulation/ClassLookupStrategyjava/lang/Object=org/openqa/selenium/internal/seleniumemulation/LookupStrategy()VCode  LineNumberTableLocalVariableTablethisDLorg/openqa/selenium/internal/seleniumemulation/ClassLookupStrategy;findS(Lorg/openqa/selenium/WebDriver;Ljava/lang/String;)Lorg/openqa/selenium/WebElement;java/lang/StringBuilder //*[@class='  (Ljava/lang/String;)V  append-(Ljava/lang/String;)Ljava/lang/StringBuilder;']  !"toString()Ljava/lang/String; $&%org/openqa/selenium/By '(xpath,(Ljava/lang/String;)Lorg/openqa/selenium/By; *,+org/openqa/selenium/WebDriver -. findElement:(Lorg/openqa/selenium/By;)Lorg/openqa/selenium/WebElement;driverLorg/openqa/selenium/WebDriver;useLjava/lang/String; SourceFileClassLookupStrategy.java! /*    ]+Y,#)  /01234PK %^D>V<org/openqa/selenium/internal/seleniumemulation/GetEval.class1B6org/openqa/selenium/internal/seleniumemulation/GetEval>org/openqa/selenium/internal/seleniumemulation/SeleneseCommandmutator>Lorg/openqa/selenium/internal/seleniumemulation/ScriptMutator;A(Lorg/openqa/selenium/internal/seleniumemulation/ScriptMutator;)VCode   ()V  LineNumberTableLocalVariableTablethis8Lorg/openqa/selenium/internal/seleniumemulation/GetEval;handleSeleneseCommandW(Lorg/openqa/selenium/WebDriver;Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;java/lang/StringBuilder  ;! F * *+  !   9Y:* ,+ $&:*,% '))*>9923945965 078)9:D; (*+,-<>?@APK %^D>4c?org/openqa/selenium/internal/seleniumemulation/IsEditable.class1S9org/openqa/selenium/internal/seleniumemulation/IsEditable>org/openqa/selenium/internal/seleniumemulation/SeleneseCommandfinder>Lorg/openqa/selenium/internal/seleniumemulation/ElementFinder;A(Lorg/openqa/selenium/internal/seleniumemulation/ElementFinder;)VCode   ()V  LineNumberTableLocalVariableTablethis;Lorg/openqa/selenium/internal/seleniumemulation/IsEditable;handleSeleneseCommandX(Lorg/openqa/selenium/WebDriver;Ljava/lang/String;Ljava/lang/String;)Ljava/lang/Boolean; java/lang/Boolean @AvalueOf(Z)Ljava/lang/Boolean;driverLorg/openqa/selenium/WebDriver;locatorLjava/lang/String;valueelement Lorg/openqa/selenium/WebElement;tagNameacceptableTagNameZW(Lorg/openqa/selenium/WebDriver;Ljava/lang/String;Ljava/lang/String;)Ljava/lang/Object; N  SourceFileIsEditable.java SignatureULorg/openqa/selenium/internal/seleniumemulation/SeleneseCommand;! F * *+     * +,:!:&(,(6.:&(!02: 6(.:8.(<<& !"2#6$@%K&Z'^+RBCDEFE vGHjIE2OJK6K1EDL (*+,-MOPQRPK %^D>Q``Forg/openqa/selenium/internal/seleniumemulation/AltLookupStrategy.class15@org/openqa/selenium/internal/seleniumemulation/AltLookupStrategyjava/lang/Object=org/openqa/selenium/internal/seleniumemulation/LookupStrategy()VCode  LineNumberTableLocalVariableTablethisBLorg/openqa/selenium/internal/seleniumemulation/AltLookupStrategy;findS(Lorg/openqa/selenium/WebDriver;Ljava/lang/String;)Lorg/openqa/selenium/WebElement;java/lang/StringBuilder //*[@alt='  (Ljava/lang/String;)V  append-(Ljava/lang/String;)Ljava/lang/StringBuilder;']  !"toString()Ljava/lang/String; $&%org/openqa/selenium/By '(xpath,(Ljava/lang/String;)Lorg/openqa/selenium/By; *,+org/openqa/selenium/WebDriver -. findElement:(Lorg/openqa/selenium/By;)Lorg/openqa/selenium/WebElement;driverLorg/openqa/selenium/WebDriver;useLjava/lang/String; SourceFileAltLookupStrategy.java! /*    ]+Y,#)  /01234PK %^D>Nة>org/openqa/selenium/internal/seleniumemulation/IsChecked.class138org/openqa/selenium/internal/seleniumemulation/IsChecked>org/openqa/selenium/internal/seleniumemulation/SeleneseCommandfinder>Lorg/openqa/selenium/internal/seleniumemulation/ElementFinder;A(Lorg/openqa/selenium/internal/seleniumemulation/ElementFinder;)VCode   ()V  LineNumberTableLocalVariableTablethis:Lorg/openqa/selenium/internal/seleniumemulation/IsChecked;handleSeleneseCommandX(Lorg/openqa/selenium/WebDriver;Ljava/lang/String;Ljava/lang/String;)Ljava/lang/Boolean; ;! F * *+     Z* +,!*'()*+*D, (*+,--/012PK %^D>4___Eorg/openqa/selenium/internal/seleniumemulation/GetElementHeight.class1;?org/openqa/selenium/internal/seleniumemulation/GetElementHeight>org/openqa/selenium/internal/seleniumemulation/SeleneseCommandfinder>Lorg/openqa/selenium/internal/seleniumemulation/ElementFinder;A(Lorg/openqa/selenium/internal/seleniumemulation/ElementFinder;)VCode   ()V  LineNumberTableLocalVariableTablethisALorg/openqa/selenium/internal/seleniumemulation/GetElementHeight;handleSeleneseCommandW(Lorg/openqa/selenium/WebDriver;Ljava/lang/String;Ljava/lang/String;)Ljava/lang/Number; ;! F * *+     r* +,:!' !"4-./010 23D4 (*+,-5789:PK %^D>?org/openqa/selenium/internal/seleniumemulation/AltKeyDown.class1'9org/openqa/selenium/internal/seleniumemulation/AltKeyDown>org/openqa/selenium/internal/seleniumemulation/SeleneseCommandkeyState9Lorg/openqa/selenium/internal/seleniumemulation/KeyState;<(Lorg/openqa/selenium/internal/seleniumemulation/KeyState;)VCode   ()V  LineNumberTableLocalVariableTablethis;Lorg/openqa/selenium/internal/seleniumemulation/AltKeyDown;handleSeleneseCommandU(Lorg/openqa/selenium/WebDriver;Ljava/lang/String;Ljava/lang/String;)Ljava/lang/Void; 7org/openqa/selenium/internal/seleniumemulation/KeyState  altKeyDownZdriverLorg/openqa/selenium/WebDriver;locatorLjava/lang/String;valueW(Lorg/openqa/selenium/WebDriver;Ljava/lang/String;Ljava/lang/String;)Ljava/lang/Object; "  SourceFileAltKeyDown.java SignatureRLorg/openqa/selenium/internal/seleniumemulation/SeleneseCommand;! F * *+     V *  *    D  (*+,-!#$%&PK %^D>9'y Aorg/openqa/selenium/internal/seleniumemulation/CreateCookie.class1;org/openqa/selenium/internal/seleniumemulation/CreateCookie>org/openqa/selenium/internal/seleniumemulation/SeleneseCommandNAME_VALUE_PAIR_PATTERNLjava/util/regex/Pattern;MAX_AGE_PATTERN PATH_PATTERN()VCode  max_age=(\d+) java/util/regex/Pattern compile-(Ljava/lang/String;)Ljava/util/regex/Pattern;  path=([^\s,]+)[,]?  LineNumberTableLocalVariableTable    3([^\s=\[\]\(\),"\/\?@:;]+)=([^=\[\]\(\),"\/\?@:;]*) " this=Lorg/openqa/selenium/internal/seleniumemulation/CreateCookie;handleSeleneseCommandU(Lorg/openqa/selenium/WebDriver;Ljava/lang/String;Ljava/lang/String;)Ljava/lang/Void; ( )*matcher3(Ljava/lang/CharSequence;)Ljava/util/regex/Matcher; ,.-java/util/regex/Matcher /0find()Z2+com/thoughtworks/selenium/SeleniumException4java/lang/StringBuilder6Invalid parameter: 38 9(Ljava/lang/String;)V 3; <=append-(Ljava/lang/String;)Ljava/lang/StringBuilder; 3? @AtoString()Ljava/lang/String; 18 ,D EFgroup(I)Ljava/lang/String;Hjava/util/Date JLKjava/lang/System MNcurrentTimeMillis()J PRQjava/lang/Integer STparseInt(Ljava/lang/String;)I GV W(J)VYhttp []\java/lang/String ^_ startsWith(Ljava/lang/String;)Za java/net/URL `8 `d eAgetPathgorg/openqa/selenium/Cookie fi jI(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/util/Date;)V lnmorg/openqa/selenium/WebDriver opmanage)()Lorg/openqa/selenium/WebDriver$Options; rts%org/openqa/selenium/WebDriver$Options uv addCookie(Lorg/openqa/selenium/Cookie;)Vxjava/net/MalformedURLExceptiondriverLorg/openqa/selenium/WebDriver; nameValuePairLjava/lang/String; optionsStringnameValuePairMatcherLjava/util/regex/Matcher;namevalue maxAgeMatchermaxAgeLjava/util/Date;path pathMatchercookieLorg/openqa/selenium/Cookie;W(Lorg/openqa/selenium/WebDriver;Ljava/lang/String;Ljava/lang/String;)Ljava/lang/Object;  %& SourceFileCreateCookie.java SignatureRLorg/openqa/selenium/internal/seleniumemulation/SeleneseCommand; InnerClassesOptions!  9  !  @**!  #$%&  *!,':+1Y3Y57,:>BC:C:-'::+GYICOhaU:: -':  +( C:  XZ`Y bc: : fY h: +k qwN% &'*)2*:,C-F/N0i3l4u5}689;@ACz #$yz{|}| ~2|:|CF|lV| uM  D% (*+,- rl PK %^D>bh?org/openqa/selenium/internal/seleniumemulation/MouseEvent.class1@9org/openqa/selenium/internal/seleniumemulation/MouseEvent>org/openqa/selenium/internal/seleniumemulation/SeleneseCommandfinder>Lorg/openqa/selenium/internal/seleniumemulation/ElementFinder;jsBLorg/openqa/selenium/internal/seleniumemulation/JavascriptLibrary;typeLjava/lang/String;(Lorg/openqa/selenium/internal/seleniumemulation/ElementFinder;Lorg/openqa/selenium/internal/seleniumemulation/JavascriptLibrary;Ljava/lang/String;)VCode  ()V      LineNumberTableLocalVariableTablethis;Lorg/openqa/selenium/internal/seleniumemulation/MouseEvent;handleSeleneseCommandU(Lorg/openqa/selenium/WebDriver;Ljava/lang/String;Ljava/lang/String;)Ljava/lang/Void;  ;!   l**+*,*-  *  +*+,:*+#%Y*SY'S-$ %)&4++34+5 +6  78D9 (*+,-:<=>?PK %^D>f  ?org/openqa/selenium/internal/seleniumemulation/AttachFile.class19org/openqa/selenium/internal/seleniumemulation/AttachFile>org/openqa/selenium/internal/seleniumemulation/SeleneseCommandfinder>Lorg/openqa/selenium/internal/seleniumemulation/ElementFinder;A(Lorg/openqa/selenium/internal/seleniumemulation/ElementFinder;)VCode   ()V  LineNumberTableLocalVariableTablethis;Lorg/openqa/selenium/internal/seleniumemulation/AttachFile;handleSeleneseCommandU(Lorg/openqa/selenium/WebDriver;Ljava/lang/String;Ljava/lang/String;)Ljava/lang/Void;   downloadFile"(Ljava/lang/String;)Ljava/io/File;  attachFile@dir BDC*org/openqa/selenium/io/TemporaryFilesystem EF createTempDir4(Ljava/lang/String;Ljava/lang/String;)Ljava/io/File; HJI java/net/URL K+getFile 'M N#(Ljava/io/File;Ljava/lang/String;)V 'P QR getParentFile()Ljava/io/File; 'T UVmkdirs()ZX+com/thoughtworks/selenium/SeleniumExceptionZjava/lang/StringBuilder\Cannot create file for upload: Y^ _(Ljava/lang/String;)V Ya bcappend-(Ljava/lang/Object;)Ljava/lang/StringBuilder; Ye f+toString W^ijava/io/FileOutputStream hk l(Ljava/io/File;)V npocom/google/common/io/Resources qrcopy'(Ljava/net/URL;Ljava/io/OutputStream;)Vtjava/io/IOExceptionnameurlLjava/net/URL;outputTofosLjava/io/FileOutputStream; H^}Malformed URL: Y b-(Ljava/lang/String;)Ljava/lang/StringBuilder;java/net/MalformedURLExceptione Ljava/net/MalformedURLException;W(Lorg/openqa/selenium/WebDriver;Ljava/lang/String;Ljava/lang/String;)Ljava/lang/Object;   SourceFileAttachFile.java SignatureRLorg/openqa/selenium/internal/seleniumemulation/SeleneseCommand;! F * *+ #$ %   .*-:* +,:$Y&S,)+,-,/>..01.23.43'5678 \*+9M=?AN'Y-,GL:OSWYYY[]`dg:hYj:,m:CTWs* 3567'8@;C=N>W?YC>\\u3VvwN@6@x6Cyz;< p"HY+{MWYYY|]+~dg H I J ""u3 D (*+,-PK %^D>֎+6>org/openqa/selenium/internal/seleniumemulation/IsVisible.class138org/openqa/selenium/internal/seleniumemulation/IsVisible>org/openqa/selenium/internal/seleniumemulation/SeleneseCommandfinder>Lorg/openqa/selenium/internal/seleniumemulation/ElementFinder;A(Lorg/openqa/selenium/internal/seleniumemulation/ElementFinder;)VCode   ()V  LineNumberTableLocalVariableTablethis:Lorg/openqa/selenium/internal/seleniumemulation/IsVisible;handleSeleneseCommandX(Lorg/openqa/selenium/WebDriver;Ljava/lang/String;Ljava/lang/String;)Ljava/lang/Boolean; ;! F * *+     ]* +,! *'()*+*D, (*+,--/012PK %^D>y JGorg/openqa/selenium/internal/seleniumemulation/WaitForCondition$1.class1=Aorg/openqa/selenium/internal/seleniumemulation/WaitForCondition$1com/thoughtworks/selenium/Waitthis$0ALorg/openqa/selenium/internal/seleniumemulation/WaitForCondition; val$driverLorg/openqa/selenium/WebDriver; val$modifiedLjava/lang/String;u(Lorg/openqa/selenium/internal/seleniumemulation/WaitForCondition;Lorg/openqa/selenium/WebDriver;Ljava/lang/String;)VCode       ()VLineNumberTableLocalVariableTablethisCLorg/openqa/selenium/internal/seleniumemulation/WaitForCondition$1;until()Z&org/openqa/selenium/JavascriptExecutor java/lang/Object " #$ executeScript9(Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/Object;&java/lang/String( %* +,equals(Ljava/lang/Object;)Z.java/lang/Boolean -0 1 booleanValueresultLjava/lang/Object; SourceFileWaitForCondition.javaEnclosingMethod8?org/openqa/selenium/internal/seleniumemulation/WaitForCondition :;handleSeleneseCommandU(Lorg/openqa/selenium/WebDriver;Ljava/lang/String;Ljava/lang/String;)Ljava/lang/Void; InnerClasses    B*+*,*-* *  B**!L++%'+)+- +-/"-123"41586@8B-2345679< PK %^D>vtEorg/openqa/selenium/internal/seleniumemulation/WaitForCondition.class1N?org/openqa/selenium/internal/seleniumemulation/WaitForCondition>org/openqa/selenium/internal/seleniumemulation/SeleneseCommandmutator>Lorg/openqa/selenium/internal/seleniumemulation/ScriptMutator;A(Lorg/openqa/selenium/internal/seleniumemulation/ScriptMutator;)VCode   ()V  LineNumberTableLocalVariableTablethisALorg/openqa/selenium/internal/seleniumemulation/WaitForCondition;handleSeleneseCommandU(Lorg/openqa/selenium/WebDriver;Ljava/lang/String;Ljava/lang/String;)Ljava/lang/Void;java/lang/StringBuilder  ; InnerClasses! F * *+  !   CY:* ,:"Y*+$Y'),,-06:& '(*';A=>CC>?C@ACBA :CD'EADF (*+,-GIJKLM "PK lC>T>WW?org/openqa/selenium/internal/seleniumemulation/.svn/all-wcpropsK 25 svn:wc:ra_dav:version-url V 88 /svn/!svn/ver/11226/trunk/java/client/src/org/openqa/selenium/internal/seleniumemulation END GetElementPositionTop.java K 25 svn:wc:ra_dav:version-url V 115 /svn/!svn/ver/11226/trunk/java/client/src/org/openqa/selenium/internal/seleniumemulation/GetElementPositionTop.java END XPathLookupStrategy.java K 25 svn:wc:ra_dav:version-url V 113 /svn/!svn/ver/11226/trunk/java/client/src/org/openqa/selenium/internal/seleniumemulation/XPathLookupStrategy.java END Submit.java K 25 svn:wc:ra_dav:version-url V 100 /svn/!svn/ver/11226/trunk/java/client/src/org/openqa/selenium/internal/seleniumemulation/Submit.java END GetAttribute.java K 25 svn:wc:ra_dav:version-url V 106 /svn/!svn/ver/11226/trunk/java/client/src/org/openqa/selenium/internal/seleniumemulation/GetAttribute.java END IsCookiePresent.java K 25 svn:wc:ra_dav:version-url V 109 /svn/!svn/ver/11226/trunk/java/client/src/org/openqa/selenium/internal/seleniumemulation/IsCookiePresent.java END WindowFocus.java K 25 svn:wc:ra_dav:version-url V 105 /svn/!svn/ver/11226/trunk/java/client/src/org/openqa/selenium/internal/seleniumemulation/WindowFocus.java END GetAllLinks.java K 25 svn:wc:ra_dav:version-url V 105 /svn/!svn/ver/11226/trunk/java/client/src/org/openqa/selenium/internal/seleniumemulation/GetAllLinks.java END WaitForPageToLoad.java K 25 svn:wc:ra_dav:version-url V 111 /svn/!svn/ver/11226/trunk/java/client/src/org/openqa/selenium/internal/seleniumemulation/WaitForPageToLoad.java END DragAndDropToObject.java K 25 svn:wc:ra_dav:version-url V 113 /svn/!svn/ver/11226/trunk/java/client/src/org/openqa/selenium/internal/seleniumemulation/DragAndDropToObject.java END DomTraversalLookupStrategy.java K 25 svn:wc:ra_dav:version-url V 120 /svn/!svn/ver/11226/trunk/java/client/src/org/openqa/selenium/internal/seleniumemulation/DomTraversalLookupStrategy.java END GetEval.java K 25 svn:wc:ra_dav:version-url V 101 /svn/!svn/ver/11226/trunk/java/client/src/org/openqa/selenium/internal/seleniumemulation/GetEval.java END ValueOptionSelectStrategy.java K 25 svn:wc:ra_dav:version-url V 119 /svn/!svn/ver/11226/trunk/java/client/src/org/openqa/selenium/internal/seleniumemulation/ValueOptionSelectStrategy.java END FunctionDeclaration.java K 25 svn:wc:ra_dav:version-url V 113 /svn/!svn/ver/11226/trunk/java/client/src/org/openqa/selenium/internal/seleniumemulation/FunctionDeclaration.java END AddSelection.java K 25 svn:wc:ra_dav:version-url V 106 /svn/!svn/ver/11226/trunk/java/client/src/org/openqa/selenium/internal/seleniumemulation/AddSelection.java END ControlKeyUp.java K 25 svn:wc:ra_dav:version-url V 106 /svn/!svn/ver/11226/trunk/java/client/src/org/openqa/selenium/internal/seleniumemulation/ControlKeyUp.java END FindSelectedOptionProperties.java K 25 svn:wc:ra_dav:version-url V 122 /svn/!svn/ver/11226/trunk/java/client/src/org/openqa/selenium/internal/seleniumemulation/FindSelectedOptionProperties.java END SeleneseCommand.java K 25 svn:wc:ra_dav:version-url V 109 /svn/!svn/ver/11226/trunk/java/client/src/org/openqa/selenium/internal/seleniumemulation/SeleneseCommand.java END CssLookupStrategy.java K 25 svn:wc:ra_dav:version-url V 111 /svn/!svn/ver/11226/trunk/java/client/src/org/openqa/selenium/internal/seleniumemulation/CssLookupStrategy.java END ExactTextMatchingStrategy.java K 25 svn:wc:ra_dav:version-url V 119 /svn/!svn/ver/11226/trunk/java/client/src/org/openqa/selenium/internal/seleniumemulation/ExactTextMatchingStrategy.java END IdLookupStrategy.java K 25 svn:wc:ra_dav:version-url V 110 /svn/!svn/ver/11226/trunk/java/client/src/org/openqa/selenium/internal/seleniumemulation/IdLookupStrategy.java END GetValue.java K 25 svn:wc:ra_dav:version-url V 102 /svn/!svn/ver/11226/trunk/java/client/src/org/openqa/selenium/internal/seleniumemulation/GetValue.java END Type.java K 25 svn:wc:ra_dav:version-url V 98 /svn/!svn/ver/11226/trunk/java/client/src/org/openqa/selenium/internal/seleniumemulation/Type.java END GetTitle.java K 25 svn:wc:ra_dav:version-url V 102 /svn/!svn/ver/11226/trunk/java/client/src/org/openqa/selenium/internal/seleniumemulation/GetTitle.java END ElementFinder.java K 25 svn:wc:ra_dav:version-url V 107 /svn/!svn/ver/11226/trunk/java/client/src/org/openqa/selenium/internal/seleniumemulation/ElementFinder.java END DragAndDrop.java K 25 svn:wc:ra_dav:version-url V 105 /svn/!svn/ver/11226/trunk/java/client/src/org/openqa/selenium/internal/seleniumemulation/DragAndDrop.java END GetAllWindowTitles.java K 25 svn:wc:ra_dav:version-url V 112 /svn/!svn/ver/11226/trunk/java/client/src/org/openqa/selenium/internal/seleniumemulation/GetAllWindowTitles.java END VariableDeclaration.java K 25 svn:wc:ra_dav:version-url V 113 /svn/!svn/ver/11226/trunk/java/client/src/org/openqa/selenium/internal/seleniumemulation/VariableDeclaration.java END GetExpression.java K 25 svn:wc:ra_dav:version-url V 107 /svn/!svn/ver/11226/trunk/java/client/src/org/openqa/selenium/internal/seleniumemulation/GetExpression.java END SetNextConfirmationState.java K 25 svn:wc:ra_dav:version-url V 118 /svn/!svn/ver/11226/trunk/java/client/src/org/openqa/selenium/internal/seleniumemulation/SetNextConfirmationState.java END Check.java K 25 svn:wc:ra_dav:version-url V 99 /svn/!svn/ver/11226/trunk/java/client/src/org/openqa/selenium/internal/seleniumemulation/Check.java END MouseEventAt.java K 25 svn:wc:ra_dav:version-url V 106 /svn/!svn/ver/11226/trunk/java/client/src/org/openqa/selenium/internal/seleniumemulation/MouseEventAt.java END GetElementIndex.java K 25 svn:wc:ra_dav:version-url V 109 /svn/!svn/ver/11226/trunk/java/client/src/org/openqa/selenium/internal/seleniumemulation/GetElementIndex.java END AltKeyDown.java K 25 svn:wc:ra_dav:version-url V 104 /svn/!svn/ver/11226/trunk/java/client/src/org/openqa/selenium/internal/seleniumemulation/AltKeyDown.java END ClassLookupStrategy.java K 25 svn:wc:ra_dav:version-url V 113 /svn/!svn/ver/11226/trunk/java/client/src/org/openqa/selenium/internal/seleniumemulation/ClassLookupStrategy.java END IndexFilterFunction.java K 25 svn:wc:ra_dav:version-url V 113 /svn/!svn/ver/11226/trunk/java/client/src/org/openqa/selenium/internal/seleniumemulation/IndexFilterFunction.java END GetHtmlSource.java K 25 svn:wc:ra_dav:version-url V 107 /svn/!svn/ver/11226/trunk/java/client/src/org/openqa/selenium/internal/seleniumemulation/GetHtmlSource.java END MethodDeclaration.java K 25 svn:wc:ra_dav:version-url V 111 /svn/!svn/ver/11226/trunk/java/client/src/org/openqa/selenium/internal/seleniumemulation/MethodDeclaration.java END GoBack.java K 25 svn:wc:ra_dav:version-url V 100 /svn/!svn/ver/11226/trunk/java/client/src/org/openqa/selenium/internal/seleniumemulation/GoBack.java END GetTable.java K 25 svn:wc:ra_dav:version-url V 102 /svn/!svn/ver/11226/trunk/java/client/src/org/openqa/selenium/internal/seleniumemulation/GetTable.java END GetAllButtons.java K 25 svn:wc:ra_dav:version-url V 107 /svn/!svn/ver/11226/trunk/java/client/src/org/openqa/selenium/internal/seleniumemulation/GetAllButtons.java END FireEvent.java K 25 svn:wc:ra_dav:version-url V 103 /svn/!svn/ver/11226/trunk/java/client/src/org/openqa/selenium/internal/seleniumemulation/FireEvent.java END GetElementWidth.java K 25 svn:wc:ra_dav:version-url V 109 /svn/!svn/ver/11226/trunk/java/client/src/org/openqa/selenium/internal/seleniumemulation/GetElementWidth.java END KeyEvent.java K 25 svn:wc:ra_dav:version-url V 102 /svn/!svn/ver/11226/trunk/java/client/src/org/openqa/selenium/internal/seleniumemulation/KeyEvent.java END Windows.java K 25 svn:wc:ra_dav:version-url V 101 /svn/!svn/ver/11226/trunk/java/client/src/org/openqa/selenium/internal/seleniumemulation/Windows.java END CreateCookie.java K 25 svn:wc:ra_dav:version-url V 106 /svn/!svn/ver/11226/trunk/java/client/src/org/openqa/selenium/internal/seleniumemulation/CreateCookie.java END WaitForPopup.java K 25 svn:wc:ra_dav:version-url V 106 /svn/!svn/ver/11226/trunk/java/client/src/org/openqa/selenium/internal/seleniumemulation/WaitForPopup.java END MetaKeyUp.java K 25 svn:wc:ra_dav:version-url V 103 /svn/!svn/ver/11226/trunk/java/client/src/org/openqa/selenium/internal/seleniumemulation/MetaKeyUp.java END Close.java K 25 svn:wc:ra_dav:version-url V 99 /svn/!svn/ver/11226/trunk/java/client/src/org/openqa/selenium/internal/seleniumemulation/Close.java END Highlight.java K 25 svn:wc:ra_dav:version-url V 103 /svn/!svn/ver/11226/trunk/java/client/src/org/openqa/selenium/internal/seleniumemulation/Highlight.java END NoOp.java K 25 svn:wc:ra_dav:version-url V 98 /svn/!svn/ver/11226/trunk/java/client/src/org/openqa/selenium/internal/seleniumemulation/NoOp.java END ShiftKeyDown.java K 25 svn:wc:ra_dav:version-url V 106 /svn/!svn/ver/11226/trunk/java/client/src/org/openqa/selenium/internal/seleniumemulation/ShiftKeyDown.java END RemoveAllSelections.java K 25 svn:wc:ra_dav:version-url V 113 /svn/!svn/ver/11226/trunk/java/client/src/org/openqa/selenium/internal/seleniumemulation/RemoveAllSelections.java END Timer.java K 25 svn:wc:ra_dav:version-url V 99 /svn/!svn/ver/11226/trunk/java/client/src/org/openqa/selenium/internal/seleniumemulation/Timer.java END ScriptMutator.java K 25 svn:wc:ra_dav:version-url V 107 /svn/!svn/ver/11226/trunk/java/client/src/org/openqa/selenium/internal/seleniumemulation/ScriptMutator.java END htmlutils.js K 25 svn:wc:ra_dav:version-url V 101 /svn/!svn/ver/11226/trunk/java/client/src/org/openqa/selenium/internal/seleniumemulation/htmlutils.js END TextMatchingStrategy.java K 25 svn:wc:ra_dav:version-url V 114 /svn/!svn/ver/11226/trunk/java/client/src/org/openqa/selenium/internal/seleniumemulation/TextMatchingStrategy.java END IsConfirmationPresent.java K 25 svn:wc:ra_dav:version-url V 115 /svn/!svn/ver/11226/trunk/java/client/src/org/openqa/selenium/internal/seleniumemulation/IsConfirmationPresent.java END DeleteAllVisibleCookies.java K 25 svn:wc:ra_dav:version-url V 117 /svn/!svn/ver/11226/trunk/java/client/src/org/openqa/selenium/internal/seleniumemulation/DeleteAllVisibleCookies.java END ShiftKeyUp.java K 25 svn:wc:ra_dav:version-url V 104 /svn/!svn/ver/11226/trunk/java/client/src/org/openqa/selenium/internal/seleniumemulation/ShiftKeyUp.java END OptionSelectStrategy.java K 25 svn:wc:ra_dav:version-url V 114 /svn/!svn/ver/11226/trunk/java/client/src/org/openqa/selenium/internal/seleniumemulation/OptionSelectStrategy.java END GetSelectOptions.java K 25 svn:wc:ra_dav:version-url V 110 /svn/!svn/ver/11226/trunk/java/client/src/org/openqa/selenium/internal/seleniumemulation/GetSelectOptions.java END CaptureScreenshotToString.java K 25 svn:wc:ra_dav:version-url V 119 /svn/!svn/ver/11226/trunk/java/client/src/org/openqa/selenium/internal/seleniumemulation/CaptureScreenshotToString.java END LookupStrategy.java K 25 svn:wc:ra_dav:version-url V 108 /svn/!svn/ver/11226/trunk/java/client/src/org/openqa/selenium/internal/seleniumemulation/LookupStrategy.java END FireNamedEvent.java K 25 svn:wc:ra_dav:version-url V 108 /svn/!svn/ver/11226/trunk/java/client/src/org/openqa/selenium/internal/seleniumemulation/FireNamedEvent.java END NameLookupStrategy.java K 25 svn:wc:ra_dav:version-url V 112 /svn/!svn/ver/11226/trunk/java/client/src/org/openqa/selenium/internal/seleniumemulation/NameLookupStrategy.java END CompoundMutator.java K 25 svn:wc:ra_dav:version-url V 109 /svn/!svn/ver/11226/trunk/java/client/src/org/openqa/selenium/internal/seleniumemulation/CompoundMutator.java END AlertOverride.java K 25 svn:wc:ra_dav:version-url V 107 /svn/!svn/ver/11226/trunk/java/client/src/org/openqa/selenium/internal/seleniumemulation/AlertOverride.java END GetAlert.java K 25 svn:wc:ra_dav:version-url V 102 /svn/!svn/ver/11226/trunk/java/client/src/org/openqa/selenium/internal/seleniumemulation/GetAlert.java END SelectOption.java K 25 svn:wc:ra_dav:version-url V 106 /svn/!svn/ver/11226/trunk/java/client/src/org/openqa/selenium/internal/seleniumemulation/SelectOption.java END GetCookie.java K 25 svn:wc:ra_dav:version-url V 103 /svn/!svn/ver/11226/trunk/java/client/src/org/openqa/selenium/internal/seleniumemulation/GetCookie.java END Uncheck.java K 25 svn:wc:ra_dav:version-url V 101 /svn/!svn/ver/11226/trunk/java/client/src/org/openqa/selenium/internal/seleniumemulation/Uncheck.java END GetText.java K 25 svn:wc:ra_dav:version-url V 101 /svn/!svn/ver/11226/trunk/java/client/src/org/openqa/selenium/internal/seleniumemulation/GetText.java END MetaKeyDown.java K 25 svn:wc:ra_dav:version-url V 105 /svn/!svn/ver/11226/trunk/java/client/src/org/openqa/selenium/internal/seleniumemulation/MetaKeyDown.java END OpenWindow.java K 25 svn:wc:ra_dav:version-url V 104 /svn/!svn/ver/11226/trunk/java/client/src/org/openqa/selenium/internal/seleniumemulation/OpenWindow.java END MouseEvent.java K 25 svn:wc:ra_dav:version-url V 104 /svn/!svn/ver/11226/trunk/java/client/src/org/openqa/selenium/internal/seleniumemulation/MouseEvent.java END JavascriptLibrary.java K 25 svn:wc:ra_dav:version-url V 111 /svn/!svn/ver/11226/trunk/java/client/src/org/openqa/selenium/internal/seleniumemulation/JavascriptLibrary.java END build.desc K 25 svn:wc:ra_dav:version-url V 99 /svn/!svn/ver/11226/trunk/java/client/src/org/openqa/selenium/internal/seleniumemulation/build.desc END injectableSelenium.js K 25 svn:wc:ra_dav:version-url V 110 /svn/!svn/ver/11226/trunk/java/client/src/org/openqa/selenium/internal/seleniumemulation/injectableSelenium.js END AltKeyUp.java K 25 svn:wc:ra_dav:version-url V 102 /svn/!svn/ver/11226/trunk/java/client/src/org/openqa/selenium/internal/seleniumemulation/AltKeyUp.java END GetAllFields.java K 25 svn:wc:ra_dav:version-url V 106 /svn/!svn/ver/11226/trunk/java/client/src/org/openqa/selenium/internal/seleniumemulation/GetAllFields.java END FindFirstSelectedOptionProperty.java K 25 svn:wc:ra_dav:version-url V 125 /svn/!svn/ver/11226/trunk/java/client/src/org/openqa/selenium/internal/seleniumemulation/FindFirstSelectedOptionProperty.java END Open.java K 25 svn:wc:ra_dav:version-url V 98 /svn/!svn/ver/11226/trunk/java/client/src/org/openqa/selenium/internal/seleniumemulation/Open.java END AssignId.java K 25 svn:wc:ra_dav:version-url V 102 /svn/!svn/ver/11226/trunk/java/client/src/org/openqa/selenium/internal/seleniumemulation/AssignId.java END RemoveSelection.java K 25 svn:wc:ra_dav:version-url V 109 /svn/!svn/ver/11226/trunk/java/client/src/org/openqa/selenium/internal/seleniumemulation/RemoveSelection.java END IsEditable.java K 25 svn:wc:ra_dav:version-url V 104 /svn/!svn/ver/11226/trunk/java/client/src/org/openqa/selenium/internal/seleniumemulation/IsEditable.java END GetCookieByName.java K 25 svn:wc:ra_dav:version-url V 109 /svn/!svn/ver/11226/trunk/java/client/src/org/openqa/selenium/internal/seleniumemulation/GetCookieByName.java END GetLocation.java K 25 svn:wc:ra_dav:version-url V 105 /svn/!svn/ver/11226/trunk/java/client/src/org/openqa/selenium/internal/seleniumemulation/GetLocation.java END IsTextPresent.java K 25 svn:wc:ra_dav:version-url V 107 /svn/!svn/ver/11226/trunk/java/client/src/org/openqa/selenium/internal/seleniumemulation/IsTextPresent.java END IsChecked.java K 25 svn:wc:ra_dav:version-url V 103 /svn/!svn/ver/11226/trunk/java/client/src/org/openqa/selenium/internal/seleniumemulation/IsChecked.java END IsElementPresent.java K 25 svn:wc:ra_dav:version-url V 110 /svn/!svn/ver/11226/trunk/java/client/src/org/openqa/selenium/internal/seleniumemulation/IsElementPresent.java END BaseOptionSelectStrategy.java K 25 svn:wc:ra_dav:version-url V 118 /svn/!svn/ver/11226/trunk/java/client/src/org/openqa/selenium/internal/seleniumemulation/BaseOptionSelectStrategy.java END ImplicitLookupStrategy.java K 25 svn:wc:ra_dav:version-url V 116 /svn/!svn/ver/11226/trunk/java/client/src/org/openqa/selenium/internal/seleniumemulation/ImplicitLookupStrategy.java END KeyState.java K 25 svn:wc:ra_dav:version-url V 102 /svn/!svn/ver/11226/trunk/java/client/src/org/openqa/selenium/internal/seleniumemulation/KeyState.java END RunScript.java K 25 svn:wc:ra_dav:version-url V 103 /svn/!svn/ver/11226/trunk/java/client/src/org/openqa/selenium/internal/seleniumemulation/RunScript.java END DeleteCookie.java K 25 svn:wc:ra_dav:version-url V 106 /svn/!svn/ver/11226/trunk/java/client/src/org/openqa/selenium/internal/seleniumemulation/DeleteCookie.java END AltLookupStrategy.java K 25 svn:wc:ra_dav:version-url V 111 /svn/!svn/ver/11226/trunk/java/client/src/org/openqa/selenium/internal/seleniumemulation/AltLookupStrategy.java END Refresh.java K 25 svn:wc:ra_dav:version-url V 101 /svn/!svn/ver/11226/trunk/java/client/src/org/openqa/selenium/internal/seleniumemulation/Refresh.java END IdentifierLookupStrategy.java K 25 svn:wc:ra_dav:version-url V 118 /svn/!svn/ver/11226/trunk/java/client/src/org/openqa/selenium/internal/seleniumemulation/IdentifierLookupStrategy.java END SetTimeout.java K 25 svn:wc:ra_dav:version-url V 104 /svn/!svn/ver/11226/trunk/java/client/src/org/openqa/selenium/internal/seleniumemulation/SetTimeout.java END IsSomethingSelected.java K 25 svn:wc:ra_dav:version-url V 113 /svn/!svn/ver/11226/trunk/java/client/src/org/openqa/selenium/internal/seleniumemulation/IsSomethingSelected.java END AttachFile.java K 25 svn:wc:ra_dav:version-url V 104 /svn/!svn/ver/11226/trunk/java/client/src/org/openqa/selenium/internal/seleniumemulation/AttachFile.java END IsAlertPresent.java K 25 svn:wc:ra_dav:version-url V 108 /svn/!svn/ver/11226/trunk/java/client/src/org/openqa/selenium/internal/seleniumemulation/IsAlertPresent.java END AddLocationStrategy.java K 25 svn:wc:ra_dav:version-url V 113 /svn/!svn/ver/11226/trunk/java/client/src/org/openqa/selenium/internal/seleniumemulation/AddLocationStrategy.java END LinkLookupStrategy.java K 25 svn:wc:ra_dav:version-url V 112 /svn/!svn/ver/11226/trunk/java/client/src/org/openqa/selenium/internal/seleniumemulation/LinkLookupStrategy.java END WindowMaximize.java K 25 svn:wc:ra_dav:version-url V 108 /svn/!svn/ver/11226/trunk/java/client/src/org/openqa/selenium/internal/seleniumemulation/WindowMaximize.java END TypeKeys.java K 25 svn:wc:ra_dav:version-url V 102 /svn/!svn/ver/11226/trunk/java/client/src/org/openqa/selenium/internal/seleniumemulation/TypeKeys.java END IsOrdered.java K 25 svn:wc:ra_dav:version-url V 103 /svn/!svn/ver/11226/trunk/java/client/src/org/openqa/selenium/internal/seleniumemulation/IsOrdered.java END DoubleClick.java K 25 svn:wc:ra_dav:version-url V 105 /svn/!svn/ver/11226/trunk/java/client/src/org/openqa/selenium/internal/seleniumemulation/DoubleClick.java END ControlKeyDown.java K 25 svn:wc:ra_dav:version-url V 108 /svn/!svn/ver/11226/trunk/java/client/src/org/openqa/selenium/internal/seleniumemulation/ControlKeyDown.java END GetElementHeight.java K 25 svn:wc:ra_dav:version-url V 110 /svn/!svn/ver/11226/trunk/java/client/src/org/openqa/selenium/internal/seleniumemulation/GetElementHeight.java END WaitForCondition.java K 25 svn:wc:ra_dav:version-url V 110 /svn/!svn/ver/11226/trunk/java/client/src/org/openqa/selenium/internal/seleniumemulation/WaitForCondition.java END IndexOptionSelectStrategy.java K 25 svn:wc:ra_dav:version-url V 119 /svn/!svn/ver/11226/trunk/java/client/src/org/openqa/selenium/internal/seleniumemulation/IndexOptionSelectStrategy.java END Click.java K 25 svn:wc:ra_dav:version-url V 99 /svn/!svn/ver/11226/trunk/java/client/src/org/openqa/selenium/internal/seleniumemulation/Click.java END GetConfirmation.java K 25 svn:wc:ra_dav:version-url V 109 /svn/!svn/ver/11226/trunk/java/client/src/org/openqa/selenium/internal/seleniumemulation/GetConfirmation.java END ValueFilterFunction.java K 25 svn:wc:ra_dav:version-url V 113 /svn/!svn/ver/11226/trunk/java/client/src/org/openqa/selenium/internal/seleniumemulation/ValueFilterFunction.java END GetElementPositionLeft.java K 25 svn:wc:ra_dav:version-url V 116 /svn/!svn/ver/11226/trunk/java/client/src/org/openqa/selenium/internal/seleniumemulation/GetElementPositionLeft.java END SelectFrame.java K 25 svn:wc:ra_dav:version-url V 105 /svn/!svn/ver/11226/trunk/java/client/src/org/openqa/selenium/internal/seleniumemulation/SelectFrame.java END LabelOptionSelectStrategy.java K 25 svn:wc:ra_dav:version-url V 119 /svn/!svn/ver/11226/trunk/java/client/src/org/openqa/selenium/internal/seleniumemulation/LabelOptionSelectStrategy.java END GetAttributeFromAllWindows.java K 25 svn:wc:ra_dav:version-url V 120 /svn/!svn/ver/11226/trunk/java/client/src/org/openqa/selenium/internal/seleniumemulation/GetAttributeFromAllWindows.java END SeleniumMutator.java K 25 svn:wc:ra_dav:version-url V 109 /svn/!svn/ver/11226/trunk/java/client/src/org/openqa/selenium/internal/seleniumemulation/SeleniumMutator.java END GetXpathCount.java K 25 svn:wc:ra_dav:version-url V 107 /svn/!svn/ver/11226/trunk/java/client/src/org/openqa/selenium/internal/seleniumemulation/GetXpathCount.java END GetBodyText.java K 25 svn:wc:ra_dav:version-url V 105 /svn/!svn/ver/11226/trunk/java/client/src/org/openqa/selenium/internal/seleniumemulation/GetBodyText.java END SelectWindow.java K 25 svn:wc:ra_dav:version-url V 106 /svn/!svn/ver/11226/trunk/java/client/src/org/openqa/selenium/internal/seleniumemulation/SelectWindow.java END IdOptionSelectStrategy.java K 25 svn:wc:ra_dav:version-url V 116 /svn/!svn/ver/11226/trunk/java/client/src/org/openqa/selenium/internal/seleniumemulation/IdOptionSelectStrategy.java END RegExTextMatchingStrategy.java K 25 svn:wc:ra_dav:version-url V 119 /svn/!svn/ver/11226/trunk/java/client/src/org/openqa/selenium/internal/seleniumemulation/RegExTextMatchingStrategy.java END SeleniumSelect.java K 25 svn:wc:ra_dav:version-url V 108 /svn/!svn/ver/11226/trunk/java/client/src/org/openqa/selenium/internal/seleniumemulation/SeleniumSelect.java END BaseFilterFunction.java K 25 svn:wc:ra_dav:version-url V 112 /svn/!svn/ver/11226/trunk/java/client/src/org/openqa/selenium/internal/seleniumemulation/BaseFilterFunction.java END GlobTextMatchingStrategy.java K 25 svn:wc:ra_dav:version-url V 118 /svn/!svn/ver/11226/trunk/java/client/src/org/openqa/selenium/internal/seleniumemulation/GlobTextMatchingStrategy.java END IsVisible.java K 25 svn:wc:ra_dav:version-url V 103 /svn/!svn/ver/11226/trunk/java/client/src/org/openqa/selenium/internal/seleniumemulation/IsVisible.java END FilterFunction.java K 25 svn:wc:ra_dav:version-url V 108 /svn/!svn/ver/11226/trunk/java/client/src/org/openqa/selenium/internal/seleniumemulation/FilterFunction.java END NameFilterFunction.java K 25 svn:wc:ra_dav:version-url V 112 /svn/!svn/ver/11226/trunk/java/client/src/org/openqa/selenium/internal/seleniumemulation/NameFilterFunction.java END PK lC>@¡9HH;org/openqa/selenium/internal/seleniumemulation/.svn/entries8 dir 11264 http://selenium.googlecode.com/svn/trunk/java/client/src/org/openqa/selenium/internal/seleniumemulation http://selenium.googlecode.com/svn 2011-02-01T13:59:17.176547Z 11226 simon.m.stewart svn:special svn:externals svn:needs-lock 07704840-8298-11de-bf8c-fd130f914ac9 GetElementPositionTop.java file 2011-02-03T12:01:17.000000Z 39e760d6aa92338f16e49eec4800d44b 2011-01-18T16:04:46.488656Z 11008 eran.mes@gmail.com XPathLookupStrategy.java file 2011-02-03T12:01:17.000000Z 46b2ef178043e1a04c1cd0fa7fa2729d 2009-11-15T02:09:46.887006Z 7628 simon.m.stewart Submit.java file 2011-02-03T12:01:17.000000Z da64b7de81e36055df9b2b619320f79e 2009-11-17T17:08:47.929854Z 7640 simon.m.stewart GetAttribute.java file 2011-02-03T12:01:17.000000Z 53f0c4581e240f444edc783432440ab7 2010-09-28T21:04:49.974237Z 9744 dawagner IsCookiePresent.java file 2011-02-03T12:01:17.000000Z 25e6f455130a016512acaa04cce4a849 2009-11-15T23:33:27.507914Z 7630 simon.m.stewart WindowFocus.java file 2011-02-03T12:01:17.000000Z 27048485f73ff43e054d4106cf1fc025 2010-09-28T21:04:49.974237Z 9744 dawagner GetAllLinks.java file 2011-02-03T12:01:17.000000Z bee17536cfa4b2240d77b80697f0a893 2009-11-19T11:18:19.084937Z 7656 simon.m.stewart WaitForPageToLoad.java file 2011-02-03T12:01:17.000000Z 35992a24cfcaf7282731a0b9a52cfde4 2010-08-17T14:05:00.079713Z 9470 simon.m.stewart DragAndDropToObject.java file 2011-02-03T12:01:17.000000Z 4c0b8f3efdb8dc0127c52904b8072544 2010-09-28T21:04:49.974237Z 9744 dawagner DomTraversalLookupStrategy.java file 2011-02-03T12:01:17.000000Z 9fa254f03e6e86be55714e08b89923be 2009-11-15T02:09:46.887006Z 7628 simon.m.stewart GetEval.java file 2011-02-03T12:01:17.000000Z 4bb8779ff52f9c0d67a208df516a45b3 2010-09-22T17:27:24.326828Z 9697 simon.m.stewart ValueOptionSelectStrategy.java file 2011-02-03T12:01:17.000000Z 3e39a965a6d888fc3d64f85a939516ed 2009-11-15T02:09:46.887006Z 7628 simon.m.stewart FunctionDeclaration.java file 2011-02-03T12:01:17.000000Z 85731bd4d39a9a69c6bbfbc234c6cc02 2010-09-09T17:04:26.083209Z 9624 simon.m.stewart AddSelection.java file 2011-02-03T12:01:17.000000Z e38008d36d0ac256934eda749e103ada 2010-09-28T21:04:49.974237Z 9744 dawagner ControlKeyUp.java file 2011-02-03T12:01:17.000000Z 3785e592535e75d4c677e4cbc33a1b35 2009-11-17T17:08:47.929854Z 7640 simon.m.stewart FindSelectedOptionProperties.java file 2011-02-03T12:01:17.000000Z 1b2597e040d839fe128c7c79175a6810 2009-11-19T11:18:19.084937Z 7656 simon.m.stewart SeleneseCommand.java file 2011-02-03T12:01:17.000000Z 9c3c9b320588e79fb6ff5d4601afba28 2009-11-19T11:55:47.175266Z 7657 simon.m.stewart CssLookupStrategy.java file 2011-02-03T12:01:17.000000Z 9289a638e0a4b2afc409b6722ee256c2 2010-10-14T18:33:24.024256Z 9965 simon.m.stewart ExactTextMatchingStrategy.java file 2011-02-03T12:01:17.000000Z 1e4a26ffa7113c0f49f97e1da17f6eef 2009-11-15T02:09:46.887006Z 7628 simon.m.stewart IdLookupStrategy.java file 2011-02-03T12:01:17.000000Z 002724e03cba700cc733451b004cde5c 2009-11-15T02:09:46.887006Z 7628 simon.m.stewart GetValue.java file 2011-02-03T12:01:17.000000Z c8d02b63781e5a4572352e753d2a703c 2011-01-26T18:37:16.588346Z 11149 eran.mes@gmail.com Type.java file 2011-02-03T12:01:17.000000Z c901145a388864933e84f616d672e693 2010-12-30T13:19:20.757226Z 10799 simon.m.stewart GetTitle.java file 2011-02-03T12:01:17.000000Z 661042da63d6583e775f33550722a1a8 2009-11-19T11:18:19.084937Z 7656 simon.m.stewart ElementFinder.java file 2011-02-03T12:01:17.000000Z a7290fe07ef92d2adcd32758af0ff513 2011-01-07T22:08:28.371182Z 10900 simon.m.stewart DragAndDrop.java file 2011-02-03T12:01:17.000000Z 8eb68d05691f96c0681686b88f6cbe20 2010-09-28T21:04:49.974237Z 9744 dawagner GetAllWindowTitles.java file 2011-02-03T12:01:17.000000Z 441524a28cbe591dfb41a230440666d9 2009-11-19T11:18:19.084937Z 7656 simon.m.stewart VariableDeclaration.java file 2011-02-03T12:01:17.000000Z f6f8af82651f3aecbffc5bab767f7fde 2010-09-08T12:51:42.612071Z 9613 simon.m.stewart GetExpression.java file 2011-02-03T12:01:17.000000Z cd3272ef7ecdf089a86d3b2055964f30 2010-09-09T14:22:00.256022Z 9620 simon.m.stewart SetNextConfirmationState.java file 2011-02-03T12:01:17.000000Z b0c7daa2a55afce0615ab343eaf4fcb4 2010-09-09T17:00:01.679074Z 9621 simon.m.stewart Check.java file 2011-02-03T12:01:17.000000Z 48e7bb6e1485ee15b890c1f7382471d8 2010-09-09T14:22:00.256022Z 9620 simon.m.stewart MouseEventAt.java file 2011-02-03T12:01:17.000000Z 2e48a0df31f0b35667309adc43fc6c7f 2010-09-28T21:04:49.974237Z 9744 dawagner GetElementIndex.java file 2011-02-03T12:01:17.000000Z 644a486ac11bd8d11f6cf9aa9a6a0798 2010-12-20T16:08:43.899982Z 10697 simon.m.stewart AltKeyDown.java file 2011-02-03T12:01:17.000000Z 50b699934a309c4f5c84f171de8209aa 2009-11-16T01:00:27.363229Z 7633 simon.m.stewart ClassLookupStrategy.java file 2011-02-03T12:01:17.000000Z 704031bfff171640e957b145e7be9a11 2009-11-15T02:09:46.887006Z 7628 simon.m.stewart IndexFilterFunction.java file 2011-02-03T12:01:17.000000Z d90596dc57a3ae844799ca52b466186e 2009-11-15T08:57:41.098470Z 7629 simon.m.stewart GetHtmlSource.java file 2011-02-03T12:01:17.000000Z 8080bbfacd3018f21a1d837141bd7fee 2009-11-19T11:18:19.084937Z 7656 simon.m.stewart MethodDeclaration.java file 2011-02-03T12:01:17.000000Z 730602a9e2d75b74d3338c31210a505c 2010-07-29T16:03:38.363559Z 9420 simon.m.stewart GoBack.java file 2011-02-03T12:01:17.000000Z c368987db7403a00038a894353d64ce7 2009-12-17T20:45:33.678753Z 7910 simon.m.stewart GetTable.java file 2011-02-03T12:01:17.000000Z b9959a487d19908ecf8a0663a6f70748 2009-11-19T11:18:19.084937Z 7656 simon.m.stewart GetAllButtons.java file 2011-02-03T12:01:17.000000Z d56f807bb22e5b7256ef0fad2d55e0e2 2009-11-19T11:18:19.084937Z 7656 simon.m.stewart FireEvent.java file 2011-02-03T12:01:17.000000Z e790e4ce2415bbfb8d9743e3aaad8619 2009-11-15T02:09:46.887006Z 7628 simon.m.stewart GetElementWidth.java file 2011-02-03T12:01:17.000000Z 046f460b28bfa469473eb9eab8f2871f 2011-01-18T16:04:46.488656Z 11008 eran.mes@gmail.com KeyEvent.java file 2011-02-03T12:01:17.000000Z ed46eeba762cc655eb605ce5b9563d2b 2010-09-28T21:04:49.974237Z 9744 dawagner Windows.java file 2011-02-03T12:01:17.000000Z 5279c26cf0c82e8ab90173e5598ed60a 2009-11-17T17:08:47.929854Z 7640 simon.m.stewart CreateCookie.java file 2011-02-03T12:01:17.000000Z 7ecd780ea295e60893e241086dc5c62a 2009-11-15T08:57:41.098470Z 7629 simon.m.stewart WaitForPopup.java file 2011-02-03T12:01:17.000000Z 2a4917dd33c909e7adf6a644d381b088 2009-12-17T20:45:33.678753Z 7910 simon.m.stewart MetaKeyUp.java file 2011-02-03T12:01:17.000000Z 5836be3310f6da2b1f44477293427637 2009-11-16T01:00:27.363229Z 7633 simon.m.stewart Close.java file 2011-02-03T12:01:17.000000Z 584ac92999433c7cc310762b0647454e 2009-11-19T11:18:19.084937Z 7656 simon.m.stewart Highlight.java file 2011-02-03T12:01:17.000000Z 993cb2e1f3da8817cdeb584b70985afc 2010-09-28T21:04:49.974237Z 9744 dawagner NoOp.java file 2011-02-03T12:01:17.000000Z 9bca1786d9fd27b8f06bffb04488c5b7 2009-11-17T17:08:47.929854Z 7640 simon.m.stewart ShiftKeyDown.java file 2011-02-03T12:01:17.000000Z 65117f50ff93dadf772ee1fd5dc6ffba 2010-10-16T15:38:20.242544Z 9993 dawagner RemoveAllSelections.java file 2011-02-03T12:01:17.000000Z 17ef18db4aced6bf27f82ce7e54e5184 2009-11-15T02:09:46.887006Z 7628 simon.m.stewart Timer.java file 2011-02-03T12:01:17.000000Z 0efcfb01372a7cf515a994a09956770e 2010-11-15T10:21:46.196383Z 10322 simon.m.stewart ScriptMutator.java file 2011-02-03T12:01:17.000000Z 946a1cdff7c0cfa6748f592ee0e5f1f6 2010-09-08T12:51:42.612071Z 9613 simon.m.stewart htmlutils.js file 2011-02-03T12:01:17.000000Z efb56094b7015ae21aaeb41066ec9564 2010-01-26T22:44:08.423757Z 8177 simon.m.stewart TextMatchingStrategy.java file 2011-02-03T12:01:17.000000Z e7325eec0397daf06abdbd00a3b06285 2009-11-15T02:09:46.887006Z 7628 simon.m.stewart IsConfirmationPresent.java file 2011-02-03T12:01:17.000000Z 187c682b459e3155b972f7bc621224e8 2010-09-09T17:03:54.076368Z 9623 simon.m.stewart DeleteAllVisibleCookies.java file 2011-02-03T12:01:17.000000Z 96572631a67e1206e43fc04b59bb30b6 2009-11-15T08:57:41.098470Z 7629 simon.m.stewart ShiftKeyUp.java file 2011-02-03T12:01:17.000000Z a0f25489deb0aa5911e4a370033e75e3 2009-11-16T01:00:27.363229Z 7633 simon.m.stewart OptionSelectStrategy.java file 2011-02-03T12:01:17.000000Z 4a92954217b84395a0d38d0b5d470b3d 2009-11-15T08:57:41.098470Z 7629 simon.m.stewart GetSelectOptions.java file 2011-02-03T12:01:17.000000Z 638a30f5c4c6bb949fa29ca9d37537e8 2010-09-28T21:04:49.974237Z 9744 dawagner CaptureScreenshotToString.java file 2011-02-03T12:01:17.000000Z bddffa28a8a2b9f9e1a63c67ae83b407 2010-01-29T20:04:12.111869Z 8235 plightbo FireNamedEvent.java file 2011-02-03T12:01:17.000000Z a784959f82a7216afc036d89e5feb1cc 2009-11-16T01:00:27.363229Z 7633 simon.m.stewart LookupStrategy.java file 2011-02-03T12:01:17.000000Z b42c943c8ba5f1c6d30bea5fe96f2682 2009-11-15T02:09:46.887006Z 7628 simon.m.stewart NameLookupStrategy.java file 2011-02-03T12:01:17.000000Z 894ea24fa8546effb93f12296d4f3d39 2010-09-28T21:04:49.974237Z 9744 dawagner CompoundMutator.java file 2011-02-03T12:01:17.000000Z 8ce7d3067de8010577b5b9c8b23aa7b7 2010-12-16T23:53:57.496922Z 10670 jmleyba AlertOverride.java file 2011-02-03T12:01:17.000000Z 7cdd46486ff7475f8f18a4675d5807d4 2010-09-09T17:03:54.076368Z 9623 simon.m.stewart GetAlert.java file 2011-02-03T12:01:17.000000Z 478e919a5178630766236ae3de63eecb 2010-09-09T14:22:00.256022Z 9620 simon.m.stewart SelectOption.java file 2011-02-03T12:01:17.000000Z 390599d1d8e4d8b564d34dc1e01ca2cd 2010-09-09T14:22:00.256022Z 9620 simon.m.stewart GetCookie.java file 2011-02-03T12:01:17.000000Z 6bd006fad54bb2c61ea33a0e145fd3a5 2009-11-15T23:33:27.507914Z 7630 simon.m.stewart Uncheck.java file 2011-02-03T12:01:17.000000Z 9aede06ab109c0ec76951a56d1bb66ee 2010-09-09T14:22:00.256022Z 9620 simon.m.stewart GetText.java file 2011-02-03T12:01:17.000000Z 20cdec1d4e7c43ae6deddec60d5295ab 2010-12-31T10:54:42.934653Z 10808 jmleyba MetaKeyDown.java file 2011-02-03T12:01:17.000000Z 56dc42b93ac75179e94a4a40afcece48 2009-11-16T01:00:27.363229Z 7633 simon.m.stewart OpenWindow.java file 2011-02-03T12:01:17.000000Z 109cf4c48c28c8475fdefe84c9159840 2009-12-17T20:45:33.678753Z 7910 simon.m.stewart MouseEvent.java file 2011-02-03T12:01:17.000000Z edc11977a01daa01a835ee1dd9d9ec35 2010-09-28T21:04:49.974237Z 9744 dawagner JavascriptLibrary.java file 2011-02-03T12:01:17.000000Z e2eccce433f16f2b33623b0c528ad086 2010-12-31T10:54:42.934653Z 10808 jmleyba build.desc file 2011-02-03T12:01:17.000000Z 35d4bcc4dacab0c2cb9fe859630d24d1 2011-02-01T13:59:17.176547Z 11226 simon.m.stewart injectableSelenium.js file 2011-02-03T12:01:17.000000Z d7ac4a86366ba1e6e814984870efe53b 2009-11-15T02:09:46.887006Z 7628 simon.m.stewart AltKeyUp.java file 2011-02-03T12:01:17.000000Z 47bb43c07abb00df5de9e93257bbdcd7 2009-11-16T01:00:27.363229Z 7633 simon.m.stewart GetAllFields.java file 2011-02-03T12:01:17.000000Z 5d21452443bc0185d674f6015a295d59 2009-11-19T11:18:19.084937Z 7656 simon.m.stewart FindFirstSelectedOptionProperty.java file 2011-02-03T12:01:17.000000Z 5e8a67d18facc9b52d0a8bb22b5ea70a 2009-11-19T11:18:19.084937Z 7656 simon.m.stewart Open.java file 2011-02-03T12:01:17.000000Z 6b02c61220912b5ea24f61210530ae47 2009-12-17T20:45:33.678753Z 7910 simon.m.stewart AssignId.java file 2011-02-03T12:01:17.000000Z 8156611cac85446f7d703d0c1b873f58 2010-09-28T21:04:49.974237Z 9744 dawagner RemoveSelection.java file 2011-02-03T12:01:17.000000Z 2d41426953db6bf9dfa18320502f00e6 2010-09-28T21:04:49.974237Z 9744 dawagner IsEditable.java file 2011-02-03T12:01:17.000000Z f86bd35f4c8d1b5b1a29e7cf77260a5d 2010-09-28T21:04:49.974237Z 9744 dawagner GetCookieByName.java file 2011-02-03T12:01:17.000000Z 69450e85f7f5d0168ddafd8fae52ba78 2009-11-15T23:33:27.507914Z 7630 simon.m.stewart GetLocation.java file 2011-02-03T12:01:17.000000Z b976a46a3976c9018407c1fb6ed2a264 2009-11-19T11:18:19.084937Z 7656 simon.m.stewart IsTextPresent.java file 2011-02-03T12:01:17.000000Z 9cfd789ab7bcf5611225aa0f1f00660b 2010-12-31T10:54:42.934653Z 10808 jmleyba IsChecked.java file 2011-02-03T12:01:17.000000Z aa0ec01f628ba268f689e9f8ec990731 2010-09-28T21:04:49.974237Z 9744 dawagner IsElementPresent.java file 2011-02-03T12:01:17.000000Z 50322c41de7027ec7a9a114f2a814f2a 2010-09-28T21:04:49.974237Z 9744 dawagner BaseOptionSelectStrategy.java file 2011-02-03T12:01:17.000000Z 444e2d2d1bbfb40f8ee6fb0c571b4512 2009-11-15T08:57:41.098470Z 7629 simon.m.stewart ImplicitLookupStrategy.java file 2011-02-03T12:01:17.000000Z d6725735e09488bc21eb09b86b802920 2009-11-15T02:09:46.887006Z 7628 simon.m.stewart KeyState.java file 2011-02-03T12:01:17.000000Z 5d71f380513f462c2b488459e49c1445 2009-11-15T02:09:46.887006Z 7628 simon.m.stewart RunScript.java file 2011-02-03T12:01:17.000000Z 46725cb718ba0c599890fe2daa9a4e52 2010-09-08T12:51:42.612071Z 9613 simon.m.stewart DeleteCookie.java file 2011-02-03T12:01:17.000000Z be688a9090930e1a1142cbc59e45a3ae 2010-10-16T15:38:20.242544Z 9993 dawagner AltLookupStrategy.java file 2011-02-03T12:01:17.000000Z 761da469826920896cb3e2fc1d3931ea 2009-11-15T02:09:46.887006Z 7628 simon.m.stewart Refresh.java file 2011-02-03T12:01:17.000000Z 4635556a7d6ea08fd2f1d9fdd0fbd3cc 2009-12-17T20:45:33.678753Z 7910 simon.m.stewart IdentifierLookupStrategy.java file 2011-02-03T12:01:17.000000Z 6f351e362af628c741b96594d218407d 2009-11-15T02:09:46.887006Z 7628 simon.m.stewart SetTimeout.java file 2011-02-03T12:01:17.000000Z 931064db16b02a48f95179a608b02526 2010-07-29T14:08:41.732990Z 9418 simon.m.stewart IsSomethingSelected.java file 2011-02-03T12:01:17.000000Z 2b941adda6e7e61fe9152cc1c3b69956 2010-09-28T21:04:49.974237Z 9744 dawagner AttachFile.java file 2011-02-03T12:01:17.000000Z d2ac3b181376d96f1082a5c1504d838f 2011-01-17T21:50:09.122540Z 10988 simon.m.stewart IsAlertPresent.java file 2011-02-03T12:01:17.000000Z 225c363e2cd724828de338dd8acf744a 2010-09-09T14:22:00.256022Z 9620 simon.m.stewart AddLocationStrategy.java file 2011-02-03T12:01:17.000000Z 985f317ec21db86e0ba38daf95f560d6 2010-09-28T21:04:49.974237Z 9744 dawagner LinkLookupStrategy.java file 2011-02-03T12:01:17.000000Z d3742d0b2e2bee6c6c63e099e9678960 2009-11-15T08:57:41.098470Z 7629 simon.m.stewart WindowMaximize.java file 2011-02-03T12:01:17.000000Z bf24d04214e51b0780b0f718973d6663 2010-09-28T21:04:49.974237Z 9744 dawagner TypeKeys.java file 2011-02-03T12:01:17.000000Z 30643e4d75334be75e73fa6ffa10758a 2011-01-29T19:14:57.307815Z 11192 simon.m.stewart IsOrdered.java file 2011-02-03T12:01:17.000000Z 4c448d86ed38d7ecf1f6f5bd06621e7c 2010-09-28T21:04:49.974237Z 9744 dawagner DoubleClick.java file 2011-02-03T12:01:17.000000Z 99a51da72b20b3e1c360c97b03762dcc 2010-09-28T21:04:49.974237Z 9744 dawagner ControlKeyDown.java file 2011-02-03T12:01:17.000000Z ea5319055c4f18edc1242342f0527cec 2009-11-17T17:08:47.929854Z 7640 simon.m.stewart GetElementHeight.java file 2011-02-03T12:01:17.000000Z 6025d10ca6347853ed4a9131e903ac7a 2011-01-18T16:04:46.488656Z 11008 eran.mes@gmail.com WaitForCondition.java file 2011-02-03T12:01:17.000000Z a743cfe0652b38a8eefb7bbe1d955918 2010-09-08T12:51:42.612071Z 9613 simon.m.stewart IndexOptionSelectStrategy.java file 2011-02-03T12:01:17.000000Z 54acb936dd7e80270fed05202f641cf6 2009-11-15T08:57:41.098470Z 7629 simon.m.stewart Click.java file 2011-02-03T12:01:17.000000Z cd794e7175d96d501d7ec22ddad67022 2010-09-28T21:06:33.316206Z 9745 dawagner GetConfirmation.java file 2011-02-03T12:01:17.000000Z fc227bbf2584fd646cd9d5a53449a1f2 2010-09-09T17:03:54.076368Z 9623 simon.m.stewart ValueFilterFunction.java file 2011-02-03T12:01:17.000000Z c3f9f8e6a9565b2823b4b1886265a065 2009-11-15T02:09:46.887006Z 7628 simon.m.stewart GetElementPositionLeft.java file 2011-02-03T12:01:17.000000Z 3b01981b821f59163123da7face0399f 2011-01-18T16:04:46.488656Z 11008 eran.mes@gmail.com SelectFrame.java file 2011-02-03T12:01:17.000000Z 4244ee195f70242efe6cb4d3c7582181 2010-09-22T17:27:24.326828Z 9697 simon.m.stewart LabelOptionSelectStrategy.java file 2011-02-03T12:01:17.000000Z 73da57492fb0a160131eb4c4643fdde8 2009-11-15T02:09:46.887006Z 7628 simon.m.stewart GetAttributeFromAllWindows.java file 2011-02-03T12:01:17.000000Z 86a60cb5fcd1a892b2585f5671bcb868 2009-11-19T11:18:19.084937Z 7656 simon.m.stewart SeleniumMutator.java file 2011-02-03T12:01:17.000000Z 8c1c9333873b04335499ab9afb853b7f 2010-12-16T23:53:57.496922Z 10670 jmleyba GetXpathCount.java file 2011-02-03T12:01:17.000000Z ddd6db5070971c586de7497872b74ee0 2009-11-15T23:33:27.507914Z 7630 simon.m.stewart GetBodyText.java file 2011-02-03T12:01:17.000000Z f8f6aaa0e5d2d216e221e3ae823e1e0e 2009-11-19T11:18:19.084937Z 7656 simon.m.stewart SelectWindow.java file 2011-02-03T12:01:17.000000Z 40749b49e6039f65edb9378a90a6e7a2 2009-11-17T17:08:47.929854Z 7640 simon.m.stewart IdOptionSelectStrategy.java file 2011-02-03T12:01:17.000000Z c2aa1988c1a6c022f6a6464fc26aec40 2009-11-15T02:09:46.887006Z 7628 simon.m.stewart RegExTextMatchingStrategy.java file 2011-02-03T12:01:17.000000Z 44ef721694fd9f9d1b96e849d3fd13cb 2009-11-15T02:09:46.887006Z 7628 simon.m.stewart SeleniumSelect.java file 2011-02-03T12:01:17.000000Z 9daa19da19c29fed839c73532aec753f 2010-02-02T16:11:02.443528Z 8257 simon.m.stewart GlobTextMatchingStrategy.java file 2011-02-03T12:01:17.000000Z cb5eb70300733c234561e0dd27026e9c 2010-01-26T22:44:08.423757Z 8177 simon.m.stewart BaseFilterFunction.java file 2011-02-03T12:01:17.000000Z 60e125b4f02446a727ebec1c4c10febe 2009-11-15T08:57:41.098470Z 7629 simon.m.stewart IsVisible.java file 2011-02-03T12:01:17.000000Z 9451c1697400a3a01eab4105bdeba7e9 2010-09-28T21:04:49.974237Z 9744 dawagner FilterFunction.java file 2011-02-03T12:01:17.000000Z aab93581bb71cc1d2ef14ab5acf48289 2009-11-15T08:57:41.098470Z 7629 simon.m.stewart NameFilterFunction.java file 2011-02-03T12:01:17.000000Z 705d22210f0bfd7f2a5fc0781527d919 2009-11-15T02:09:46.887006Z 7628 simon.m.stewart PK lC>G:org/openqa/selenium/internal/seleniumemulation/.svn/format8 PK lC>G_org/openqa/selenium/internal/seleniumemulation/.svn/text-base/AddLocationStrategy.java.svn-base/* Copyright 2007-2009 WebDriver committers Copyright 2007-2009 Google Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package org.openqa.selenium.internal.seleniumemulation; import org.openqa.selenium.JavascriptExecutor; import org.openqa.selenium.WebDriver; import org.openqa.selenium.WebElement; public class AddLocationStrategy extends SeleneseCommand { private final ElementFinder elementFinder; public AddLocationStrategy(ElementFinder elementFinder) { this.elementFinder = elementFinder; } @Override protected Void handleSeleneseCommand(WebDriver driver, String strategyName, final String functionDefinition) { elementFinder.add(strategyName, new LookupStrategy() { public WebElement find(WebDriver driver, String use) { return (WebElement) ((JavascriptExecutor) driver).executeScript( String.format( "(function(locator, inWindow, inDocument) { %s }).call(this,'%s', window, document)", functionDefinition, use)); } }); return null; } } PK lC>SXorg/openqa/selenium/internal/seleniumemulation/.svn/text-base/AddSelection.java.svn-base/* Copyright 2007-2009 WebDriver committers Copyright 2007-2009 Google Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package org.openqa.selenium.internal.seleniumemulation; import com.thoughtworks.selenium.SeleniumException; import org.openqa.selenium.WebDriver; import org.openqa.selenium.WebElement; public class AddSelection extends SeleneseCommand { private final ElementFinder finder; private final SeleniumSelect select; public AddSelection(ElementFinder elementFinder, SeleniumSelect select) { this.finder = elementFinder; this.select = select; } @Override protected Void handleSeleneseCommand(WebDriver driver, String locator, String optionLocator) { WebElement element = finder.findElement(driver, locator); if (!select.isMultiple(element)) { throw new SeleniumException("You may only add a selection to a select that supports multiple selections"); } select.select(driver, locator, optionLocator, true, false); return null; } } PK lC>ʚD Yorg/openqa/selenium/internal/seleniumemulation/.svn/text-base/AlertOverride.java.svn-base/* Copyright 2010 WebDriver committers Copyright 2010 Google Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package org.openqa.selenium.internal.seleniumemulation; import com.thoughtworks.selenium.SeleniumException; import org.openqa.selenium.JavascriptExecutor; import org.openqa.selenium.WebDriver; public class AlertOverride { public void replaceAlertMethod(WebDriver driver) { ((JavascriptExecutor) driver).executeScript( "if (window.__webdriverAlerts) { return; } " + "window.__webdriverAlerts = []; " + "window.alert = function(msg) { window.__webdriverAlerts.push(msg); }; " + "window.__webdriverConfirms = []; " + "window.__webdriverNextConfirm = true; " + "window.confirm = function(msg) { " + " window.__webdriverConfirms.push(msg); " + " var res = window.__webdriverNextConfirm; " + " window.__webdriverNextConfirm = true; " + " return res; " + "};" ); } public String getNextAlert(WebDriver driver) { String result = (String) ((JavascriptExecutor) driver).executeScript( "if (!window.__webdriverAlerts) { return null }; " + "var t = window.__webdriverAlerts.shift();" + "if (t) { t = t.replace(/\\n/g, ' '); } " + "return t;" ); if (result == null) { throw new SeleniumException("There were no alerts"); } return result; } public boolean isAlertPresent(WebDriver driver) { return Boolean.TRUE.equals(((JavascriptExecutor) driver).executeScript( "return window.__webdriverAlerts && window.__webdriverAlerts.length > 0;" )); } public String getNextConfirmation(WebDriver driver) { String result = (String) ((JavascriptExecutor) driver).executeScript( "if (!window.__webdriverConfirms) { return null; } " + "return window.__webdriverConfirms.shift();" ); if (result == null) { throw new SeleniumException("There were no confirmations"); } return result; } public boolean isConfirmationPresent(WebDriver driver) { return Boolean.TRUE.equals(((JavascriptExecutor) driver).executeScript( "return window.__webdriverConfirms && window.__webdriverConfirms.length > 0;" )); } } PK lC>ãVorg/openqa/selenium/internal/seleniumemulation/.svn/text-base/AltKeyDown.java.svn-basepackage org.openqa.selenium.internal.seleniumemulation; import org.openqa.selenium.WebDriver; public class AltKeyDown extends SeleneseCommand { private final KeyState keyState; public AltKeyDown(KeyState keyState) { this.keyState = keyState; } @Override protected Void handleSeleneseCommand(WebDriver driver, String locator, String value) { keyState.altKeyDown = true; return null; } }PK lC>=Z=Torg/openqa/selenium/internal/seleniumemulation/.svn/text-base/AltKeyUp.java.svn-basepackage org.openqa.selenium.internal.seleniumemulation; import org.openqa.selenium.WebDriver; public class AltKeyUp extends SeleneseCommand { private final KeyState keyState; public AltKeyUp(KeyState keyState) { this.keyState = keyState; } @Override protected Void handleSeleneseCommand(WebDriver driver, String locator, String value) { keyState.altKeyDown = false; return null; } }PK lC>cW]org/openqa/selenium/internal/seleniumemulation/.svn/text-base/AltLookupStrategy.java.svn-base/* Copyright 2007-2009 WebDriver committers Copyright 2007-2009 Google Inc. Portions copyright 2007 ThoughtWorks, Inc Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package org.openqa.selenium.internal.seleniumemulation; import org.openqa.selenium.By; import org.openqa.selenium.WebDriver; import org.openqa.selenium.WebElement; public class AltLookupStrategy implements LookupStrategy { public WebElement find(WebDriver driver, String use) { return driver.findElement(By.xpath("//*[@alt='" + use + "']")); } } PK lC>g`Torg/openqa/selenium/internal/seleniumemulation/.svn/text-base/AssignId.java.svn-base/* Copyright 2007-2009 WebDriver committers Copyright 2007-2009 Google Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package org.openqa.selenium.internal.seleniumemulation; import org.openqa.selenium.WebDriver; public class AssignId extends SeleneseCommand { private final JavascriptLibrary js; private final ElementFinder finder; public AssignId(JavascriptLibrary js, ElementFinder finder) { this.js = js; this.finder = finder; } @Override protected Void handleSeleneseCommand(WebDriver driver, String locator, String value) { js.executeScript(driver, "arguments[0].id = arguments[1]", finder.findElement(driver, locator), value); return null; } }PK lC>ɱVorg/openqa/selenium/internal/seleniumemulation/.svn/text-base/AttachFile.java.svn-base/* Copyright 2007-2009 WebDriver committers Copyright 2007-2009 Google Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package org.openqa.selenium.internal.seleniumemulation; import com.google.common.io.Resources; import com.thoughtworks.selenium.SeleniumException; import org.openqa.selenium.WebDriver; import org.openqa.selenium.WebElement; import org.openqa.selenium.io.TemporaryFilesystem; import java.io.File; import java.io.FileOutputStream; import java.io.IOException; import java.net.MalformedURLException; import java.net.URL; public class AttachFile extends SeleneseCommand { private final ElementFinder finder; public AttachFile(ElementFinder finder) { this.finder = finder; } @Override protected Void handleSeleneseCommand(WebDriver driver, String locator, String value) { File file = downloadFile(value); WebElement element = finder.findElement(driver, locator); element.clear(); element.sendKeys(file.getAbsolutePath()); return null; } private File downloadFile(String name) { URL url = getUrl(name); File dir = TemporaryFilesystem.createTempDir("attachFile", "dir"); File outputTo = new File(dir, url.getFile()); if (!outputTo.getParentFile().mkdirs()) { throw new SeleniumException("Cannot create file for upload: " + outputTo); } FileOutputStream fos = null; try { fos = new FileOutputStream(outputTo); Resources.copy(url, fos); } catch (IOException e) { } return outputTo; } private URL getUrl(String name) { try { return new URL(name); } catch (MalformedURLException e) { throw new SeleniumException("Malformed URL: " + name); } } }PK lC>{2^org/openqa/selenium/internal/seleniumemulation/.svn/text-base/BaseFilterFunction.java.svn-base/* Copyright 2007-2009 WebDriver committers Copyright 2007-2009 Google Inc. Portions copyright 2007 ThoughtWorks, Inc Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package org.openqa.selenium.internal.seleniumemulation; import java.util.ArrayList; import java.util.Iterator; import java.util.List; import org.openqa.selenium.WebElement; public abstract class BaseFilterFunction implements FilterFunction { public List filterElements(List allElements, String filterValue) { ArrayList toReturn = new ArrayList(); Iterator iterator = allElements.iterator(); while (iterator.hasNext()) { WebElement element = iterator.next(); if (shouldAdd(element, filterValue)) toReturn.add(element); } return toReturn; } protected abstract boolean shouldAdd(WebElement element, String filterValue); } PK lC>f~wdorg/openqa/selenium/internal/seleniumemulation/.svn/text-base/BaseOptionSelectStrategy.java.svn-base/* Copyright 2007-2009 WebDriver committers Copyright 2007-2009 Google Inc. Portions copyright 2007 ThoughtWorks, Inc Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package org.openqa.selenium.internal.seleniumemulation; import java.util.Iterator; import java.util.List; import org.openqa.selenium.WebElement; public abstract class BaseOptionSelectStrategy implements OptionSelectStrategy { public boolean select(List fromOptions, String selectThis, boolean setSelected, boolean allowMultipleSelect) { boolean matchMade = false; Iterator allOptions = fromOptions.iterator(); while (allOptions.hasNext()) { WebElement option = allOptions.next(); boolean matchThisTime = selectOption(option, selectThis); if (matchThisTime) { if (setSelected) option.setSelected(); else if (option.isSelected()) { option.toggle(); } } matchMade |= matchThisTime; if (matchMade && !allowMultipleSelect) return true; } return matchMade; } protected abstract boolean selectOption(WebElement option, String selectThis); } PK lC>'||eorg/openqa/selenium/internal/seleniumemulation/.svn/text-base/CaptureScreenshotToString.java.svn-basepackage org.openqa.selenium.internal.seleniumemulation; import org.openqa.selenium.OutputType; import org.openqa.selenium.TakesScreenshot; import org.openqa.selenium.WebDriver; public class CaptureScreenshotToString extends SeleneseCommand { @Override protected String handleSeleneseCommand(WebDriver driver, String locator, String value) { if (driver instanceof TakesScreenshot) { TakesScreenshot tsDriver = (TakesScreenshot) driver; return tsDriver.getScreenshotAs(OutputType.BASE64); } else { throw new UnsupportedOperationException("WebDriver does not implement TakeScreenshot"); } } } PK lC>?1.!Qorg/openqa/selenium/internal/seleniumemulation/.svn/text-base/Check.java.svn-base/* Copyright 2007-2009 WebDriver committers Copyright 2007-2009 Google Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package org.openqa.selenium.internal.seleniumemulation; import org.openqa.selenium.WebDriver; public class Check extends SeleneseCommand { private final AlertOverride alertOverride; private final ElementFinder finder; public Check(AlertOverride alertOverride, ElementFinder finder) { this.alertOverride = alertOverride; this.finder = finder; } @Override protected Void handleSeleneseCommand(WebDriver driver, String locator, String value) { alertOverride.replaceAlertMethod(driver); finder.findElement(driver, locator).setSelected(); return null; } }PK lC>9_org/openqa/selenium/internal/seleniumemulation/.svn/text-base/ClassLookupStrategy.java.svn-base/* Copyright 2007-2009 WebDriver committers Copyright 2007-2009 Google Inc. Portions copyright 2007 ThoughtWorks, Inc Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package org.openqa.selenium.internal.seleniumemulation; import org.openqa.selenium.By; import org.openqa.selenium.WebDriver; import org.openqa.selenium.WebElement; public class ClassLookupStrategy implements LookupStrategy { public WebElement find(WebDriver driver, String use) { return driver.findElement(By.xpath("//*[@class='" + use + "']")); } } PK lC>ZQorg/openqa/selenium/internal/seleniumemulation/.svn/text-base/Click.java.svn-base/* Copyright 2007-2009 WebDriver committers Copyright 2007-2009 Google Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package org.openqa.selenium.internal.seleniumemulation; import org.openqa.selenium.WebDriver; import org.openqa.selenium.WebElement; public class Click extends SeleneseCommand { private final AlertOverride alertOverride; private final ElementFinder finder; public Click(AlertOverride alertOverride, ElementFinder elementFinder) { this.alertOverride = alertOverride; finder = elementFinder; } @Override protected Void handleSeleneseCommand(WebDriver driver, String locator, String value) { alertOverride.replaceAlertMethod(driver); WebElement element = finder.findElement(driver, locator); element.click(); return null; } } PK lC>vMQorg/openqa/selenium/internal/seleniumemulation/.svn/text-base/Close.java.svn-base/* Copyright 2007-2009 WebDriver committers Copyright 2007-2009 Google Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package org.openqa.selenium.internal.seleniumemulation; import org.openqa.selenium.WebDriver; public class Close extends SeleneseCommand { @Override protected Void handleSeleneseCommand(WebDriver driver, String ignored, String alsoIgnored) { driver.close(); return null; } } PK lC>`f f [org/openqa/selenium/internal/seleniumemulation/.svn/text-base/CompoundMutator.java.svn-base/* Copyright 2010 WebDriver committers Copyright 2010 Google Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package org.openqa.selenium.internal.seleniumemulation; import com.google.common.collect.Lists; import java.util.List; /** * A class that collects together a group of other mutators and applies * them in the order they've been added to any script that needs modification. * Any JS to be executed will be wrapped in an "eval" block so that a * meaningful return value can be created. */ public class CompoundMutator implements ScriptMutator { // The ordering of mutators matters private final List mutators = Lists.newArrayList(); public CompoundMutator(String baseUrl) { addMutator(new VariableDeclaration("selenium", "var selenium = {};")); addMutator(new VariableDeclaration("selenium.browserbot", "selenium.browserbot = {};")); addMutator(new VariableDeclaration( "selenium.browserbot.baseUrl", "selenium.browserbot.baseUrl = '" + baseUrl + "';")); addMutator(new FunctionDeclaration("selenium.page", "if (!selenium.browserbot) { selenium.browserbot = {} }; return selenium.browserbot;")); addMutator(new FunctionDeclaration("selenium.browserbot.getCurrentWindow", "return window;")); addMutator(new FunctionDeclaration("selenium.page().getCurrentWindow", "return window;")); addMutator(new FunctionDeclaration("selenium.browserbot.getDocument", "return document;")); addMutator(new FunctionDeclaration("selenium.page().getDocument", "return document;")); JavascriptLibrary library = new JavascriptLibrary(); addMutator(new SeleniumMutator("selenium.isElementPresent", library.getSeleniumScript("isElementPresent.js"))); addMutator(new SeleniumMutator("selenium.isTextPresent", library.getSeleniumScript("isTextPresent.js"))); addMutator(new SeleniumMutator("selenium.isVisible", library.getSeleniumScript("isVisible.js"))); addMutator(new SeleniumMutator("selenium.browserbot.findElement", library.getSeleniumScript("findElement.js"))); } public void addMutator(ScriptMutator mutator) { mutators.add(mutator); } public void mutate(String script, StringBuilder outputTo) { StringBuilder nested = new StringBuilder(); for (ScriptMutator mutator : mutators) { mutator.mutate(script, nested); } nested.append("").append(script); outputTo.append("return eval('"); outputTo.append(escape(nested.toString())); outputTo.append("');"); } private String escape(String escapee) { return escapee .replace("\\", "\\\\") .replace("\n", "\\n") .replace("'", "\\'"); } } PK lC>~#YZorg/openqa/selenium/internal/seleniumemulation/.svn/text-base/ControlKeyDown.java.svn-base/* Copyright 2007-2009 WebDriver committers Copyright 2007-2009 Google Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package org.openqa.selenium.internal.seleniumemulation; import org.openqa.selenium.WebDriver; public class ControlKeyDown extends SeleneseCommand { private final KeyState keyState; public ControlKeyDown(KeyState keyState) { this.keyState = keyState; } @Override protected Void handleSeleneseCommand(WebDriver driver, String locator, String value) { keyState.controlKeyDown = true; return null; } } PK lC>DTo  Xorg/openqa/selenium/internal/seleniumemulation/.svn/text-base/ControlKeyUp.java.svn-base/* Copyright 2007-2009 WebDriver committers Copyright 2007-2009 Google Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package org.openqa.selenium.internal.seleniumemulation; import org.openqa.selenium.WebDriver; public class ControlKeyUp extends SeleneseCommand { private final KeyState keyState; public ControlKeyUp(KeyState keyState) { this.keyState = keyState; } @Override protected Void handleSeleneseCommand(WebDriver driver, String locator, String value) { keyState.controlKeyDown = false; return null; } } PK lC>N` ` Xorg/openqa/selenium/internal/seleniumemulation/.svn/text-base/CreateCookie.java.svn-base/* Copyright 2007-2009 WebDriver committers Copyright 2007-2009 Google Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package org.openqa.selenium.internal.seleniumemulation; import java.net.MalformedURLException; import java.net.URL; import java.util.Date; import java.util.regex.Matcher; import java.util.regex.Pattern; import com.thoughtworks.selenium.SeleniumException; import org.openqa.selenium.Cookie; import org.openqa.selenium.WebDriver; public class CreateCookie extends SeleneseCommand { private final Pattern NAME_VALUE_PAIR_PATTERN = Pattern.compile("([^\\s=\\[\\]\\(\\),\"\\/\\?@:;]+)=([^=\\[\\]\\(\\),\"\\/\\?@:;]*)"); private static final Pattern MAX_AGE_PATTERN = Pattern.compile("max_age=(\\d+)"); private static final Pattern PATH_PATTERN = Pattern.compile("path=([^\\s,]+)[,]?"); @Override protected Void handleSeleneseCommand(WebDriver driver, String nameValuePair, String optionsString) { Matcher nameValuePairMatcher = NAME_VALUE_PAIR_PATTERN.matcher(nameValuePair); if (!nameValuePairMatcher.find()) throw new SeleniumException("Invalid parameter: " + nameValuePair); String name = nameValuePairMatcher.group(1); String value = nameValuePairMatcher.group(2); Matcher maxAgeMatcher = MAX_AGE_PATTERN.matcher(optionsString); Date maxAge = null; if (maxAgeMatcher.find()) { maxAge = new Date(System.currentTimeMillis() + Integer.parseInt(maxAgeMatcher.group(1)) * 1000); } String path = null; Matcher pathMatcher = PATH_PATTERN.matcher(optionsString); if (pathMatcher.find()) { path = pathMatcher.group(1); try { if (path.startsWith("http")) { path = new URL(path).getPath(); } } catch (MalformedURLException e) { // Fine. } } Cookie cookie = new Cookie(name, value, path, maxAge); driver.manage().addCookie(cookie); return null; } } PK lC>͚]org/openqa/selenium/internal/seleniumemulation/.svn/text-base/CssLookupStrategy.java.svn-base/* Copyright 2010 WebDriver committers Copyright 2010 Google Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package org.openqa.selenium.internal.seleniumemulation; import org.openqa.selenium.By; import org.openqa.selenium.WebDriver; import org.openqa.selenium.WebElement; public class CssLookupStrategy implements LookupStrategy { public WebElement find(WebDriver driver, String use) { return driver.findElement(By.cssSelector(use)); } } PK lC>ɧcorg/openqa/selenium/internal/seleniumemulation/.svn/text-base/DeleteAllVisibleCookies.java.svn-base/* Copyright 2007-2009 WebDriver committers Copyright 2007-2009 Google Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package org.openqa.selenium.internal.seleniumemulation; import org.openqa.selenium.WebDriver; public class DeleteAllVisibleCookies extends SeleneseCommand { @Override protected Void handleSeleneseCommand(WebDriver driver, String locator, String value) { driver.manage().deleteAllCookies(); return null; } } PK lC>F  Xorg/openqa/selenium/internal/seleniumemulation/.svn/text-base/DeleteCookie.java.svn-base/* Copyright 2007-2009 WebDriver committers Copyright 2007-2009 Google Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package org.openqa.selenium.internal.seleniumemulation; import org.openqa.selenium.Cookie; import org.openqa.selenium.WebDriver; public class DeleteCookie extends SeleneseCommand { @Override protected Void handleSeleneseCommand(WebDriver driver, String name, String ignored) { Cookie cookie = driver.manage().getCookieNamed(name); if (cookie != null) { driver.manage().deleteCookieNamed(name); } return null; } }PK lC>dW{{forg/openqa/selenium/internal/seleniumemulation/.svn/text-base/DomTraversalLookupStrategy.java.svn-base/* Copyright 2007-2009 WebDriver committers Copyright 2007-2009 Google Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package org.openqa.selenium.internal.seleniumemulation; import org.openqa.selenium.JavascriptExecutor; import org.openqa.selenium.WebDriver; import org.openqa.selenium.WebElement; public class DomTraversalLookupStrategy implements LookupStrategy { public WebElement find(WebDriver driver, String use) { if (!(driver instanceof JavascriptExecutor)) { throw new UnsupportedOperationException( "DOM lookups only work when the driver supports Javascript"); } JavascriptExecutor executor = (JavascriptExecutor) driver; if (!executor.isJavascriptEnabled()) { throw new UnsupportedOperationException( "DOM lookup failed: driver does not have JS enabled"); } return (WebElement) executor.executeScript(String.format("return %s", use)); } } PK lC>GBvvWorg/openqa/selenium/internal/seleniumemulation/.svn/text-base/DoubleClick.java.svn-base/* Copyright 2007-2009 WebDriver committers Copyright 2007-2009 Google Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package org.openqa.selenium.internal.seleniumemulation; import org.openqa.selenium.WebDriver; import org.openqa.selenium.WebElement; public class DoubleClick extends SeleneseCommand { private final ElementFinder finder; public DoubleClick(ElementFinder finder) { this.finder = finder; } @Override protected Void handleSeleneseCommand(WebDriver driver, String locator, String value) { WebElement element = finder.findElement(driver, locator); element.click(); element.click(); return null; } } PK lC>#UKKWorg/openqa/selenium/internal/seleniumemulation/.svn/text-base/DragAndDrop.java.svn-base/* Copyright 2007-2009 WebDriver committers Copyright 2007-2009 Google Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package org.openqa.selenium.internal.seleniumemulation; import org.openqa.selenium.RenderedWebElement; import org.openqa.selenium.WebDriver; public class DragAndDrop extends SeleneseCommand { private final ElementFinder finder; public DragAndDrop(ElementFinder finder) { this.finder = finder; } @Override protected Void handleSeleneseCommand(WebDriver driver, String locator, String movementsString) { String[] parts = movementsString.split("\\s*,\\s*", 2); int xDelta = Integer.parseInt(parts[0].trim()); int yDelta = Integer.parseInt(parts[1].trim()); ((RenderedWebElement) finder.findElement(driver, locator)).dragAndDropBy(xDelta, yDelta); return null; } } PK lC>jA_org/openqa/selenium/internal/seleniumemulation/.svn/text-base/DragAndDropToObject.java.svn-base/* Copyright 2007-2009 WebDriver committers Copyright 2007-2009 Google Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package org.openqa.selenium.internal.seleniumemulation; import org.openqa.selenium.RenderedWebElement; import org.openqa.selenium.WebDriver; public class DragAndDropToObject extends SeleneseCommand { private final ElementFinder finder; public DragAndDropToObject(ElementFinder finder) { this.finder = finder; } @Override protected Void handleSeleneseCommand( WebDriver driver, String locatorOfObjectToBeDragged, String locatorOfDragDestinationObject) { RenderedWebElement dragger = (RenderedWebElement) finder.findElement(driver, locatorOfObjectToBeDragged); RenderedWebElement draggee = (RenderedWebElement) finder.findElement(driver, locatorOfDragDestinationObject); dragger.dragAndDropOn(draggee); return null; } } PK lC>i9 9 Yorg/openqa/selenium/internal/seleniumemulation/.svn/text-base/ElementFinder.java.svn-base/* Copyright 2007-2009 WebDriver committers Copyright 2007-2009 Google Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package org.openqa.selenium.internal.seleniumemulation; import java.util.Map; import java.util.regex.Matcher; import java.util.regex.Pattern; import com.google.common.collect.Maps; import com.thoughtworks.selenium.SeleniumException; import org.openqa.selenium.NoSuchElementException; import org.openqa.selenium.WebDriver; import org.openqa.selenium.WebElement; public class ElementFinder { // TODO(simon): This should not be public public static final Pattern STRATEGY_AND_VALUE_PATTERN = Pattern.compile("^(\\p{Alpha}+)=(.*)"); private final Map lookupStrategies = Maps.newHashMap(); public ElementFinder() { setUpElementFindingStrategies(); } public WebElement findElement(WebDriver driver, String locator) { LookupStrategy strategy = findStrategy(locator); String use = determineWebDriverLocator(locator); try { return strategy.find(driver, use); } catch (NoSuchElementException e) { throw new SeleniumException("Element " + locator + " not found"); } } public void add(String strategyName, LookupStrategy lookupStrategy) { lookupStrategies.put(strategyName, lookupStrategy); } public LookupStrategy findStrategy(String locator) { String strategyName = "implicit"; Matcher matcher = STRATEGY_AND_VALUE_PATTERN.matcher(locator); if (matcher.matches()) { strategyName = matcher.group(1); } LookupStrategy strategy = lookupStrategies.get(strategyName); if (strategy == null) throw new SeleniumException("No matcher found for " + strategyName); return strategy; } public String determineWebDriverLocator(String locator) { String use = locator; Matcher matcher = STRATEGY_AND_VALUE_PATTERN.matcher(locator); if (matcher.matches()) { use = matcher.group(2); } return use; } private void setUpElementFindingStrategies() { lookupStrategies.put("alt", new AltLookupStrategy()); lookupStrategies.put("class", new ClassLookupStrategy()); lookupStrategies.put("css", new CssLookupStrategy()); lookupStrategies.put("id", new IdLookupStrategy()); lookupStrategies.put("identifier", new IdentifierLookupStrategy()); lookupStrategies.put("implicit", new ImplicitLookupStrategy()); lookupStrategies.put("link", new LinkLookupStrategy()); lookupStrategies.put("name", new NameLookupStrategy()); lookupStrategies.put("xpath", new XPathLookupStrategy()); lookupStrategies.put("dom", new DomTraversalLookupStrategy()); } } PK lC>y!||eorg/openqa/selenium/internal/seleniumemulation/.svn/text-base/ExactTextMatchingStrategy.java.svn-base/* Copyright 2007-2009 WebDriver committers Copyright 2007-2009 Google Inc. Portions copyright 2007 ThoughtWorks, Inc Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package org.openqa.selenium.internal.seleniumemulation; public class ExactTextMatchingStrategy implements TextMatchingStrategy { public boolean isAMatch(String compareThis, String with) { return with.contains(compareThis); } } PK lC>Z||Zorg/openqa/selenium/internal/seleniumemulation/.svn/text-base/FilterFunction.java.svn-base/* Copyright 2007-2009 WebDriver committers Copyright 2007-2009 Google Inc. Portions copyright 2007 ThoughtWorks, Inc Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package org.openqa.selenium.internal.seleniumemulation; import java.util.List; import org.openqa.selenium.WebElement; public interface FilterFunction { List filterElements(List allElements, String filterValue); } PK lC>ukorg/openqa/selenium/internal/seleniumemulation/.svn/text-base/FindFirstSelectedOptionProperty.java.svn-base/* Copyright 2007-2009 WebDriver committers Copyright 2007-2009 Google Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package org.openqa.selenium.internal.seleniumemulation; import java.util.List; import org.openqa.selenium.WebDriver; public class FindFirstSelectedOptionProperty extends SeleneseCommand { private final SeleniumSelect select; private final SeleniumSelect.Property property; public FindFirstSelectedOptionProperty(SeleniumSelect select, SeleniumSelect.Property property) { this.select = select; this.property = property; } @Override protected String handleSeleneseCommand(WebDriver driver, String selectLocator, String ignored) { List options = select.getOptions(driver, selectLocator, property, false); return options.get(0); } }PK lC>s!!horg/openqa/selenium/internal/seleniumemulation/.svn/text-base/FindSelectedOptionProperties.java.svn-base/* Copyright 2007-2009 WebDriver committers Copyright 2007-2009 Google Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package org.openqa.selenium.internal.seleniumemulation; import java.util.List; import org.openqa.selenium.WebDriver; public class FindSelectedOptionProperties extends SeleneseCommand { private final SeleniumSelect select; private final SeleniumSelect.Property property; public FindSelectedOptionProperties(SeleniumSelect select, SeleniumSelect.Property property) { this.select = select; this.property = property; } @Override protected String[] handleSeleneseCommand(WebDriver driver, String selectLocator, String ignored) { List options = select.getOptions(driver, selectLocator, property, false); return options.toArray(new String[options.size()]); } } PK lC>WUorg/openqa/selenium/internal/seleniumemulation/.svn/text-base/FireEvent.java.svn-base/* Copyright 2007-2009 WebDriver committers Copyright 2007-2009 Google Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package org.openqa.selenium.internal.seleniumemulation; import org.openqa.selenium.WebDriver; import org.openqa.selenium.WebElement; public class FireEvent extends SeleneseCommand { private final ElementFinder elementFinder; private final JavascriptLibrary js; public FireEvent(ElementFinder elementFinder, JavascriptLibrary js) { this.elementFinder = elementFinder; this.js = js; } @Override protected Void handleSeleneseCommand(WebDriver driver, String locator, String value) { WebElement element = elementFinder.findElement(driver, locator); js.callEmbeddedSelenium(driver, "doFireEvent", element, value); return null; } } PK lC>HHZorg/openqa/selenium/internal/seleniumemulation/.svn/text-base/FireNamedEvent.java.svn-base/* Copyright 2007-2009 WebDriver committers Copyright 2007-2009 Google Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package org.openqa.selenium.internal.seleniumemulation; import org.openqa.selenium.WebDriver; import org.openqa.selenium.WebElement; public class FireNamedEvent extends SeleneseCommand { private final ElementFinder elementFinder; private final JavascriptLibrary js; private final String name; public FireNamedEvent(ElementFinder elementFinder, JavascriptLibrary js, String name) { this.elementFinder = elementFinder; this.js = js; this.name = name; } @Override protected Void handleSeleneseCommand(WebDriver driver, String locator, String ignored) { WebElement element = elementFinder.findElement(driver, locator); js.callEmbeddedSelenium(driver, "doFireEvent", element, name); return null; } } PK lC>37_org/openqa/selenium/internal/seleniumemulation/.svn/text-base/FunctionDeclaration.java.svn-base/* Copyright 2010 WebDriver committers Copyright 2010 Google Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package org.openqa.selenium.internal.seleniumemulation; import java.util.regex.Pattern; /** * Models a function declaration. That is, it provides an implementation of a * particular Javascript function. */ public class FunctionDeclaration implements ScriptMutator { private final Pattern pattern; private final String function; /** * @param raw The original function (eg: "selenium.isElementPresent") * @param result The body of the function implementation. */ public FunctionDeclaration(String raw, String result) { String base = raw.replace(".", "\\s*\\.\\s*"); pattern = Pattern.compile(".*" + base + "\\s*\\(\\s*\\).*"); function = raw + " = function() { " + result + " }; "; } public void mutate(String script, StringBuilder outputTo) { if (!pattern.matcher(script).matches()) { return; } outputTo.append(function); } } PK lC>$i?  Torg/openqa/selenium/internal/seleniumemulation/.svn/text-base/GetAlert.java.svn-base/* Copyright 2010 WebDriver committers Copyright 2010 Google Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package org.openqa.selenium.internal.seleniumemulation; import org.openqa.selenium.WebDriver; public class GetAlert extends SeleneseCommand { private final AlertOverride alertOverride; public GetAlert(AlertOverride alertOverride) { this.alertOverride = alertOverride; } @Override protected Object handleSeleneseCommand(WebDriver driver, String locator, String value) { return alertOverride.getNextAlert(driver); } } PK lC> O1UYorg/openqa/selenium/internal/seleniumemulation/.svn/text-base/GetAllButtons.java.svn-base/* Copyright 2007-2009 WebDriver committers Copyright 2007-2009 Google Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package org.openqa.selenium.internal.seleniumemulation; import java.util.ArrayList; import java.util.List; import org.openqa.selenium.By; import org.openqa.selenium.WebDriver; import org.openqa.selenium.WebElement; public class GetAllButtons extends SeleneseCommand { @Override protected String[] handleSeleneseCommand(WebDriver driver, String ignored, String alsoIgnored) { List allInputs = driver.findElements(By.xpath("//input")); List ids = new ArrayList(); for (WebElement input : allInputs) { String type = input.getAttribute("type").toLowerCase(); if ("button".equals(type) || "submit".equals(type) || "reset".equals(type)) ids.add(input.getAttribute("id")); } return ids.toArray(new String[ids.size()]); } } PK lC>/aNrrXorg/openqa/selenium/internal/seleniumemulation/.svn/text-base/GetAllFields.java.svn-base/* Copyright 2007-2009 WebDriver committers Copyright 2007-2009 Google Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package org.openqa.selenium.internal.seleniumemulation; import java.util.ArrayList; import java.util.List; import org.openqa.selenium.By; import org.openqa.selenium.WebDriver; import org.openqa.selenium.WebElement; public class GetAllFields extends SeleneseCommand { @Override protected String[] handleSeleneseCommand(WebDriver driver, String locator, String value) { List allInputs = driver.findElements(By.xpath("//input")); List ids = new ArrayList(); for (WebElement input : allInputs) { String type = input.getAttribute("type").toLowerCase(); if ("text".equals(type)) ids.add(input.getAttribute("id")); } return ids.toArray(new String[ids.size()]); } } PK lC>ML7Worg/openqa/selenium/internal/seleniumemulation/.svn/text-base/GetAllLinks.java.svn-base/* Copyright 2007-2009 WebDriver committers Copyright 2007-2009 Google Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package org.openqa.selenium.internal.seleniumemulation; import java.util.ArrayList; import java.util.Iterator; import java.util.List; import org.openqa.selenium.By; import org.openqa.selenium.WebDriver; import org.openqa.selenium.WebElement; public class GetAllLinks extends SeleneseCommand { @Override protected String[] handleSeleneseCommand(WebDriver driver, String locator, String value) { List allLinks = driver.findElements(By.xpath("//a")); Iterator i = allLinks.iterator(); List links = new ArrayList(); while (i.hasNext()) { WebElement link = i.next(); String id = link.getAttribute("id"); if (id == null) links.add(""); else links.add(id); } return links.toArray(new String[links.size()]); } } PK lC> 00^org/openqa/selenium/internal/seleniumemulation/.svn/text-base/GetAllWindowTitles.java.svn-base/* Copyright 2007-2009 WebDriver committers Copyright 2007-2009 Google Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package org.openqa.selenium.internal.seleniumemulation; import java.util.ArrayList; import java.util.List; import org.openqa.selenium.WebDriver; public class GetAllWindowTitles extends SeleneseCommand { @Override protected String[] handleSeleneseCommand(WebDriver driver, String ignored, String alsoIgnored) { String current = driver.getWindowHandle(); List attributes = new ArrayList(); for (String handle : driver.getWindowHandles()) { driver.switchTo().window(handle); attributes.add(driver.getTitle()); } driver.switchTo().window(current); return attributes.toArray(new String[attributes.size()]); } } PK lC>LsjXorg/openqa/selenium/internal/seleniumemulation/.svn/text-base/GetAttribute.java.svn-base/* Copyright 2007-2009 WebDriver committers Copyright 2007-2009 Google Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package org.openqa.selenium.internal.seleniumemulation; import org.openqa.selenium.WebDriver; import org.openqa.selenium.WebElement; public class GetAttribute extends SeleneseCommand { private final ElementFinder finder; public GetAttribute(ElementFinder finder) { this.finder = finder; } @Override protected String handleSeleneseCommand(WebDriver driver, String attributeLocator, String ignored) { int attributePos = attributeLocator.lastIndexOf("@"); String elementLocator = attributeLocator.substring(0, attributePos); String attributeName = attributeLocator.substring(attributePos + 1); // Find the element. WebElement element = finder.findElement(driver, elementLocator); return element.getAttribute(attributeName); } } PK lC>gk forg/openqa/selenium/internal/seleniumemulation/.svn/text-base/GetAttributeFromAllWindows.java.svn-base/* Copyright 2007-2009 WebDriver committers Copyright 2007-2009 Google Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package org.openqa.selenium.internal.seleniumemulation; import java.util.ArrayList; import java.util.List; import org.openqa.selenium.JavascriptExecutor; import org.openqa.selenium.WebDriver; public class GetAttributeFromAllWindows extends SeleneseCommand { @Override protected String[] handleSeleneseCommand(WebDriver driver, String attributeName, String ignored) { String current = driver.getWindowHandle(); List attributes = new ArrayList(); for (String handle : driver.getWindowHandles()) { driver.switchTo().window(handle); String value = (String) ((JavascriptExecutor) driver).executeScript( "return '' + window[arguments[0]];", attributeName); attributes.add(value); } driver.switchTo().window(current); return attributes.toArray(new String[attributes.size()]); } } PK lC>Worg/openqa/selenium/internal/seleniumemulation/.svn/text-base/GetBodyText.java.svn-base/* Copyright 2007-2009 WebDriver committers Copyright 2007-2009 Google Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package org.openqa.selenium.internal.seleniumemulation; import org.openqa.selenium.By; import org.openqa.selenium.WebDriver; public class GetBodyText extends SeleneseCommand { @Override protected String handleSeleneseCommand(WebDriver driver, String ignored, String alsoIgnored) { return driver.findElement(By.xpath("//body")).getText(); } }PK lC>b,+!![org/openqa/selenium/internal/seleniumemulation/.svn/text-base/GetConfirmation.java.svn-base/* Copyright 2010 WebDriver committers Copyright 2010 Google Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package org.openqa.selenium.internal.seleniumemulation; import org.openqa.selenium.WebDriver; public class GetConfirmation extends SeleneseCommand { private final AlertOverride alertOverride; public GetConfirmation(AlertOverride alertOverride) { this.alertOverride = alertOverride; } @Override protected Object handleSeleneseCommand(WebDriver driver, String locator, String value) { return alertOverride.getNextConfirmation(driver); } } PK lC>[-VVUorg/openqa/selenium/internal/seleniumemulation/.svn/text-base/GetCookie.java.svn-base/* Copyright 2007-2009 WebDriver committers Copyright 2007-2009 Google Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package org.openqa.selenium.internal.seleniumemulation; import org.openqa.selenium.Cookie; import org.openqa.selenium.WebDriver; public class GetCookie extends SeleneseCommand { @Override protected String handleSeleneseCommand(WebDriver driver, String ignored, String alsoIgnored) { StringBuilder builder = new StringBuilder(); for (Cookie c : driver.manage().getCookies()) { builder.append(c.toString()); builder.append("; "); } return builder.toString(); } }PK lC>-XK[org/openqa/selenium/internal/seleniumemulation/.svn/text-base/GetCookieByName.java.svn-base/* Copyright 2007-2009 WebDriver committers Copyright 2007-2009 Google Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package org.openqa.selenium.internal.seleniumemulation; import org.openqa.selenium.Cookie; import org.openqa.selenium.WebDriver; public class GetCookieByName extends SeleneseCommand { @Override protected String handleSeleneseCommand(WebDriver driver, String name, String ignored) { Cookie cookie = driver.manage().getCookieNamed(name); return cookie == null ? null : cookie.getValue(); } }PK lC>xP\org/openqa/selenium/internal/seleniumemulation/.svn/text-base/GetElementHeight.java.svn-base/* Copyright 2007-2009 WebDriver committers Copyright 2007-2009 Google Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package org.openqa.selenium.internal.seleniumemulation; import org.openqa.selenium.Dimension; import org.openqa.selenium.RenderedWebElement; import org.openqa.selenium.WebDriver; public class GetElementHeight extends SeleneseCommand { private final ElementFinder finder; public GetElementHeight(ElementFinder finder) { this.finder = finder; } @Override protected Number handleSeleneseCommand(WebDriver driver, String locator, String ignored) { Dimension size = ((RenderedWebElement) finder.findElement(driver, locator)).getSize(); return (int) size.getHeight(); } } PK lC>|`kk[org/openqa/selenium/internal/seleniumemulation/.svn/text-base/GetElementIndex.java.svn-base/* Copyright 2007-2009 WebDriver committers Copyright 2007-2009 Google Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package org.openqa.selenium.internal.seleniumemulation; import org.openqa.selenium.WebDriver; import org.openqa.selenium.WebElement; public class GetElementIndex extends SeleneseCommand { private final ElementFinder finder; private final JavascriptLibrary js; public GetElementIndex(ElementFinder finder, JavascriptLibrary js) { this.finder = finder; this.js = js; } @Override protected Number handleSeleneseCommand(WebDriver driver, String locator, String value) { WebElement element = finder.findElement(driver, locator); String script = "var _isCommentOrEmptyTextNode = function(node) {\n" + " return node.nodeType == 8 || ((node.nodeType == 3) && !(/[^\\t\\n\\r ]/.test(node.data)));\n" + "};\n" + " var element = arguments[0];\n" + " var previousSibling;\n" + " var index = 0;\n" + " while ((previousSibling = element.previousSibling) != null) {\n" + " if (!_isCommentOrEmptyTextNode(previousSibling)) {\n" + " index++;\n" + " }\n" + " element = previousSibling;\n" + " }\n" + " return index;"; return (Long) js.executeScript(driver, script, element); } } PK lC>lqborg/openqa/selenium/internal/seleniumemulation/.svn/text-base/GetElementPositionLeft.java.svn-base/* Copyright 2007-2009 WebDriver committers Copyright 2007-2009 Google Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package org.openqa.selenium.internal.seleniumemulation; import org.openqa.selenium.Point; import org.openqa.selenium.RenderedWebElement; import org.openqa.selenium.WebDriver; public class GetElementPositionLeft extends SeleneseCommand { private final ElementFinder finder; public GetElementPositionLeft(ElementFinder finder) { this.finder = finder; } @Override protected Number handleSeleneseCommand(WebDriver driver, String locator, String value) { Point location = ((RenderedWebElement) finder.findElement(driver, locator)).getLocation(); return (int) location.getX(); } } PK lC>Baorg/openqa/selenium/internal/seleniumemulation/.svn/text-base/GetElementPositionTop.java.svn-base/* Copyright 2007-2009 WebDriver committers Copyright 2007-2009 Google Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package org.openqa.selenium.internal.seleniumemulation; import org.openqa.selenium.Point; import org.openqa.selenium.RenderedWebElement; import org.openqa.selenium.WebDriver; public class GetElementPositionTop extends SeleneseCommand { private final ElementFinder finder; public GetElementPositionTop(ElementFinder finder) { this.finder = finder; } @Override protected Number handleSeleneseCommand(WebDriver driver, String locator, String value) { Point location = ((RenderedWebElement) finder.findElement(driver, locator)).getLocation(); return (int) location.getY(); } }PK lC> }[org/openqa/selenium/internal/seleniumemulation/.svn/text-base/GetElementWidth.java.svn-base/* Copyright 2007-2009 WebDriver committers Copyright 2007-2009 Google Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package org.openqa.selenium.internal.seleniumemulation; import org.openqa.selenium.Dimension; import org.openqa.selenium.RenderedWebElement; import org.openqa.selenium.WebDriver; public class GetElementWidth extends SeleneseCommand { private final ElementFinder finder; public GetElementWidth(ElementFinder finder) { this.finder = finder; } @Override protected Number handleSeleneseCommand(WebDriver driver, String locator, String ignored) { Dimension size = ((RenderedWebElement) finder.findElement(driver, locator)).getSize(); return (int) size.getWidth(); } }PK lC>0mmSorg/openqa/selenium/internal/seleniumemulation/.svn/text-base/GetEval.java.svn-base/* Copyright 2010 WebDriver committers Copyright 2010 Google Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package org.openqa.selenium.internal.seleniumemulation; import org.openqa.selenium.JavascriptExecutor; import org.openqa.selenium.WebDriver; import org.openqa.selenium.internal.seleniumemulation.SeleneseCommand; /** * An implementation of the "getEval" method from Selenium. */ public class GetEval extends SeleneseCommand { private final ScriptMutator mutator; public GetEval(ScriptMutator mutator) { this.mutator = mutator; } @Override protected String handleSeleneseCommand(WebDriver driver, String locator, String value) { StringBuilder builder = new StringBuilder(); mutator.mutate(locator, builder); Object result = ((JavascriptExecutor) driver).executeScript(builder.toString()); return result == null ? "" : String.valueOf(result); } } PK lC>ŸjjYorg/openqa/selenium/internal/seleniumemulation/.svn/text-base/GetExpression.java.svn-base/* Copyright 2010 WebDriver committers Copyright 2010 Google Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package org.openqa.selenium.internal.seleniumemulation; import org.openqa.selenium.WebDriver; public class GetExpression extends SeleneseCommand { @Override protected Object handleSeleneseCommand(WebDriver driver, String locator, String value) { return locator; } } PK lC> Yorg/openqa/selenium/internal/seleniumemulation/.svn/text-base/GetHtmlSource.java.svn-base/* Copyright 2007-2009 WebDriver committers Copyright 2007-2009 Google Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package org.openqa.selenium.internal.seleniumemulation; import org.openqa.selenium.WebDriver; public class GetHtmlSource extends SeleneseCommand { @Override protected String handleSeleneseCommand(WebDriver driver, String locator, String value) { return driver.getPageSource(); } } PK lC>șWorg/openqa/selenium/internal/seleniumemulation/.svn/text-base/GetLocation.java.svn-base/* Copyright 2007-2009 WebDriver committers Copyright 2007-2009 Google Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package org.openqa.selenium.internal.seleniumemulation; import org.openqa.selenium.WebDriver; public class GetLocation extends SeleneseCommand { @Override protected String handleSeleneseCommand(WebDriver driver, String ignored, String alsoIgnored) { return driver.getCurrentUrl(); } }PK lC>3x\org/openqa/selenium/internal/seleniumemulation/.svn/text-base/GetSelectOptions.java.svn-base/* Copyright 2007-2009 WebDriver committers Copyright 2007-2009 Google Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package org.openqa.selenium.internal.seleniumemulation; import java.util.List; import org.openqa.selenium.WebDriver; import static org.openqa.selenium.internal.seleniumemulation.SeleniumSelect.Property.TEXT; public class GetSelectOptions extends SeleneseCommand { private final SeleniumSelect select; public GetSelectOptions(SeleniumSelect select) { this.select = select; } @Override protected String[] handleSeleneseCommand(WebDriver driver, String selectLocator, String ignored) { List allOptions = select.getOptions(driver, selectLocator, TEXT, true); return allOptions.toArray(new String[allOptions.size()]); } } PK lC>+ت Torg/openqa/selenium/internal/seleniumemulation/.svn/text-base/GetTable.java.svn-base/* Copyright 2007-2009 WebDriver committers Copyright 2007-2009 Google Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package org.openqa.selenium.internal.seleniumemulation; import java.util.regex.Matcher; import java.util.regex.Pattern; import com.thoughtworks.selenium.SeleniumException; import org.openqa.selenium.WebDriver; import org.openqa.selenium.WebElement; public class GetTable extends SeleneseCommand { private static final Pattern TABLE_PARTS = Pattern.compile("(.*)\\.(\\d+)\\.(\\d+)"); private final ElementFinder finder; private final JavascriptLibrary js; public GetTable(ElementFinder finder, JavascriptLibrary js) { this.finder = finder; this.js = js; } @Override protected String handleSeleneseCommand(WebDriver driver, String tableCellAddress, String ignored) { Matcher matcher = TABLE_PARTS.matcher(tableCellAddress); if (!matcher.matches()) { throw new SeleniumException("Invalid target format. Correct format is tableName.rowNum.columnNum"); } String tableName = matcher.group(1); long row = Long.parseLong(matcher.group(2)); long col = Long.parseLong(matcher.group(3)); WebElement table = finder.findElement(driver, tableName); String script = "var table = arguments[0]; var row = arguments[1]; var col = arguments[2];" + "if (row > table.rows.length) { return \"Cannot access row \" + row + \" - table has \" + table.rows.length + \" rows\"; }" + "if (col > table.rows[row].cells.length) { return \"Cannot access column \" + col + \" - table row has \" + table.rows[row].cells.length + \" columns\"; }" + "return table.rows[row].cells[col];"; Object value = js.executeScript(driver, script, table, row, col); if (value instanceof WebElement) { return ((WebElement) value).getText().trim(); } throw new SeleniumException((String) value); } }PK lC>=lSorg/openqa/selenium/internal/seleniumemulation/.svn/text-base/GetText.java.svn-base/* Copyright 2007-2009 WebDriver committers Copyright 2007-2009 Google Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package org.openqa.selenium.internal.seleniumemulation; import org.openqa.selenium.JavascriptExecutor; import org.openqa.selenium.WebDriver; public class GetText extends SeleneseCommand { private final JavascriptLibrary library; public GetText(JavascriptLibrary library) { this.library = library; } @Override protected String handleSeleneseCommand(WebDriver driver, String locator, String ignored) { String getText = library.getSeleniumScript("getText.js"); return (String) ((JavascriptExecutor) driver).executeScript( "return (" + getText + ")(arguments[0]);", locator); } }PK lC>̯ݻTorg/openqa/selenium/internal/seleniumemulation/.svn/text-base/GetTitle.java.svn-base/* Copyright 2007-2009 WebDriver committers Copyright 2007-2009 Google Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package org.openqa.selenium.internal.seleniumemulation; import org.openqa.selenium.WebDriver; public class GetTitle extends SeleneseCommand { @Override protected String handleSeleneseCommand(WebDriver driver, String ignored, String alsoIgnored) { return driver.getTitle(); } }PK lC>VbbTorg/openqa/selenium/internal/seleniumemulation/.svn/text-base/GetValue.java.svn-base/* Copyright 2007-2009 WebDriver committers Copyright 2007-2009 Google Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package org.openqa.selenium.internal.seleniumemulation; import org.openqa.selenium.WebDriver; import org.openqa.selenium.WebElement; public class GetValue extends SeleneseCommand { private final ElementFinder finder; public GetValue(ElementFinder finder) { this.finder = finder; } @Override protected String handleSeleneseCommand(WebDriver driver, String locator, String ignored) { WebElement element = finder.findElement(driver, locator); // Special-case handling for checkboxes: The Selenium API returs "on" for // checked checkboxes and off for unchecked ones. WebDriver will return "null" for // the "checked" attribute if the checkbox is not-checked, "true" otherwise. if (element.getTagName().equals("input") && element.getAttribute("type").equals("checkbox")) { if (element.getAttribute("checked") == null) { return "off"; } else { return "on"; } } return element.getValue(); } }PK lC>Yorg/openqa/selenium/internal/seleniumemulation/.svn/text-base/GetXpathCount.java.svn-base/* Copyright 2007-2009 WebDriver committers Copyright 2007-2009 Google Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package org.openqa.selenium.internal.seleniumemulation; import org.openqa.selenium.By; import org.openqa.selenium.WebDriver; public class GetXpathCount extends SeleneseCommand { @Override protected Number handleSeleneseCommand(WebDriver driver, String xpath, String ignored) { return driver.findElements(By.xpath(xpath)) .size(); } }PK lC>XJWdorg/openqa/selenium/internal/seleniumemulation/.svn/text-base/GlobTextMatchingStrategy.java.svn-base/* Copyright 2007-2009 WebDriver committers Copyright 2007-2009 Google Inc. Portions copyright 2007 ThoughtWorks, Inc Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package org.openqa.selenium.internal.seleniumemulation; import java.util.regex.Matcher; import java.util.regex.Pattern; public class GlobTextMatchingStrategy implements TextMatchingStrategy { public boolean isAMatch(String compareThis, String with) { String regex = compareThis.replace(".", "\\.").replace("*", ".*").replace("?", ".?"); Pattern pattern = Pattern.compile(regex, Pattern.MULTILINE); String mutatedWith = with.replaceAll("\u00a0", " "); Matcher matcher = pattern.matcher(mutatedWith); return matcher.find() || with.contains(compareThis); } } PK lC>1nRorg/openqa/selenium/internal/seleniumemulation/.svn/text-base/GoBack.java.svn-base/* Copyright 2007-2009 WebDriver committers Copyright 2007-2009 Google Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package org.openqa.selenium.internal.seleniumemulation; import org.openqa.selenium.WebDriver; public class GoBack extends SeleneseCommand { @Override protected Void handleSeleneseCommand(final WebDriver driver, String ignored, String alsoIgnored) { driver.navigate().back(); return null; } } PK lC>mc\Uorg/openqa/selenium/internal/seleniumemulation/.svn/text-base/Highlight.java.svn-base/* Copyright 2007-2009 WebDriver committers Copyright 2007-2009 Google Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package org.openqa.selenium.internal.seleniumemulation; import org.openqa.selenium.WebDriver; public class Highlight extends SeleneseCommand { private final JavascriptLibrary js; private final ElementFinder finder; public Highlight(ElementFinder finder, JavascriptLibrary js) { this.js = js; this.finder = finder; } @Override protected String handleSeleneseCommand(WebDriver driver, String locator, String ignored) { js.callEmbeddedHtmlUtils(driver, "highlight", finder.findElement(driver, locator)); return null; } }PK lC>\org/openqa/selenium/internal/seleniumemulation/.svn/text-base/IdLookupStrategy.java.svn-base/* Copyright 2007-2009 WebDriver committers Copyright 2007-2009 Google Inc. Portions copyright 2007 ThoughtWorks, Inc Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package org.openqa.selenium.internal.seleniumemulation; import org.openqa.selenium.By; import org.openqa.selenium.WebDriver; import org.openqa.selenium.WebElement; public class IdLookupStrategy implements LookupStrategy { public WebElement find(WebDriver driver, String use) { return driver.findElement(By.id(use)); } } PK lC>4Nborg/openqa/selenium/internal/seleniumemulation/.svn/text-base/IdOptionSelectStrategy.java.svn-base/* Copyright 2007-2009 WebDriver committers Copyright 2007-2009 Google Inc. Portions copyright 2007 ThoughtWorks, Inc Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package org.openqa.selenium.internal.seleniumemulation; import org.openqa.selenium.WebElement; public class IdOptionSelectStrategy extends BaseOptionSelectStrategy { protected boolean selectOption(WebElement option, String selectThis) { String id = option.getAttribute("id"); return selectThis.equals(id); } } PK lC>dorg/openqa/selenium/internal/seleniumemulation/.svn/text-base/IdentifierLookupStrategy.java.svn-base/* Copyright 2007-2009 WebDriver committers Copyright 2007-2009 Google Inc. Portions copyright 2007 ThoughtWorks, Inc Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package org.openqa.selenium.internal.seleniumemulation; import org.openqa.selenium.NoSuchElementException; import org.openqa.selenium.WebDriver; import org.openqa.selenium.WebElement; public class IdentifierLookupStrategy implements LookupStrategy { public WebElement find(WebDriver driver, String use) { try { return new IdLookupStrategy().find(driver, use); } catch (NoSuchElementException e) { return new NameLookupStrategy().find(driver, use); } } } PK lC>atborg/openqa/selenium/internal/seleniumemulation/.svn/text-base/ImplicitLookupStrategy.java.svn-base/* Copyright 2007-2009 WebDriver committers Copyright 2007-2009 Google Inc. Portions copyright 2007 ThoughtWorks, Inc Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package org.openqa.selenium.internal.seleniumemulation; import org.openqa.selenium.WebDriver; import org.openqa.selenium.WebElement; public class ImplicitLookupStrategy implements LookupStrategy { public WebElement find(WebDriver driver, String use) { if (use.startsWith("document.")) { return new DomTraversalLookupStrategy().find(driver, use); } else if (use.startsWith("//")) { return new XPathLookupStrategy().find(driver, use); } else { return new IdentifierLookupStrategy().find(driver, use); } } } PK lC>=D6___org/openqa/selenium/internal/seleniumemulation/.svn/text-base/IndexFilterFunction.java.svn-base/* Copyright 2007-2009 WebDriver committers Copyright 2007-2009 Google Inc. Portions copyright 2007 ThoughtWorks, Inc Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package org.openqa.selenium.internal.seleniumemulation; import java.util.Collections; import java.util.List; import com.thoughtworks.selenium.SeleniumException; import org.openqa.selenium.WebElement; public class IndexFilterFunction implements FilterFunction { public List filterElements(List allElements, String filterValue) { try { int index = Integer.parseInt(filterValue); if (allElements.size() > index) return Collections.singletonList(allElements.get(index)); } catch (NumberFormatException e) { // Handled below } throw new SeleniumException("Element with index " + filterValue + " not found"); } } PK lC>5zzeorg/openqa/selenium/internal/seleniumemulation/.svn/text-base/IndexOptionSelectStrategy.java.svn-base/* Copyright 2007-2009 WebDriver committers Copyright 2007-2009 Google Inc. Portions copyright 2007 ThoughtWorks, Inc Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package org.openqa.selenium.internal.seleniumemulation; import java.util.List; import org.openqa.selenium.WebElement; public class IndexOptionSelectStrategy implements OptionSelectStrategy { public boolean select(List fromOptions, String selectThis, boolean setSelected, boolean allowMultipleSelect) { try { int index = Integer.parseInt(selectThis); WebElement option = (WebElement) fromOptions.get(index); if (setSelected) option.setSelected(); else if (option.isSelected()) { option.toggle(); } return true; } catch (Exception e) { // Do nothing. Handled below } return false; } } PK lC>e 55Uorg/openqa/selenium/internal/seleniumemulation/.svn/text-base/IsChecked.java.svn-base/* Copyright 2007-2009 WebDriver committers Copyright 2007-2009 Google Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package org.openqa.selenium.internal.seleniumemulation; import org.openqa.selenium.WebDriver; public class IsChecked extends SeleneseCommand { private final ElementFinder finder; public IsChecked(ElementFinder finder) { this.finder = finder; } @Override protected Boolean handleSeleneseCommand(WebDriver driver, String locator, String ignored) { return finder.findElement(driver, locator).isSelected(); } }PK lC>=700aorg/openqa/selenium/internal/seleniumemulation/.svn/text-base/IsConfirmationPresent.java.svn-base/* Copyright 2010 WebDriver committers Copyright 2010 Google Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package org.openqa.selenium.internal.seleniumemulation; import org.openqa.selenium.WebDriver; public class IsConfirmationPresent extends SeleneseCommand { private final AlertOverride alertOverride; public IsConfirmationPresent(AlertOverride alertOverride) { this.alertOverride = alertOverride; } @Override protected Object handleSeleneseCommand(WebDriver driver, String locator, String value) { return alertOverride.isConfirmationPresent(driver); } } PK lC>}[org/openqa/selenium/internal/seleniumemulation/.svn/text-base/IsCookiePresent.java.svn-base/* Copyright 2007-2009 WebDriver committers Copyright 2007-2009 Google Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package org.openqa.selenium.internal.seleniumemulation; import org.openqa.selenium.WebDriver; public class IsCookiePresent extends SeleneseCommand { @Override protected Boolean handleSeleneseCommand(WebDriver driver, String name, String ignored) { return driver.manage().getCookieNamed(name) == null ? false : true; } }PK lC>_tVorg/openqa/selenium/internal/seleniumemulation/.svn/text-base/IsEditable.java.svn-base/* Copyright 2007-2009 WebDriver committers Copyright 2007-2009 Google Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package org.openqa.selenium.internal.seleniumemulation; import org.openqa.selenium.WebDriver; import org.openqa.selenium.WebElement; public class IsEditable extends SeleneseCommand { private final ElementFinder finder; public IsEditable(ElementFinder finder) { this.finder = finder; } @Override protected Boolean handleSeleneseCommand(WebDriver driver, String locator, String value) { WebElement element = finder.findElement(driver, locator); String tagName = element.getTagName().toLowerCase(); boolean acceptableTagName = "input".equals(tagName) || "select".equals(tagName); String readonly = ""; if ("input".equals(tagName)) { readonly = element.getAttribute("readonly"); if (readonly == null || "false".equals(readonly)) { readonly = ""; } } return element.isEnabled() && acceptableTagName && "".equals(readonly); } } PK lC>o7\org/openqa/selenium/internal/seleniumemulation/.svn/text-base/IsElementPresent.java.svn-base/* Copyright 2007-2009 WebDriver committers Copyright 2007-2009 Google Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package org.openqa.selenium.internal.seleniumemulation; import com.thoughtworks.selenium.SeleniumException; import org.openqa.selenium.WebDriver; public class IsElementPresent extends SeleneseCommand { private final ElementFinder finder; public IsElementPresent(ElementFinder finder) { this.finder = finder; } @Override protected Boolean handleSeleneseCommand(WebDriver driver, String locator, String ignored) { try { finder.findElement(driver, locator); return true; } catch (SeleniumException e) { return false; } } } PK lC>11Uorg/openqa/selenium/internal/seleniumemulation/.svn/text-base/IsOrdered.java.svn-base/* Copyright 2007-2009 WebDriver committers Copyright 2007-2009 Google Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package org.openqa.selenium.internal.seleniumemulation; import org.openqa.selenium.WebDriver; import org.openqa.selenium.WebElement; public class IsOrdered extends SeleneseCommand { private final ElementFinder finder; private final JavascriptLibrary js; public IsOrdered(ElementFinder finder, JavascriptLibrary js) { this.finder = finder; this.js = js; } @Override protected Boolean handleSeleneseCommand(WebDriver driver, String locator1, String locator2) { WebElement one = finder.findElement(driver, locator1); WebElement two = finder.findElement(driver, locator2); String ordered = " if (arguments[0] === arguments[1]) return false;\n" + "\n" + " var previousSibling;\n" + " while ((previousSibling = arguments[1].previousSibling) != null) {\n" + " if (previousSibling === arguments[0]) {\n" + " return true;\n" + " }\n" + " arguments[1] = previousSibling;\n" + " }\n" + " return false;\n"; Boolean result = (Boolean) js.executeScript(driver, ordered, one, two); return result != null && result.booleanValue(); } } PK lC>Ӟ_org/openqa/selenium/internal/seleniumemulation/.svn/text-base/IsSomethingSelected.java.svn-base/* Copyright 2007-2009 WebDriver committers Copyright 2007-2009 Google Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package org.openqa.selenium.internal.seleniumemulation; import java.util.List; import org.openqa.selenium.WebDriver; import static org.openqa.selenium.internal.seleniumemulation.SeleniumSelect.Property.VALUE; public class IsSomethingSelected extends SeleneseCommand { private final SeleniumSelect select; public IsSomethingSelected(SeleniumSelect select) { this.select = select; } @Override protected Boolean handleSeleneseCommand(WebDriver driver, String selectLocator, String ignored) { List values = select.getOptions(driver, selectLocator, VALUE, false); return values.size() > 0; } } PK lC>x77Yorg/openqa/selenium/internal/seleniumemulation/.svn/text-base/IsTextPresent.java.svn-base/* Copyright 2007-2009 WebDriver committers Copyright 2007-2009 Google Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package org.openqa.selenium.internal.seleniumemulation; import org.openqa.selenium.JavascriptExecutor; import org.openqa.selenium.WebDriver; public class IsTextPresent extends SeleneseCommand { private final JavascriptLibrary js; public IsTextPresent(JavascriptLibrary js) { this.js = js; } @Override protected Boolean handleSeleneseCommand(WebDriver driver, String pattern, String ignored) { String script = js.getSeleniumScript("isTextPresent.js"); Boolean result = (Boolean) ((JavascriptExecutor) driver).executeScript( "return (" + script + ")(arguments[0]);", pattern); // Handle the null case return Boolean.TRUE == result; } } PK lC>$fNUorg/openqa/selenium/internal/seleniumemulation/.svn/text-base/IsVisible.java.svn-base/* Copyright 2007-2009 WebDriver committers Copyright 2007-2009 Google Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package org.openqa.selenium.internal.seleniumemulation; import org.openqa.selenium.RenderedWebElement; import org.openqa.selenium.WebDriver; public class IsVisible extends SeleneseCommand { private final ElementFinder finder; public IsVisible(ElementFinder finder) { this.finder = finder; } @Override protected Boolean handleSeleneseCommand(WebDriver driver, String locator, String ignored) { return ((RenderedWebElement) finder.findElement(driver, locator)).isDisplayed(); } } PK lC>t ]org/openqa/selenium/internal/seleniumemulation/.svn/text-base/JavascriptLibrary.java.svn-base/* Copyright 2007-2009 WebDriver committers Copyright 2007-2009 Google Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package org.openqa.selenium.internal.seleniumemulation; import com.google.common.base.Charsets; import com.google.common.base.Throwables; import com.google.common.io.Resources; import org.openqa.selenium.JavascriptExecutor; import org.openqa.selenium.WebDriver; import org.openqa.selenium.WebElement; import java.io.IOException; import java.net.URL; import java.util.ArrayList; import java.util.Arrays; import java.util.List; public class JavascriptLibrary { private static final String PREFIX = "/scripts/selenium/"; private static final String injectableSelenium = "/org/openqa/selenium/internal/seleniumemulation/injectableSelenium.js"; private static final String htmlUtils = "/org/openqa/selenium/internal/seleniumemulation/htmlutils.js"; /** * Loads the named Selenium script and returns it wrapped in an anonymous * function. * * @param name The script to load. * @return The loaded script wrapped in an anonymous function. */ public String getSeleniumScript(String name) { String rawFunction = readScript(PREFIX + name); return String.format("function() { return (%s).apply(null, arguments);}", rawFunction); } public void callEmbeddedSelenium(WebDriver driver, String functionName, WebElement element, Object... values) { StringBuilder builder = new StringBuilder(readScript(injectableSelenium)); builder.append("return browserbot.").append(functionName).append(".apply(browserbot, arguments);"); List args = new ArrayList(); args.add(element); args.addAll(Arrays.asList(values)); ((JavascriptExecutor) driver).executeScript(builder.toString(), args.toArray()); } public Object callEmbeddedHtmlUtils(WebDriver driver, String functionName, WebElement element, Object... values) { StringBuilder builder = new StringBuilder(readScript(htmlUtils)); builder.append("return htmlutils.").append(functionName).append(".apply(htmlutils, arguments);"); List args = new ArrayList(); args.add(element); args.addAll(Arrays.asList(values)); return ((JavascriptExecutor) driver).executeScript(builder.toString(), args.toArray()); } public Object executeScript(WebDriver driver, String script, Object... args) { if (driver instanceof JavascriptExecutor) { return ((JavascriptExecutor) driver).executeScript(script, args); } throw new UnsupportedOperationException( "The underlying WebDriver instance does not support executing javascript"); } private String readScript(String script) { URL url = getClass().getResource(script); if (url == null) { throw new RuntimeException("Cannot locate " + script); } try { return Resources.toString(url, Charsets.UTF_8); } catch (IOException e) { throw Throwables.propagate(e); } } } PK lC>yTorg/openqa/selenium/internal/seleniumemulation/.svn/text-base/KeyEvent.java.svn-base/* Copyright 2007-2009 WebDriver committers Copyright 2007-2009 Google Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package org.openqa.selenium.internal.seleniumemulation; import org.openqa.selenium.WebDriver; public class KeyEvent extends SeleneseCommand { private final ElementFinder elementFinder; private final JavascriptLibrary js; private final KeyState state; private final String eventName; public KeyEvent(ElementFinder elementFinder, JavascriptLibrary js, KeyState state, String eventName) { this.elementFinder = elementFinder; this.js = js; this.state = state; this.eventName = eventName; } @Override protected Void handleSeleneseCommand(WebDriver driver, String locator, String value) { js.callEmbeddedSelenium(driver, eventName, elementFinder.findElement(driver, locator), value, state.controlKeyDown, state.altKeyDown, state.shiftKeyDown, state.metaKeyDown); return null; } } PK lC>vy,,Torg/openqa/selenium/internal/seleniumemulation/.svn/text-base/KeyState.java.svn-base/* Copyright 2007-2009 WebDriver committers Copyright 2007-2009 Google Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package org.openqa.selenium.internal.seleniumemulation; public class KeyState { public boolean metaKeyDown; public boolean altKeyDown; public boolean controlKeyDown; public boolean shiftKeyDown; } PK lC>͎[9 ^org/openqa/selenium/internal/seleniumemulation/.svn/text-base/LinkLookupStrategy.java.svn-base/* Copyright 2007-2009 WebDriver committers Copyright 2007-2009 Google Inc. Portions copyright 2007 ThoughtWorks, Inc Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package org.openqa.selenium.internal.seleniumemulation; import java.util.HashMap; import java.util.Iterator; import java.util.List; import java.util.Map; import java.util.regex.Matcher; import java.util.regex.Pattern; import com.thoughtworks.selenium.SeleniumException; import org.openqa.selenium.By; import org.openqa.selenium.WebDriver; import org.openqa.selenium.WebElement; public class LinkLookupStrategy implements LookupStrategy { private static final Pattern TEXT_MATCHING_STRATEGY_AND_VALUE_PATTERN = Pattern.compile("^(\\p{Alpha}+):(.*)"); private Map textMatchingStrategies = new HashMap(); public LinkLookupStrategy() { textMatchingStrategies.put("implicit", new GlobTextMatchingStrategy()); textMatchingStrategies.put("glob", new GlobTextMatchingStrategy()); textMatchingStrategies.put("regexp", new RegExTextMatchingStrategy()); textMatchingStrategies.put("exact", new ExactTextMatchingStrategy()); } public WebElement find(WebDriver driver, String use) { List elements = driver.findElements(By.xpath("//a")); String strategyName = "implicit"; Matcher matcher = TEXT_MATCHING_STRATEGY_AND_VALUE_PATTERN.matcher(use); if (matcher.matches()) { strategyName = matcher.group(1); use = matcher.group(2); } TextMatchingStrategy strategy = textMatchingStrategies.get(strategyName); Iterator allLinks = elements.iterator(); while (allLinks.hasNext()) { WebElement link = allLinks.next(); if (!(strategy.isAMatch(use, link.getText()))) allLinks.remove(); } if (elements.size() > 0) return elements.get(0); throw new SeleniumException(use + " not found"); } } PK lC>ffZorg/openqa/selenium/internal/seleniumemulation/.svn/text-base/LookupStrategy.java.svn-base/* Copyright 2007-2009 WebDriver committers Copyright 2007-2009 Google Inc. Portions copyright 2007 ThoughtWorks, Inc Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package org.openqa.selenium.internal.seleniumemulation; import org.openqa.selenium.WebDriver; import org.openqa.selenium.WebElement; public interface LookupStrategy { WebElement find(WebDriver driver, String use); } PK lC>j.צWorg/openqa/selenium/internal/seleniumemulation/.svn/text-base/MetaKeyDown.java.svn-basepackage org.openqa.selenium.internal.seleniumemulation; import org.openqa.selenium.WebDriver; public class MetaKeyDown extends SeleneseCommand { private final KeyState keyState; public MetaKeyDown(KeyState keyState) { this.keyState = keyState; } @Override protected Void handleSeleneseCommand(WebDriver driver, String locator, String value) { keyState.metaKeyDown = true; return null; } }PK lC>3ԢUorg/openqa/selenium/internal/seleniumemulation/.svn/text-base/MetaKeyUp.java.svn-basepackage org.openqa.selenium.internal.seleniumemulation; import org.openqa.selenium.WebDriver; public class MetaKeyUp extends SeleneseCommand { private final KeyState keyState; public MetaKeyUp(KeyState keyState) { this.keyState = keyState; } @Override protected Void handleSeleneseCommand(WebDriver driver, String locator, String value) { keyState.metaKeyDown = false; return null; } }PK lC>Uh]org/openqa/selenium/internal/seleniumemulation/.svn/text-base/MethodDeclaration.java.svn-base/* Copyright 2010 WebDriver committers Copyright 2010 Google Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package org.openqa.selenium.internal.seleniumemulation; import java.util.regex.Pattern; public class MethodDeclaration implements ScriptMutator { private final Pattern pattern; private final String function; public MethodDeclaration(String raw, String result) { String base = raw.replace(".", "\\s*\\.\\s*"); pattern = Pattern.compile(".*" + base + "\\s*\\(\\s*\\).*"); function = raw + " = function() { " + result + " }"; } public void mutate(String script, StringBuilder outputTo) { if (!pattern.matcher(script).matches()) { return; } outputTo.append(function); } } PK lC>֏&&Vorg/openqa/selenium/internal/seleniumemulation/.svn/text-base/MouseEvent.java.svn-base/* Copyright 2007-2009 WebDriver committers Copyright 2007-2009 Google Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package org.openqa.selenium.internal.seleniumemulation; import org.openqa.selenium.WebDriver; import org.openqa.selenium.WebElement; public class MouseEvent extends SeleneseCommand { private final ElementFinder finder; private final JavascriptLibrary js; private final String type; public MouseEvent(ElementFinder finder, JavascriptLibrary js, String type) { this.finder = finder; this.js = js; this.type = type; } @Override protected Void handleSeleneseCommand(WebDriver driver, String locator, String value) { WebElement element = finder.findElement(driver, locator); js.callEmbeddedSelenium(driver, "triggerMouseEvent", element, type, true); return null; } } PK lC>O==Xorg/openqa/selenium/internal/seleniumemulation/.svn/text-base/MouseEventAt.java.svn-base/* Copyright 2007-2009 WebDriver committers Copyright 2007-2009 Google Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package org.openqa.selenium.internal.seleniumemulation; import org.openqa.selenium.WebDriver; import org.openqa.selenium.WebElement; public class MouseEventAt extends SeleneseCommand { private final ElementFinder finder; private final JavascriptLibrary js; private final String type; public MouseEventAt(ElementFinder finder, JavascriptLibrary js, String type) { this.finder = finder; this.js = js; this.type = type; } @Override protected Void handleSeleneseCommand(WebDriver driver, String locator, String coordString) { WebElement element = finder.findElement(driver, locator); js.callEmbeddedSelenium(driver, "triggerMouseEventAt", element, type, coordString); return null; } }PK lC>b^org/openqa/selenium/internal/seleniumemulation/.svn/text-base/NameFilterFunction.java.svn-base/* Copyright 2007-2009 WebDriver committers Copyright 2007-2009 Google Inc. Portions copyright 2007 ThoughtWorks, Inc Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package org.openqa.selenium.internal.seleniumemulation; import org.openqa.selenium.WebElement; public class NameFilterFunction extends BaseFilterFunction { protected boolean shouldAdd(WebElement element, String filterValue) { String name = element.getAttribute("name"); return filterValue.equals(name); } } PK lC> ^org/openqa/selenium/internal/seleniumemulation/.svn/text-base/NameLookupStrategy.java.svn-base/* Copyright 2007-2009 WebDriver committers Copyright 2007-2009 Google Inc. Portions copyright 2007 ThoughtWorks, Inc Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package org.openqa.selenium.internal.seleniumemulation; import java.util.HashMap; import java.util.Iterator; import java.util.List; import java.util.Map; import java.util.regex.Matcher; import java.util.regex.Pattern; import com.thoughtworks.selenium.SeleniumException; import org.openqa.selenium.By; import org.openqa.selenium.WebDriver; import org.openqa.selenium.WebElement; public class NameLookupStrategy implements LookupStrategy { private static final Pattern NAME_AND_VALUE_PATTERN = Pattern.compile("^(\\p{Alpha}+)=(.+)"); private final Map filterFunctions = new HashMap(); public NameLookupStrategy() { filterFunctions.put("value", new ValueFilterFunction()); filterFunctions.put("name", new NameFilterFunction()); filterFunctions.put("index", new IndexFilterFunction()); } public WebElement find(WebDriver driver, String use) { String[] parts = use.split(" "); List allElements = driver.findElements(By.name(parts[0])); // For some reason, we sometimes get back elements with a name that doesn't match. Filter those out Iterator iterator = allElements.iterator(); while (iterator.hasNext()) { WebElement element = iterator.next(); if (!(parts[0].equals(element.getAttribute("name")))) iterator.remove(); } for (int i = 1; i < parts.length; i++) { FilterFunction filterBy = getFilterFunction(parts[i]); if (filterBy == null) { throw new SeleniumException(use + " not found. Cannot find filter for: " + parts[i]); } String filterValue = getFilterValue(parts[i]); allElements = filterBy.filterElements(allElements, filterValue); } if (allElements.size() > 0) { return allElements.get(0); } throw new SeleniumException(use + " not found"); } private String getFilterValue(String originalFilterValue) { Matcher matcher = NAME_AND_VALUE_PATTERN.matcher(originalFilterValue); if (matcher.matches()) { return matcher.group(2); } return originalFilterValue; } private FilterFunction getFilterFunction(String originalFilter) { String filterName = "value"; Matcher matcher = NAME_AND_VALUE_PATTERN.matcher(originalFilter); if (matcher.matches()) { filterName = matcher.group(1); } return filterFunctions.get(filterName); } } PK lC> Porg/openqa/selenium/internal/seleniumemulation/.svn/text-base/NoOp.java.svn-base/* Copyright 2007-2009 WebDriver committers Copyright 2007-2009 Google Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package org.openqa.selenium.internal.seleniumemulation; import org.openqa.selenium.WebDriver; public class NoOp extends SeleneseCommand { private final Object returnValue; public NoOp(Object returnValue) { this.returnValue = returnValue; } @Override protected Object handleSeleneseCommand(WebDriver driver, String locator, String value) { return returnValue; } } PK lC> Porg/openqa/selenium/internal/seleniumemulation/.svn/text-base/Open.java.svn-base/* Copyright 2007-2009 WebDriver committers Copyright 2007-2009 Google Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package org.openqa.selenium.internal.seleniumemulation; import org.openqa.selenium.WebDriver; public class Open extends SeleneseCommand { private final String baseUrl; public Open(String baseUrl) { this.baseUrl = baseUrl; } @Override protected Void handleSeleneseCommand(final WebDriver driver, String url, String ignored) { final String urlToOpen = url.indexOf("://") == -1 ? baseUrl + (!url.startsWith("/") ? "/" : "") + url : url; driver.get(urlToOpen); return null; } } PK lC>ڪd[[Vorg/openqa/selenium/internal/seleniumemulation/.svn/text-base/OpenWindow.java.svn-base/* Copyright 2007-2009 WebDriver committers Copyright 2007-2009 Google Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package org.openqa.selenium.internal.seleniumemulation; import org.openqa.selenium.WebDriver; public class OpenWindow extends SeleneseCommand { private final GetEval opener; public OpenWindow(GetEval opener) { this.opener = opener; } @Override protected Void handleSeleneseCommand(final WebDriver driver, final String url, final String windowID) { String[] args = {String.format("window.open('%s', '%s');", url, windowID)}; opener.apply(driver, args); return null; } } PK lC> v`org/openqa/selenium/internal/seleniumemulation/.svn/text-base/OptionSelectStrategy.java.svn-base/* Copyright 2007-2009 WebDriver committers Copyright 2007-2009 Google Inc. Portions copyright 2007 ThoughtWorks, Inc Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package org.openqa.selenium.internal.seleniumemulation; import java.util.List; import org.openqa.selenium.WebElement; public interface OptionSelectStrategy { public boolean select(List fromOptions, String selectThis, boolean setSelected, boolean allowMultipleSelect); } PK lC>0Sorg/openqa/selenium/internal/seleniumemulation/.svn/text-base/Refresh.java.svn-base/* Copyright 2007-2009 WebDriver committers Copyright 2007-2009 Google Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package org.openqa.selenium.internal.seleniumemulation; import org.openqa.selenium.WebDriver; public class Refresh extends SeleneseCommand { @Override protected Void handleSeleneseCommand(final WebDriver driver, String ignored, String alsoIgnored) { driver.navigate().refresh(); return null; } } PK lC>ʶ..eorg/openqa/selenium/internal/seleniumemulation/.svn/text-base/RegExTextMatchingStrategy.java.svn-base/* Copyright 2007-2009 WebDriver committers Copyright 2007-2009 Google Inc. Portions copyright 2007 ThoughtWorks, Inc Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package org.openqa.selenium.internal.seleniumemulation; import java.util.regex.Matcher; import java.util.regex.Pattern; public class RegExTextMatchingStrategy implements TextMatchingStrategy { public boolean isAMatch(String compareThis, String with) { Pattern pattern = Pattern.compile(compareThis, Pattern.MULTILINE); Matcher matcher = pattern.matcher(with); return matcher.find(); } } PK lC>--_org/openqa/selenium/internal/seleniumemulation/.svn/text-base/RemoveAllSelections.java.svn-base/* Copyright 2007-2009 WebDriver committers Copyright 2007-2009 Google Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package org.openqa.selenium.internal.seleniumemulation; import java.util.List; import org.openqa.selenium.By; import org.openqa.selenium.WebDriver; import org.openqa.selenium.WebElement; public class RemoveAllSelections extends SeleneseCommand { private final ElementFinder finder; public RemoveAllSelections(ElementFinder finder) { this.finder = finder; } @Override protected Void handleSeleneseCommand(WebDriver driver, String locator, String value) { WebElement select = finder.findElement(driver, locator); List options = select.findElements(By.tagName("option")); String multiple = select.getAttribute("multiple"); if (multiple == null || "".equals(multiple)) { return null; } removeAllSelections(options); return null; } private void removeAllSelections(List options) { for (WebElement option : options) { if (option.isSelected()) option.toggle(); } } } PK lC>rT[org/openqa/selenium/internal/seleniumemulation/.svn/text-base/RemoveSelection.java.svn-base/* Copyright 2007-2009 WebDriver committers Copyright 2007-2009 Google Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package org.openqa.selenium.internal.seleniumemulation; import com.thoughtworks.selenium.SeleniumException; import org.openqa.selenium.WebDriver; import org.openqa.selenium.WebElement; public class RemoveSelection extends SeleneseCommand { private final ElementFinder elementFinder; private final SeleniumSelect select; public RemoveSelection(ElementFinder elementFinder, SeleniumSelect select) { this.elementFinder = elementFinder; this.select = select; } @Override protected Void handleSeleneseCommand(WebDriver driver, String locator, String optionLocator) { WebElement element = elementFinder.findElement(driver, locator); if (!select.isMultiple(element)) throw new SeleniumException("You may only remove a selection to a select that supports multiple selections"); select.select(driver, locator, optionLocator, false, false); return null; } } PK lC> Uorg/openqa/selenium/internal/seleniumemulation/.svn/text-base/RunScript.java.svn-base/* Copyright 2010 WebDriver committers Copyright 2010 Google Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package org.openqa.selenium.internal.seleniumemulation; import org.openqa.selenium.JavascriptExecutor; import org.openqa.selenium.WebDriver; public class RunScript extends SeleneseCommand { private final ScriptMutator mutator; public RunScript(ScriptMutator mutator) { this.mutator = mutator; } @Override protected Void handleSeleneseCommand(WebDriver driver, String locator, String value) { StringBuilder builder = new StringBuilder(); mutator.mutate(locator, builder); ((JavascriptExecutor) driver).executeScript(builder.toString()); return null; } } PK lC> Yorg/openqa/selenium/internal/seleniumemulation/.svn/text-base/ScriptMutator.java.svn-base/* Copyright 2010 WebDriver committers Copyright 2010 Google Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package org.openqa.selenium.internal.seleniumemulation; /** * A mechanism for taking a single method from a script meant for Selenium Core * and converting to something that webdriver can evaluate. */ public interface ScriptMutator { /** * Mutate a script. The original, unmodified script is used to generate a * script on the StringBuilder, the "toString" method of which should be * used to get the result. We make use of a StringBuilder rather than a * normal String so that we can efficiently chain mutators. * * @param script The original script. * @param outputTo The mutated script. */ void mutate(String script, StringBuilder outputTo); } PK lC>Worg/openqa/selenium/internal/seleniumemulation/.svn/text-base/SelectFrame.java.svn-base/* Copyright 2010 WebDriver committers Copyright 2010 Google Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package org.openqa.selenium.internal.seleniumemulation; import org.openqa.selenium.WebDriver; public class SelectFrame extends SeleneseCommand { private final Windows windows; public SelectFrame(Windows windows) { this.windows = windows; } @Override protected Void handleSeleneseCommand(WebDriver driver, String locator, String ignored) { windows.selectFrame(driver, locator); return null; } } PK lC>`6lXorg/openqa/selenium/internal/seleniumemulation/.svn/text-base/SelectOption.java.svn-base/* Copyright 2007-2009 WebDriver committers Copyright 2007-2009 Google Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package org.openqa.selenium.internal.seleniumemulation; import org.openqa.selenium.WebDriver; public class SelectOption extends SeleneseCommand { private final AlertOverride alertOverride; private final SeleniumSelect select; public SelectOption(AlertOverride alertOverride, SeleniumSelect select) { this.alertOverride = alertOverride; this.select = select; } @Override protected Void handleSeleneseCommand(WebDriver driver, String selectLocator, String optionLocator) { alertOverride.replaceAlertMethod(driver); select.select(driver, selectLocator, optionLocator, true, true); return null; } } PK lC>x$WXorg/openqa/selenium/internal/seleniumemulation/.svn/text-base/SelectWindow.java.svn-base/* Copyright 2007-2009 WebDriver committers Copyright 2007-2009 Google Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package org.openqa.selenium.internal.seleniumemulation; import org.openqa.selenium.WebDriver; public class SelectWindow extends SeleneseCommand { private final Windows windows; public SelectWindow(Windows windows) { this.windows = windows; } @Override protected Void handleSeleneseCommand(WebDriver driver, String windowID, String ignored) { windows.selectWindow(driver, windowID); return null; } } PK lC>ڒ[org/openqa/selenium/internal/seleniumemulation/.svn/text-base/SeleneseCommand.java.svn-base/* Copyright 2007-2009 WebDriver committers Copyright 2007-2009 Google Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package org.openqa.selenium.internal.seleniumemulation; import com.thoughtworks.selenium.SeleniumException; import org.openqa.selenium.WebDriver; public abstract class SeleneseCommand { public T apply(WebDriver driver, String[] args) { switch (args.length) { case 0: return handleSeleneseCommand(driver, null, null); case 1: return handleSeleneseCommand(driver, args[0], null); case 2: return handleSeleneseCommand(driver, args[0], args[1]); default: throw new SeleniumException("Too many arguments! " + args.length); } } protected abstract T handleSeleneseCommand(WebDriver driver, String locator, String value); } PK lC>:#[org/openqa/selenium/internal/seleniumemulation/.svn/text-base/SeleniumMutator.java.svn-base/* Copyright 2010 WebDriver committers Copyright 2010 Google Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package org.openqa.selenium.internal.seleniumemulation; import java.util.regex.Pattern; /** * Add a function backed by the closure-based implementation of Selenium Core. */ public class SeleniumMutator implements ScriptMutator { private final Pattern pattern; private final String method; private final String atom; public SeleniumMutator(String method, String atom) { String raw = ".*" + method.replace(".", "\\s*\\.\\s*") + ".*"; this.pattern = Pattern.compile(raw); this.method = method; this.atom = atom; } public void mutate(String script, StringBuilder appendTo) { if (!pattern.matcher(script).matches()) { return; } // Alias the raw atom and set "this" to be the pre-declared selenium object. appendTo.append(String.format("%s = function() { return (%s).apply(null, arguments);};", method, atom)); } } PK lC>,VVZorg/openqa/selenium/internal/seleniumemulation/.svn/text-base/SeleniumSelect.java.svn-base/* Copyright 2007-2009 WebDriver committers Copyright 2007-2009 Google Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package org.openqa.selenium.internal.seleniumemulation; import java.util.ArrayList; import java.util.List; import java.util.Map; import java.util.regex.Matcher; import com.google.common.collect.Maps; import com.thoughtworks.selenium.SeleniumException; import org.openqa.selenium.By; import org.openqa.selenium.JavascriptExecutor; import org.openqa.selenium.WebDriver; import org.openqa.selenium.WebElement; public class SeleniumSelect { private final Map optionSelectStrategies = Maps.newHashMap(); private final ElementFinder finder; public SeleniumSelect(ElementFinder finder) { this.finder = finder; setUpOptionFindingStrategies(); } public static enum Property { ID, INDEX, TEXT, VALUE, } public List getOptions(WebDriver driver, String selectLocator, Property property, boolean fetchAll) { WebElement element = finder.findElement(driver, selectLocator); List options = element.findElements(By.tagName("option")); if (options.size() == 0) { throw new SeleniumException("Specified element is not a Select (has no options)"); } List selectedOptions = new ArrayList(); for (WebElement option : options) { if (fetchAll || option.isSelected()) { switch (property) { case TEXT: selectedOptions.add(option.getText()); break; case VALUE: selectedOptions.add(option.getValue()); break; case ID: selectedOptions.add(option.getAttribute("id")); break; case INDEX: // TODO(simon): Implement this in the IE driver as "getAttribute" Object result = ((JavascriptExecutor) driver) .executeScript("return arguments[0].index", option); selectedOptions.add(String.valueOf(result)); break; } } } return selectedOptions; } public boolean isMultiple(WebElement theSelect) { String multiple = theSelect.getAttribute("multiple"); if (multiple == null) { return false; } if ("false".equals(multiple)) { return false; } if ("".equals(multiple)) { return false; } return true; } public void select(WebDriver driver, String selectLocator, String optionLocator, boolean setSelected, boolean onlyOneOption) { WebElement select = finder.findElement(driver, selectLocator); List allOptions = select.findElements(By.tagName("option")); boolean isMultiple = isMultiple(select); if (onlyOneOption && isMultiple) { new RemoveAllSelections(finder).apply(driver, new String[] { selectLocator }); } Matcher matcher = ElementFinder.STRATEGY_AND_VALUE_PATTERN .matcher(optionLocator); String strategyName = "implicit"; String use = optionLocator; if (matcher.matches()) { strategyName = matcher.group(1); use = matcher.group(2); } if (use == null) { use = ""; } OptionSelectStrategy strategy = optionSelectStrategies.get(strategyName); if (strategy == null) { throw new SeleniumException( strategyName + " (from " + optionLocator + ") is not a method for selecting options"); } if (!strategy.select(allOptions, use, setSelected, isMultiple)) { throw new SeleniumException(optionLocator + " is not an option"); } } private void setUpOptionFindingStrategies() { optionSelectStrategies.put("implicit", new LabelOptionSelectStrategy()); optionSelectStrategies.put("id", new IdOptionSelectStrategy()); optionSelectStrategies.put("index", new IndexOptionSelectStrategy()); optionSelectStrategies.put("label", new LabelOptionSelectStrategy()); optionSelectStrategies.put("value", new ValueOptionSelectStrategy()); } }PK lC>>܇dorg/openqa/selenium/internal/seleniumemulation/.svn/text-base/SetNextConfirmationState.java.svn-base/* Copyright 2010 WebDriver committers Copyright 2010 Google Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package org.openqa.selenium.internal.seleniumemulation; import org.openqa.selenium.JavascriptExecutor; import org.openqa.selenium.WebDriver; public class SetNextConfirmationState extends SeleneseCommand { private final boolean result; public SetNextConfirmationState(boolean result) { this.result = result; } @Override protected Object handleSeleneseCommand(WebDriver driver, String locator, String value) { ((JavascriptExecutor) driver).executeScript( "window.__webdriverNextConfirm = arguments[0]", result); return null; } } PK lC>.ooVorg/openqa/selenium/internal/seleniumemulation/.svn/text-base/SetTimeout.java.svn-base/* Copyright 2007-2009 WebDriver committers Copyright 2007-2009 Google Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package org.openqa.selenium.internal.seleniumemulation; import org.openqa.selenium.WebDriver; public class SetTimeout extends SeleneseCommand { private final Timer timer; public SetTimeout(Timer timer) { this.timer = timer; } @Override protected Void handleSeleneseCommand(WebDriver driver, String timeout, String ignored) { // generally, the timeout is only set to 0 when opening a page. WebDriver // will wait indefinitely anyway, so setting the timeout to "0" will // actually cause the command to return with an error too soon. Avoid this // sorry and shocking state of affairs. if ("0".equals(timeout)) { timer.setTimeout(Long.MAX_VALUE); } else { timer.setTimeout(Long.parseLong(timeout)); } return null; } } PK lC> hvXorg/openqa/selenium/internal/seleniumemulation/.svn/text-base/ShiftKeyDown.java.svn-basepackage org.openqa.selenium.internal.seleniumemulation; import org.openqa.selenium.WebDriver; public class ShiftKeyDown extends SeleneseCommand { private final KeyState keyState; public ShiftKeyDown(KeyState keyState) { this.keyState = keyState; } @Override protected Void handleSeleneseCommand(WebDriver driver, String locator, String value) { keyState.shiftKeyDown = true; return null; } }PK lC>ʎVorg/openqa/selenium/internal/seleniumemulation/.svn/text-base/ShiftKeyUp.java.svn-basepackage org.openqa.selenium.internal.seleniumemulation; import org.openqa.selenium.WebDriver; public class ShiftKeyUp extends SeleneseCommand { private final KeyState keyState; public ShiftKeyUp(KeyState keyState) { this.keyState = keyState; } @Override protected Void handleSeleneseCommand(WebDriver driver, String locator, String value) { keyState.shiftKeyDown = false; return null; } }PK lC>q5Rorg/openqa/selenium/internal/seleniumemulation/.svn/text-base/Submit.java.svn-base/* Copyright 2007-2009 WebDriver committers Copyright 2007-2009 Google Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package org.openqa.selenium.internal.seleniumemulation; import org.openqa.selenium.WebDriver; public class Submit extends SeleneseCommand { private final ElementFinder finder; public Submit(ElementFinder finder) { this.finder = finder; } @Override protected Void handleSeleneseCommand(WebDriver driver, String formLocator, String ignored) { finder.findElement(driver, formLocator) .submit(); return null; } } PK lC>j""`org/openqa/selenium/internal/seleniumemulation/.svn/text-base/TextMatchingStrategy.java.svn-base/* Copyright 2007-2009 WebDriver committers Copyright 2007-2009 Google Inc. Portions copyright 2007 ThoughtWorks, Inc Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package org.openqa.selenium.internal.seleniumemulation; public interface TextMatchingStrategy { boolean isAMatch(String compareThis, String with); } PK lC>U U Qorg/openqa/selenium/internal/seleniumemulation/.svn/text-base/Timer.java.svn-base/* Copyright 2007-2009 WebDriver committers Copyright 2007-2009 Google Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package org.openqa.selenium.internal.seleniumemulation; import java.io.PrintWriter; import java.io.StringWriter; import java.util.TimerTask; import com.thoughtworks.selenium.SeleniumException; import org.openqa.selenium.WebDriver; public class Timer { private java.util.Timer timer = new java.util.Timer(); private volatile long timeout; public Timer(long timeout) { this.timeout = timeout; } public T run(SeleneseCommand command, WebDriver driver, String[] args) { Thread thread = Thread.currentThread(); final SeleneseTimerTask myTimerTask = new SeleneseTimerTask(thread); try { timer.schedule(myTimerTask, timeout); } catch (IllegalStateException e) { Thread.interrupted(); // This should only ever happen the user tries to do something with Selenium after calling // stop. Since this RejectedExecutionException is really vague, rethrow it with a more // explicit message. // The original Selenium RC would throw an NPE at this point, so we should // too. Sadly, an NPE can't take a cause, so spool the stacktrace into a // string. StringWriter writer = new StringWriter(); e.printStackTrace(new PrintWriter(writer)); String stack = writer.toString(); throw new NullPointerException( "Illegal attempt to execute a command after calling stop()\n" + stack); } // Because we call Thread to interrupt, we should ensure that the // interrupted status is cleared. This will be a no-op if called twice. Thread.interrupted(); try { return command.apply(driver, args); } catch (RuntimeException re) { Throwable cause = re.getCause(); if (cause instanceof InterruptedException){ throw new SeleniumException("Timed out waiting for action to finish", re); } throw re; } finally { myTimerTask.cancel(); } } public void setTimeout(long timeout) { this.timeout = timeout; } public void stop() { timer.cancel(); } class SeleneseTimerTask extends TimerTask { private final Thread thread; SeleneseTimerTask(Thread thread) { this.thread = thread; } @Override public void run() { synchronized (thread) { thread.interrupt(); } } } } PK lC>I&- - Porg/openqa/selenium/internal/seleniumemulation/.svn/text-base/Type.java.svn-base/* Copyright 2007-2009 WebDriver committers Copyright 2007-2009 Google Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package org.openqa.selenium.internal.seleniumemulation; import com.thoughtworks.selenium.SeleniumException; import org.openqa.selenium.JavascriptExecutor; import org.openqa.selenium.WebDriver; import org.openqa.selenium.WebElement; public class Type extends SeleneseCommand { private final AlertOverride alertOverride; private final JavascriptLibrary js; private final ElementFinder finder; private final KeyState state; public Type(AlertOverride alertOverride, JavascriptLibrary js, ElementFinder finder, KeyState state) { this.alertOverride = alertOverride; this.js = js; this.finder = finder; this.state = state; } @Override protected Void handleSeleneseCommand(WebDriver driver, String locator, String value) { alertOverride.replaceAlertMethod(driver); if (state.controlKeyDown || state.altKeyDown || state.metaKeyDown) throw new SeleniumException("type not supported immediately after call to controlKeyDown() or altKeyDown() or metaKeyDown()"); String type = state.shiftKeyDown ? value.toUpperCase() : value; WebElement element = finder.findElement(driver, locator); // TODO(simon): Log a warning that people should be using "attachFile" String tagName = element.getTagName(); String elementType = element.getAttribute("type"); if ("input".equals(tagName.toLowerCase()) && elementType != null && "file".equals(elementType.toLowerCase())) { element.sendKeys(value); return null; } if(driver instanceof JavascriptExecutor && ((JavascriptExecutor) driver).isJavascriptEnabled()) { js.callEmbeddedSelenium(driver, "replaceText", element, type); } else { element.sendKeys(type); } return null; } } PK lC>::Torg/openqa/selenium/internal/seleniumemulation/.svn/text-base/TypeKeys.java.svn-base/* Copyright 2007-2009 WebDriver committers Copyright 2007-2009 Google Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package org.openqa.selenium.internal.seleniumemulation; import org.openqa.selenium.Keys; import org.openqa.selenium.WebDriver; public class TypeKeys extends SeleneseCommand { private final AlertOverride alertOverride; private final ElementFinder finder; public TypeKeys(AlertOverride alertOverride, ElementFinder finder) { this.alertOverride = alertOverride; this.finder = finder; } @Override protected Void handleSeleneseCommand(WebDriver driver, String locator, String value) { alertOverride.replaceAlertMethod(driver); value = value.replace("\\10", Keys.ENTER); value = value.replace("\\13", Keys.RETURN); value = value.replace("\\27", Keys.ESCAPE); value = value.replace("\\38", Keys.ARROW_UP); value = value.replace("\\40", Keys.ARROW_DOWN); value = value.replace("\\37", Keys.ARROW_LEFT); value = value.replace("\\39", Keys.ARROW_RIGHT); finder.findElement(driver, locator).sendKeys(value); return null; } }PK lC>kSorg/openqa/selenium/internal/seleniumemulation/.svn/text-base/Uncheck.java.svn-base/* Copyright 2007-2009 WebDriver committers Copyright 2007-2009 Google Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package org.openqa.selenium.internal.seleniumemulation; import org.openqa.selenium.WebDriver; import org.openqa.selenium.WebElement; public class Uncheck extends SeleneseCommand { private final AlertOverride alertOverride; private final ElementFinder finder; public Uncheck(AlertOverride alertOverride, ElementFinder finder) { this.alertOverride = alertOverride; this.finder = finder; } @Override protected Void handleSeleneseCommand(WebDriver driver, String locator, String value) { alertOverride.replaceAlertMethod(driver); WebElement element = finder.findElement(driver, locator); if (element.isSelected()) element.toggle(); return null; } }PK lC>B_org/openqa/selenium/internal/seleniumemulation/.svn/text-base/ValueFilterFunction.java.svn-base/* Copyright 2007-2009 WebDriver committers Copyright 2007-2009 Google Inc. Portions copyright 2007 ThoughtWorks, Inc Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package org.openqa.selenium.internal.seleniumemulation; import org.openqa.selenium.WebElement; public class ValueFilterFunction extends BaseFilterFunction { protected boolean shouldAdd(WebElement element, String filterValue) { String value = element.getValue(); return filterValue.equals(value); } } PK lC>_~ueorg/openqa/selenium/internal/seleniumemulation/.svn/text-base/ValueOptionSelectStrategy.java.svn-base/* Copyright 2007-2009 WebDriver committers Copyright 2007-2009 Google Inc. Portions copyright 2007 ThoughtWorks, Inc Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package org.openqa.selenium.internal.seleniumemulation; import org.openqa.selenium.WebElement; public class ValueOptionSelectStrategy extends BaseOptionSelectStrategy { protected boolean selectOption(WebElement option, String selectThis) { return selectThis.equals(option.getValue()); } } PK lC>_w_org/openqa/selenium/internal/seleniumemulation/.svn/text-base/VariableDeclaration.java.svn-base/* Copyright 2010 WebDriver committers Copyright 2010 Google Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package org.openqa.selenium.internal.seleniumemulation; import java.util.regex.Pattern; /** * Prepend a variable declaration to a script. */ public class VariableDeclaration implements ScriptMutator { private final Pattern pattern; private final String declaration; public VariableDeclaration(String raw, String declaration) { this.declaration = declaration; raw = raw.replace(".", "\\s*\\.\\s*") .replace("(", "\\(") .replace(")", "\\)"); pattern = Pattern.compile(".*" + raw + ".*"); } public void mutate(String script, StringBuilder outputTo) { if (!pattern.matcher(script).matches()) { return; } outputTo.append(declaration); } } PK lC> \org/openqa/selenium/internal/seleniumemulation/.svn/text-base/WaitForCondition.java.svn-base/* Copyright 2010 WebDriver committers Copyright 2010 Google Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package org.openqa.selenium.internal.seleniumemulation; import com.thoughtworks.selenium.Wait; import org.openqa.selenium.JavascriptExecutor; import org.openqa.selenium.WebDriver; import org.openqa.selenium.internal.seleniumemulation.SeleneseCommand; public class WaitForCondition extends SeleneseCommand { private final ScriptMutator mutator; public WaitForCondition(ScriptMutator mutator) { this.mutator = mutator; } @Override protected Void handleSeleneseCommand(final WebDriver driver, String script, final String timeout) { StringBuilder builder = new StringBuilder(); mutator.mutate(script, builder); final String modified = builder.toString(); new Wait() { @Override public boolean until() { Object result = ((JavascriptExecutor) driver).executeScript(modified); // Although the conditions should return a boolean, JS has a loose // definition of "true" Try and meet that definition. if (result == null) { return false; } else if (result instanceof String) { return !"".equals(result); } else if (result instanceof Boolean) { return (Boolean) result; } else { return true; } } }.wait("Failed to resolve " + script, Long.valueOf(timeout)); return null; } } PK lC>^e  ]org/openqa/selenium/internal/seleniumemulation/.svn/text-base/WaitForPageToLoad.java.svn-base/* Copyright 2007-2009 WebDriver committers Copyright 2007-2009 Google Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package org.openqa.selenium.internal.seleniumemulation; import com.thoughtworks.selenium.Wait; import org.openqa.selenium.JavascriptExecutor; import org.openqa.selenium.WebDriver; public class WaitForPageToLoad extends SeleneseCommand { private int timeToWait = 100; /** * Overrides the default time to wait (in milliseconds) after a page has finished loading. * * @param timeToWait the time to wait, in milliseconds, after the page has finished loading */ public void setTimeToWait(int timeToWait) { this.timeToWait = timeToWait; } @Override protected Void handleSeleneseCommand(final WebDriver driver, String timeout, String ignored) { // Wait until things look like they've been stable for "timeToWait" if (!(driver instanceof JavascriptExecutor)) { // Assume that we Do The Right Thing return null; } long timeoutInMillis = Long.parseLong(timeout); new Wait() { private long started = System.currentTimeMillis(); public boolean until() { try { Object result = ((JavascriptExecutor) driver).executeScript( "return document['readyState'] ? 'complete' == document.readyState : true"); if (result != null && result instanceof Boolean && (Boolean) result) { long now = System.currentTimeMillis(); if (now - started > timeToWait) { return true; } } else { started = System.currentTimeMillis(); } } catch (Exception e) { // Possible page reload. Fine } return false; } }.wait(String.format("Failed to load page within %s ms", timeout), timeoutInMillis); return null; } }PK lC>yXorg/openqa/selenium/internal/seleniumemulation/.svn/text-base/WaitForPopup.java.svn-base/* Copyright 2007-2009 WebDriver committers Copyright 2007-2009 Google Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package org.openqa.selenium.internal.seleniumemulation; import com.thoughtworks.selenium.SeleniumException; import com.thoughtworks.selenium.Wait; import org.openqa.selenium.WebDriver; public class WaitForPopup extends SeleneseCommand { private final Windows windows; public WaitForPopup(Windows windows) { this.windows = windows; } @Override protected Void handleSeleneseCommand(final WebDriver driver, final String windowID, final String timeout) { final long millis = Long.parseLong(timeout); final String current = driver.getWindowHandle(); new Wait() { @Override public boolean until() { try { if ("_blank".equals(windowID)) { windows.selectBlankWindow(driver); } else { driver.switchTo() .window(windowID); } return !"about:blank".equals(driver.getCurrentUrl()); } catch (SeleniumException e) { // Swallow } return false; } }.wait(String.format("Timed out waiting for %s. Waited %s", windowID, timeout), millis); driver.switchTo().window(current); return null; } } PK lC>Z;88Worg/openqa/selenium/internal/seleniumemulation/.svn/text-base/WindowFocus.java.svn-base/* Copyright 2007-2009 WebDriver committers Copyright 2007-2009 Google Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package org.openqa.selenium.internal.seleniumemulation; import org.openqa.selenium.WebDriver; public class WindowFocus extends SeleneseCommand { private final JavascriptLibrary js; public WindowFocus(JavascriptLibrary js) { this.js = js; } @Override protected Void handleSeleneseCommand(WebDriver driver, String ignored, String alsoIgnored) { js.executeScript(driver, "window.focus()"); return null; } } PK lC>QZorg/openqa/selenium/internal/seleniumemulation/.svn/text-base/WindowMaximize.java.svn-base/* Copyright 2007-2009 WebDriver committers Copyright 2007-2009 Google Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package org.openqa.selenium.internal.seleniumemulation; import org.openqa.selenium.WebDriver; public class WindowMaximize extends SeleneseCommand { private final JavascriptLibrary js; public WindowMaximize(JavascriptLibrary js) { this.js = js; } @Override protected Void handleSeleneseCommand(WebDriver driver, String ignored, String alsoIgnored) { js.executeScript(driver, "if (window.screen) { window.moveTo(0, 0); window.resizeTo(window.screen.availWidth, window.screen.availHeight);};"); return null; } }PK lC>)Sorg/openqa/selenium/internal/seleniumemulation/.svn/text-base/Windows.java.svn-base/* Copyright 2007-2009 WebDriver committers Copyright 2007-2009 Google Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package org.openqa.selenium.internal.seleniumemulation; import java.util.ArrayList; import java.util.List; import java.util.Map; import com.google.common.collect.Maps; import com.thoughtworks.selenium.SeleniumException; import org.openqa.selenium.JavascriptExecutor; import org.openqa.selenium.NoSuchFrameException; import org.openqa.selenium.NoSuchWindowException; import org.openqa.selenium.WebDriver; public class Windows { private final Map lastFrame = Maps.newHashMap(); private final String originalWindowHandle; public Windows(WebDriver driver) { originalWindowHandle = driver.getWindowHandle(); } public void selectWindow(WebDriver driver, String windowID) { if ("null".equals(windowID)) { driver.switchTo() .window(originalWindowHandle); } else if ("_blank".equals(windowID)) { selectBlankWindow(driver); } else { if (windowID.startsWith("title=")) { selectWindowWithTitle(driver, windowID.substring("title=".length())); return; } if (windowID.startsWith("name=")) { windowID = windowID.substring("name=".length()); } try { driver.switchTo().window(windowID); } catch (NoSuchWindowException e) { selectWindowWithTitle(driver, windowID); } } if (lastFrame.containsKey(driver.getWindowHandle())) { // If the frame has gone, fall back try { selectFrame(driver, lastFrame.get(driver.getWindowHandle())); } catch (SeleniumException e) { lastFrame.remove(driver.getWindowHandle()); } } } public void selectFrame(WebDriver driver, String locator) { if ("relative=top".equals(locator)) { driver.switchTo().defaultContent(); lastFrame.remove(driver.getWindowHandle()); return; } try { lastFrame.put(driver.getWindowHandle(), locator); driver.switchTo().frame(locator); } catch (NoSuchFrameException e) { throw new SeleniumException(e.getMessage(), e); } } private void selectWindowWithTitle(WebDriver driver, String title) { String current = driver.getWindowHandle(); for (String handle : driver.getWindowHandles()) { driver.switchTo().window(handle); if (title.equals(driver.getTitle())) { return; } } driver.switchTo() .window(current); throw new SeleniumException("Unable to select window with title: " + title); } /** * Selects the only _blank window. A window open with * target='_blank' will have a window.name = null. *

*

This method assumes that there will only be one single * _blank window and selects the first one with no name. * Therefore if for any reasons there are multiple windows with * window.name = null the first found one will be selected. *

*

If none of the windows have window.name = null the last * selected one will be re-selected and a {@link SeleniumException} will * be thrown. * * @throws NoSuchWindowException if no window with * window.name = null is found. */ public void selectBlankWindow(WebDriver driver) { String current = driver.getWindowHandle(); // Find the first window without a "name" attribute List handles = new ArrayList(driver.getWindowHandles()); for (String handle : handles) { // the original window will never be a _blank window, so don't even look at it // this is also important to skip, because the original/root window won't have // a name either, so if we didn't know better we might think it's a _blank popup! if (handle.equals(originalWindowHandle)) { continue; } driver.switchTo().window(handle); String value = (String) ((JavascriptExecutor) driver).executeScript("return window.name;"); if (value == null || "".equals(value)) { // We found it! return; } } // We couldn't find it driver.switchTo().window(current); throw new SeleniumException("Unable to select window _blank"); } } PK lC>Uc55_org/openqa/selenium/internal/seleniumemulation/.svn/text-base/XPathLookupStrategy.java.svn-base/* Copyright 2007-2009 WebDriver committers Copyright 2007-2009 Google Inc. Portions copyright 2007 ThoughtWorks, Inc Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package org.openqa.selenium.internal.seleniumemulation; import org.openqa.selenium.By; import org.openqa.selenium.WebDriver; import org.openqa.selenium.WebElement; public class XPathLookupStrategy implements LookupStrategy { public WebElement find(WebDriver driver, String use) { if (use.endsWith("/")) use = use.substring(0, use.length() - 1); return driver.findElement(By.xpath(use)); } } PK lC>ٱQorg/openqa/selenium/internal/seleniumemulation/.svn/text-base/build.desc.svn-base java_library(name = "seleniumemulation", srcs = [ "*.java" ], deps = [ "//java/client/src/com/thoughtworks/selenium", "//java/client/src/org/openqa/selenium:webdriver-api", "//java/client/src/org/openqa/selenium/io", "//third_party/java/guava-libraries", ]) PK lC>DϊSorg/openqa/selenium/internal/seleniumemulation/.svn/text-base/htmlutils.js.svn-basevar htmlutils = { highlight : function(element) { var highLightColor = "yellow"; if (element.originalColor == undefined) { // avoid picking up highlight element.originalColor = this.elementGetStyle(element, "background-color"); } this.elementSetStyle(element, {"backgroundColor" : highLightColor}); window.setTimeout(function() { try { //if element is orphan, probably page of it has already gone, so ignore if (!element.parentNode) { return; } this.elementSetStyle(element, {"backgroundColor" : element.originalColor}); } catch (e) {} // DGF unhighlighting is very dangerous and low priority }, 200); }, elementSetStyle : function(element, style) { for (var name in style) { var value = style[name]; if (value == null) value = ""; element.style[name] = value; } }, elementGetStyle : function(element, style) { var value = element.style[style]; if (!value) { if (document.defaultView && document.defaultView.getComputedStyle) { var css = document.defaultView.getComputedStyle(element, null); value = css ? css.getPropertyValue(style) : null; } else if (element.currentStyle) { value = element.currentStyle[style]; } } /** DGF necessary? if (window.opera && ['left', 'top', 'right', 'bottom'].include(style)) if (Element.getStyle(element, 'position') == 'static') value = 'auto'; */ return value == 'auto' ? null : value; }, absolutify: function(url, baseUrl) { /** returns a relative url in its absolute form, given by baseUrl. * * This function is a little odd, because it can take baseUrls that * aren't necessarily directories. It uses the same rules as the HTML * <base> tag; if the baseUrl doesn't end with "/", we'll assume * that it points to a file, and strip the filename off to find its * base directory. * * So absolutify("foo", "http://x/bar") will return "http://x/foo" (stripping off bar), * whereas absolutify("foo", "http://x/bar/") will return "http://x/bar/foo" (preserving bar). * Naturally absolutify("foo", "http://x") will return "http://x/foo", appropriately. * * @param url the url to make absolute; if this url is already absolute, we'll just return that, unchanged * @param baseUrl the baseUrl from which we'll absolutify, following the rules above. * @return 'url' if it was already absolute, or the absolutized version of url if it was not absolute. */ // DGF isn't there some library we could use for this? if (/^\w+:/.test(url)) { // it's already absolute return url; } var loc; try { loc = this.parseUrl(baseUrl); } catch (e) { // is it an absolute windows file path? let's play the hero in that case if (/^\w:\\/.test(baseUrl)) { baseUrl = "file:///" + baseUrl.replace(/\\/g, "/"); loc = this.parseUrl(baseUrl); } else { throw new SeleniumError("baseUrl wasn't absolute: " + baseUrl); } } loc.search = null; loc.hash = null; // if url begins with /, then that's the whole pathname if (/^\//.test(url)) { loc.pathname = url; var result = this.reassembleLocation(loc); return result; } // if pathname is null, then we'll just append "/" + the url if (!loc.pathname) { loc.pathname = "/" + url; var result = this.reassembleLocation(loc); return result; } // if pathname ends with /, just append url if (/\/$/.test(loc.pathname)) { loc.pathname += url; var result = this.reassembleLocation(loc); return result; } // if we're here, then the baseUrl has a pathname, but it doesn't end with / // in that case, we replace everything after the final / with the relative url loc.pathname = loc.pathname.replace(/[^\/\\]+$/, url); var result = this.reassembleLocation(loc); return result; }, URL_REGEX : /^((\w+):\/\/)(([^:]+):?([^@]+)?@)?([^\/\?:]*):?(\d+)?(\/?[^\?#]+)?\??([^#]+)?#?(.+)?/, parseUrl : function(url) { var fields = ['url', null, 'protocol', null, 'username', 'password', 'host', 'port', 'pathname', 'search', 'hash']; var result = this.URL_REGEX.exec(url); if (!result) { throw new SeleniumError("Invalid URL: " + url); } var loc = new Object(); for (var i = 0; i < fields.length; i++) { var field = fields[i]; if (field == null) { continue; } loc[field] = result[i]; } return loc; }, reassembleLocation : function(loc) { if (!loc.protocol) { throw new Error("Not a valid location object: " + o2s(loc)); } var protocol = loc.protocol; protocol = protocol.replace(/:$/, ""); var url = protocol + "://"; if (loc.username) { url += loc.username; if (loc.password) { url += ":" + loc.password; } url += "@"; } if (loc.host) { url += loc.host; } if (loc.port) { url += ":" + loc.port; } if (loc.pathname) { url += loc.pathname; } if (loc.search) { url += "?" + loc.search; } if (loc.hash) { var hash = loc.hash; hash = loc.hash.replace(/^#/, ""); url += "#" + hash; } return url; }, getTextContent: function(element, preformatted) { if (element.style && (element.style.visibility == 'hidden' || element.style.display == 'none')) return ''; if (element.nodeType == 3 /*Node.TEXT_NODE*/) { var text = element.data; if (!preformatted) { text = text.replace(/\n|\r|\t/g, " "); } return text.replace(/ /, " "); } if (element.nodeType == 1 /*Node.ELEMENT_NODE*/ && element.nodeName != 'SCRIPT') { var childrenPreformatted = preformatted || (element.tagName == "PRE"); var text = ""; for (var i = 0; i < element.childNodes.length; i++) { var child = element.childNodes.item(i); text += this.getTextContent(child, childrenPreformatted); } // Handle block elements that introduce newlines // -- From HTML spec: // // // TODO: should potentially introduce multiple newlines to separate blocks if (element.tagName == "P" || element.tagName == "BR" || element.tagName == "HR" || element.tagName == "DIV") { text += "\n"; } return text.replace(/ /, " "); } return ''; } };PK lC> .44\org/openqa/selenium/internal/seleniumemulation/.svn/text-base/injectableSelenium.js.svn-basevar browserbot = { getTagName : function(element) { var tagName; if (element && element.tagName && element.tagName.toLowerCase) { tagName = element.tagName.toLowerCase(); } return tagName; }, replaceText : function(element, stringValue) { this.triggerEvent(element, 'focus', false); this.triggerEvent(element, 'select', true); var maxLengthAttr = element.getAttribute("maxLength"); var actualValue = stringValue; if (maxLengthAttr != null) { var maxLength = parseInt(maxLengthAttr); if (stringValue.length > maxLength) { actualValue = stringValue.substr(0, maxLength); } } if (this.getTagName(element) == "body") { if (element.ownerDocument && element.ownerDocument.designMode) { var designMode = new String(element.ownerDocument.designMode).toLowerCase(); if (designMode = "on") { // this must be a rich text control! element.innerHTML = actualValue; } } } else { element.value = actualValue; } // DGF this used to be skipped in chrome URLs, but no longer. Is xpcnativewrappers to blame? try { this.triggerEvent(element, 'change', true); } catch (e) { } }, getKeyCodeFromKeySequence : function(keySequence) { var match = /^\\(\d{1,3})$/.exec(keySequence); if (match != null) { return match[1]; } match = /^.$/.exec(keySequence); if (match != null) { return match[0].charCodeAt(0); } // this is for backward compatibility with existing tests // 1 digit ascii codes will break however because they are used for the digit chars match = /^\d{2,3}$/.exec(keySequence); if (match != null) { return match[0]; } throw "invalid keySequence"; }, createEventObject : function(element, controlKeyDown, altKeyDown, shiftKeyDown, metaKeyDown) { var evt = element.ownerDocument.createEventObject(); evt.shiftKey = shiftKeyDown; evt.metaKey = metaKeyDown; evt.altKey = altKeyDown; evt.ctrlKey = controlKeyDown; return evt; }, triggerEvent : function(element, eventType, canBubble, controlKeyDown, altKeyDown, shiftKeyDown, metaKeyDown) { canBubble = (typeof(canBubble) == undefined) ? true : canBubble; if (element.fireEvent && element.ownerDocument && element.ownerDocument.createEventObject) { // IE var evt = this.createEventObject(element, controlKeyDown, altKeyDown, shiftKeyDown, metaKeyDown); element.fireEvent('on' + eventType, evt); } else { var evt = document.createEvent('HTMLEvents'); try { evt.shiftKey = shiftKeyDown; evt.metaKey = metaKeyDown; evt.altKey = altKeyDown; evt.ctrlKey = controlKeyDown; } catch (e) { // Nothing sane to do } evt.initEvent(eventType, canBubble, true); element.dispatchEvent(evt); } }, triggerKeyEvent : function(element, eventType, keySequence, canBubble, controlKeyDown, altKeyDown, shiftKeyDown, metaKeyDown) { var keycode = this.getKeyCodeFromKeySequence(keySequence); canBubble = (typeof(canBubble) == undefined) ? true : canBubble; if (element.fireEvent && element.ownerDocument && element.ownerDocument.createEventObject) { // IE var keyEvent = this.createEventObject(element, controlKeyDown, altKeyDown, shiftKeyDown, metaKeyDown); keyEvent.keyCode = keycode; element.fireEvent('on' + eventType, keyEvent); } else { var evt; if (window.KeyEvent) { evt = document.createEvent('KeyEvents'); evt.initKeyEvent(eventType, true, true, window, controlKeyDown, altKeyDown, shiftKeyDown, metaKeyDown, keycode, keycode); } else { evt = document.createEvent('UIEvents'); evt.shiftKey = shiftKeyDown; evt.metaKey = metaKeyDown; evt.altKey = altKeyDown; evt.ctrlKey = controlKeyDown; evt.initUIEvent(eventType, true, true, window, 1); evt.keyCode = keycode; evt.which = keycode; } element.dispatchEvent(evt); } }, triggerMouseEvent : function(element, eventType, canBubble, clientX, clientY, button) { clientX = clientX ? clientX : 0; clientY = clientY ? clientY : 0; var screenX = 0; var screenY = 0; canBubble = (typeof(canBubble) == undefined) ? true : canBubble; if (element.fireEvent && element.ownerDocument && element.ownerDocument.createEventObject) { //IE var evt = this.createEventObject(element, this.controlKeyDown, this.altKeyDown, this.shiftKeyDown, this.metaKeyDown); evt.detail = 0; evt.button = button ? button : 1; // default will be the left mouse click ( http://www.javascriptkit.com/jsref/event.shtml ) evt.relatedTarget = null; if (!screenX && !screenY && !clientX && !clientY) { element.fireEvent('on' + eventType); } else { evt.screenX = screenX; evt.screenY = screenY; evt.clientX = clientX; evt.clientY = clientY; // when we go this route, window.event is never set to contain the event we have just created. // ideally we could just slide it in as follows in the try-block below, but this normally // doesn't work. This is why I try to avoid this code path, which is only required if we need to // set attributes on the event (e.g., clientX). try { window.event = evt; } catch(e) { // work around for http://jira.openqa.org/browse/SEL-280 -- make the event available somewhere: } element.fireEvent('on' + eventType, evt); } } else { var evt = document.createEvent('MouseEvents'); if (evt.initMouseEvent) { // see http://developer.mozilla.org/en/docs/DOM:event.button and // http://developer.mozilla.org/en/docs/DOM:event.initMouseEvent for button ternary logic logic //Safari evt.initMouseEvent(eventType, canBubble, true, document.defaultView, 1, screenX, screenY, clientX, clientY, this.controlKeyDown, this.altKeyDown, this.shiftKeyDown, this.metaKeyDown, button ? button : 0, null); } else { evt.initEvent(eventType, canBubble, true); evt.shiftKey = this.shiftKeyDown; evt.metaKey = this.metaKeyDown; evt.altKey = this.altKeyDown; evt.ctrlKey = this.controlKeyDown; if (button) { evt.button = button; } } element.dispatchEvent(evt); } }, doFireEvent : function(element, eventName) { /** * Explicitly simulate an event, to trigger the corresponding "onevent" * handler. * * @param locator an element locator * @param eventName the event name, e.g. "focus" or "blur" */ this.triggerEvent(element, eventName, false); }, getClientXY : function(element, coordString) { // Parse coordString var coords = null; var x; var y; if (coordString) { coords = coordString.split(/,/); x = Number(coords[0]); y = Number(coords[1]); } else { x = y = 0; } // Get position of element, // Return 2 item array with clientX and clientY return [this.getElementPositionLeft(element) + x, this.getElementPositionTop(element) + y]; }, getElementPositionLeft : function(element) { var x = element.offsetLeft; var elementParent = element.offsetParent; while (elementParent != null) { if (document.all) { if ((elementParent.tagName != "TABLE") && (elementParent.tagName != "BODY")) { x += elementParent.clientLeft; } } else // Netscape/DOM { if (elementParent.tagName == "TABLE") { var parentBorder = parseInt(elementParent.border); if (isNaN(parentBorder)) { var parentFrame = elementParent.getAttribute('frame'); if (parentFrame != null) { x += 1; } } else if (parentBorder > 0) { x += parentBorder; } } } x += elementParent.offsetLeft; elementParent = elementParent.offsetParent; } return x; }, getElementPositionTop : function(element) { /** * Retrieves the vertical position of an element * * @param locator an element locator pointing to an element OR an element itself * @return number of pixels from the edge of the frame. */ var y = 0; while (element != null) { if (document.all) { if ((element.tagName != "TABLE") && (element.tagName != "BODY")) { y += element.clientTop; } } else // Netscape/DOM { if (element.tagName == "TABLE") { var parentBorder = parseInt(element.border); if (isNaN(parentBorder)) { var parentFrame = element.getAttribute('frame'); if (parentFrame != null) { y += 1; } } else if (parentBorder > 0) { y += parentBorder; } } } y += element.offsetTop; // Netscape can get confused in some cases, such that the height of the parent is smaller // than that of the element (which it shouldn't really be). If this is the case, we need to // exclude this element, since it will result in too large a 'top' return value. if (element.offsetParent && element.offsetParent.offsetHeight && element.offsetParent.offsetHeight < element.offsetHeight) { // skip the parent that's too small element = element.offsetParent.offsetParent; } else { // Next up... element = element.offsetParent; } } return y; }, triggerMouseEventAt : function(element, eventName, coordString) { var clientXY = this.getClientXY(element, coordString) this.triggerMouseEvent(element, eventName, true, clientXY[0], clientXY[1]); }, doKeyDown : function(element, keySequence, controlKeyDown, altKeyDown, shiftKeyDown, metaKeyDown) { /** * Simulates a user pressing a key (without releasing it yet). * * @param locator an element locator * @param keySequence Either be a string("\" followed by the numeric keycode * of the key to be pressed, normally the ASCII value of that key), or a single * character. For example: "w", "\119". */ this.triggerKeyEvent(element, 'keydown', keySequence, true, controlKeyDown, altKeyDown, shiftKeyDown, metaKeyDown); }, doKeyUp : function(element, keySequence, controlKeyDown, altKeyDown, shiftKeyDown, metaKeyDown) { /** * Simulates a user releasing a key. * * @param locator an element locator * @param keySequence Either be a string("\" followed by the numeric keycode * of the key to be pressed, normally the ASCII value of that key), or a single * character. For example: "w", "\119". */ this.triggerKeyEvent(element, 'keyup', keySequence, true, controlKeyDown, altKeyDown, shiftKeyDown, metaKeyDown); } }; PK (hC>ٱ9org/openqa/selenium/internal/seleniumemulation/build.desc java_library(name = "seleniumemulation", srcs = [ "*.java" ], deps = [ "//java/client/src/com/thoughtworks/selenium", "//java/client/src/org/openqa/selenium:webdriver-api", "//java/client/src/org/openqa/selenium/io", "//third_party/java/guava-libraries", ]) PK (hC>Dϊ;org/openqa/selenium/internal/seleniumemulation/htmlutils.jsvar htmlutils = { highlight : function(element) { var highLightColor = "yellow"; if (element.originalColor == undefined) { // avoid picking up highlight element.originalColor = this.elementGetStyle(element, "background-color"); } this.elementSetStyle(element, {"backgroundColor" : highLightColor}); window.setTimeout(function() { try { //if element is orphan, probably page of it has already gone, so ignore if (!element.parentNode) { return; } this.elementSetStyle(element, {"backgroundColor" : element.originalColor}); } catch (e) {} // DGF unhighlighting is very dangerous and low priority }, 200); }, elementSetStyle : function(element, style) { for (var name in style) { var value = style[name]; if (value == null) value = ""; element.style[name] = value; } }, elementGetStyle : function(element, style) { var value = element.style[style]; if (!value) { if (document.defaultView && document.defaultView.getComputedStyle) { var css = document.defaultView.getComputedStyle(element, null); value = css ? css.getPropertyValue(style) : null; } else if (element.currentStyle) { value = element.currentStyle[style]; } } /** DGF necessary? if (window.opera && ['left', 'top', 'right', 'bottom'].include(style)) if (Element.getStyle(element, 'position') == 'static') value = 'auto'; */ return value == 'auto' ? null : value; }, absolutify: function(url, baseUrl) { /** returns a relative url in its absolute form, given by baseUrl. * * This function is a little odd, because it can take baseUrls that * aren't necessarily directories. It uses the same rules as the HTML * <base> tag; if the baseUrl doesn't end with "/", we'll assume * that it points to a file, and strip the filename off to find its * base directory. * * So absolutify("foo", "http://x/bar") will return "http://x/foo" (stripping off bar), * whereas absolutify("foo", "http://x/bar/") will return "http://x/bar/foo" (preserving bar). * Naturally absolutify("foo", "http://x") will return "http://x/foo", appropriately. * * @param url the url to make absolute; if this url is already absolute, we'll just return that, unchanged * @param baseUrl the baseUrl from which we'll absolutify, following the rules above. * @return 'url' if it was already absolute, or the absolutized version of url if it was not absolute. */ // DGF isn't there some library we could use for this? if (/^\w+:/.test(url)) { // it's already absolute return url; } var loc; try { loc = this.parseUrl(baseUrl); } catch (e) { // is it an absolute windows file path? let's play the hero in that case if (/^\w:\\/.test(baseUrl)) { baseUrl = "file:///" + baseUrl.replace(/\\/g, "/"); loc = this.parseUrl(baseUrl); } else { throw new SeleniumError("baseUrl wasn't absolute: " + baseUrl); } } loc.search = null; loc.hash = null; // if url begins with /, then that's the whole pathname if (/^\//.test(url)) { loc.pathname = url; var result = this.reassembleLocation(loc); return result; } // if pathname is null, then we'll just append "/" + the url if (!loc.pathname) { loc.pathname = "/" + url; var result = this.reassembleLocation(loc); return result; } // if pathname ends with /, just append url if (/\/$/.test(loc.pathname)) { loc.pathname += url; var result = this.reassembleLocation(loc); return result; } // if we're here, then the baseUrl has a pathname, but it doesn't end with / // in that case, we replace everything after the final / with the relative url loc.pathname = loc.pathname.replace(/[^\/\\]+$/, url); var result = this.reassembleLocation(loc); return result; }, URL_REGEX : /^((\w+):\/\/)(([^:]+):?([^@]+)?@)?([^\/\?:]*):?(\d+)?(\/?[^\?#]+)?\??([^#]+)?#?(.+)?/, parseUrl : function(url) { var fields = ['url', null, 'protocol', null, 'username', 'password', 'host', 'port', 'pathname', 'search', 'hash']; var result = this.URL_REGEX.exec(url); if (!result) { throw new SeleniumError("Invalid URL: " + url); } var loc = new Object(); for (var i = 0; i < fields.length; i++) { var field = fields[i]; if (field == null) { continue; } loc[field] = result[i]; } return loc; }, reassembleLocation : function(loc) { if (!loc.protocol) { throw new Error("Not a valid location object: " + o2s(loc)); } var protocol = loc.protocol; protocol = protocol.replace(/:$/, ""); var url = protocol + "://"; if (loc.username) { url += loc.username; if (loc.password) { url += ":" + loc.password; } url += "@"; } if (loc.host) { url += loc.host; } if (loc.port) { url += ":" + loc.port; } if (loc.pathname) { url += loc.pathname; } if (loc.search) { url += "?" + loc.search; } if (loc.hash) { var hash = loc.hash; hash = loc.hash.replace(/^#/, ""); url += "#" + hash; } return url; }, getTextContent: function(element, preformatted) { if (element.style && (element.style.visibility == 'hidden' || element.style.display == 'none')) return ''; if (element.nodeType == 3 /*Node.TEXT_NODE*/) { var text = element.data; if (!preformatted) { text = text.replace(/\n|\r|\t/g, " "); } return text.replace(/ /, " "); } if (element.nodeType == 1 /*Node.ELEMENT_NODE*/ && element.nodeName != 'SCRIPT') { var childrenPreformatted = preformatted || (element.tagName == "PRE"); var text = ""; for (var i = 0; i < element.childNodes.length; i++) { var child = element.childNodes.item(i); text += this.getTextContent(child, childrenPreformatted); } // Handle block elements that introduce newlines // -- From HTML spec: // // // TODO: should potentially introduce multiple newlines to separate blocks if (element.tagName == "P" || element.tagName == "BR" || element.tagName == "HR" || element.tagName == "DIV") { text += "\n"; } return text.replace(/ /, " "); } return ''; } };PK (hC> .44Dorg/openqa/selenium/internal/seleniumemulation/injectableSelenium.jsvar browserbot = { getTagName : function(element) { var tagName; if (element && element.tagName && element.tagName.toLowerCase) { tagName = element.tagName.toLowerCase(); } return tagName; }, replaceText : function(element, stringValue) { this.triggerEvent(element, 'focus', false); this.triggerEvent(element, 'select', true); var maxLengthAttr = element.getAttribute("maxLength"); var actualValue = stringValue; if (maxLengthAttr != null) { var maxLength = parseInt(maxLengthAttr); if (stringValue.length > maxLength) { actualValue = stringValue.substr(0, maxLength); } } if (this.getTagName(element) == "body") { if (element.ownerDocument && element.ownerDocument.designMode) { var designMode = new String(element.ownerDocument.designMode).toLowerCase(); if (designMode = "on") { // this must be a rich text control! element.innerHTML = actualValue; } } } else { element.value = actualValue; } // DGF this used to be skipped in chrome URLs, but no longer. Is xpcnativewrappers to blame? try { this.triggerEvent(element, 'change', true); } catch (e) { } }, getKeyCodeFromKeySequence : function(keySequence) { var match = /^\\(\d{1,3})$/.exec(keySequence); if (match != null) { return match[1]; } match = /^.$/.exec(keySequence); if (match != null) { return match[0].charCodeAt(0); } // this is for backward compatibility with existing tests // 1 digit ascii codes will break however because they are used for the digit chars match = /^\d{2,3}$/.exec(keySequence); if (match != null) { return match[0]; } throw "invalid keySequence"; }, createEventObject : function(element, controlKeyDown, altKeyDown, shiftKeyDown, metaKeyDown) { var evt = element.ownerDocument.createEventObject(); evt.shiftKey = shiftKeyDown; evt.metaKey = metaKeyDown; evt.altKey = altKeyDown; evt.ctrlKey = controlKeyDown; return evt; }, triggerEvent : function(element, eventType, canBubble, controlKeyDown, altKeyDown, shiftKeyDown, metaKeyDown) { canBubble = (typeof(canBubble) == undefined) ? true : canBubble; if (element.fireEvent && element.ownerDocument && element.ownerDocument.createEventObject) { // IE var evt = this.createEventObject(element, controlKeyDown, altKeyDown, shiftKeyDown, metaKeyDown); element.fireEvent('on' + eventType, evt); } else { var evt = document.createEvent('HTMLEvents'); try { evt.shiftKey = shiftKeyDown; evt.metaKey = metaKeyDown; evt.altKey = altKeyDown; evt.ctrlKey = controlKeyDown; } catch (e) { // Nothing sane to do } evt.initEvent(eventType, canBubble, true); element.dispatchEvent(evt); } }, triggerKeyEvent : function(element, eventType, keySequence, canBubble, controlKeyDown, altKeyDown, shiftKeyDown, metaKeyDown) { var keycode = this.getKeyCodeFromKeySequence(keySequence); canBubble = (typeof(canBubble) == undefined) ? true : canBubble; if (element.fireEvent && element.ownerDocument && element.ownerDocument.createEventObject) { // IE var keyEvent = this.createEventObject(element, controlKeyDown, altKeyDown, shiftKeyDown, metaKeyDown); keyEvent.keyCode = keycode; element.fireEvent('on' + eventType, keyEvent); } else { var evt; if (window.KeyEvent) { evt = document.createEvent('KeyEvents'); evt.initKeyEvent(eventType, true, true, window, controlKeyDown, altKeyDown, shiftKeyDown, metaKeyDown, keycode, keycode); } else { evt = document.createEvent('UIEvents'); evt.shiftKey = shiftKeyDown; evt.metaKey = metaKeyDown; evt.altKey = altKeyDown; evt.ctrlKey = controlKeyDown; evt.initUIEvent(eventType, true, true, window, 1); evt.keyCode = keycode; evt.which = keycode; } element.dispatchEvent(evt); } }, triggerMouseEvent : function(element, eventType, canBubble, clientX, clientY, button) { clientX = clientX ? clientX : 0; clientY = clientY ? clientY : 0; var screenX = 0; var screenY = 0; canBubble = (typeof(canBubble) == undefined) ? true : canBubble; if (element.fireEvent && element.ownerDocument && element.ownerDocument.createEventObject) { //IE var evt = this.createEventObject(element, this.controlKeyDown, this.altKeyDown, this.shiftKeyDown, this.metaKeyDown); evt.detail = 0; evt.button = button ? button : 1; // default will be the left mouse click ( http://www.javascriptkit.com/jsref/event.shtml ) evt.relatedTarget = null; if (!screenX && !screenY && !clientX && !clientY) { element.fireEvent('on' + eventType); } else { evt.screenX = screenX; evt.screenY = screenY; evt.clientX = clientX; evt.clientY = clientY; // when we go this route, window.event is never set to contain the event we have just created. // ideally we could just slide it in as follows in the try-block below, but this normally // doesn't work. This is why I try to avoid this code path, which is only required if we need to // set attributes on the event (e.g., clientX). try { window.event = evt; } catch(e) { // work around for http://jira.openqa.org/browse/SEL-280 -- make the event available somewhere: } element.fireEvent('on' + eventType, evt); } } else { var evt = document.createEvent('MouseEvents'); if (evt.initMouseEvent) { // see http://developer.mozilla.org/en/docs/DOM:event.button and // http://developer.mozilla.org/en/docs/DOM:event.initMouseEvent for button ternary logic logic //Safari evt.initMouseEvent(eventType, canBubble, true, document.defaultView, 1, screenX, screenY, clientX, clientY, this.controlKeyDown, this.altKeyDown, this.shiftKeyDown, this.metaKeyDown, button ? button : 0, null); } else { evt.initEvent(eventType, canBubble, true); evt.shiftKey = this.shiftKeyDown; evt.metaKey = this.metaKeyDown; evt.altKey = this.altKeyDown; evt.ctrlKey = this.controlKeyDown; if (button) { evt.button = button; } } element.dispatchEvent(evt); } }, doFireEvent : function(element, eventName) { /** * Explicitly simulate an event, to trigger the corresponding "onevent" * handler. * * @param locator an element locator * @param eventName the event name, e.g. "focus" or "blur" */ this.triggerEvent(element, eventName, false); }, getClientXY : function(element, coordString) { // Parse coordString var coords = null; var x; var y; if (coordString) { coords = coordString.split(/,/); x = Number(coords[0]); y = Number(coords[1]); } else { x = y = 0; } // Get position of element, // Return 2 item array with clientX and clientY return [this.getElementPositionLeft(element) + x, this.getElementPositionTop(element) + y]; }, getElementPositionLeft : function(element) { var x = element.offsetLeft; var elementParent = element.offsetParent; while (elementParent != null) { if (document.all) { if ((elementParent.tagName != "TABLE") && (elementParent.tagName != "BODY")) { x += elementParent.clientLeft; } } else // Netscape/DOM { if (elementParent.tagName == "TABLE") { var parentBorder = parseInt(elementParent.border); if (isNaN(parentBorder)) { var parentFrame = elementParent.getAttribute('frame'); if (parentFrame != null) { x += 1; } } else if (parentBorder > 0) { x += parentBorder; } } } x += elementParent.offsetLeft; elementParent = elementParent.offsetParent; } return x; }, getElementPositionTop : function(element) { /** * Retrieves the vertical position of an element * * @param locator an element locator pointing to an element OR an element itself * @return number of pixels from the edge of the frame. */ var y = 0; while (element != null) { if (document.all) { if ((element.tagName != "TABLE") && (element.tagName != "BODY")) { y += element.clientTop; } } else // Netscape/DOM { if (element.tagName == "TABLE") { var parentBorder = parseInt(element.border); if (isNaN(parentBorder)) { var parentFrame = element.getAttribute('frame'); if (parentFrame != null) { y += 1; } } else if (parentBorder > 0) { y += parentBorder; } } } y += element.offsetTop; // Netscape can get confused in some cases, such that the height of the parent is smaller // than that of the element (which it shouldn't really be). If this is the case, we need to // exclude this element, since it will result in too large a 'top' return value. if (element.offsetParent && element.offsetParent.offsetHeight && element.offsetParent.offsetHeight < element.offsetHeight) { // skip the parent that's too small element = element.offsetParent.offsetParent; } else { // Next up... element = element.offsetParent; } } return y; }, triggerMouseEventAt : function(element, eventName, coordString) { var clientXY = this.getClientXY(element, coordString) this.triggerMouseEvent(element, eventName, true, clientXY[0], clientXY[1]); }, doKeyDown : function(element, keySequence, controlKeyDown, altKeyDown, shiftKeyDown, metaKeyDown) { /** * Simulates a user pressing a key (without releasing it yet). * * @param locator an element locator * @param keySequence Either be a string("\" followed by the numeric keycode * of the key to be pressed, normally the ASCII value of that key), or a single * character. For example: "w", "\119". */ this.triggerKeyEvent(element, 'keydown', keySequence, true, controlKeyDown, altKeyDown, shiftKeyDown, metaKeyDown); }, doKeyUp : function(element, keySequence, controlKeyDown, altKeyDown, shiftKeyDown, metaKeyDown) { /** * Simulates a user releasing a key. * * @param locator an element locator * @param keySequence Either be a string("\" followed by the numeric keycode * of the key to be pressed, normally the ASCII value of that key), or a single * character. For example: "w", "\119". */ this.triggerKeyEvent(element, 'keyup', keySequence, true, controlKeyDown, altKeyDown, shiftKeyDown, metaKeyDown); } }; PK %^D>8RH H 7org/openqa/selenium/support/testing/Verifications.class1y1org/openqa/selenium/support/testing/Verificationsorg/junit/rules/VerifierverificationErrorsLjava/lang/StringBuilder;()VCode   java/lang/StringBuilder  LineNumberTableLocalVariableTablethis3Lorg/openqa/selenium/support/testing/Verifications;verify Exceptionsjava/lang/Throwable  toString()Ljava/lang/String;  clearVerificationErrors! #%$java/lang/String &'equals(Ljava/lang/Object;)Z )+*org/junit/Assert ,-fail(Ljava/lang/String;)VverificationErrorStringLjava/lang/String; verifyEquals'(Ljava/lang/Object;Ljava/lang/Object;)V )3 41 assertEquals 6 78throwableToString)(Ljava/lang/Throwable;)Ljava/lang/String; : ;<append-(Ljava/lang/String;)Ljava/lang/StringBuilder;>java/lang/ErrorexpectedLjava/lang/Object;actualeLjava/lang/Error; verifyTrue(Z)V )G HE assertTruevalueZ verifyFalse )M NE assertFalse)([Ljava/lang/String;[Ljava/lang/String;)V QSR.org/openqa/selenium/support/testing/Assertions TU(verifyEqualsAndReturnComparisonDumpIfNot:([Ljava/lang/String;[Ljava/lang/String;)Ljava/lang/String;[Ljava/lang/String;comparisonDumpIfNotEqualverifyNotEquals QZ [1assertNotEquals]java/lang/AssertionErrorLjava/lang/AssertionError;(ZZ)Vajava/lang/Boolean `c Eejava/io/StringWriter d hjava/io/PrintWriter gj k(Ljava/io/Writer;)V m noprintStackTrace(Ljava/io/PrintWriter;)V dtLjava/lang/Throwable;swLjava/io/StringWriter;pwLjava/io/PrintWriter; SourceFileVerifications.java!  B* * Y!"!  ^*L* +"+(&' ()+./ : * Y / 0  01 s+,2N**-59W=56 79*?@A@ BCDE hFM**,59W=>?@B IJ BCKE hLM**,59W=GHIK IJ BC0O l+,PN- *-9WSRT UW*?VAVW/X1 s+,YN**-59W\\] ^`*?@A@ B^X_ %`Yb`YbYN**-59W\efg$i*%%?J%AJ B^78 odYfMgY,iN+-l,plmno*qrst uvwxPK %^D>kԉ4org/openqa/selenium/support/testing/Assertions.class1.org/openqa/selenium/support/testing/Assertionsjava/lang/Object()VCode  LineNumberTableLocalVariableTablethis0Lorg/openqa/selenium/support/testing/Assertions; assertEquals'(Ljava/lang/String;Ljava/lang/String;)Vjava/lang/StringBuilder Expected "  (Ljava/lang/String;)V  append-(Ljava/lang/String;)Ljava/lang/StringBuilder; " but saw " " instead  !"toString()Ljava/lang/String; $ %&seleniumEquals'(Ljava/lang/String;Ljava/lang/String;)Z (*)org/junit/Assert +, assertTrue(Ljava/lang/String;Z)VexpectedLjava/lang/String;actual((Ljava/lang/String;[Ljava/lang/String;)V 2 34join(([Ljava/lang/String;C)Ljava/lang/String; 6 [Ljava/lang/String;  : ;(C)Ljava/lang/StringBuilder;sacCsbLjava/lang/StringBuilder;jI'(Ljava/lang/Object;Ljava/lang/Object;)ZEjava/lang/String G HIequals(Ljava/lang/Object;)ZLjava/lang/Object;Lregexp: DN OP startsWith(Ljava/lang/String;)ZRregex:Tregexpi:Vregexi: X YZ handleRegexL(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;I)Ljava/lang/Boolean; \^]java/lang/Boolean _` booleanValue()Zbexact:d Df gh replaceFirst8(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String; DG kmljava/lang/System nooutLjava/io/PrintStream;q expected s to match uwvjava/io/PrintStream xprintlnzglob:|([\]\[\\{\}$\(\)\|\^\+.])~\\$1 D h replaceAll\*.*\?. java/util/regex/Pattern compile.(Ljava/lang/String;I)Ljava/util/regex/Pattern; matcher3(Ljava/lang/CharSequence;)Ljava/util/regex/Matcher; java/util/regex/Matcher `matches expected "" to match glob ")" (had transformed the glob into regexp ""expectedPatterntmpbLjava/lang/Boolean; expectedExact expectedGlob D valueOf&(Ljava/lang/Object;)Ljava/lang/String; to match regexp \ FALSE \ TRUEprefixflags expectedRegExpLjava/util/regex/Pattern;(verifyEqualsAndReturnComparisonDumpIfNot:([Ljava/lang/String;[Ljava/lang/String;)Ljava/lang/String; Expected  stringArrayToString'([Ljava/lang/String;)Ljava/lang/String; but saw misMatchZjava/lang/StringBuffer{  ,(Ljava/lang/String;)Ljava/lang/StringBuffer; } Ljava/lang/StringBuffer;assertNotEquals'(Ljava/lang/Object;Ljava/lang/Object;)V#did not expect values to be equal (  ) ( fail SourceFileAssertions.java! /*   g'Y*+*+#' !"#!&# '-.'/. 0C *+,15 * +  -. /7 341Y8M>,*2W*d ,9W*, ./ 012#/,5 *1<71=>)?@ "AB %C\ *D+D*D+D#*+F ?@B  -J /J %&+KM+QM+SM +UM +M*L,KK*+WM,,[Q*+WM,,[S*+WM,,[U*+WM,,[*aM7*aceN-+i$jYp+r*t*yceN-{}N-N-N- +2jY+*-t +MN$P&Q(R*U3V7W<YEZI[N]R^S]W_[``bdcebidmerh{ijklkmorstsvwxyz{| z} >./.&.3+.\. YZ`+*MYY+*e::,&jYp,+t * #+7LSVZ^ >`.`.`/.`B#;.+3 P=*+=>*2+2#= *#Y*+ 6  !*.CJN *P-7P/7N AB ;YƷL=+ɶ*2W*+ζW+а  &/6 ;<7 1? #AB `$*+FYԷ*ֶ׶ٱ # $-J$/JPK lC>4444org/openqa/selenium/support/testing/.svn/all-wcpropsK 25 svn:wc:ra_dav:version-url V 77 /svn/!svn/ver/11224/trunk/java/client/src/org/openqa/selenium/support/testing END Verifications.java K 25 svn:wc:ra_dav:version-url V 96 /svn/!svn/ver/11224/trunk/java/client/src/org/openqa/selenium/support/testing/Verifications.java END Assertions.java K 25 svn:wc:ra_dav:version-url V 93 /svn/!svn/ver/11224/trunk/java/client/src/org/openqa/selenium/support/testing/Assertions.java END build.desc K 25 svn:wc:ra_dav:version-url V 88 /svn/!svn/ver/11224/trunk/java/client/src/org/openqa/selenium/support/testing/build.desc END PK lC>WHtϹ0org/openqa/selenium/support/testing/.svn/entries8 dir 11264 http://selenium.googlecode.com/svn/trunk/java/client/src/org/openqa/selenium/support/testing http://selenium.googlecode.com/svn 2011-01-07T12:19:58.058512Z 10882 simon.m.stewart svn:special svn:externals svn:needs-lock 07704840-8298-11de-bf8c-fd130f914ac9 Verifications.java file 2011-02-03T12:01:18.000000Z 3f3a8c1ee2e22874b15d89ad50fed096 2010-08-26T18:50:58.745110Z 9547 simon.m.stewart Assertions.java file 2011-02-03T12:01:18.000000Z f731d0079c7cea25a1b87088c58dc97d 2010-08-26T18:50:58.745110Z 9547 simon.m.stewart build.desc file 2011-02-03T12:01:18.000000Z 560492ea03bcd2d8252b59a262c14349 2011-01-07T12:19:58.058512Z 10882 simon.m.stewart PK lC>G/org/openqa/selenium/support/testing/.svn/format8 PK lC>}Korg/openqa/selenium/support/testing/.svn/text-base/Assertions.java.svn-base/* Copyright 2010 WebDriver committers Copyright 2010 Google Inc. Portions copyright 2007 ThoughtWorks, Inc Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package org.openqa.selenium.support.testing; import static org.junit.Assert.assertTrue; import static org.junit.Assert.fail; import java.util.regex.Pattern; public class Assertions { /** * Like JUnit's Assert.assertEquals, but handles "regexp:" strings like HTML * Selenese */ public static void assertEquals(String expected, String actual) { assertTrue("Expected \"" + expected + "\" but saw \"" + actual + "\" instead", seleniumEquals(expected, actual)); } /** * Like JUnit's Assert.assertEquals, but joins the string array with commas, * and handles "regexp:" strings like HTML Selenese */ public static void assertEquals(String expected, String[] actual) { assertEquals(expected, join(actual, ',')); } private static String join(String[] sa, char c) { StringBuilder sb = new StringBuilder(); for (int j = 0; j < sa.length; j++) { sb.append(sa[j]); if (j < sa.length - 1) { sb.append(c); } } return sb.toString(); } /** * Compares two objects, but handles "regexp:" strings like HTML Selenese * * @return true if actual matches the expectedPattern, or false otherwise * @see #seleniumEquals(String, String) */ public static boolean seleniumEquals(Object expected, Object actual) { if (expected instanceof String && actual instanceof String) { return seleniumEquals((String) expected, (String) actual); } return expected.equals(actual); } /** * Compares two strings, but handles "regexp:" strings like HTML Selenese * * @param expectedPattern * @param actual * @return true if actual matches the expectedPattern, or false otherwise */ private static boolean seleniumEquals(String expectedPattern, String actual) { if (actual.startsWith("regexp:") || actual.startsWith("regex:") || actual.startsWith("regexpi:") || actual.startsWith("regexi:")) { // swap 'em String tmp = actual; actual = expectedPattern; expectedPattern = tmp; } Boolean b; b = handleRegex("regexp:", expectedPattern, actual, 0); if (b != null) { return b.booleanValue(); } b = handleRegex("regex:", expectedPattern, actual, 0); if (b != null) { return b.booleanValue(); } b = handleRegex("regexpi:", expectedPattern, actual, Pattern.CASE_INSENSITIVE); if (b != null) { return b.booleanValue(); } b = handleRegex("regexi:", expectedPattern, actual, Pattern.CASE_INSENSITIVE); if (b != null) { return b.booleanValue(); } if (expectedPattern.startsWith("exact:")) { String expectedExact = expectedPattern.replaceFirst("exact:", ""); if (!expectedExact.equals(actual)) { System.out.println("expected " + actual + " to match " + expectedPattern); return false; } return true; } String expectedGlob = expectedPattern.replaceFirst("glob:", ""); expectedGlob = expectedGlob.replaceAll( "([\\]\\[\\\\{\\}$\\(\\)\\|\\^\\+.])", "\\\\$1"); expectedGlob = expectedGlob.replaceAll("\\*", ".*"); expectedGlob = expectedGlob.replaceAll("\\?", "."); if (!Pattern.compile(expectedGlob, Pattern.DOTALL).matcher(actual) .matches()) { System.out.println("expected \"" + actual + "\" to match glob \"" + expectedPattern + "\" (had transformed the glob into regexp \"" + expectedGlob + "\""); return false; } return true; } private static Boolean handleRegex(String prefix, String expectedPattern, String actual, int flags) { if (expectedPattern.startsWith(prefix)) { String expectedRegEx = expectedPattern.replaceFirst(prefix, ".*") + ".*"; Pattern p = Pattern.compile(expectedRegEx, flags); if (!p.matcher(actual).matches()) { System.out.println("expected " + actual + " to match regexp " + expectedPattern); return Boolean.FALSE; } return Boolean.TRUE; } return null; } protected static String verifyEqualsAndReturnComparisonDumpIfNot(String[] expected, String[] actual) { boolean misMatch = false; if (expected.length != actual.length) { misMatch = true; } for (int j = 0; j < expected.length; j++) { if (!seleniumEquals(expected[j], actual[j])) { misMatch = true; break; } } if (misMatch) { return "Expected " + stringArrayToString(expected) + " but saw " + stringArrayToString(actual); } return null; } private static String stringArrayToString(String[] sa) { StringBuffer sb = new StringBuffer("{"); for (int j = 0; j < sa.length; j++) { sb.append(" ").append("\"").append(sa[j]).append("\""); } sb.append(" }"); return sb.toString(); } /** * Asserts that two objects are not the same (compares using .equals()) */ public static void assertNotEquals(Object expected, Object actual) { if (expected.equals(actual)) { fail("did not expect values to be equal (" + expected.toString() + ")"); } } } PK lC>$ݮ==Norg/openqa/selenium/support/testing/.svn/text-base/Verifications.java.svn-base/* Copyright 2010 WebDriver committers Copyright 2010 Google Inc. Portions copyright 2007 ThoughtWorks, Inc Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package org.openqa.selenium.support.testing; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertFalse; import static org.junit.Assert.assertTrue; import static org.junit.Assert.fail; import static org.openqa.selenium.support.testing.Assertions.assertNotEquals; import static org.openqa.selenium.support.testing.Assertions.verifyEqualsAndReturnComparisonDumpIfNot; import java.io.PrintWriter; import java.io.StringWriter; import org.junit.rules.Verifier; public class Verifications extends Verifier { protected StringBuilder verificationErrors = new StringBuilder(); @Override protected void verify() throws Throwable { String verificationErrorString = verificationErrors.toString(); clearVerificationErrors(); if (!"".equals(verificationErrorString)) { fail(verificationErrorString); } } /** Clears out the list of verification errors */ public void clearVerificationErrors() { verificationErrors = new StringBuilder(); } /** Like assertEquals, but fails at the end of the test (during tearDown) */ public void verifyEquals(Object expected, Object actual) { try { assertEquals(expected, actual); } catch (Error e) { verificationErrors.append(throwableToString(e)); } } /** Like assertTrue, but fails at the end of the test (during tearDown) */ public void verifyTrue(boolean value) { try { assertTrue(value); } catch (Error e) { verificationErrors.append(throwableToString(e)); } } /** Like assertFalse, but fails at the end of the test (during tearDown) */ public void verifyFalse(boolean value) { try { assertFalse(value); } catch (Error e) { verificationErrors.append(throwableToString(e)); } } /** * Asserts that two string arrays have identical string contents (fails at the * end of the test, during tearDown) */ public void verifyEquals(String[] expected, String[] actual) { String comparisonDumpIfNotEqual = verifyEqualsAndReturnComparisonDumpIfNot( expected, actual); if (comparisonDumpIfNotEqual != null) { verificationErrors.append(comparisonDumpIfNotEqual); } } /** Like assertNotEquals, but fails at the end of the test (during tearDown) */ public void verifyNotEquals(Object expected, Object actual) { try { assertNotEquals(expected, actual); } catch (AssertionError e) { verificationErrors.append(throwableToString(e)); } } /** Like assertNotEquals, but fails at the end of the test (during tearDown) */ public void verifyNotEquals(boolean expected, boolean actual) { try { assertNotEquals(new Boolean(expected), new Boolean(actual)); } catch (AssertionError e) { verificationErrors.append(throwableToString(e)); } } protected String throwableToString(Throwable t) { StringWriter sw = new StringWriter(); PrintWriter pw = new PrintWriter(sw); t.printStackTrace(pw); return sw.toString(); } } PK lC>ggForg/openqa/selenium/support/testing/.svn/text-base/build.desc.svn-base java_library(name = "testing", srcs = [ "*.java" ], deps = [ "//third_party/java/junit", ]) PK )hC>gg.org/openqa/selenium/support/testing/build.desc java_library(name = "testing", srcs = [ "*.java" ], deps = [ "//third_party/java/junit", ]) PK %^D>%5org/openqa/selenium/lift/match/SelectionMatcher.class11/org/openqa/selenium/lift/match/SelectionMatcherorg/hamcrest/TypeSafeMatcher()VCode  LineNumberTableLocalVariableTablethis1Lorg/openqa/selenium/lift/match/SelectionMatcher; matchesSafely#(Lorg/openqa/selenium/WebElement;)Z org/openqa/selenium/WebElement  isSelected()Zitem Lorg/openqa/selenium/WebElement; describeTo(Lorg/hamcrest/Description;)Vshould be selected org/hamcrest/Description ! appendText.(Ljava/lang/String;)Lorg/hamcrest/Description; descriptionLorg/hamcrest/Description; selection()Lorg/hamcrest/Matcher; Signature:()Lorg/hamcrest/Matcher;RuntimeVisibleAnnotationsLorg/hamcrest/Factory;  (Ljava/lang/Object;)Z -  SourceFileSelectionMatcher.java@Lorg/hamcrest/TypeSafeMatcher;!/*   ;+   B +W    "# $%&'()(Y*  A+) *+,  ./&0PK %^D>u1org/openqa/selenium/lift/match/ValueMatcher.class1?+org/openqa/selenium/lift/match/ValueMatcherorg/hamcrest/TypeSafeMatchervalueLjava/lang/Object;(Ljava/lang/Object;)VCode   ()V  LineNumberTableLocalVariableTablethis-Lorg/openqa/selenium/lift/match/ValueMatcher; matchesSafely#(Lorg/openqa/selenium/WebElement;)Z org/openqa/selenium/WebElement getValue()Ljava/lang/String; java/lang/String  equals(Ljava/lang/Object;)Zitem Lorg/openqa/selenium/WebElement; describeTo(Lorg/hamcrest/Description;)V&should have value (*)org/hamcrest/Description +, appendText.(Ljava/lang/String;)Lorg/hamcrest/Description; (. /0 appendValue.(Ljava/lang/Object;)Lorg/hamcrest/Description; descriptionLorg/hamcrest/Description;*(Ljava/lang/Object;)Lorg/hamcrest/Matcher; SignatureL(Ljava/lang/Object;)Lorg/hamcrest/Matcher;RuntimeVisibleAnnotationsLorg/hamcrest/Factory; 9  ;  SourceFileValueMatcher.java@Lorg/hamcrest/TypeSafeMatcher;! F * *+     B+* !"#$ K+%'* -W 12 34567 3 Y*8!  A  ) *+:<=4>PK %^D>{45org/openqa/selenium/lift/match/AttributeMatcher.class1J/org/openqa/selenium/lift/match/AttributeMatcherorg/hamcrest/TypeSafeMatchermatcherLorg/hamcrest/Matcher; Signature*Lorg/hamcrest/Matcher;nameLjava/lang/String;+(Ljava/lang/String;Lorg/hamcrest/Matcher;)V?(Ljava/lang/String;Lorg/hamcrest/Matcher;)VCode  ()V   LineNumberTableLocalVariableTablethis1Lorg/openqa/selenium/lift/match/AttributeMatcher;LocalVariableTypeTable matchesSafely#(Lorg/openqa/selenium/WebElement;)Z  org/openqa/selenium/WebElement !" getAttribute&(Ljava/lang/String;)Ljava/lang/String; $&%org/hamcrest/Matcher '(matches(Ljava/lang/Object;)Zitem Lorg/openqa/selenium/WebElement; describeTo(Lorg/hamcrest/Description;)V. attribute 021org/hamcrest/Description 34 appendText.(Ljava/lang/String;)Lorg/hamcrest/Description; 06 78 appendValue.(Ljava/lang/Object;)Lorg/hamcrest/Description; $: +, descriptionLorg/hamcrest/Description; attribute@(Ljava/lang/String;Lorg/hamcrest/Matcher;)Lorg/hamcrest/Matcher;v(Ljava/lang/String;Lorg/hamcrest/Matcher;)Lorg/hamcrest/Matcher;RuntimeVisibleAnnotationsLorg/hamcrest/Factory; C  valueMatcher F  SourceFileAttributeMatcher.java@Lorg/hamcrest/TypeSafeMatcher;!   k**+*,$% &'   H*+*#+)*+,Y+-/*5W*+9/01;< =>?@AP Y*+B5 D  DA() *+EGHIPK %^D>ǿ)6org/openqa/selenium/lift/match/NumericalMatchers.class1)0org/openqa/selenium/lift/match/NumericalMatchersjava/lang/Object()VCode  LineNumberTableLocalVariableTablethis2Lorg/openqa/selenium/lift/match/NumericalMatchers;atLeast(I)Lorg/hamcrest/Matcher; Signature.(I)Lorg/hamcrest/Matcher;RuntimeVisibleAnnotationsLorg/hamcrest/Factory; java/lang/Integer valueOf(I)Ljava/lang/Integer; org/hamcrest/Matchers  greaterThan.(Ljava/lang/Comparable;)Lorg/hamcrest/Matcher;iIexactly $ %&equalTo*(Ljava/lang/Object;)Lorg/hamcrest/Matcher; SourceFileNumericalMatchers.java!/*   4 d "  ! "2# '  !'(PK %^D>7)0org/openqa/selenium/lift/match/TextMatcher.class1B*org/openqa/selenium/lift/match/TextMatcherorg/hamcrest/TypeSafeMatchermatcherLorg/hamcrest/Matcher; Signature*Lorg/hamcrest/Matcher;(Lorg/hamcrest/Matcher;)V-(Lorg/hamcrest/Matcher;)VCode  ()V  LineNumberTableLocalVariableTablethis,Lorg/openqa/selenium/lift/match/TextMatcher;LocalVariableTypeTable matchesSafely#(Lorg/openqa/selenium/WebElement;)Z org/openqa/selenium/WebElement getText()Ljava/lang/String; "!org/hamcrest/Matcher #$matches(Ljava/lang/Object;)Zitem Lorg/openqa/selenium/WebElement; describeTo(Lorg/hamcrest/Description;)V*text ,.-org/hamcrest/Description /0 appendText.(Ljava/lang/String;)Lorg/hamcrest/Description; 2 '( descriptionLorg/hamcrest/Description;text.(Lorg/hamcrest/Matcher;)Lorg/hamcrest/Matcher;d(Lorg/hamcrest/Matcher;)Lorg/hamcrest/Matcher;RuntimeVisibleAnnotationsLorg/hamcrest/Factory; ;  textMatcher >  SourceFileTextMatcher.java@Lorg/hamcrest/TypeSafeMatcher;!  X * *+#$ %     D*+)%&'( P+)+W*+1- ./34 56789 E Y*:3  <  <A$ ) *+=?@APK lC>rr/org/openqa/selenium/lift/match/.svn/all-wcpropsK 25 svn:wc:ra_dav:version-url V 72 /svn/!svn/ver/11224/trunk/java/client/src/org/openqa/selenium/lift/match END ValueMatcher.java K 25 svn:wc:ra_dav:version-url V 90 /svn/!svn/ver/11224/trunk/java/client/src/org/openqa/selenium/lift/match/ValueMatcher.java END NumericalMatchers.java K 25 svn:wc:ra_dav:version-url V 95 /svn/!svn/ver/11224/trunk/java/client/src/org/openqa/selenium/lift/match/NumericalMatchers.java END AttributeMatcher.java K 25 svn:wc:ra_dav:version-url V 94 /svn/!svn/ver/11224/trunk/java/client/src/org/openqa/selenium/lift/match/AttributeMatcher.java END TextMatcher.java K 25 svn:wc:ra_dav:version-url V 89 /svn/!svn/ver/11224/trunk/java/client/src/org/openqa/selenium/lift/match/TextMatcher.java END SelectionMatcher.java K 25 svn:wc:ra_dav:version-url V 94 /svn/!svn/ver/11224/trunk/java/client/src/org/openqa/selenium/lift/match/SelectionMatcher.java END PK lC>W+org/openqa/selenium/lift/match/.svn/entries8 dir 11264 http://selenium.googlecode.com/svn/trunk/java/client/src/org/openqa/selenium/lift/match http://selenium.googlecode.com/svn 2009-03-24T17:04:27.143928Z 6446 rchatley@gmail.com svn:special svn:externals svn:needs-lock 07704840-8298-11de-bf8c-fd130f914ac9 ValueMatcher.java file 2011-02-03T12:01:17.000000Z d5c3cc44ea586f28c75688c9246450a4 2009-03-24T17:04:27.143928Z 6446 rchatley@gmail.com NumericalMatchers.java file 2011-02-03T12:01:17.000000Z 63785beb25f012c4187efec4c9fb451c 2009-01-05T15:17:38.587344Z 6031 simon.m.stewart AttributeMatcher.java file 2011-02-03T12:01:17.000000Z ebac12945be320e94c5b0a37ad6d4bf6 2009-03-24T17:04:27.143928Z 6446 rchatley@gmail.com TextMatcher.java file 2011-02-03T12:01:17.000000Z 7bf9240a422c756af40085c079c94cc0 2009-01-05T15:17:38.587344Z 6031 simon.m.stewart SelectionMatcher.java file 2011-02-03T12:01:17.000000Z e7471c2eba129b2f5e41ac02f0d96f8a 2009-03-24T17:04:27.143928Z 6446 rchatley@gmail.com PK lC>G*org/openqa/selenium/lift/match/.svn/format8 PK lC> AALorg/openqa/selenium/lift/match/.svn/text-base/AttributeMatcher.java.svn-base/* Copyright 2007-2009 WebDriver committers Copyright 2007-2009 Google Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package org.openqa.selenium.lift.match; import org.hamcrest.Description; import org.hamcrest.Factory; import org.hamcrest.Matcher; import org.hamcrest.TypeSafeMatcher; import org.openqa.selenium.WebElement; /** * hamcrest matcher for attributes of {@link WebElement}s. * @author rchatley (Robert Chatley) * */ public class AttributeMatcher extends TypeSafeMatcher { private final Matcher matcher; private final String name; AttributeMatcher(String name, Matcher matcher) { this.name = name; this.matcher = matcher; } @Override public boolean matchesSafely(WebElement item) { return matcher.matches(item.getAttribute(name)); } public void describeTo(Description description) { description.appendText("attribute ").appendValue(name); matcher.describeTo(description); } @Factory public static Matcher attribute(final String name, final Matcher valueMatcher) { return new AttributeMatcher(name, valueMatcher); } }PK lC>ʹ-SSMorg/openqa/selenium/lift/match/.svn/text-base/NumericalMatchers.java.svn-base/* Copyright 2007-2009 WebDriver committers Copyright 2007-2009 Google Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package org.openqa.selenium.lift.match; import org.hamcrest.Factory; import org.hamcrest.Matcher; import static org.hamcrest.Matchers.equalTo; import static org.hamcrest.Matchers.greaterThan; /** * Various numerical hamcrest {@link Matcher}s. * @author rchatley (Robert Chatley) * */ public class NumericalMatchers { @Factory public static Matcher atLeast(int i) { return greaterThan(i - 1); } @Factory public static Matcher exactly(int i) { return equalTo(i); } } PK lC>SLorg/openqa/selenium/lift/match/.svn/text-base/SelectionMatcher.java.svn-basepackage org.openqa.selenium.lift.match; import org.hamcrest.Description; import org.hamcrest.Factory; import org.hamcrest.Matcher; import org.hamcrest.TypeSafeMatcher; import org.openqa.selenium.WebElement; /** * Matcher to match a selected element (e.g. a radio button). * * @author rchatley (Robert Chatley) */ public class SelectionMatcher extends TypeSafeMatcher { @Override public boolean matchesSafely(WebElement item) { return item.isSelected(); } public void describeTo(Description description) { description.appendText("should be selected"); } @Factory public static Matcher selection() { return new SelectionMatcher(); } } PK lC>c2o]Gorg/openqa/selenium/lift/match/.svn/text-base/TextMatcher.java.svn-base/* Copyright 2007-2009 WebDriver committers Copyright 2007-2009 Google Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package org.openqa.selenium.lift.match; import org.hamcrest.Description; import org.hamcrest.Factory; import org.hamcrest.Matcher; import org.hamcrest.TypeSafeMatcher; import org.openqa.selenium.WebElement; /** * {@link Matcher} for matching text content within {@link WebElement}s. * @author rchatley (Robert Chatley) * */ public class TextMatcher extends TypeSafeMatcher { private final Matcher matcher; TextMatcher(Matcher matcher) { this.matcher = matcher; } @Override public boolean matchesSafely(WebElement item) { return matcher.matches(item.getText()); } public void describeTo(Description description) { description.appendText("text "); matcher.describeTo(description); } @Factory public static Matcher text(final Matcher textMatcher) { return new TextMatcher(textMatcher); } }PK lC>M44Horg/openqa/selenium/lift/match/.svn/text-base/ValueMatcher.java.svn-basepackage org.openqa.selenium.lift.match; import org.hamcrest.Description; import org.hamcrest.Factory; import org.hamcrest.Matcher; import org.hamcrest.TypeSafeMatcher; import org.openqa.selenium.WebElement; /** * Matches the value of an element, for example an input field. * * @author rchatley (Robert Chatley) */ public class ValueMatcher extends TypeSafeMatcher { private final Object value; public ValueMatcher(Object value) { this.value = value; } @Override public boolean matchesSafely(WebElement item) { return item.getValue().equals(value); } public void describeTo(Description description) { description.appendText("should have value ").appendValue(value); } @Factory public static Matcher value(final Object value) { return new ValueMatcher(value); } } PK %^D>V xxAorg/openqa/selenium/interactions/internal/KeysRelatedAction.class1,;org/openqa/selenium/interactions/internal/KeysRelatedAction4org/openqa/selenium/interactions/internal/BaseActionkeyboardLorg/openqa/selenium/Keyboard;mouseLorg/openqa/selenium/Mouse;d(Lorg/openqa/selenium/Keyboard;Lorg/openqa/selenium/Mouse;Lorg/openqa/selenium/internal/Locatable;)VCode  +(Lorg/openqa/selenium/internal/Locatable;)V    LineNumberTableLocalVariableTablethis=Lorg/openqa/selenium/interactions/internal/KeysRelatedAction;locationProvider(Lorg/openqa/selenium/internal/Locatable;focusOnElement()V  where ! &org/openqa/selenium/internal/Locatable "#getCoordinates9()Lorg/openqa/selenium/interactions/internal/Coordinates; %'&org/openqa/selenium/Mouse ()click:(Lorg/openqa/selenium/interactions/internal/Coordinates;)V SourceFileKeysRelatedAction.java!  d*- *+*,$% &'* L***$*+- *+PK %^D>||Borg/openqa/selenium/interactions/internal/MouseRelatedAction.class1+F(Lorg/openqa/selenium/Mouse;Lorg/openqa/selenium/internal/Locatable;)VCode   +(Lorg/openqa/selenium/internal/Locatable;)V  LineNumberTableLocalVariableTablethis>Lorg/openqa/selenium/interactions/internal/MouseRelatedAction;locationProvider(Lorg/openqa/selenium/internal/Locatable;getActionLocation9()Lorg/openqa/selenium/interactions/internal/Coordinates;  where &org/openqa/selenium/internal/Locatable getCoordinatesmoveToLocation()V "  $&%org/openqa/selenium/Mouse '( mouseMove:(Lorg/openqa/selenium/interactions/internal/Coordinates;)V SourceFileMouseRelatedAction.java! Q *, *+       E**    G*!* *!#! )*PK %^D>`88:org/openqa/selenium/interactions/internal/BaseAction.class14org/openqa/selenium/interactions/internal/BaseActionjava/lang/Objectwhere(Lorg/openqa/selenium/internal/Locatable;+(Lorg/openqa/selenium/internal/Locatable;)VCode   ()V  LineNumberTableLocalVariableTablethis6Lorg/openqa/selenium/interactions/internal/BaseAction;actionLocation SourceFileBaseAction.java! F * *+  ! "    < * * () *  PK %^D>\\?org/openqa/selenium/interactions/internal/SingleKeyAction.class1=9org/openqa/selenium/interactions/internal/SingleKeyAction;org/openqa/selenium/interactions/internal/KeysRelatedActionkeyLorg/openqa/selenium/Keys; MODIFIER_KEYSorg/openqa/selenium/Keys;()VCode org/openqa/selenium/Keys  SHIFT  CONTROL  ALT  LineNumberTableLocalVariableTableV(Lorg/openqa/selenium/Keyboard;Lorg/openqa/selenium/Mouse;Lorg/openqa/selenium/Keys;)V  ~(Lorg/openqa/selenium/Keyboard;Lorg/openqa/selenium/Mouse;Lorg/openqa/selenium/internal/Locatable;Lorg/openqa/selenium/Keys;)Vthis;Lorg/openqa/selenium/interactions/internal/SingleKeyAction;keyboardLorg/openqa/selenium/Keyboard;mouseLorg/openqa/selenium/Mouse; ' (d(Lorg/openqa/selenium/Keyboard;Lorg/openqa/selenium/Mouse;Lorg/openqa/selenium/internal/Locatable;)V *  , -.equals(Ljava/lang/Object;)Z0"java/lang/IllegalArgumentException27Key Down / Up events only make sense for modifier keys. /4 5(Ljava/lang/String;)VlocationProvider(Lorg/openqa/selenium/internal/Locatable; isModifierZmodifier SourceFileSingleKeyAction.java!  > YSYSYS  U *+,- !"* ! "# $%   L*+,-&*)6Y: 66 2:+6 /Y13& %& '(&)2(<,A-K0HL !L"#L$%L67L<89& :;h3;77;org/openqa/selenium/interactions/internal/Coordinates.class1 5org/openqa/selenium/interactions/internal/Coordinatesjava/lang/ObjectgetLocationOnScreen()Lorg/openqa/selenium/Point;getLocationInViewPortgetLocationInDOM getAuxiliry()Ljava/lang/Object; SourceFileCoordinates.java   PK lC>wN:org/openqa/selenium/interactions/internal/.svn/all-wcpropsK 25 svn:wc:ra_dav:version-url V 83 /svn/!svn/ver/11226/trunk/java/client/src/org/openqa/selenium/interactions/internal END MouseRelatedAction.java K 25 svn:wc:ra_dav:version-url V 107 /svn/!svn/ver/11226/trunk/java/client/src/org/openqa/selenium/interactions/internal/MouseRelatedAction.java END SingleKeyAction.java K 25 svn:wc:ra_dav:version-url V 104 /svn/!svn/ver/11226/trunk/java/client/src/org/openqa/selenium/interactions/internal/SingleKeyAction.java END BaseAction.java K 25 svn:wc:ra_dav:version-url V 99 /svn/!svn/ver/11226/trunk/java/client/src/org/openqa/selenium/interactions/internal/BaseAction.java END KeysRelatedAction.java K 25 svn:wc:ra_dav:version-url V 106 /svn/!svn/ver/11226/trunk/java/client/src/org/openqa/selenium/interactions/internal/KeysRelatedAction.java END Coordinates.java K 25 svn:wc:ra_dav:version-url V 100 /svn/!svn/ver/11226/trunk/java/client/src/org/openqa/selenium/interactions/internal/Coordinates.java END PK lC>6]6org/openqa/selenium/interactions/internal/.svn/entries8 dir 11264 http://selenium.googlecode.com/svn/trunk/java/client/src/org/openqa/selenium/interactions/internal http://selenium.googlecode.com/svn 2011-02-01T13:59:17.176547Z 11226 simon.m.stewart svn:special svn:externals svn:needs-lock 07704840-8298-11de-bf8c-fd130f914ac9 MouseRelatedAction.java file 2011-02-03T12:01:18.000000Z ff792db9951206152926ab3dc123a3f2 2011-02-01T13:59:17.176547Z 11226 simon.m.stewart SingleKeyAction.java file 2011-02-03T12:01:18.000000Z 37a2ad6ca0dc94dc6d59b5e102b893fb 2011-02-01T13:59:17.176547Z 11226 simon.m.stewart BaseAction.java file 2011-02-03T12:01:18.000000Z 77c2e305062eccf0a5efdaa8fd44dbb7 2011-02-01T13:59:17.176547Z 11226 simon.m.stewart KeysRelatedAction.java file 2011-02-03T12:01:18.000000Z bb169b837eda2c6dae15f4d25a91475f 2011-02-01T13:59:17.176547Z 11226 simon.m.stewart Coordinates.java file 2011-02-03T12:01:18.000000Z 8228f76069564875cdcd1c13aac264fd 2011-02-01T13:59:17.176547Z 11226 simon.m.stewart PK lC>G5org/openqa/selenium/interactions/internal/.svn/format8 PK lC>%Qorg/openqa/selenium/interactions/internal/.svn/text-base/BaseAction.java.svn-base/* Copyright 2007-2010 WebDriver committers Copyright 2007-2010 Google Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package org.openqa.selenium.interactions.internal; import org.openqa.selenium.internal.Locatable; /** * Base class for all actions. */ public abstract class BaseAction { protected final Locatable where; /** * Common c'tor - a locatable element is provided. * @param actionLocation provider of coordinates for the action. */ protected BaseAction(Locatable actionLocation) { this.where = actionLocation; } /** * No locatable element provided - action in the context of the previous * action. */ protected BaseAction() { this.where = null; } } PK lC>bARorg/openqa/selenium/interactions/internal/.svn/text-base/Coordinates.java.svn-base// Copyright 2011 Google Inc. All Rights Reserved. package org.openqa.selenium.interactions.internal; import org.openqa.selenium.Point; /** * Provides coordinates of an element for advanced interactions. * Note that some coordinates (such as screen coordinates) are evaluated lazily * since the element may have to be scrolled into view. */ public interface Coordinates { Point getLocationOnScreen(); Point getLocationInViewPort(); Point getLocationInDOM(); Object getAuxiliry(); } PK lC> Xorg/openqa/selenium/interactions/internal/.svn/text-base/KeysRelatedAction.java.svn-base/* Copyright 2007-2010 WebDriver committers Copyright 2007-2010 Google Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package org.openqa.selenium.interactions.internal; import org.openqa.selenium.HasInputDevices; import org.openqa.selenium.JavascriptExecutor; import org.openqa.selenium.Keyboard; import org.openqa.selenium.Mouse; import org.openqa.selenium.WebDriver; import org.openqa.selenium.WebElement; import org.openqa.selenium.internal.Locatable; /** * Represents a general action related to keyboard input. */ public abstract class KeysRelatedAction extends BaseAction { protected final Keyboard keyboard; protected final Mouse mouse; protected KeysRelatedAction(Keyboard keyboard, Mouse mouse, Locatable locationProvider) { super(locationProvider); this.keyboard = keyboard; this.mouse = mouse; } protected void focusOnElement() { if (where != null) { mouse.click(where.getCoordinates()); } } } PK lC>ߓMooYorg/openqa/selenium/interactions/internal/.svn/text-base/MouseRelatedAction.java.svn-base// Copyright 2011 Google Inc. All Rights Reserved. package org.openqa.selenium.interactions.internal; import org.openqa.selenium.Mouse; import org.openqa.selenium.internal.Locatable; /** * Base class for all mouse-related actions. */ public class MouseRelatedAction extends BaseAction { protected final Mouse mouse; protected MouseRelatedAction(Mouse mouse, Locatable locationProvider) { super(locationProvider); this.mouse = mouse; } protected Coordinates getActionLocation() { if (where == null) { return null; } return where.getCoordinates(); } protected void moveToLocation() { // Only call mouseMove if an actual location was provided. If not, // the action will happen in the last known location of the mouse // cursor. if (getActionLocation() != null) { mouse.mouseMove(getActionLocation()); } } } PK lC>!99Vorg/openqa/selenium/interactions/internal/.svn/text-base/SingleKeyAction.java.svn-base/* Copyright 2007-2010 WebDriver committers Copyright 2007-2010 Google Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package org.openqa.selenium.interactions.internal; import org.openqa.selenium.*; import org.openqa.selenium.internal.Locatable; import org.openqa.selenium.interactions.internal.KeysRelatedAction; /** * Used both by KeyDownAction and KeyUpAction * */ public abstract class SingleKeyAction extends KeysRelatedAction { protected final Keys key; private static final Keys[] MODIFIER_KEYS = {Keys.SHIFT, Keys.CONTROL, Keys.ALT}; protected SingleKeyAction(Keyboard keyboard, Mouse mouse, Keys key) { this(keyboard, mouse, null, key); } protected SingleKeyAction(Keyboard keyboard, Mouse mouse, Locatable locationProvider, Keys key) { super(keyboard, mouse, locationProvider); this.key = key; boolean isModifier = false; for (Keys modifier : MODIFIER_KEYS) { isModifier = isModifier | modifier.equals(key); } if (!isModifier) { throw new IllegalArgumentException("Key Down / Up events only make sense for modifier keys."); } } } PK lC>dycc!com/thoughtworks/.svn/all-wcpropsK 25 svn:wc:ra_dav:version-url V 58 /svn/!svn/ver/11226/trunk/java/client/src/com/thoughtworks END PK lC>a com/thoughtworks/.svn/entries8 dir 11264 http://selenium.googlecode.com/svn/trunk/java/client/src/com/thoughtworks http://selenium.googlecode.com/svn 2011-02-01T13:59:17.176547Z 11226 simon.m.stewart svn:special svn:externals svn:needs-lock 07704840-8298-11de-bf8c-fd130f914ac9 selenium dir PK lC>Gcom/thoughtworks/.svn/format8 PK %^D>_  0org/openqa/selenium/lift/find/BaseFinder$1.class1G*org/openqa/selenium/lift/find/BaseFinder$1org/hamcrest/TypeSafeMatcherthis$0*Lorg/openqa/selenium/lift/find/BaseFinder;val$matcherListLjava/util/List;=(Lorg/openqa/selenium/lift/find/BaseFinder;Ljava/util/List;)VCode      ()VLineNumberTableLocalVariableTablethis,Lorg/openqa/selenium/lift/find/BaseFinder$1; matchesSafely(Ljava/lang/Object;)Z Signature(TS;)Z java/util/List  iterator()Ljava/util/Iterator; "$#java/util/Iterator %&next()Ljava/lang/Object;(org/hamcrest/Matcher '* +matches "- ./hasNext()ZitemLjava/lang/Object;matcherLorg/hamcrest/Matcher;LocalVariableTypeTableTS;Lorg/hamcrest/Matcher; describeTo(Lorg/hamcrest/Description;)V ': 78 descriptionLorg/hamcrest/Description; SourceFileBaseFinder.java#Lorg/hamcrest/TypeSafeMatcher;EnclosingMethodB(org/openqa/selenium/lift/find/BaseFinder DEallOf((Ljava/util/List;)Lorg/hamcrest/Matcher; InnerClasses   =*+ *,*  P  .*N-!'M,+)-,ST!U#S,X ..01 234.05 2678 (*N-!'M,+9-,\]\'_ ((;<234 26=>?@ACF PK %^D>0g* * .org/openqa/selenium/lift/find/BaseFinder.class1w(org/openqa/selenium/lift/find/BaseFinderjava/lang/Object$org/openqa/selenium/lift/find/FindermatchersLjava/util/List; Signature-Ljava/util/List;>;()VCode  java/util/ArrayList   LineNumberTableLocalVariableTablethis*Lorg/openqa/selenium/lift/find/BaseFinder;LocalVariableTypeTable2Lorg/openqa/selenium/lift/find/BaseFinder;findFrom*(Ljava/lang/Object;)Ljava/util/Collection; (TT;)Ljava/util/Collection;   extractFrom "$#java/util/List %&isEmpty()Z ( )* allMatching>(Ljava/util/List;Ljava/util/Collection;)Ljava/util/Collection;contextLjava/lang/Object;foundLjava/util/Collection;TT;Ljava/util/Collection;with>(Lorg/hamcrest/Matcher;)Lorg/openqa/selenium/lift/find/Finder;K(Lorg/hamcrest/Matcher;)Lorg/openqa/selenium/lift/find/Finder; "5 67add(Ljava/lang/Object;)ZmatcherLorg/hamcrest/Matcher;Lorg/hamcrest/Matcher; describeTo(Lorg/hamcrest/Description;)V > ?<describeTargetTo "A BCiterator()Ljava/util/Iterator; EGFjava/util/Iterator HInext()Ljava/lang/Object;Korg/hamcrest/MatcherM with OQPorg/hamcrest/Description RS appendText.(Ljava/lang/String;)Lorg/hamcrest/Description; JU ;< EW X&hasNext descriptionLorg/hamcrest/Description;Lorg/hamcrest/Matcher<*>;e(Ljava/util/List;>;Ljava/util/Collection;)Ljava/util/Collection; ^A_java/util/Collection a bcallOf((Ljava/util/List;)Lorg/hamcrest/Matcher; Je f7matches ^5itemstempitemTS;J(Ljava/util/List;>;)Lorg/hamcrest/Matcher;n*org/openqa/selenium/lift/find/BaseFinder$1 mp q=(Lorg/openqa/selenium/lift/find/BaseFinder;Ljava/util/List;)V matcherList SourceFileBaseFinder.javajLjava/lang/Object;Lorg/openqa/selenium/lift/find/Finder; InnerClasses!    T**Y#%#    *+M*!,**,')+,. +,-. +/-012 3 a *+4W* 3 4  89  8:;< :*+=*@N!-DJM,+LNW,+T-Vܱ89: ;)<099? ::YZ89:8[  ?<)* \ CYN,]:'D:*+`d -gWV-FGH.I7GAL4CCCh.;i.j,4CC Ch0;i0jkbc l Z mY*+oP  r  r st uv mPK %^D>Z.org/openqa/selenium/lift/find/LinkFinder.class11(org/openqa/selenium/lift/find/LinkFinder+org/openqa/selenium/lift/find/HtmlTagFinder()VCode  LineNumberTableLocalVariableTablethis*Lorg/openqa/selenium/lift/find/LinkFinder;tagName()Ljava/lang/String;atagDescriptionlink/()Lorg/openqa/selenium/lift/find/HtmlTagFinder;RuntimeVisibleAnnotationsLorg/hamcrest/Factory;  A(Ljava/lang/String;)Lorg/openqa/selenium/lift/find/HtmlTagFinder; org/hamcrest/Matchers equalTo*(Ljava/lang/Object;)Lorg/hamcrest/Matcher; !#"*org/openqa/selenium/lift/match/TextMatcher $%text.(Lorg/hamcrest/Matcher;)Lorg/hamcrest/Matcher; ' ()withE(Lorg/hamcrest/Matcher;)Lorg/openqa/selenium/lift/find/HtmlTagFinder;linkTextLjava/lang/String;links .  SourceFileLinkFinder.java!/*   - $  - )  (Y .  <Y* & 3 *+ ,$- 8 /0PK %^D>" /org/openqa/selenium/lift/find/InputFinder.class1H)org/openqa/selenium/lift/find/InputFinder+org/openqa/selenium/lift/find/HtmlTagFinder()VCode  LineNumberTableLocalVariableTablethis+Lorg/openqa/selenium/lift/find/InputFinder;tagDescription()Ljava/lang/String; input fieldtagNameinputtextbox/()Lorg/openqa/selenium/lift/find/HtmlTagFinder;RuntimeVisibleAnnotationsLorg/hamcrest/Factory;  typetext ! org/hamcrest/Matchers "#equalTo*(Ljava/lang/Object;)Lorg/hamcrest/Matcher; %'&!org/openqa/selenium/lift/Matchers () attribute@(Ljava/lang/String;Lorg/hamcrest/Matcher;)Lorg/hamcrest/Matcher; + ,-withE(Lorg/hamcrest/Matcher;)Lorg/openqa/selenium/lift/find/HtmlTagFinder; imageButton0imageA(Ljava/lang/String;)Lorg/openqa/selenium/lift/find/HtmlTagFinder; 3 . %5 6#value +labelLjava/lang/String; radioButton<radio > :@id submitButtonCsubmit E A SourceFileInputFinder.java! /*   - #  - (  5Y$* -  .5Y/$* 2  .15 2*47 7  89 :5Y;$* <  :1:=?*$7 A @9 A5YB$* F  A15 D*47 K  89FGPK %^D>?  /org/openqa/selenium/lift/find/TableFinder.class1)org/openqa/selenium/lift/find/TableFinder+org/openqa/selenium/lift/find/HtmlTagFinder()VCode  LineNumberTableLocalVariableTablethis+Lorg/openqa/selenium/lift/find/TableFinder;tagName()Ljava/lang/String;tabletagDescription/()Lorg/openqa/selenium/lift/find/HtmlTagFinder;RuntimeVisibleAnnotationsLorg/hamcrest/Factory;  tables   SourceFileTableFinder.java!/*   - !  - &  (Y +  $ 0 PK %^D>83org/openqa/selenium/lift/find/PageTitleFinder.class1.-org/openqa/selenium/lift/find/PageTitleFinder+org/openqa/selenium/lift/find/HtmlTagFinder()VCode  LineNumberTableLocalVariableTablethis/Lorg/openqa/selenium/lift/find/PageTitleFinder;tagName()Ljava/lang/String;titletagDescription page title/()Lorg/openqa/selenium/lift/find/HtmlTagFinder;RuntimeVisibleAnnotationsLorg/hamcrest/Factory;  A(Ljava/lang/String;)Lorg/openqa/selenium/lift/find/HtmlTagFinder; org/hamcrest/Matchers equalTo*(Ljava/lang/Object;)Lorg/hamcrest/Matcher; !#"*org/openqa/selenium/lift/match/TextMatcher $%text.(Lorg/hamcrest/Matcher;)Lorg/hamcrest/Matcher; ' ()withE(Lorg/hamcrest/Matcher;)Lorg/openqa/selenium/lift/find/HtmlTagFinder;Ljava/lang/String;titles SourceFilePageTitleFinder.java!/* "  - &  - +  (Y 0  <Y* & 5 * +(Y : ,-PK %^D>E}*org/openqa/selenium/lift/find/Finder.class1$org/openqa/selenium/lift/find/Finderjava/lang/Objectorg/hamcrest/SelfDescribingfindFrom*(Ljava/lang/Object;)Ljava/util/Collection; Signature (TT;)Ljava/util/Collection;with>(Lorg/hamcrest/Matcher;)Lorg/openqa/selenium/lift/find/Finder;K(Lorg/hamcrest/Matcher;)Lorg/openqa/selenium/lift/find/Finder; SourceFile Finder.javaYLjava/lang/Object;Lorg/hamcrest/SelfDescribing;      PK %^D>Dy/org/openqa/selenium/lift/find/XPathFinder.class16)org/openqa/selenium/lift/find/XPathFinder(org/openqa/selenium/lift/find/BaseFinderxpathLjava/lang/String;(Ljava/lang/String;)VCode   ()V  LineNumberTableLocalVariableTablethis+Lorg/openqa/selenium/lift/find/XPathFinder; extractFrom7(Lorg/openqa/selenium/WebDriver;)Ljava/util/Collection; SignatureY(Lorg/openqa/selenium/WebDriver;)Ljava/util/Collection; org/openqa/selenium/By ,(Ljava/lang/String;)Lorg/openqa/selenium/By; org/openqa/selenium/WebDriver ! findElements*(Lorg/openqa/selenium/By;)Ljava/util/List;contextLorg/openqa/selenium/WebDriver;describeTargetTo(Lorg/hamcrest/Description;)V'XPath )+*org/hamcrest/Description ,- appendText.(Ljava/lang/String;)Lorg/hamcrest/Description; descriptionLorg/hamcrest/Description;*(Ljava/lang/Object;)Ljava/util/Collection; 2  SourceFileXPathFinder.javakLorg/openqa/selenium/lift/find/BaseFinder;! F * *+ #$ %   B+* ("#$% Q+&(W+* (W, -../D0 ) *+1345PK %^D>o|b1org/openqa/selenium/lift/find/HtmlTagFinder.class1S+org/openqa/selenium/lift/find/HtmlTagFinder(org/openqa/selenium/lift/find/BaseFinder()VCode  LineNumberTableLocalVariableTablethis-Lorg/openqa/selenium/lift/find/HtmlTagFinder; extractFrom7(Lorg/openqa/selenium/WebDriver;)Ljava/util/Collection; SignatureY(Lorg/openqa/selenium/WebDriver;)Ljava/util/Collection;java/lang/StringBuilder//  (Ljava/lang/String;)V  tagName()Ljava/lang/String;   append-(Ljava/lang/String;)Ljava/lang/StringBuilder; " #toString %'&org/openqa/selenium/By ()xpath,(Ljava/lang/String;)Lorg/openqa/selenium/By; +-,org/openqa/selenium/WebDriver ./ findElements*(Lorg/openqa/selenium/By;)Ljava/util/List;contextLorg/openqa/selenium/WebDriver;describeTargetTo(Lorg/hamcrest/Description;)V 5 6tagDescription 8:9org/hamcrest/Description ;< appendText.(Ljava/lang/String;)Lorg/hamcrest/Description; descriptionLorg/hamcrest/Description;withE(Lorg/hamcrest/Matcher;)Lorg/openqa/selenium/lift/find/HtmlTagFinder;g(Lorg/hamcrest/Matcher;)Lorg/openqa/selenium/lift/find/HtmlTagFinder; C ?D>(Lorg/hamcrest/Matcher;)Lorg/openqa/selenium/lift/find/Finder;matcherLorg/hamcrest/Matcher;LocalVariableTypeTable8Lorg/hamcrest/Matcher;Jorg/hamcrest/Matcher L ?@*(Ljava/lang/Object;)Ljava/util/Collection; O  SourceFileHtmlTagFinder.javakLorg/openqa/selenium/lift/find/BaseFinder;!/* #  Q+Y*!$* &  0123D +*47W * +  =>?@AR*+BW* /0  EFG EH6A?D) *+IK  DM) *++N  PQRPK %^D>F-org/openqa/selenium/lift/find/DivFinder.class1/'org/openqa/selenium/lift/find/DivFinder+org/openqa/selenium/lift/find/HtmlTagFinder()VCode  LineNumberTableLocalVariableTablethis)Lorg/openqa/selenium/lift/find/DivFinder;tagDescription()Ljava/lang/String;divtagName/()Lorg/openqa/selenium/lift/find/HtmlTagFinder;RuntimeVisibleAnnotationsLorg/hamcrest/Factory;  A(Ljava/lang/String;)Lorg/openqa/selenium/lift/find/HtmlTagFinder;  id org/hamcrest/Matchers !equalTo*(Ljava/lang/Object;)Lorg/hamcrest/Matcher; #%$/org/openqa/selenium/lift/match/AttributeMatcher &' attribute@(Ljava/lang/String;Lorg/hamcrest/Matcher;)Lorg/hamcrest/Matcher; ) *+withE(Lorg/hamcrest/Matcher;)Lorg/openqa/selenium/lift/find/HtmlTagFinder;Ljava/lang/String; SourceFileDivFinder.java!/*   - "  - '  (Y ,  :*"( 0 ,-.PK %^D>/org/openqa/selenium/lift/find/ImageFinder.class1)org/openqa/selenium/lift/find/ImageFinder+org/openqa/selenium/lift/find/HtmlTagFinder()VCode  LineNumberTableLocalVariableTablethis+Lorg/openqa/selenium/lift/find/ImageFinder;tagDescription()Ljava/lang/String;imagetagNameimg/()Lorg/openqa/selenium/lift/find/HtmlTagFinder;RuntimeVisibleAnnotationsLorg/hamcrest/Factory;  images SourceFileImageFinder.java!/*   -   - $  (Y )  (Y . PK %^D>(**3org/openqa/selenium/lift/find/TableCellFinder.class1-org/openqa/selenium/lift/find/TableCellFinder+org/openqa/selenium/lift/find/HtmlTagFinder()VCode  LineNumberTableLocalVariableTablethis/Lorg/openqa/selenium/lift/find/TableCellFinder;tagName()Ljava/lang/String;tdtagDescription table cellcell/()Lorg/openqa/selenium/lift/find/HtmlTagFinder;RuntimeVisibleAnnotationsLorg/hamcrest/Factory;  cells   SourceFileTableCellFinder.java!/*   - !  - &  (Y +  $ 0 PK lC>.org/openqa/selenium/lift/find/.svn/all-wcpropsK 25 svn:wc:ra_dav:version-url V 71 /svn/!svn/ver/11224/trunk/java/client/src/org/openqa/selenium/lift/find END TableCellFinder.java K 25 svn:wc:ra_dav:version-url V 92 /svn/!svn/ver/11224/trunk/java/client/src/org/openqa/selenium/lift/find/TableCellFinder.java END TableFinder.java K 25 svn:wc:ra_dav:version-url V 88 /svn/!svn/ver/11224/trunk/java/client/src/org/openqa/selenium/lift/find/TableFinder.java END BaseFinder.java K 25 svn:wc:ra_dav:version-url V 87 /svn/!svn/ver/11224/trunk/java/client/src/org/openqa/selenium/lift/find/BaseFinder.java END LinkFinder.java K 25 svn:wc:ra_dav:version-url V 87 /svn/!svn/ver/11224/trunk/java/client/src/org/openqa/selenium/lift/find/LinkFinder.java END PageTitleFinder.java K 25 svn:wc:ra_dav:version-url V 92 /svn/!svn/ver/11224/trunk/java/client/src/org/openqa/selenium/lift/find/PageTitleFinder.java END InputFinder.java K 25 svn:wc:ra_dav:version-url V 88 /svn/!svn/ver/11224/trunk/java/client/src/org/openqa/selenium/lift/find/InputFinder.java END Finder.java K 25 svn:wc:ra_dav:version-url V 83 /svn/!svn/ver/11224/trunk/java/client/src/org/openqa/selenium/lift/find/Finder.java END HtmlTagFinder.java K 25 svn:wc:ra_dav:version-url V 90 /svn/!svn/ver/11224/trunk/java/client/src/org/openqa/selenium/lift/find/HtmlTagFinder.java END DivFinder.java K 25 svn:wc:ra_dav:version-url V 86 /svn/!svn/ver/11224/trunk/java/client/src/org/openqa/selenium/lift/find/DivFinder.java END ImageFinder.java K 25 svn:wc:ra_dav:version-url V 88 /svn/!svn/ver/11224/trunk/java/client/src/org/openqa/selenium/lift/find/ImageFinder.java END XPathFinder.java K 25 svn:wc:ra_dav:version-url V 88 /svn/!svn/ver/11224/trunk/java/client/src/org/openqa/selenium/lift/find/XPathFinder.java END PK lC>fDp*org/openqa/selenium/lift/find/.svn/entries8 dir 11264 http://selenium.googlecode.com/svn/trunk/java/client/src/org/openqa/selenium/lift/find http://selenium.googlecode.com/svn 2009-10-20T11:48:31.254806Z 7437 michael.tamm2 svn:special svn:externals svn:needs-lock 07704840-8298-11de-bf8c-fd130f914ac9 TableCellFinder.java file 2011-02-03T12:01:17.000000Z 5e980283c5ba063b3092f41ff6260c17 2009-01-05T15:17:38.587344Z 6031 simon.m.stewart TableFinder.java file 2011-02-03T12:01:17.000000Z 86b92fe44a7290b250fd8748980885cd 2009-01-05T15:17:38.587344Z 6031 simon.m.stewart BaseFinder.java file 2011-02-03T12:01:17.000000Z 8aa7ecab88abb200eab3279d0b2d6660 2009-03-24T17:04:27.143928Z 6446 rchatley@gmail.com LinkFinder.java file 2011-02-03T12:01:17.000000Z 693cbbec0b53c8e441538568d4fa1621 2009-01-05T15:17:38.587344Z 6031 simon.m.stewart PageTitleFinder.java file 2011-02-03T12:01:17.000000Z df11cf5c8fcb31671ebc4d0205afeed2 2009-01-05T15:17:38.587344Z 6031 simon.m.stewart InputFinder.java file 2011-02-03T12:01:17.000000Z 7ed7aaa4d43bba8fd66dcc1cc0fba7dd 2009-03-24T17:04:27.143928Z 6446 rchatley@gmail.com Finder.java file 2011-02-03T12:01:17.000000Z 548ef3a93244c0482860620d90212d82 2009-01-05T15:17:38.587344Z 6031 simon.m.stewart HtmlTagFinder.java file 2011-02-03T12:01:17.000000Z eb40e422f3d2d433160940c046a2f892 2009-03-24T17:04:27.143928Z 6446 rchatley@gmail.com DivFinder.java file 2011-02-03T12:01:17.000000Z 083d2f70e536e0e51cc22937a6ff3c94 2009-03-24T17:04:27.143928Z 6446 rchatley@gmail.com ImageFinder.java file 2011-02-03T12:01:17.000000Z 9ae2594544ecc04fb6204ffced3b2649 2009-01-05T15:17:38.587344Z 6031 simon.m.stewart XPathFinder.java file 2011-02-03T12:01:17.000000Z e0d62d676427df395ba340b4376a9950 2009-10-20T11:48:31.254806Z 7437 michael.tamm2 PK lC>G)org/openqa/selenium/lift/find/.svn/format8 PK lC>{sG  Eorg/openqa/selenium/lift/find/.svn/text-base/BaseFinder.java.svn-base/* Copyright 2007-2009 WebDriver committers Copyright 2007-2009 Google Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package org.openqa.selenium.lift.find; import java.util.ArrayList; import java.util.Collection; import java.util.List; import org.hamcrest.Description; import org.hamcrest.Matcher; import org.hamcrest.TypeSafeMatcher; /** * Base class for {@link Finder}s. These allow the creation of a specification * to be applied to objects of type T, to identify and return a Collection of * any contained objects of type S. * * @author rchatley (Robert Chatley) */ public abstract class BaseFinder implements Finder { protected List> matchers = new ArrayList>(); public Collection findFrom(T context) { Collection found = extractFrom(context); if (matchers.isEmpty()) { return found; } else { return allMatching(matchers, found); } } public Finder with(Matcher matcher) { this.matchers.add(matcher); return this; } public void describeTo(Description description) { describeTargetTo(description); for (Matcher matcher : matchers) { if (matcher != null) { description.appendText(" with "); matcher.describeTo(description); } } } protected abstract Collection extractFrom(T context); protected abstract void describeTargetTo(Description description); protected Collection allMatching(List> matchers, Collection items) { Collection temp = new ArrayList(); for (S item : items) { if (allOf(matchers).matches(item)) { temp.add(item); } } return temp; } private Matcher allOf(final List> matcherList) { return new TypeSafeMatcher() { @Override public boolean matchesSafely(S item) { for (Matcher matcher : matcherList) { if (!matcher.matches(item)) { return false; } } return true; } public void describeTo(Description description) { for (Matcher matcher : matcherList) { matcher.describeTo(description); } } }; } } PK lC>Dorg/openqa/selenium/lift/find/.svn/text-base/DivFinder.java.svn-base/* Copyright 2007-2009 WebDriver committers Copyright 2007-2009 Google Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package org.openqa.selenium.lift.find; import static org.hamcrest.Matchers.equalTo; import static org.openqa.selenium.lift.match.AttributeMatcher.attribute; import org.hamcrest.Factory; /** * {@link Finder} for HTML div tags. * @author rchatley (Robert Chatley) * */ public class DivFinder extends HtmlTagFinder { @Override protected String tagDescription() { return "div"; } @Override protected String tagName() { return "div"; } @Factory public static HtmlTagFinder div() { return new DivFinder(); } public static HtmlTagFinder div(String id) { return div().with(attribute("id", equalTo(id))); } } PK lC>"Aorg/openqa/selenium/lift/find/.svn/text-base/Finder.java.svn-base/* Copyright 2007-2009 WebDriver committers Copyright 2007-2009 Google Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ /** * */ package org.openqa.selenium.lift.find; import org.hamcrest.Matcher; import org.hamcrest.SelfDescribing; import java.util.Collection; /** * @author rchatley (Robert Chatley) */ public interface Finder extends SelfDescribing { Collection findFrom(T context); Finder with(Matcher textMatcher); }PK lC>ffHorg/openqa/selenium/lift/find/.svn/text-base/HtmlTagFinder.java.svn-base/* Copyright 2007-2009 WebDriver committers Copyright 2007-2009 Google Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package org.openqa.selenium.lift.find; import org.hamcrest.Description; import org.hamcrest.Matcher; import org.openqa.selenium.By; import org.openqa.selenium.WebDriver; import org.openqa.selenium.WebElement; import java.util.Collection; /** * Base {@link Finder} for all types of HTML tags. Subclasses should be created * for each specific tag, specifying the tag name (e.g. "a" in the case or an anchor * tag), and a description. * * @author rchatley (Robert Chatley) */ public abstract class HtmlTagFinder extends BaseFinder { protected Collection extractFrom(WebDriver context) { return context.findElements(By.xpath("//" + tagName())); } protected void describeTargetTo(Description description) { description.appendText(tagDescription()); } @Override // more specific return type public HtmlTagFinder with(Matcher matcher) { super.with(matcher); return this; } protected abstract String tagName(); protected abstract String tagDescription(); }PK lC>ZnUUForg/openqa/selenium/lift/find/.svn/text-base/ImageFinder.java.svn-base/* Copyright 2007-2009 WebDriver committers Copyright 2007-2009 Google Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package org.openqa.selenium.lift.find; import org.hamcrest.Factory; /** * {@link Finder} for HTML image tags. * @author rchatley (Robert Chatley) * */ public class ImageFinder extends HtmlTagFinder { @Override protected String tagDescription() { return "image"; } @Override protected String tagName() { return "img"; } @Factory public static HtmlTagFinder image() { return new ImageFinder(); } @Factory public static HtmlTagFinder images() { return new ImageFinder(); } } PK lC>j{Forg/openqa/selenium/lift/find/.svn/text-base/InputFinder.java.svn-base/* Copyright 2007-2009 WebDriver committers Copyright 2007-2009 Google Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package org.openqa.selenium.lift.find; import static org.hamcrest.Matchers.equalTo; import static org.openqa.selenium.lift.Matchers.attribute; import static org.openqa.selenium.lift.Matchers.value; import org.hamcrest.Factory; /** * {@link Finder} for HTML input tags. * @author rchatley (Robert Chatley) * */ public class InputFinder extends HtmlTagFinder { @Override protected String tagDescription() { return "input field"; } @Override protected String tagName() { return "input"; } @Factory public static HtmlTagFinder textbox() { return new InputFinder().with(attribute("type", equalTo("text"))); } @Factory public static HtmlTagFinder imageButton() { return new InputFinder().with(attribute("type", equalTo("image"))); } @Factory public static HtmlTagFinder imageButton(String label) { return imageButton().with(value((label))); } @Factory public static HtmlTagFinder radioButton() { return new InputFinder().with(attribute("type", equalTo("radio"))); } @Factory public static HtmlTagFinder radioButton(String id) { return radioButton().with(attribute("id", equalTo(id))); } @Factory public static HtmlTagFinder submitButton() { return new InputFinder().with(attribute("type", equalTo("submit"))); } @Factory public static HtmlTagFinder submitButton(String label) { return submitButton().with(value(label)); } } PK lC>QCGVVEorg/openqa/selenium/lift/find/.svn/text-base/LinkFinder.java.svn-base/* Copyright 2007-2009 WebDriver committers Copyright 2007-2009 Google Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package org.openqa.selenium.lift.find; /** * A {@link Finder} for HTML anchor tags, "links". * @author rchatley (Robert Chatley) * */ import org.hamcrest.Factory; import static org.hamcrest.Matchers.equalTo; import static org.openqa.selenium.lift.match.TextMatcher.text; public class LinkFinder extends HtmlTagFinder { private LinkFinder() {}; @Override protected String tagName() { return "a"; } @Override protected String tagDescription() { return "link"; } @Factory public static HtmlTagFinder link() { return new LinkFinder(); } @Factory public static HtmlTagFinder link(String linkText) { return new LinkFinder().with(text(equalTo(linkText))); } @Factory public static HtmlTagFinder links() { return link(); } }PK lC>nJorg/openqa/selenium/lift/find/.svn/text-base/PageTitleFinder.java.svn-base/* Copyright 2007-2009 WebDriver committers Copyright 2007-2009 Google Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ /** * A {@link Finder} for title tags. */ package org.openqa.selenium.lift.find; import org.hamcrest.Factory; import static org.hamcrest.Matchers.equalTo; import static org.openqa.selenium.lift.match.TextMatcher.text; /** * A {@link Finder} for HTML title tags. * @author rchatley (Robert Chatley) * */ public class PageTitleFinder extends HtmlTagFinder { private PageTitleFinder() {}; @Override protected String tagName() { return "title"; } @Override protected String tagDescription() { return "page title"; } @Factory public static HtmlTagFinder title() { return new PageTitleFinder(); } @Factory public static HtmlTagFinder title(String title) { return new PageTitleFinder().with(text(equalTo(title))); } @Factory public static HtmlTagFinder titles() { return new PageTitleFinder(); } }PK lC>@)Jorg/openqa/selenium/lift/find/.svn/text-base/TableCellFinder.java.svn-base/* Copyright 2007-2009 WebDriver committers Copyright 2007-2009 Google Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package org.openqa.selenium.lift.find; import org.hamcrest.Factory; /** * A {@link Finder} for HTML table cell "td" tags. * @author rchatley (Robert Chatley) * */ public class TableCellFinder extends HtmlTagFinder { private TableCellFinder() {}; @Override protected String tagName() { return "td"; } @Override protected String tagDescription() { return "table cell"; } @Factory public static HtmlTagFinder cell() { return new TableCellFinder(); } @Factory public static HtmlTagFinder cells() { return cell(); } }PK lC>{mmForg/openqa/selenium/lift/find/.svn/text-base/TableFinder.java.svn-base/* Copyright 2007-2009 WebDriver committers Copyright 2007-2009 Google Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package org.openqa.selenium.lift.find; import org.hamcrest.Factory; /** * A {@link Finder} for HTML table tags. * @author rchatley (Robert Chatley) * */ public class TableFinder extends HtmlTagFinder { private TableFinder() {}; @Override protected String tagName() { return "table"; } @Override protected String tagDescription() { return "table"; } @Factory public static HtmlTagFinder table() { return new TableFinder(); } @Factory public static HtmlTagFinder tables() { return table(); } }PK lC>YYForg/openqa/selenium/lift/find/.svn/text-base/XPathFinder.java.svn-base/* Copyright 2007-2009 WebDriver committers Copyright 2007-2009 Google Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package org.openqa.selenium.lift.find; import org.openqa.selenium.WebElement; import org.openqa.selenium.WebDriver; import org.openqa.selenium.By; import org.hamcrest.Description; import java.util.Collection; /** * A {@link Finder} for elements using XPath expressions * * @author James Strachan * @version $Revision: 1.1 $ */ public class XPathFinder extends BaseFinder { private final String xpath; public XPathFinder(String xpath) { this.xpath = xpath; } protected Collection extractFrom(WebDriver context) { return context.findElements(By.xpath(xpath)); } protected void describeTargetTo(Description description) { description.appendText("XPath "); description.appendText(xpath); } } PK %^D>望-org/openqa/selenium/html5/AppCacheEntry.class18'org/openqa/selenium/html5/AppCacheEntryjava/lang/Objecttype(Lorg/openqa/selenium/html5/AppCacheType;urlLjava/lang/String;mimeTypeO(Lorg/openqa/selenium/html5/AppCacheType;Ljava/lang/String;Ljava/lang/String;)VCode  ()V      LineNumberTableLocalVariableTablethis)Lorg/openqa/selenium/html5/AppCacheEntry;getType*()Lorg/openqa/selenium/html5/AppCacheType;getUrl()Ljava/lang/String; getMimeTypetoString!java/lang/StringBuilder#CacheEntry [mimeType= % &(Ljava/lang/String;)V ( )*append-(Ljava/lang/String;)Ljava/lang/StringBuilder;,, type= . )/-(Ljava/lang/Object;)Ljava/lang/StringBuilder;1, url=3] 5  SourceFileAppCacheEntry.java!   l* *+*,*-  *  /*)  /*2  /*;  c1 Y"$*'+'*-0'*'2'4EF-E 167PK %^D>GR.org/openqa/selenium/html5/AppCacheStatus.class1E(org/openqa/selenium/html5/AppCacheStatusjava/lang/EnumUNCACHED*Lorg/openqa/selenium/html5/AppCacheStatus;IDLECHECKING DOWNLOADING UPDATE_READYOBSOLETEvalueI ENUM$VALUES+[Lorg/openqa/selenium/html5/AppCacheStatus;()VCode  (Ljava/lang/String;II)V       "  %  (  * LineNumberTableLocalVariableTable . /(Ljava/lang/String;I)V 1 this()Ivalues-()[Lorg/openqa/selenium/html5/AppCacheStatus; 798java/lang/System :; arraycopy*(Ljava/lang/Object;ILjava/lang/Object;II)VvalueOf>(Ljava/lang/String;)Lorg/openqa/selenium/html5/AppCacheStatus; ? <@5(Ljava/lang/Class;Ljava/lang/String;)Ljava/lang/Enum; SourceFileAppCacheStatus.java Signature;@1@@@@ @ @  YYYY !Y#$Y&'YSYSYSY!SY$SY'S)+*8FT,H *+-*0+!" #, 2  3/*0+&, 2 456)YK*Y<YM6,+, <=* *>+,ABCDPK %^D>A0AA,org/openqa/selenium/html5/AppCacheType.class1=&org/openqa/selenium/html5/AppCacheTypejava/lang/EnumMASTER(Lorg/openqa/selenium/html5/AppCacheType;MANIFESTEXPLICITFALLBACKvalueI ENUM$VALUES)[Lorg/openqa/selenium/html5/AppCacheType;()VCode  (Ljava/lang/String;II)V         " LineNumberTableLocalVariableTable & '(Ljava/lang/String;I)V ) this()Ivalues+()[Lorg/openqa/selenium/html5/AppCacheType; /10java/lang/System 23 arraycopy*(Ljava/lang/Object;ILjava/lang/Object;II)VvalueOf<(Ljava/lang/String;)Lorg/openqa/selenium/html5/AppCacheType; 7 485(Ljava/lang/Class;Ljava/lang/String;)Ljava/lang/Enum; SourceFileAppCacheType.java Signature:Ljava/lang/Enum;@1@@@@   XYYYYYSYSYSYS!#*8$H *+%*(# !$ *  +/*(#$$ * ,-6!YK*Y<YM.,#$ 45* *6#$9:;cAA)org/openqa/selenium/html5/ResultSet.class1 #org/openqa/selenium/html5/ResultSetjava/lang/ObjectinsertIdI rowsAffectedrows)Lorg/openqa/selenium/html5/ResultSetRows;.(IILorg/openqa/selenium/html5/ResultSetRows;)VCode  ()V       LineNumberTableLocalVariableTablethis%Lorg/openqa/selenium/html5/ResultSet;getLastInsertedRowId()IgetNumberOfRowsAffected+()Lorg/openqa/selenium/html5/ResultSetRows; SourceFileResultSet.java!   l* ***-  !*  /*,  /*6  /*B PK %^D>ko,org/openqa/selenium/html5/LocalStorage.class1&org/openqa/selenium/html5/LocalStoragejava/lang/ObjectgetItem&(Ljava/lang/String;)Ljava/lang/String;keySet()Ljava/util/Set; Signature%()Ljava/util/Set;setItem'(Ljava/lang/String;Ljava/lang/String;)V removeItemclear()Vsize()I SourceFileLocalStorage.java    PK %^D>a>1(org/openqa/selenium/html5/Location.class1/"org/openqa/selenium/html5/Locationjava/lang/ObjectlatitudeD longitudealtitude(DDD)VCode  ()V      LineNumberTableLocalVariableTablethis$Lorg/openqa/selenium/html5/Location; getLatitude()D getLongitude getAltitudetoString()Ljava/lang/String; )Latitude: %s, Longitude: %s, Altitude: %s "$#java/lang/Double %&valueOf(D)Ljava/lang/Double; (*)java/lang/String +,format9(Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/String; SourceFile Location.java!  m* *'*)*  !* /*$  /*(  /*,  Z(Y*!SY*!SY*!S'01$0 (-.PK %^D>fS+/org/openqa/selenium/html5/LocationContext.class1 )org/openqa/selenium/html5/LocationContextjava/lang/Objectlocation&()Lorg/openqa/selenium/html5/Location; setLocation'(Lorg/openqa/selenium/html5/Location;)V SourceFileLocationContext.java  PK %^D>Ϸ*org/openqa/selenium/html5/WebStorage.class1 $org/openqa/selenium/html5/WebStoragejava/lang/ObjectgetLocalStorage*()Lorg/openqa/selenium/html5/LocalStorage;getSessionStorage,()Lorg/openqa/selenium/html5/SessionStorage; SourceFileWebStorage.java  PK %^D>d}1org/openqa/selenium/html5/BrowserConnection.class1+org/openqa/selenium/html5/BrowserConnectionjava/lang/ObjectisOnline()Z setOnline(Z)V Exceptions &org/openqa/selenium/WebDriverException SourceFileBrowserConnection.java    PK %^D>UE>-org/openqa/selenium/html5/ResultSetRows.class1*'org/openqa/selenium/html5/ResultSetRowsjava/lang/ObjectrowsLjava/util/List; SignatureGLjava/util/List;>;(Ljava/util/List;)VJ(Ljava/util/List;>;)VCode  ()V  LineNumberTableLocalVariableTablethis)Lorg/openqa/selenium/html5/ResultSetRows;LocalVariableTypeTableitem(I)Ljava/util/Map;8(I)Ljava/util/Map; java/util/List get(I)Ljava/lang/Object;! java/util/MapindexIsize()I ' $% SourceFileResultSetRows.java!  X * *+      B* '"#$% 4 *&0  ()PK %^D>y.org/openqa/selenium/html5/SessionStorage.class1(org/openqa/selenium/html5/SessionStoragejava/lang/ObjectgetItem&(Ljava/lang/String;)Ljava/lang/String;keySet()Ljava/util/Set; Signature%()Ljava/util/Set;setItem'(Ljava/lang/String;Ljava/lang/String;)V removeItemclear()Vsize()I SourceFileSessionStorage.java    PK %^D>7뇛0org/openqa/selenium/html5/ApplicationCache.class1*org/openqa/selenium/html5/ApplicationCachejava/lang/Object getAppCache()Ljava/util/List; Exceptions &org/openqa/selenium/WebDriverException Signature=()Ljava/util/List; getStatus,()Lorg/openqa/selenium/html5/AppCacheStatus; SourceFileApplicationCache.java   PK %^D>\BB/org/openqa/selenium/html5/DatabaseStorage.class1 )org/openqa/selenium/html5/DatabaseStoragejava/lang/Object executeSQL^(Ljava/lang/String;Ljava/lang/String;[Ljava/lang/Object;)Lorg/openqa/selenium/html5/ResultSet; Exceptions &org/openqa/selenium/WebDriverException SourceFileDatabaseStorage.java  PK lC>Z*org/openqa/selenium/html5/.svn/all-wcpropsK 25 svn:wc:ra_dav:version-url V 67 /svn/!svn/ver/11226/trunk/java/client/src/org/openqa/selenium/html5 END LocalStorage.java K 25 svn:wc:ra_dav:version-url V 85 /svn/!svn/ver/11226/trunk/java/client/src/org/openqa/selenium/html5/LocalStorage.java END WebStorage.java K 25 svn:wc:ra_dav:version-url V 83 /svn/!svn/ver/11226/trunk/java/client/src/org/openqa/selenium/html5/WebStorage.java END BrowserConnection.java K 25 svn:wc:ra_dav:version-url V 90 /svn/!svn/ver/11226/trunk/java/client/src/org/openqa/selenium/html5/BrowserConnection.java END ResultSetRows.java K 25 svn:wc:ra_dav:version-url V 86 /svn/!svn/ver/11226/trunk/java/client/src/org/openqa/selenium/html5/ResultSetRows.java END AppCacheType.java K 25 svn:wc:ra_dav:version-url V 85 /svn/!svn/ver/11226/trunk/java/client/src/org/openqa/selenium/html5/AppCacheType.java END AppCacheEntry.java K 25 svn:wc:ra_dav:version-url V 86 /svn/!svn/ver/11226/trunk/java/client/src/org/openqa/selenium/html5/AppCacheEntry.java END ApplicationCache.java K 25 svn:wc:ra_dav:version-url V 89 /svn/!svn/ver/11226/trunk/java/client/src/org/openqa/selenium/html5/ApplicationCache.java END SessionStorage.java K 25 svn:wc:ra_dav:version-url V 87 /svn/!svn/ver/11226/trunk/java/client/src/org/openqa/selenium/html5/SessionStorage.java END AppCacheStatus.java K 25 svn:wc:ra_dav:version-url V 87 /svn/!svn/ver/11226/trunk/java/client/src/org/openqa/selenium/html5/AppCacheStatus.java END Location.java K 25 svn:wc:ra_dav:version-url V 81 /svn/!svn/ver/11226/trunk/java/client/src/org/openqa/selenium/html5/Location.java END DatabaseStorage.java K 25 svn:wc:ra_dav:version-url V 88 /svn/!svn/ver/11226/trunk/java/client/src/org/openqa/selenium/html5/DatabaseStorage.java END ResultSet.java K 25 svn:wc:ra_dav:version-url V 82 /svn/!svn/ver/11226/trunk/java/client/src/org/openqa/selenium/html5/ResultSet.java END LocationContext.java K 25 svn:wc:ra_dav:version-url V 88 /svn/!svn/ver/11226/trunk/java/client/src/org/openqa/selenium/html5/LocationContext.java END PK lC>Z&org/openqa/selenium/html5/.svn/entries8 dir 11264 http://selenium.googlecode.com/svn/trunk/java/client/src/org/openqa/selenium/html5 http://selenium.googlecode.com/svn 2011-02-01T13:59:17.176547Z 11226 simon.m.stewart svn:special svn:externals svn:needs-lock 07704840-8298-11de-bf8c-fd130f914ac9 LocalStorage.java file 2011-02-03T12:01:17.000000Z 58f369d8d2f7a0d85fff9bb16ba5deb5 2010-06-09T20:57:24.739603Z 9114 jmleyba WebStorage.java file 2011-02-03T12:01:17.000000Z c5be75e270b6b350e708730ce41d23da 2010-06-09T20:57:24.739603Z 9114 jmleyba BrowserConnection.java file 2011-02-03T12:01:17.000000Z 53b9ba37e98344d9189442a397028c1c 2010-05-05T10:23:25.567517Z 8814 eran.mes ResultSetRows.java file 2011-02-03T12:01:17.000000Z 1e96bbfba32ffaa4eb8ed94c78611eec 2010-05-05T10:23:25.567517Z 8814 eran.mes AppCacheType.java file 2011-02-03T12:01:17.000000Z dd98dea4faa827e6fd20e2139484d8e4 2010-05-05T10:23:25.567517Z 8814 eran.mes AppCacheEntry.java file 2011-02-03T12:01:17.000000Z 05d2786e668b3b08bf384b17f8e904f0 2010-05-05T10:23:25.567517Z 8814 eran.mes ApplicationCache.java file 2011-02-03T12:01:17.000000Z bc01eefa2efce165dbc258777685ac16 2010-05-21T18:20:31.047813Z 8963 simon.m.stewart SessionStorage.java file 2011-02-03T12:01:17.000000Z dd5de2df85210bffb138dae6daa7a82a 2010-06-09T20:57:24.739603Z 9114 jmleyba AppCacheStatus.java file 2011-02-03T12:01:17.000000Z d778fefbdb4f2fd6a4e93704153ff6ff 2010-05-05T10:23:25.567517Z 8814 eran.mes Location.java file 2011-02-03T12:01:17.000000Z 8989c3aae86722c75b567db46833fe90 2010-05-21T18:20:31.047813Z 8963 simon.m.stewart DatabaseStorage.java file 2011-02-03T12:01:17.000000Z 9795417aac3d68d88fda223f3ee91573 2010-05-05T10:23:25.567517Z 8814 eran.mes ResultSet.java file 2011-02-03T12:01:17.000000Z 408132c7dfd0e84a200068c874e69caa 2010-05-05T10:23:25.567517Z 8814 eran.mes LocationContext.java file 2011-02-03T12:01:17.000000Z e12bbe3d610a431bfc346656bfa5cf64 2010-05-05T10:23:25.567517Z 8814 eran.mes PK lC>G%org/openqa/selenium/html5/.svn/format8 PK lC> >>Dorg/openqa/selenium/html5/.svn/text-base/AppCacheEntry.java.svn-base/* Copyright 2007-2010 WebDriver committers Copyright 2007-2010 Google Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package org.openqa.selenium.html5; /** * Represents a cache resource in the application cache. */ public class AppCacheEntry { private final AppCacheType type; private final String url; private final String mimeType; public AppCacheEntry(AppCacheType type, String url, String mimeType) { this.type = type; this.url = url; this.mimeType = mimeType; } /** * Gets the cache type, which can be any of the resource types listed in * {@link AppCacheType} * * @return {@link AppCacheType} */ public AppCacheType getType() { return type; } /** * Gets a String representation of the URL which identifies the cache resource. * * @return The URL of the cache resource */ public String getUrl() { return url; } /** * Gets String representation of the Mime type the cache resource is labeled with. * * @return Mime type of the cache resource */ public String getMimeType() { return mimeType; } /** * Gets a human readable String representation of the cache entry. * * @return A human readable String. */ @Override public String toString() { return "CacheEntry [mimeType=" + mimeType + ", type=" + type + ", url=" + url + "]"; } } PK lC>{-Eorg/openqa/selenium/html5/.svn/text-base/AppCacheStatus.java.svn-base/* Copyright 2007-2010 WebDriver committers Copyright 2007-2010 Google Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package org.openqa.selenium.html5; /** * Represents the application cache status. */ public enum AppCacheStatus { UNCACHED(0), IDLE(1), CHECKING(2), DOWNLOADING(3), UPDATE_READY(4), OBSOLETE(5); private final int value; private AppCacheStatus(int value) { this.value = value; } public int value() { return value; } } PK lC>WCorg/openqa/selenium/html5/.svn/text-base/AppCacheType.java.svn-base/* Copyright 2007-2010 WebDriver committers Copyright 2007-2010 Google Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package org.openqa.selenium.html5; /** * Represents cache types for application cache entries. */ public enum AppCacheType { MASTER(0), MANIFEST(1), EXPLICIT(2), FALLBACK(3); private final int value; private AppCacheType(int value) { this.value = value; } public int value() { return value; } } PK lC>IQQGorg/openqa/selenium/html5/.svn/text-base/ApplicationCache.java.svn-base/* Copyright 2007-2010 WebDriver committers Copyright 2007-2010 Google Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package org.openqa.selenium.html5; import org.openqa.selenium.WebDriverException; import java.util.List; public interface ApplicationCache { /** * Gets the list of cache entries on the application cache. * * @return a list of {@link AppCacheEntry} * @throws WebDriverException */ List getAppCache() throws WebDriverException; /** * The current state of the application cache. * * @return {@link AppCacheStatus} */ AppCacheStatus getStatus(); } PK lC>''Horg/openqa/selenium/html5/.svn/text-base/BrowserConnection.java.svn-base/* Copyright 2007-2010 WebDriver committers Copyright 2007-2010 Google Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package org.openqa.selenium.html5; import org.openqa.selenium.WebDriverException; /** * Represents the connection state of the application. */ public interface BrowserConnection { /** * @return true if the application is online, false otherwise */ boolean isOnline(); /** * Changes the application online state. * * @param online A boolean representing the state */ void setOnline(boolean online) throws WebDriverException; } PK lC>&Forg/openqa/selenium/html5/.svn/text-base/DatabaseStorage.java.svn-base/* Copyright 2007-2010 WebDriver committers Copyright 2007-2010 Google Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package org.openqa.selenium.html5; import org.openqa.selenium.WebDriverException; import org.openqa.selenium.html5.ResultSet; public interface DatabaseStorage { /** * Executes an SQL statement on the given database name. * * @param databaseName The database name * @param query The SQL query * @param args Optional arguments to the SQL query * @return A {@link ResultSet} containing the result of the executed query * @throws WebDriverException */ ResultSet executeSQL(String databaseName, String query, Object... args) throws WebDriverException; } PK lC>[Corg/openqa/selenium/html5/.svn/text-base/LocalStorage.java.svn-base/* Copyright 2010 WebDriver committers Copyright 2010 Google Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package org.openqa.selenium.html5; import java.util.Set; /** * Represents the local storage for the site currently opened in the browser. * Each site has its own separate storage area. */ public interface LocalStorage { String getItem(String key); Set keySet(); void setItem(String key, String value); String removeItem(String key); void clear(); int size(); } PK lC>'nD'((?org/openqa/selenium/html5/.svn/text-base/Location.java.svn-base/* Copyright 2007-2010 WebDriver committers Copyright 2007-2010 Google Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package org.openqa.selenium.html5; /** * Represents the physical location of the browser. */ public class Location { private final double latitude; private final double longitude; private final double altitude; public Location(double latitude, double longitude, double altitude) { this.latitude = latitude; this.longitude = longitude; this.altitude = altitude; } public double getLatitude() { return latitude; } public double getLongitude() { return longitude; } public double getAltitude() { return altitude; } public String toString() { return String.format("Latitude: %s, Longitude: %s, Altitude: %s", latitude, longitude, altitude); } } PK lC>I<&&Forg/openqa/selenium/html5/.svn/text-base/LocationContext.java.svn-base/* Copyright 2007-2010 WebDriver committers Copyright 2007-2010 Google Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package org.openqa.selenium.html5; public interface LocationContext { /** * Gets the physical location of the browser. * * @return A {@link Location} containing the location information. Returns null * if the location is not available */ Location location(); /** * Sets the physical location. * * @param location A {@link Location} containing the new location information */ void setLocation(Location location); } PK lC>qm@org/openqa/selenium/html5/.svn/text-base/ResultSet.java.svn-base/* Copyright 2007-2010 WebDriver committers Copyright 2007-2010 Google Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package org.openqa.selenium.html5; /** * Represents database result set for SQL transactions and queries. */ public class ResultSet { private final int insertId; private final int rowsAffected; private final ResultSetRows rows; public ResultSet(int insertId, int rowsAffected, ResultSetRows rows) { this.insertId = insertId; this.rowsAffected = rowsAffected; this.rows = rows; } /** * Gets the row ID of the inserted row if the statement inserted a row. If multiple * rows were inserted, this returns the row ID of the last row inserted. If the * statement did not insert a row this returns -1. * * @return An integer representing the index of the last row inserted if any, * returns -1 otherwise */ public int getLastInsertedRowId() { return insertId; } /** * Gets the number of rows that were changed by the SQL statement. If the statement * did not affect any rows then this returns zero. * * @return an integer representing the number of rows changed */ public int getNumberOfRowsAffected() { return rowsAffected; } /** * Returns the rows returned by the statement executed in the order returned by the * database. If no rows were returned then the returned object will be empty. * * @return A {@link ResultSetRows} containing the database results as returned * by the database. Returns am empty {@link ResultSetRows} if no results were * returned (i.e. ResultSetRowList.size() = 0) */ public ResultSetRows rows() { return rows; } } PK lC>N{Dorg/openqa/selenium/html5/.svn/text-base/ResultSetRows.java.svn-base/* Copyright 2007-2010 WebDriver committers Copyright 2007-2010 Google Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package org.openqa.selenium.html5; import java.util.List; import java.util.Map; public class ResultSetRows { private final List> rows; public ResultSetRows(List> rows) { this.rows = rows; } /** * Returns the row at the given index. The Map represents a * mapping between the column and the value of the cell as returned by the database. * * @param index * @return A Map representing the row at the given index. * If there is no such row, this returns null */ public Map item(int index) { return rows.get(index); } /** * The number of rows returned by the database. * * @return An integer representing the number of rows contained in the {@link ResultSetRows} */ public int size() { return rows.size(); } } PK lC>֞Eorg/openqa/selenium/html5/.svn/text-base/SessionStorage.java.svn-base/* Copyright 2010 WebDriver committers Copyright 2010 Google Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package org.openqa.selenium.html5; import java.util.Set; /** * Represents the session storage in the browser for the site currently opened * in the browser. The session storage areas is specific to the current top * level browsing context. Each context has a unique set of session storage, * one for each origin. Sites can add data to the session storage and * it will be accessible to any page from the same site opened in that window. */ public interface SessionStorage { String getItem(String key); Set keySet(); void setItem(String key, String value); String removeItem(String key); void clear(); int size(); } PK lC>udAorg/openqa/selenium/html5/.svn/text-base/WebStorage.java.svn-base/* Copyright 2010 WebDriver committers Copyright 2010 Google Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package org.openqa.selenium.html5; public interface WebStorage { LocalStorage getLocalStorage(); SessionStorage getSessionStorage(); } PK %^D>8^{{Horg/openqa/selenium/browserlaunchers/locators/SingleBrowserLocator.class1Borg/openqa/selenium/browserlaunchers/locators/SingleBrowserLocatorjava/lang/Object()VCode )org/openqa/selenium/internal/TraceFactory getTrace7(Ljava/lang/Class;)Lorg/openqa/selenium/internal/Trace;  LineNumberTableLocalVariableTable   thisDLorg/openqa/selenium/browserlaunchers/locators/SingleBrowserLocator;findBrowserLocationOrFailE()Lorg/openqa/selenium/browserlaunchers/locators/BrowserInstallation;  findBrowserLocation!java/lang/RuntimeException # $%"couldNotFindAnyInstallationMessage()Ljava/lang/String; ' ((Ljava/lang/String;)VlocationCLorg/openqa/selenium/browserlaunchers/locators/BrowserInstallation;,java/lang/StringBuilder. Discovering +' 1 2% browserName +4 56append-(Ljava/lang/String;)Ljava/lang/StringBuilder;8... +: ;%toString =?>"org/openqa/selenium/internal/Trace @(debug B CfindAtADefaultLocation E F findInPath defaultPathstandardlauncherFilenames()[Ljava/lang/String;seleniumBrowserNamebrowserPathOverridePropertyNameusualLauncherLocations N HI P QRfindFileInPathW(Ljava/lang/String;)Lorg/openqa/selenium/browserlaunchers/locators/BrowserInstallation;launcherFilenameLjava/lang/String; launcherPath W XbrowserDefaultPath Z K% \^]java/lang/System _` getProperty&(Ljava/lang/String;)Ljava/lang/String; b cRretrieveValidInstallationPath e LI g chi(Ljava/lang/String;Ljava/lang/String;)Lorg/openqa/selenium/browserlaunchers/locators/BrowserInstallation;userProvidedDefaultPathfileNamevalidInstallationPath mon"org/openqa/selenium/os/CommandLine p`findExecutable rtsjava/lang/String uvvalueOf&(Ljava/lang/Object;)Ljava/lang/String;x! could not be found in the path! z%Please add the directory containing ' | }%humanFriendlyLauncherFileNames' to your PATH environment *variable, or explicitly specify a path to  like this: *  J%  %fakeLauncherPath #org/openqa/selenium/os/WindowsUtils  thisIsWindows()Zc:\blah\ /blah/blah/'java/lang/StringBuffer  5,(Ljava/lang/String;)Ljava/lang/StringBuffer; or  lastIndexOf(Ljava/lang/String;)I  substring(II)Ljava/lang/String; fileNames[Ljava/lang/String;bufferLjava/lang/StringBuffer;filename java/io/File '(Ljava/lang/String;Ljava/lang/String;)V  cS(Ljava/io/File;)Lorg/openqa/selenium/browserlaunchers/locators/BrowserInstallation;dirname 'launcherChecking whether  launcher at :' + 5-(Ljava/lang/Object;)Ljava/lang/StringBuilder; ' is valid... exists 2org/openqa/selenium/browserlaunchers/LauncherUtils  isScriptFile(Ljava/io/File;)Z Caution: ' %getAbsolutePathm': file is a script file, not a real executable. The browser environment is no longer fully under RC control = (warnDiscovered valid  launcher : 'Aorg/openqa/selenium/browserlaunchers/locators/BrowserInstallation  computeLibraryPath"(Ljava/io/File;)Ljava/lang/String; Ljava/io/File; m %getLibraryPathPropertyName loadEnvironment()Ljava/util/Properties; ^java/util/Properties T pathSeparator % getParentlibraryPathEnvironmentVariablecurrentLibraryPath SourceFileSingleBrowserLocator.java!  -     /*  W*L+ Y*"&+ )* t0+Y-/*03739<*AL++*D !%")#+&0% G*2%HIJ%K%LIF ~,*MY:>=2L*+O:0345"0*8 ,STU*C /*V< X  c*Y[L+ *+a*dY:6>=2M*MY: 66 2:*,f:   . CD EH&I=LFMKNNIXHaS4c[iT&2)T=jTFk* QR = *+laW  jT$% L+Y*0q/w3y3*{3~33*0333*3*39[\$]5^H[ L% d2+Y/*M239+Y/*M239bce 2}% s*ML+++Y/+2339YM+Y:66#2N,-W,W,,. lm n op+s3tFuVv]tgy*sn3@FTch L*Y+,} TjTcR O+*Y+Tc ++Y/*033+39<+š+ř#+Y˷/+Ͷ3ж39+Yշ/*03׶3+39<Y+*+۷߰& /68?_ 0M,N+Y-q/3+39 *00U $TTPK %^D>tGorg/openqa/selenium/browserlaunchers/locators/GoogleChromeLocator.class1HAorg/openqa/selenium/browserlaunchers/locators/GoogleChromeLocatorBorg/openqa/selenium/browserlaunchers/locators/SingleBrowserLocator()VCode  LineNumberTableLocalVariableTablethisCLorg/openqa/selenium/browserlaunchers/locators/GoogleChromeLocator; browserName()Ljava/lang/String; Google ChromeseleniumBrowserName googlechromestandardlauncherFilenames()[Ljava/lang/String;java/lang/String chrome.exe google-chromebrowserPathOverridePropertyNamegoogleChromeDefaultPathusualLauncherLocations "$##org/openqa/selenium/os/WindowsUtils %& thisIsWindows()Z ( )usualWindowsLauncherLocations + ,usualUnixLauncherLocations.java/lang/StringBuilder "0 1getLocalAppDataPath 3 45valueOf&(Ljava/lang/Object;)Ljava/lang/String; -7 8(Ljava/lang/String;)V:\Google\Chrome\Application -< =>append-(Ljava/lang/String;)Ljava/lang/StringBuilder; -@ AtoStringC/usr/binE./Applications/Google Chrome.app/Contents/MacOS SourceFileGoogleChromeLocator.java!/*   -   - !  >YSYSYS %  - )   D! *'** - .-  )OY-Y/269;?S 9:9  ,EYBSYDS DE FD  FGPK %^D>ke Corg/openqa/selenium/browserlaunchers/locators/Firefox2Locator.class1=org/openqa/selenium/browserlaunchers/locators/Firefox2Locator()VCode java/lang/String*/Applications/Firefox-2.app/Contents/MacOS(/Applications/Firefox.app/Contents/MacOS/usr/lib/firefox  java/lang/StringBuilder #org/openqa/selenium/os/WindowsUtils getProgramFilesPath()Ljava/lang/String;   valueOf&(Ljava/lang/Object;)Ljava/lang/String; " #$(Ljava/lang/String;)V&\Mozilla Firefox ( )*append-(Ljava/lang/String;)Ljava/lang/StringBuilder; , -toString/\Firefox1 \Firefox-2 3 LineNumberTableLocalVariableTable 7 # this?Lorg/openqa/selenium/browserlaunchers/locators/Firefox2Locator; browserName< Firefox 2seleniumBrowserName? *firefox2standardlauncherFilenames()[Ljava/lang/String; C DE thisIsWindows()ZG firefox.exeI firefox-binusualLauncherLocationsrunningOnWindows MONorg/openqa/selenium/Platform PQ getCurrent ()Lorg/openqa/selenium/Platform; MS TUWINDOWSLorg/openqa/selenium/Platform; MW XYis!(Lorg/openqa/selenium/Platform;)ZcomputeLibraryPath"(Ljava/io/File;)Ljava/lang/String; ] KE_ 7 bdc"org/openqa/selenium/os/CommandLine egetLibraryPathPropertyName gihjava/lang/System jkgetenv&(Ljava/lang/String;)Ljava/lang/String; Mm nUMAC Mp qrgetMinorVersion()I tvu java/io/File w getParent ty z{ pathSeparatorLjava/lang/String; } )~3(Ljava/lang/CharSequence;)Ljava/lang/StringBuilder; launcherPathLjava/io/File; libraryPathLjava/lang/StringBuilder;libraryPropertyNameexistingLibraryPath SourceFileFirefox2Locator.java!  f Y SYSYS YY!%'+SYY!.'+SYY!0'+S24.  4Lbe 5#  /*64 5 89: -;45 89= ->4 5 89@A LB  YFS YHS4$%'5 89JA :B 24,5 89KE 4 LRV405  89Z[ T*\^Y`MaN-f:LlVLo ,'W,+s'x',|W,+4& 56 9:<>2?<AOD54T89TB>{8{PK %^D>`{‰Borg/openqa/selenium/browserlaunchers/locators/BrowserLocator.class1 F|YYAorg/openqa/selenium/browserlaunchers/locators/SafariLocator.class1F;org/openqa/selenium/browserlaunchers/locators/SafariLocatorBorg/openqa/selenium/browserlaunchers/locators/SingleBrowserLocatorUSUAL_UNIX_LAUNCHER_LOCATIONS[Ljava/lang/String; USUAL_WINDOWS_LAUNCHER_LOCATIONS()VCode java/lang/String'/Applications/Safari.app/Contents/MacOS  java/lang/StringBuilder #org/openqa/selenium/os/WindowsUtils getProgramFilesPath()Ljava/lang/String;  valueOf&(Ljava/lang/Object;)Ljava/lang/String;   (Ljava/lang/String;)V"\Safari $ %&append-(Ljava/lang/String;)Ljava/lang/StringBuilder; ( )toString + LineNumberTableLocalVariableTable /  this=Lorg/openqa/selenium/browserlaunchers/locators/SafariLocator; browserName4SafariseleniumBrowserName7safaristandardlauncherFilenames()[Ljava/lang/String; ; <= thisIsWindows()Z? Safari.exebrowserPathOverridePropertyNameBSafariDefaultPathusualLauncherLocations SourceFileSafariLocator.java!  d, Y S YY!#'S*,  (+ -  /*., - 012 -3,- 015 -6,- 0189 L:  Y>S Y3S,- 01@ -A,$- 01C9 :: *,(- 01DEPK %^D>b[Eorg/openqa/selenium/browserlaunchers/locators/Firefox3Locator$1.class1,?org/openqa/selenium/browserlaunchers/locators/Firefox3Locator$1java/lang/Objectjava/io/FilenameFilterthis$0?Lorg/openqa/selenium/browserlaunchers/locators/Firefox3Locator;B(Lorg/openqa/selenium/browserlaunchers/locators/Firefox3Locator;)VCode    ()VLineNumberTableLocalVariableTablethisALorg/openqa/selenium/browserlaunchers/locators/Firefox3Locator$1;accept#(Ljava/io/File;Ljava/lang/String;)Zfirefox- java/lang/String  startsWith(Ljava/lang/String;)ZdirLjava/io/File;nameLjava/lang/String; SourceFileFirefox3Locator.javaEnclosingMethod'=org/openqa/selenium/browserlaunchers/locators/Firefox3Locator )*firefoxDefaultLocationsOnUbuntu()[Ljava/lang/String; InnerClasses   8 *+ * U   E,W  !"#$%&(+ PK %^D>|LT Corg/openqa/selenium/browserlaunchers/locators/Firefox3Locator.class1=org/openqa/selenium/browserlaunchers/locators/Firefox3Locator()VCodejava/lang/String*/Applications/Firefox-3.app/Contents/MacOS(/Applications/Firefox.app/Contents/MacOS  java/lang/StringBuilder #org/openqa/selenium/os/WindowsUtils  getProgramFilesPath()Ljava/lang/String; " #$valueOf&(Ljava/lang/Object;)Ljava/lang/String; & '((Ljava/lang/String;)V* \Firefox-3 , -.append-(Ljava/lang/String;)Ljava/lang/StringBuilder; 0 1 toString3\Mozilla Firefox5\Firefox 7 LineNumberTableLocalVariableTable ; 'this?Lorg/openqa/selenium/browserlaunchers/locators/Firefox3Locator; browserName@ Firefox 3seleniumBrowserNameCfirefox3standardlauncherFilenames()[Ljava/lang/String; G HIrunningOnWindows()ZK firefox.exeM firefox-binOfirefox Q S TEusualUnixLauncherLocations V WEfirefoxDefaultLocationsOnUbuntuY /usr/lib/ubuntuLocationsubuntoLocationPathsiI_ java/io/File ^& ^b cIexists ^e fI isDirectoryh?org/openqa/selenium/browserlaunchers/locators/Firefox3Locator$1 gj 'kB(Lorg/openqa/selenium/browserlaunchers/locators/Firefox3Locator;)V ^m nolist-(Ljava/io/FilenameFilter;)[Ljava/lang/String;dirLjava/io/File; sutorg/openqa/selenium/Platform vw getCurrent ()Lorg/openqa/selenium/Platform; sy z{WINDOWSLorg/openqa/selenium/Platform; s} ~is!(Lorg/openqa/selenium/Platform;)ZcomputeLibraryPath"(Ljava/io/File;)Ljava/lang/String; ; "org/openqa/selenium/os/CommandLine getLibraryPathPropertyName java/lang/System getenv&(Ljava/lang/String;)Ljava/lang/String; s {MAC s getMinorVersion()I ^  getParent ^  pathSeparator  -3(Ljava/lang/CharSequence;)Ljava/lang/StringBuilder; launcherPath libraryPathLjava/lang/StringBuilder;libraryPropertyNameexistingLibraryPath SourceFileFirefox3Locator.java InnerClasses!   aYSYSYY!%)+/SYY!%2+/SYY!%4+/S68*  /G]`9'/*:89 <=> -?8"9 <=A -B8&9 <=DER *F YJSYLSYNS8*+-9  <=$ ES!*P**F 6*RP*P82369 !<=TE9*UL++M>,YX%+2+/S+,8"=> ?BCD.C7F9*9<=4Z %[ !\]WEj*^Y`L+a+d+gY*il8P RSU9*<= pqHI4 rx|8]9  <=T*FYMN-:r|r ,+W,+++,W,/8& bc fgik2l<nOq94T<=TqB>8 gPK %^D>".nnForg/openqa/selenium/browserlaunchers/locators/Firefox2or3Locator.class1G@org/openqa/selenium/browserlaunchers/locators/Firefox2or3Locatorjava/lang/Object()VCode )org/openqa/selenium/internal/TraceFactory getTrace7(Ljava/lang/Class;)Lorg/openqa/selenium/internal/Trace;  LineNumberTableLocalVariableTable   thisBLorg/openqa/selenium/browserlaunchers/locators/Firefox2or3Locator;findBrowserLocationOrFailE()Lorg/openqa/selenium/browserlaunchers/locators/BrowserInstallation;Dicovering Firefox 2... "!"org/openqa/selenium/internal/Trace #$debug(Ljava/lang/String;)V&=org/openqa/selenium/browserlaunchers/locators/Firefox2Locator % %) *findBrowserLocation,3Did not find Firefox 2, now dicovering Firefox 3....=org/openqa/selenium/browserlaunchers/locators/Firefox3Locator - -)2java/lang/RuntimeException 4 56couldNotFindFirefoxMessage()Ljava/lang/String; 18 $firefox2LocationCLorg/openqa/selenium/browserlaunchers/locators/BrowserInstallation;firefox3LocationretrieveValidInstallationPathW(Ljava/lang/String;)Lorg/openqa/selenium/browserlaunchers/locators/BrowserInstallation; -? <=customLauncherPathLjava/lang/String; -C D6"couldNotFindAnyInstallationMessage SourceFileFirefox2or3Locator.java!   -       /*   B%Y'(L+++-Y/0M,,1Y*37&  %046 B-9:0;:<= @ -Y/+>  @A56 5 -Y/B"  EFPK %^D>ht%%Borg/openqa/selenium/browserlaunchers/locators/FirefoxLocator.class1()VCode  LineNumberTableLocalVariableTablethis>Lorg/openqa/selenium/browserlaunchers/locators/FirefoxLocator;browserPathOverridePropertyName()Ljava/lang/String;firefoxDefaultPath SourceFileFirefoxLocator.java!/*   -   PK %^D>   Korg/openqa/selenium/browserlaunchers/locators/InternetExplorerLocator.class1AEorg/openqa/selenium/browserlaunchers/locators/InternetExplorerLocatorBorg/openqa/selenium/browserlaunchers/locators/SingleBrowserLocator USUAL_WINDOWS_LAUNCHER_LOCATIONS[Ljava/lang/String;()VCode java/lang/String java/lang/StringBuilder #org/openqa/selenium/os/WindowsUtils getProgramFilesPath()Ljava/lang/String;  valueOf&(Ljava/lang/Object;)Ljava/lang/String;  (Ljava/lang/String;)V\Internet Explorer  !append-(Ljava/lang/String;)Ljava/lang/StringBuilder; # $toString & LineNumberTableLocalVariableTable * thisGLorg/openqa/selenium/browserlaunchers/locators/InternetExplorerLocator; browserName/Internet ExplorerseleniumBrowserName2iexplorestandardlauncherFilenames()[Ljava/lang/String;6 iexplore.exebrowserPathOverridePropertyName9internetExplorerDefaultPathusualLauncherLocations < => thisIsWindows()Z SourceFileInternetExplorerLocator.java! L  Y Y"S%'    ( /*)' ( +,- -.'( +,0 -1'( +,34 4  Y5S'(  +,7 -8'( +,:4 ;; % ' ( +,?@PK %^D>%Gorg/openqa/selenium/browserlaunchers/locators/BrowserInstallation.class1Aorg/openqa/selenium/browserlaunchers/locators/BrowserInstallationjava/lang/ObjectlauncherFilePathLjava/lang/String; libraryPath'(Ljava/lang/String;Ljava/lang/String;)VCode   ()V    LineNumberTableLocalVariableTablethisCLorg/openqa/selenium/browserlaunchers/locators/BrowserInstallation;()Ljava/lang/String; SourceFileBrowserInstallation.java!  Y* *+*,    /*  /* PK lC>H>%>org/openqa/selenium/browserlaunchers/locators/.svn/all-wcpropsK 25 svn:wc:ra_dav:version-url V 87 /svn/!svn/ver/11226/trunk/java/client/src/org/openqa/selenium/browserlaunchers/locators END BrowserInstallation.java K 25 svn:wc:ra_dav:version-url V 112 /svn/!svn/ver/11226/trunk/java/client/src/org/openqa/selenium/browserlaunchers/locators/BrowserInstallation.java END FirefoxLocator.java K 25 svn:wc:ra_dav:version-url V 107 /svn/!svn/ver/11226/trunk/java/client/src/org/openqa/selenium/browserlaunchers/locators/FirefoxLocator.java END BrowserLocator.java K 25 svn:wc:ra_dav:version-url V 107 /svn/!svn/ver/11226/trunk/java/client/src/org/openqa/selenium/browserlaunchers/locators/BrowserLocator.java END Firefox2Locator.java K 25 svn:wc:ra_dav:version-url V 108 /svn/!svn/ver/11226/trunk/java/client/src/org/openqa/selenium/browserlaunchers/locators/Firefox2Locator.java END SafariLocator.java K 25 svn:wc:ra_dav:version-url V 106 /svn/!svn/ver/11226/trunk/java/client/src/org/openqa/selenium/browserlaunchers/locators/SafariLocator.java END SingleBrowserLocator.java K 25 svn:wc:ra_dav:version-url V 113 /svn/!svn/ver/11226/trunk/java/client/src/org/openqa/selenium/browserlaunchers/locators/SingleBrowserLocator.java END Firefox3Locator.java K 25 svn:wc:ra_dav:version-url V 108 /svn/!svn/ver/11226/trunk/java/client/src/org/openqa/selenium/browserlaunchers/locators/Firefox3Locator.java END Firefox2or3Locator.java K 25 svn:wc:ra_dav:version-url V 111 /svn/!svn/ver/11226/trunk/java/client/src/org/openqa/selenium/browserlaunchers/locators/Firefox2or3Locator.java END build.desc K 25 svn:wc:ra_dav:version-url V 98 /svn/!svn/ver/11226/trunk/java/client/src/org/openqa/selenium/browserlaunchers/locators/build.desc END InternetExplorerLocator.java K 25 svn:wc:ra_dav:version-url V 116 /svn/!svn/ver/11226/trunk/java/client/src/org/openqa/selenium/browserlaunchers/locators/InternetExplorerLocator.java END GoogleChromeLocator.java K 25 svn:wc:ra_dav:version-url V 112 /svn/!svn/ver/11226/trunk/java/client/src/org/openqa/selenium/browserlaunchers/locators/GoogleChromeLocator.java END PK lC>G9org/openqa/selenium/browserlaunchers/locators/.svn/format8 PK lC>;;^org/openqa/selenium/browserlaunchers/locators/.svn/text-base/BrowserInstallation.java.svn-basepackage org.openqa.selenium.browserlaunchers.locators; /** * Encapsulate useful settings of a browser installation discovered with a {@link org.openqa.selenium.browserlaunchers.locators.BrowserLocator} */ public class BrowserInstallation { private final String launcherFilePath; private final String libraryPath; public BrowserInstallation(String launcherFilePath, String libraryPath) { this.launcherFilePath = launcherFilePath; this.libraryPath = libraryPath; } public String launcherFilePath() { return launcherFilePath; } public String libraryPath() { return libraryPath; } } PK lC>d11Yorg/openqa/selenium/browserlaunchers/locators/.svn/text-base/BrowserLocator.java.svn-basepackage org.openqa.selenium.browserlaunchers.locators; /** * Discovers a valid browser installation on local system. */ public interface BrowserLocator { BrowserInstallation findBrowserLocationOrFail(); BrowserInstallation retrieveValidInstallationPath(String customLauncherPath); } PK lC>~Zorg/openqa/selenium/browserlaunchers/locators/.svn/text-base/Firefox2Locator.java.svn-basepackage org.openqa.selenium.browserlaunchers.locators; import java.io.File; import org.openqa.selenium.Platform; import org.openqa.selenium.os.WindowsUtils; import org.openqa.selenium.os.CommandLine; /** * Discovers a valid Firefox 2.x installation on local system. */ public class Firefox2Locator extends FirefoxLocator { private static final String[] USUAL_UNIX_LAUNCHER_LOCATIONS = { "/Applications/Firefox-2.app/Contents/MacOS", "/Applications/Firefox.app/Contents/MacOS", "/usr/lib/firefox", /* Ubuntu 7.x default location */ }; private static final String[] USUAL_WINDOWS_LAUNCHER_LOCATIONS = { WindowsUtils.getProgramFilesPath() + "\\Mozilla Firefox", WindowsUtils.getProgramFilesPath() + "\\Firefox", WindowsUtils.getProgramFilesPath() + "\\Firefox-2", }; protected String browserName() { return "Firefox 2"; } protected String seleniumBrowserName() { return "*firefox2"; } protected String[] standardlauncherFilenames() { if (WindowsUtils.thisIsWindows()) { return new String[]{"firefox.exe"}; } else { return new String[]{"firefox-bin"}; } } protected String[] usualLauncherLocations() { return WindowsUtils.thisIsWindows() ? USUAL_WINDOWS_LAUNCHER_LOCATIONS : USUAL_UNIX_LAUNCHER_LOCATIONS; } protected boolean runningOnWindows() { return Platform.getCurrent().is(Platform.WINDOWS); } @Override public String computeLibraryPath(File launcherPath) { if (runningOnWindows()) { return ""; } StringBuilder libraryPath = new StringBuilder(); String libraryPropertyName = CommandLine.getLibraryPathPropertyName(); String existingLibraryPath = System.getenv(libraryPropertyName); if (Platform.getCurrent().is(Platform.MAC) && Platform.getCurrent().getMinorVersion() > 5) { libraryPath.append(existingLibraryPath); } else { libraryPath.append(launcherPath.getParent()).append(File.pathSeparator).append(libraryPath); } return libraryPath.toString(); } }PK lC>d  ]org/openqa/selenium/browserlaunchers/locators/.svn/text-base/Firefox2or3Locator.java.svn-basepackage org.openqa.selenium.browserlaunchers.locators; import org.openqa.selenium.internal.Trace; import org.openqa.selenium.internal.TraceFactory; /** * Discovers a valid Firefox installation on local system. */ public class Firefox2or3Locator implements BrowserLocator { private static Trace LOGGER = TraceFactory.getTrace(Firefox2or3Locator.class); public BrowserInstallation findBrowserLocationOrFail() { LOGGER.debug("Dicovering Firefox 2..."); final BrowserInstallation firefox2Location = new Firefox2Locator().findBrowserLocation(); if (null != firefox2Location) { return firefox2Location; } LOGGER.debug("Did not find Firefox 2, now dicovering Firefox 3..."); final BrowserInstallation firefox3Location = new Firefox3Locator().findBrowserLocation(); if (null != firefox3Location) { return firefox3Location; } throw new RuntimeException(couldNotFindFirefoxMessage()); } public BrowserInstallation retrieveValidInstallationPath(String customLauncherPath) { return new Firefox3Locator().retrieveValidInstallationPath(customLauncherPath); } private String couldNotFindFirefoxMessage() { return new Firefox3Locator().couldNotFindAnyInstallationMessage(); } }PK lC>[S Zorg/openqa/selenium/browserlaunchers/locators/.svn/text-base/Firefox3Locator.java.svn-basepackage org.openqa.selenium.browserlaunchers.locators; import org.openqa.selenium.Platform; import org.openqa.selenium.browserlaunchers.locators.FirefoxLocator; import org.openqa.selenium.os.WindowsUtils; import org.openqa.selenium.os.CommandLine; import java.io.File; import java.io.FilenameFilter; /** * Discovers a valid Firefox 2.x or 3.x installation on local system. Preference is given to 2.x installs. */ public class Firefox3Locator extends FirefoxLocator { private static final String UBUNTU_BASE_DIR = "/usr/lib"; private static final String[] USUAL_OS_X_LAUNCHER_LOCATIONS = { "/Applications/Firefox-3.app/Contents/MacOS", "/Applications/Firefox.app/Contents/MacOS", }; private static final String[] USUAL_WINDOWS_LAUNCHER_LOCATIONS = { WindowsUtils.getProgramFilesPath() + "\\Firefox-3", WindowsUtils.getProgramFilesPath() + "\\Mozilla Firefox", WindowsUtils.getProgramFilesPath() + "\\Firefox", }; private String[] usualLauncherLocations; protected String browserName() { return "Firefox 3"; } protected String seleniumBrowserName() { return "firefox3"; } protected String[] standardlauncherFilenames() { if (runningOnWindows()) { return new String[]{"firefox.exe"}; } else { return new String[]{"firefox-bin", "firefox"}; } } protected synchronized String[] usualLauncherLocations() { if (null == usualLauncherLocations) { usualLauncherLocations = runningOnWindows() ? USUAL_WINDOWS_LAUNCHER_LOCATIONS : usualUnixLauncherLocations(); } return usualLauncherLocations; } protected String[] usualUnixLauncherLocations() { final String[] ubuntuLocations; final String[] ubuntoLocationPaths; ubuntuLocations = firefoxDefaultLocationsOnUbuntu(); if (ubuntuLocations.length == 0) { return USUAL_OS_X_LAUNCHER_LOCATIONS; } ubuntoLocationPaths = new String[ubuntuLocations.length]; for (int i = 0; i < ubuntuLocations.length; i++) { ubuntoLocationPaths[i] = UBUNTU_BASE_DIR + "/" + ubuntuLocations[i]; } return ubuntoLocationPaths; } /** * Dynamic because the directory version number keep changing. */ protected String[] firefoxDefaultLocationsOnUbuntu() { final File dir; dir = new File(UBUNTU_BASE_DIR); if (!dir.exists() && dir.isDirectory()) { return new String[] {}; } return dir.list(new FilenameFilter() { public boolean accept(File dir, String name) { return name.startsWith("firefox-"); } }); } protected boolean runningOnWindows() { return Platform.getCurrent().is(Platform.WINDOWS); } @Override public String computeLibraryPath(File launcherPath) { if (runningOnWindows()) { return ""; } StringBuilder libraryPath = new StringBuilder(); String libraryPropertyName = CommandLine.getLibraryPathPropertyName(); String existingLibraryPath = System.getenv(libraryPropertyName); if (Platform.getCurrent().is(Platform.MAC) && Platform.getCurrent().getMinorVersion() > 5) { libraryPath.append(existingLibraryPath); } else { libraryPath.append(launcherPath.getParent()).append(File.pathSeparator).append(libraryPath); } return libraryPath.toString(); } }PK lC>ussYorg/openqa/selenium/browserlaunchers/locators/.svn/text-base/FirefoxLocator.java.svn-basepackage org.openqa.selenium.browserlaunchers.locators; import org.openqa.selenium.browserlaunchers.locators.SingleBrowserLocator; /** * Discovers a valid Firefox installation on local system. */ public abstract class FirefoxLocator extends SingleBrowserLocator { protected String browserPathOverridePropertyName() { return "firefoxDefaultPath"; } } PK lC>9m( ( ^org/openqa/selenium/browserlaunchers/locators/.svn/text-base/GoogleChromeLocator.java.svn-base/* * Copyright 2008 Google, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package org.openqa.selenium.browserlaunchers.locators; import org.openqa.selenium.browserlaunchers.locators.SingleBrowserLocator; import org.openqa.selenium.os.WindowsUtils; /** * Discovers a valid Google Chrome installation on local system. */ public class GoogleChromeLocator extends SingleBrowserLocator { protected String browserName() { return "Google Chrome"; } protected String seleniumBrowserName() { return "googlechrome"; } protected String[] standardlauncherFilenames() { return new String[]{"chrome.exe", "google-chrome","Google Chrome"}; } protected String browserPathOverridePropertyName() { return "googleChromeDefaultPath"; } protected String[] usualLauncherLocations() { return WindowsUtils.thisIsWindows() ? usualWindowsLauncherLocations() : usualUnixLauncherLocations(); } /** * Returns usual Google Chrome installation location on Windows. * * WARNING: Executing this method on a non-windows platform will fail because the system root is not set. * * @return Usual Google Chrome installation location on Windows */ protected String[] usualWindowsLauncherLocations() { return new String[]{ WindowsUtils.getLocalAppDataPath() + "\\Google\\Chrome\\Application" }; } /** * Returns usual Google Chrome installation location on Linux. * * @return Usual Google Chrome installation location on Linux */ protected String[] usualUnixLauncherLocations() { return new String[]{ "/usr/bin", "/Applications/Google Chrome.app/Contents/MacOS", }; } } PK lC>borg/openqa/selenium/browserlaunchers/locators/.svn/text-base/InternetExplorerLocator.java.svn-basepackage org.openqa.selenium.browserlaunchers.locators; import org.openqa.selenium.browserlaunchers.locators.SingleBrowserLocator; import org.openqa.selenium.os.WindowsUtils; /** * Discovers a valid Internet Explorer installation on local system. */ public class InternetExplorerLocator extends SingleBrowserLocator { private static final String[] USUAL_WINDOWS_LAUNCHER_LOCATIONS = { WindowsUtils.getProgramFilesPath() + "\\Internet Explorer" }; protected String browserName() { return "Internet Explorer"; } protected String seleniumBrowserName() { return "iexplore"; } protected String[] standardlauncherFilenames() { return new String[]{"iexplore.exe"}; } protected String browserPathOverridePropertyName() { return "internetExplorerDefaultPath"; } protected String[] usualLauncherLocations() { return WindowsUtils.thisIsWindows() ? USUAL_WINDOWS_LAUNCHER_LOCATIONS : new String[0]; } } PK lC>Xorg/openqa/selenium/browserlaunchers/locators/.svn/text-base/SafariLocator.java.svn-basepackage org.openqa.selenium.browserlaunchers.locators; import org.openqa.selenium.browserlaunchers.locators.SingleBrowserLocator; import org.openqa.selenium.os.WindowsUtils; /** * Discovers a valid Internet Explorer installation on local system. */ public class SafariLocator extends SingleBrowserLocator { private static final String[] USUAL_UNIX_LAUNCHER_LOCATIONS = { "/Applications/Safari.app/Contents/MacOS", }; private static final String[] USUAL_WINDOWS_LAUNCHER_LOCATIONS = { WindowsUtils.getProgramFilesPath() + "\\Safari" }; protected String browserName() { return "Safari"; } protected String seleniumBrowserName() { return "safari"; } protected String[] standardlauncherFilenames() { if (WindowsUtils.thisIsWindows()) { return new String[]{"Safari.exe"}; } else { return new String[]{"Safari"}; } } protected String browserPathOverridePropertyName() { return "SafariDefaultPath"; } protected String[] usualLauncherLocations() { return WindowsUtils.thisIsWindows() ? USUAL_WINDOWS_LAUNCHER_LOCATIONS : USUAL_UNIX_LAUNCHER_LOCATIONS; } } PK lC>._org/openqa/selenium/browserlaunchers/locators/.svn/text-base/SingleBrowserLocator.java.svn-basepackage org.openqa.selenium.browserlaunchers.locators; import org.openqa.selenium.browserlaunchers.LauncherUtils; import org.openqa.selenium.internal.Trace; import org.openqa.selenium.internal.TraceFactory; import org.openqa.selenium.os.WindowsUtils; import org.openqa.selenium.os.CommandLine; import java.io.File; /** * Discovers a valid browser installation on local system. */ public abstract class SingleBrowserLocator implements BrowserLocator { private static final Trace LOGGER = TraceFactory.getTrace(BrowserLocator.class); public BrowserInstallation findBrowserLocationOrFail() { final BrowserInstallation location; location = findBrowserLocation(); if (null == location) { throw new RuntimeException(couldNotFindAnyInstallationMessage()); } return location; } public BrowserInstallation findBrowserLocation() { final BrowserInstallation defaultPath; LOGGER.debug("Discovering " + browserName() + "..."); defaultPath = findAtADefaultLocation(); if (null != defaultPath) { return defaultPath; } return findInPath(); } protected abstract String browserName(); protected abstract String[] standardlauncherFilenames(); protected abstract String seleniumBrowserName(); protected abstract String browserPathOverridePropertyName(); protected abstract String[] usualLauncherLocations(); protected BrowserInstallation findInPath() { for(String launcherFilename : standardlauncherFilenames()) { final BrowserInstallation launcherPath; launcherPath = findFileInPath(launcherFilename); if (null != launcherPath) { return launcherPath; } } return null; } protected BrowserInstallation findAtADefaultLocation() { return browserDefaultPath(); } protected BrowserInstallation browserDefaultPath() { final String userProvidedDefaultPath; userProvidedDefaultPath = System.getProperty(browserPathOverridePropertyName()); if (null != userProvidedDefaultPath) { return retrieveValidInstallationPath(userProvidedDefaultPath); } for (String location : usualLauncherLocations()) { for (String fileName : standardlauncherFilenames()) { final BrowserInstallation validInstallationPath; validInstallationPath = retrieveValidInstallationPath(location, fileName); if (null != validInstallationPath) { return validInstallationPath; } } } return null; } public BrowserInstallation findFileInPath(String fileName) { return retrieveValidInstallationPath(CommandLine.findExecutable(fileName)); } protected String couldNotFindAnyInstallationMessage() { return browserName() + " could not be found in the path!\n" + "Please add the directory containing '" + humanFriendlyLauncherFileNames() + "' to your PATH environment\n" + "variable, or explicitly specify a path to " + browserName() + " like this:\n" + "*" + seleniumBrowserName() + fakeLauncherPath(); } protected String fakeLauncherPath() { if (WindowsUtils.thisIsWindows()) { return "c:\\blah\\" + standardlauncherFilenames()[0]; } return "/blah/blah/" + standardlauncherFilenames()[0]; } protected String humanFriendlyLauncherFileNames() { final String[] fileNames; final StringBuffer buffer; fileNames = standardlauncherFilenames(); if (0 == fileNames.length) { return ""; } else if (1 == fileNames.length) { return "'" + fileNames[0] + "'"; } buffer = new StringBuffer(); for (String filename : fileNames) { buffer.append("'").append(filename).append("'"); buffer.append(" or "); } return buffer.substring(0, buffer.lastIndexOf(" or ")); } protected BrowserInstallation retrieveValidInstallationPath(String dirname, String fileName) { return retrieveValidInstallationPath(new File(dirname, fileName)); } public BrowserInstallation retrieveValidInstallationPath(String launcher) { if (null == launcher) { return null; } return retrieveValidInstallationPath(new File(launcher)); } protected BrowserInstallation retrieveValidInstallationPath(File launcher) { if (null == launcher) { return null; } LOGGER.debug("Checking whether " + browserName() + " launcher at :'" + launcher + "' is valid..."); if (!launcher.exists()) { return null; } if (LauncherUtils.isScriptFile(launcher)) { LOGGER.warn("Caution: '" + launcher.getAbsolutePath() +"': file is a script file, not a real executable. The browser environment is no longer fully under RC control"); } LOGGER.debug("Discovered valid " + browserName() + " launcher : '" + launcher + "'"); return new BrowserInstallation(launcher.getAbsolutePath(), computeLibraryPath(launcher)); } public String computeLibraryPath(File launcherPath) { final String libraryPathEnvironmentVariable; final String currentLibraryPath; if (WindowsUtils.thisIsWindows()) { return null; } libraryPathEnvironmentVariable = CommandLine.getLibraryPathPropertyName(); currentLibraryPath = WindowsUtils.loadEnvironment().getProperty(libraryPathEnvironmentVariable); return currentLibraryPath + File.pathSeparator + launcherPath.getParent(); } } PK lC>>"Porg/openqa/selenium/browserlaunchers/locators/.svn/text-base/build.desc.svn-base java_library(name = "locators", srcs = [ "*.java" ], deps = [ "//java/client/src/org/openqa/selenium/browserlaunchers:launcher-utils", "//java/client/src/org/openqa/selenium/internal:logging", "//java/client/src/org/openqa/selenium/os", ]) PK (hC>>"8org/openqa/selenium/browserlaunchers/locators/build.desc java_library(name = "locators", srcs = [ "*.java" ], deps = [ "//java/client/src/org/openqa/selenium/browserlaunchers:launcher-utils", "//java/client/src/org/openqa/selenium/internal:logging", "//java/client/src/org/openqa/selenium/os", ]) PK %^D><5org/openqa/selenium/internal/FindsByCssSelector.class1 /org/openqa/selenium/internal/FindsByCssSelectorjava/lang/ObjectfindElementByCssSelector4(Ljava/lang/String;)Lorg/openqa/selenium/WebElement;findElementsByCssSelector$(Ljava/lang/String;)Ljava/util/List; SignatureF(Ljava/lang/String;)Ljava/util/List; SourceFileFindsByCssSelector.java    PK %^D>:6./org/openqa/selenium/internal/WrapsElement.class1 )org/openqa/selenium/internal/WrapsElementjava/lang/ObjectgetWrappedElement"()Lorg/openqa/selenium/WebElement; SourceFileWrapsElement.javaPK %^D><1org/openqa/selenium/internal/ReturnedCookie.class1+org/openqa/selenium/internal/ReturnedCookieorg/openqa/selenium/Cookie\(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/util/Date;Z)VCode  LineNumberTableLocalVariableTablethis-Lorg/openqa/selenium/internal/ReturnedCookie;nameLjava/lang/String;valuedomainpathexpiryLjava/util/Date;isSecureZ SourceFileReturnedCookie.java DeprecatedRuntimeVisibleAnnotationsLjava/lang/Deprecated;!x*+,-   H PK %^D>Zs91org/openqa/selenium/internal/FindsByTagName.class1 +org/openqa/selenium/internal/FindsByTagNamejava/lang/ObjectfindElementByTagName4(Ljava/lang/String;)Lorg/openqa/selenium/WebElement;findElementsByTagName$(Ljava/lang/String;)Ljava/util/List; SignatureF(Ljava/lang/String;)Ljava/util/List; SourceFileFindsByTagName.java    PK %^D> [,org/openqa/selenium/internal/NullTrace.class1O&org/openqa/selenium/internal/NullTracejava/lang/Object"org/openqa/selenium/internal/Trace()VCode  LineNumberTableLocalVariableTablethis(Lorg/openqa/selenium/internal/NullTrace;info(Ljava/lang/String;)VmessageLjava/lang/String;warn(Ljava/lang/Throwable;)V  *(Ljava/lang/String;Ljava/lang/Throwable;)VeLjava/lang/Throwable; WARNING:  !" logMessage<(Ljava/lang/String;Ljava/lang/String;Ljava/lang/Throwable;)V throwableerror &('java/lang/System )*errLjava/io/PrintStream;,java/lang/StringBuilder.ERROR: +0  +2 34append-(Ljava/lang/String;)Ljava/lang/StringBuilder; +6 78toString()Ljava/lang/String; :<;java/io/PrintStream =printlndebug@. BDCjava/lang/Throwable E8getLocalizedMessage BG HIprintStackTrace(Ljava/io/PrintStream;)VtypemissiveLjava/lang/StringBuilder; SourceFileNullTrace.java!  /*    5   @*+   ?*+    K *+,     #$ O%+Y-/+159  $ K *-+,     #> 5  > 5  > ?  #!" ;+Y+/:,1W-?1-A1W%59- -%F " !"#$%/&3':) 4;;J;;# 1KLMNPK %^D>nɥ3org/openqa/selenium/internal/FindsByClassName.class1 -org/openqa/selenium/internal/FindsByClassNamejava/lang/ObjectfindElementByClassName4(Ljava/lang/String;)Lorg/openqa/selenium/WebElement;findElementsByClassName$(Ljava/lang/String;)Ljava/util/List; SignatureF(Ljava/lang/String;)Ljava/util/List; SourceFileFindsByClassName.java    PK %^D>:V-p5org/openqa/selenium/internal/NullTraceGenerator.class1#/org/openqa/selenium/internal/NullTraceGeneratorjava/lang/Objectcom/google/common/base/Function()VCode  LineNumberTableLocalVariableTablethis1Lorg/openqa/selenium/internal/NullTraceGenerator;apply7(Ljava/lang/Class;)Lorg/openqa/selenium/internal/Trace; Signature:(Ljava/lang/Class<*>;)Lorg/openqa/selenium/internal/Trace;&org/openqa/selenium/internal/NullTrace  ignoredLjava/lang/Class;LocalVariableTypeTableLjava/lang/Class<*>;&(Ljava/lang/Object;)Ljava/lang/Object;java/lang/Class   SourceFileNullTraceGenerator.javamLjava/lang/Object;Lcom/google/common/base/Function;Lorg/openqa/selenium/internal/Trace;>;  /*    NY   A ) *+   !"PK %^D>z>pp,org/openqa/selenium/internal/FindsById.class1 &org/openqa/selenium/internal/FindsByIdjava/lang/ObjectfindElementById4(Ljava/lang/String;)Lorg/openqa/selenium/WebElement;findElementsById$(Ljava/lang/String;)Ljava/util/List; SignatureF(Ljava/lang/String;)Ljava/util/List; SourceFileFindsById.java    PK %^D>||/org/openqa/selenium/internal/FindsByXPath.class1 )org/openqa/selenium/internal/FindsByXPathjava/lang/ObjectfindElementByXPath4(Ljava/lang/String;)Lorg/openqa/selenium/WebElement;findElementsByXPath$(Ljava/lang/String;)Ljava/util/List; SignatureF(Ljava/lang/String;)Ljava/util/List; SourceFileFindsByXPath.java    PK %^D>)_ -org/openqa/selenium/internal/SocketLock.class1}'org/openqa/selenium/internal/SocketLockjava/lang/Object!org/openqa/selenium/internal/Lock DEFAULT_PORTI ConstantValueDELAY_BETWEEN_SOCKET_CHECKSJd localhostLjava/net/InetSocketAddress; lockSocketLjava/net/Socket;address()VCodejava/net/InetSocketAddress  (Ljava/lang/String;I)V  LineNumberTableLocalVariableTable # $(Ljava/net/InetSocketAddress;)Vthis)Lorg/openqa/selenium/internal/SocketLock;(I)VlockPort * ,java/net/Socket +* /  1 lock(J)V Exceptions6&org/openqa/selenium/WebDriverException 8:9java/lang/System ;<currentTimeMillis()J > ?@ isLockFree(Ljava/net/InetSocketAddress;)Z BDCjava/lang/Thread E3sleep 5G H(Ljava/lang/Throwable;)VJ.Unable to bind to locking port %d within %d ms L MNgetPort()I PRQjava/lang/Integer STvalueOf(I)Ljava/lang/Integer; VXWjava/lang/Long SY(J)Ljava/lang/Long; []\java/lang/String ^_format9(Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/String; 5a b(Ljava/lang/String;)Vdjava/lang/InterruptedExceptionfjava/io/IOExceptiontimeoutInMillismaxWaite Ljava/lang/InterruptedException;Ljava/io/IOException;unlock +n opisBound()Z +r sclose +u vwbind(Ljava/net/SocketAddress;)Vyjava/net/BindExceptionLjava/net/BindException; SourceFileSocketLock.java!     4Y %!!6*" /0! %&'G*Y" 9:!%&($U*)*+Y-.*+0 BCDE!%&2345`7aB**0= A:5YF:5YF7!λ5YIY*0KOSYUSZ`cc'e'e 2 MRSTUV'W)X3Z;\?]\\!4`%&`g Zh  ij) iklg*.m*.q L5Y+Fe efgi!%& ik?@4e_ *.+tM x tu v w!  %&  iz{|PK %^D>"(.org/openqa/selenium/internal/WrapsDriver.class1 (org/openqa/selenium/internal/WrapsDriverjava/lang/ObjectgetWrappedDriver!()Lorg/openqa/selenium/WebDriver; SourceFileWrapsDriver.javaPK %^D>7{n>>(org/openqa/selenium/internal/Trace.class1"org/openqa/selenium/internal/Tracejava/lang/Objectinfo(Ljava/lang/String;)Vwarn(Ljava/lang/Throwable;)V*(Ljava/lang/String;Ljava/lang/Throwable;)Verrordebug SourceFile Trace.java         PK %^D>l'org/openqa/selenium/internal/Lock.class1 !org/openqa/selenium/internal/Lockjava/lang/Objectlock(J)Vunlock()V SourceFile Lock.java  PK %^D>- 0org/openqa/selenium/internal/Base64Encoder.class1|*org/openqa/selenium/internal/Base64Encoderjava/lang/ObjectSIXTY_FOUR_CHARS[CREVERSE_MAPPING[I()VCode @ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/ java/lang/String  toCharArray()[C    LineNumberTableLocalVariableTableiI   this,Lorg/openqa/selenium/internal/Base64Encoder;encode([B)Ljava/lang/String;$java/lang/StringBuffer # ')(java/lang/Math *+min(II)I #- ./append(C)Ljava/lang/StringBuffer; #1 23toString()Ljava/lang/String;input[BresultLjava/lang/StringBuffer;outputCharCount remaining oneBigNumberjdecode(Ljava/lang/String;)[B?java/io/ByteArrayOutputStream >Bjava/io/StringReader AD E(Ljava/lang/String;)V G HI mapCharToInt(Ljava/io/Reader;)I >K LMwrite(I)V O PQlength()I >S TU toByteArray()[BWjava/lang/ErrorYjava/lang/StringBuilder X X\ .]-(Ljava/lang/Object;)Ljava/lang/StringBuilder;_: Xa .b-(Ljava/lang/String;)Ljava/lang/StringBuilder; dfejava/io/IOException g3 getMessage X1 VDLjava/lang/String;outLjava/io/ByteArrayOutputStream;inLjava/io/StringReader;aeLjava/io/IOException; Exceptions tvujava/io/Reader wQreadLjava/io/Reader;c SourceFileBase64Encoder.java!  b, { ;4`O67:+!   /*!  !" 8#Y%M>6+d&6+3~x +`3~x +`3~66*,`?dhz~4=,WքLp , ,W+p,0& >? @ABUCD@FR 4567 8 ~9UD:X0;<= kŻ>Y@MAY+CN6 Y*-FOY*-FOY*-FOY*-FO:.?~x.?~ x.?~x.?~66"`.,dhz~Jބ+N},RMVYXYZ,[^`,c`hid* KLMN<OfPMRST\  4jklmn<Uof+:i(;"pqHIrd %.>d=+sY=Z[ \]Z#_4% %4xyy 6z{PK %^D>05/org/openqa/selenium/internal/TraceFactory.class1,)org/openqa/selenium/internal/TraceFactoryjava/lang/Object generator!Lcom/google/common/base/Function; Signature[Lcom/google/common/base/Function;Lorg/openqa/selenium/internal/Trace;>;()VCode /org/openqa/selenium/internal/NullTraceGenerator     LineNumberTableLocalVariableTable this+Lorg/openqa/selenium/internal/TraceFactory;getTrace7(Ljava/lang/Class;)Lorg/openqa/selenium/internal/Trace;:(Ljava/lang/Class<*>;)Lorg/openqa/selenium/internal/Trace; com/google/common/base/Function  apply&(Ljava/lang/Object;)Ljava/lang/Object;""org/openqa/selenium/internal/TraceforClassLjava/lang/Class;LocalVariableTypeTableLjava/lang/Class<*>; setGenerator$(Lcom/google/common/base/Function;)V^(Lcom/google/common/base/Function;Lorg/openqa/selenium/internal/Trace;>;)V SourceFileTraceFactory.java!   / Y    /*   I *!  #$%  #&)'() E*   % *+PK %^D>փE2org/openqa/selenium/internal/FindsByLinkText.class1,org/openqa/selenium/internal/FindsByLinkTextjava/lang/ObjectfindElementByLinkText4(Ljava/lang/String;)Lorg/openqa/selenium/WebElement;findElementsByLinkText$(Ljava/lang/String;)Ljava/util/List; SignatureF(Ljava/lang/String;)Ljava/util/List;findElementByPartialLinkTextfindElementsByPartialLinkText SourceFileFindsByLinkText.java       PK %^D>kxx.org/openqa/selenium/internal/FindsByName.class1 (org/openqa/selenium/internal/FindsByNamejava/lang/ObjectfindElementByName4(Ljava/lang/String;)Lorg/openqa/selenium/WebElement;findElementsByName$(Ljava/lang/String;)Ljava/util/List; SignatureF(Ljava/lang/String;)Ljava/util/List; SourceFileFindsByName.java    PK %^D>S'',org/openqa/selenium/internal/Locatable.class1 &org/openqa/selenium/internal/Locatablejava/lang/Object'getLocationOnScreenOnceScrolledIntoView()Lorg/openqa/selenium/Point;getCoordinates9()Lorg/openqa/selenium/interactions/internal/Coordinates; SourceFileLocatable.java  PK lC>Rܞ )org/openqa/selenium/internal/.svn/entries8 dir 11264 http://selenium.googlecode.com/svn/trunk/java/client/src/org/openqa/selenium/internal http://selenium.googlecode.com/svn 2011-02-01T13:59:17.176547Z 11226 simon.m.stewart svn:special svn:externals svn:needs-lock 07704840-8298-11de-bf8c-fd130f914ac9 FindsByName.java file 2011-02-03T12:01:17.000000Z 5648530139a87953fd172e6edbb6a1d4 2011-02-01T13:59:17.176547Z 11226 simon.m.stewart selenesedriver dir NullTraceGenerator.java file 2011-02-03T12:01:17.000000Z 420029598c34b6d6ccc546b518ed8312 2011-02-01T11:28:28.234608Z 11220 simon.m.stewart SocketLock.java file 2011-02-03T12:01:17.000000Z 900a6f21484d721a84e4f75e522dfc2f 2011-02-01T13:59:17.176547Z 11226 simon.m.stewart FindsByXPath.java file 2011-02-03T12:01:17.000000Z 0fcca2cfb11a5b803211d5f144ba260d 2011-02-01T13:59:17.176547Z 11226 simon.m.stewart WrapsElement.java file 2011-02-03T12:01:17.000000Z 5e5a79bb7329c7de750e660bd70dbce6 2011-02-01T13:59:17.176547Z 11226 simon.m.stewart FindsByCssSelector.java file 2011-02-03T12:01:17.000000Z 29eedf80d9cca369c046fee14a8bf747 2011-02-01T13:59:17.176547Z 11226 simon.m.stewart WrapsDriver.java file 2011-02-03T12:01:17.000000Z 35a72551878fda86b7ee76eae742ebb4 2011-02-01T13:59:17.176547Z 11226 simon.m.stewart FindsById.java file 2011-02-03T12:01:17.000000Z 822f7d0dfbd50652a653bd40b1930959 2011-02-01T13:59:17.176547Z 11226 simon.m.stewart seleniumemulation dir FindsByLinkText.java file 2011-02-03T12:01:17.000000Z e1436ec34666bd90d5dfd2a504bcd973 2011-02-01T13:59:17.176547Z 11226 simon.m.stewart ReturnedCookie.java file 2011-02-03T12:01:17.000000Z c9121262f56095e956b5ea7e679271f1 2011-02-01T13:59:17.176547Z 11226 simon.m.stewart Base64Encoder.java file 2011-02-03T12:01:17.000000Z ceae98daee84a861ef8eb9b0bb6f4997 2011-02-01T11:28:28.234608Z 11220 simon.m.stewart FindsByClassName.java file 2011-02-03T12:01:17.000000Z 299fca567a2ee1c1783006da64fb5e12 2011-02-01T13:59:17.176547Z 11226 simon.m.stewart TraceFactory.java file 2011-02-03T12:01:17.000000Z 360bf02e679661b6db4e3a8c33cf9f88 2011-02-01T11:28:28.234608Z 11220 simon.m.stewart Locatable.java file 2011-02-03T12:01:17.000000Z a4c2d7a940b4a277f7201ebec6df3e26 2011-02-01T13:59:17.176547Z 11226 simon.m.stewart Lock.java file 2011-02-03T12:01:17.000000Z 870fcca4384909e365bb0c51d134025f 2011-02-01T13:59:17.176547Z 11226 simon.m.stewart NullTrace.java file 2011-02-03T12:01:17.000000Z 1cac3c0d836549e1034676001515515a 2011-02-01T11:28:28.234608Z 11220 simon.m.stewart FindsByTagName.java file 2011-02-03T12:01:17.000000Z a743ddc95473b45182956c52f97ba54e 2011-02-01T13:59:17.176547Z 11226 simon.m.stewart build.desc file 2011-02-03T12:01:17.000000Z 2892684412b7f9fad9b018f123d743fd 2011-02-01T11:28:28.234608Z 11220 simon.m.stewart Trace.java file 2011-02-03T12:01:17.000000Z 7ca8476737e03418d481979ab0ed4bff 2011-02-01T11:28:28.234608Z 11220 simon.m.stewart PK lC>G(org/openqa/selenium/internal/.svn/format8 PK lC>VGorg/openqa/selenium/internal/.svn/text-base/Base64Encoder.java.svn-base/* * Copyright (C) 2004 Joe Walnes. * Copyright (C) 2006, 2007 XStream Committers. * All rights reserved. * * The software in this package is published under the terms of the BSD * style license a copy of which has been included with this distribution in * the LICENSE.txt file. * * Created on 06. August 2004 by Joe Walnes */ // original package name: com.thoughtworks.xstream.core.util package org.openqa.selenium.internal; import java.io.ByteArrayOutputStream; import java.io.IOException; import java.io.Reader; import java.io.StringReader; /** * Encodes binary data to plain text as Base64. * *

Despite there being a gazillion other Base64 implementations out there, this has been written as part of XStream as * it forms a core part but is too trivial to warrant an extra dependency.

* *

This meets the standard as described in RFC 1521, section 5.2 , allowing * other Base64 tools to manipulate the data.

* * Original code from XStream * * @author Joe Walnes */ public class Base64Encoder { // Here's how encoding works: // // 1) Incoming bytes are broken up into groups of 3 (each byte having 8 bits). // // 2) The combined 24 bits (3 * 8) are split into 4 groups of 6 bits. // // input |------||------||------| (3 values each with 8 bits) // 101010101010101010101010 // output |----||----||----||----| (4 values each with 6 bits) // // 3) Each of these 4 groups of 6 bits are converted back to a number, which will fall in the range of 0 - 63. // // 4) Each of these 4 numbers are converted to an alphanumeric char in a specified mapping table, to create // a 4 character string. // // 5) This is repeated for all groups of three bytes. // // 6) Special padding is done at the end of the stream using the '=' char. private static final char[] SIXTY_FOUR_CHARS = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".toCharArray(); private static final int[] REVERSE_MAPPING = new int[123]; static { for (int i = 0; i < SIXTY_FOUR_CHARS.length; i++) REVERSE_MAPPING[SIXTY_FOUR_CHARS[i]] = i + 1; } public String encode(byte[] input) { StringBuffer result = new StringBuffer(); int outputCharCount = 0; for (int i = 0; i < input.length; i += 3) { int remaining = Math.min(3, input.length - i); int oneBigNumber = (input[i] & 0xff) << 16 | (remaining <= 1 ? 0 : input[i + 1] & 0xff) << 8 | (remaining <= 2 ? 0 : input[i + 2] & 0xff); for (int j = 0; j < 4; j++) result.append(remaining + 1 > j ? SIXTY_FOUR_CHARS[0x3f & oneBigNumber >> 6 * (3 - j)] : '='); if ((outputCharCount += 4) % 76 == 0) result.append('\n'); } return result.toString(); } public byte[] decode(String input) { try { ByteArrayOutputStream out = new ByteArrayOutputStream(); StringReader in = new StringReader(input); for (int i = 0; i < input.length(); i += 4) { int a[] = {mapCharToInt(in), mapCharToInt(in), mapCharToInt(in), mapCharToInt(in)}; int oneBigNumber = (a[0] & 0x3f) << 18 | (a[1] & 0x3f) << 12 | (a[2] & 0x3f) << 6 | (a[3] & 0x3f); for (int j = 0; j < 3; j++) if (a[j + 1] >= 0) out.write(0xff & oneBigNumber >> 8 * (2 - j)); } return out.toByteArray(); } catch (IOException e) { throw new Error(e + ": " + e.getMessage()); } } private int mapCharToInt(Reader input) throws IOException { int c; while ((c = input.read()) != -1) { int result = REVERSE_MAPPING[c]; if (result != 0) return result -1; if (c == '=') return -1; } return -1; } }PK lC>^qqJorg/openqa/selenium/internal/.svn/text-base/FindsByClassName.java.svn-base/* Copyright 2007-2009 WebDriver committers Copyright 2007-2009 Google Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package org.openqa.selenium.internal; import org.openqa.selenium.WebElement; import java.util.List; public interface FindsByClassName { WebElement findElementByClassName(String using); List findElementsByClassName(String using); } PK lC>'տyyLorg/openqa/selenium/internal/.svn/text-base/FindsByCssSelector.java.svn-base/* Copyright 2007-2009 WebDriver committers Copyright 2007-2009 Google Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package org.openqa.selenium.internal; import org.openqa.selenium.WebElement; import java.util.List; public interface FindsByCssSelector { WebElement findElementByCssSelector(String using); List findElementsByCssSelector(String using); } PK lC>ޟ-CCCorg/openqa/selenium/internal/.svn/text-base/FindsById.java.svn-base/* Copyright 2007-2009 WebDriver committers Copyright 2007-2009 Google Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package org.openqa.selenium.internal; import org.openqa.selenium.WebElement; import java.util.List; public interface FindsById { WebElement findElementById(String using); List findElementsById(String using); } PK lC>tIorg/openqa/selenium/internal/.svn/text-base/FindsByLinkText.java.svn-base/* Copyright 2007-2009 WebDriver committers Copyright 2007-2009 Google Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package org.openqa.selenium.internal; import org.openqa.selenium.WebElement; import java.util.List; public interface FindsByLinkText { WebElement findElementByLinkText(String using); List findElementsByLinkText(String using); WebElement findElementByPartialLinkText(String using); List findElementsByPartialLinkText(String using); } PK lC>etIIEorg/openqa/selenium/internal/.svn/text-base/FindsByName.java.svn-base/* Copyright 2007-2009 WebDriver committers Copyright 2007-2009 Google Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package org.openqa.selenium.internal; import org.openqa.selenium.WebElement; import java.util.List; public interface FindsByName { WebElement findElementByName(String using); List findElementsByName(String using); } PK lC>>MkkHorg/openqa/selenium/internal/.svn/text-base/FindsByTagName.java.svn-base/* Copyright 2007-2009 WebDriver committers Copyright 2007-2009 Google Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package org.openqa.selenium.internal; import org.openqa.selenium.WebElement; import java.util.List; public interface FindsByTagName { WebElement findElementByTagName(String using); List findElementsByTagName(String using); } PK lC>u LLForg/openqa/selenium/internal/.svn/text-base/FindsByXPath.java.svn-base/* Copyright 2007-2009 WebDriver committers Copyright 2007-2009 Google Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package org.openqa.selenium.internal; import org.openqa.selenium.WebElement; import java.util.List; public interface FindsByXPath { WebElement findElementByXPath(String using); List findElementsByXPath(String using); } PK lC>vvCorg/openqa/selenium/internal/.svn/text-base/Locatable.java.svn-base/* Copyright 2007-2009 WebDriver committers Copyright 2007-2009 Google Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package org.openqa.selenium.internal; import org.openqa.selenium.*; import org.openqa.selenium.interactions.internal.Coordinates; public interface Locatable { /** * Use this to discover where on the screen an element is so that we can click it. This method * should cause the element to be scrolled into view. * * @return The top lefthand corner location on the screen, or null if the element is not visible */ org.openqa.selenium.Point getLocationOnScreenOnceScrolledIntoView(); Coordinates getCoordinates(); } PK lC>^Y>org/openqa/selenium/internal/.svn/text-base/Lock.java.svn-base/* Copyright 2007-2009 WebDriver committers Copyright 2007-2009 Google Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package org.openqa.selenium.internal; public interface Lock { void lock(long timeoutInMillis); void unlock(); } PK lC>ikkCorg/openqa/selenium/internal/.svn/text-base/NullTrace.java.svn-basepackage org.openqa.selenium.internal; public class NullTrace implements Trace { public void info(String message) { } public void warn(Throwable e) { warn("", e); } public void warn(String message) { warn(message, null); } public void warn(String message, Throwable throwable) { logMessage("WARNING: ", message, throwable); } public void error(String message) { System.err.println("ERROR: " + message); } public void error(String message, Throwable throwable) { logMessage("ERROR: ", message, throwable); } public void debug(Throwable e) { } public void debug(String message) { } public void debug(String message, Throwable throwable) { } private void logMessage(String type, String message, Throwable throwable) { StringBuilder missive = new StringBuilder(type); missive.append(message); if (throwable != null) { missive.append(". ").append(throwable.getLocalizedMessage()); } System.err.println(missive.toString()); if (throwable != null) { throwable.printStackTrace(System.err); } } } PK lC>wdP00Lorg/openqa/selenium/internal/.svn/text-base/NullTraceGenerator.java.svn-base/* Copyright 2011 WebDriver committers Copyright 2011 Google Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package org.openqa.selenium.internal; import com.google.common.base.Function; class NullTraceGenerator implements Function, Trace> { public Trace apply(Class ignored) { return new NullTrace(); } } PK lC>CHorg/openqa/selenium/internal/.svn/text-base/ReturnedCookie.java.svn-base/* Copyright 2007-2009 WebDriver committers Copyright 2007-2009 Google Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package org.openqa.selenium.internal; import java.util.Date; import org.openqa.selenium.Cookie; /** * @deprecated Use {@link Cookie} instead. */ @Deprecated public class ReturnedCookie extends Cookie { public ReturnedCookie(String name, String value, String domain, String path, Date expiry, boolean isSecure) { super(name, value, domain, path, expiry, isSecure); } } PK lC>Wi1oXXDorg/openqa/selenium/internal/.svn/text-base/SocketLock.java.svn-base/* Copyright 2007-2009 WebDriver committers Copyright 2007-2009 Google Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package org.openqa.selenium.internal; import org.openqa.selenium.WebDriverException; import org.openqa.selenium.internal.Lock; import java.io.IOException; import java.net.BindException; import java.net.InetSocketAddress; import java.net.Socket; /** * Implements {@link org.openqa.selenium.internal.Lock} via an implementation that uses a well-known server socket. * * @author gregory.block@gmail.com (Gregory Block) */ public class SocketLock implements Lock { public static final int DEFAULT_PORT = 7055; private static final long DELAY_BETWEEN_SOCKET_CHECKS = 100; private static final InetSocketAddress localhost = new InetSocketAddress("localhost", DEFAULT_PORT - 1); private final Socket lockSocket; private final InetSocketAddress address; /** * Constructs a new SocketLock using the default port. Attempts to lock the * lock will block until the default port becomes free. */ public SocketLock() { this(localhost); } /** * Constructs a new SocketLock. Attempts to lock the lock will attempt to acquire the * specified port number, and wait for it to become free. * * @param lockPort the port number to lock */ public SocketLock(int lockPort) { this(new InetSocketAddress("localhost", lockPort)); } /** * Constructs a new SocketLock. Attempts to lock the lock will attempt to acquire the * specified port number, and wait for it to become free. * * @param address The port to lock. */ public SocketLock(InetSocketAddress address) { this.lockSocket = new Socket(); this.address = address; } /** * @inheritDoc */ public void lock(long timeoutInMillis) throws WebDriverException { // Calculate the 'exit time' for our wait loop. long maxWait = System.currentTimeMillis() + timeoutInMillis; // Attempt to acquire the lock until something goes wrong or we run out of time. do { try { if (isLockFree(address)) return; Thread.sleep(DELAY_BETWEEN_SOCKET_CHECKS); } catch (InterruptedException e) { throw new WebDriverException(e); } catch (IOException e) { throw new WebDriverException(e); } } while (System.currentTimeMillis() < maxWait); throw new WebDriverException( String.format("Unable to bind to locking port %d within %d ms", address.getPort(), timeoutInMillis)); } /** * @inheritDoc */ public void unlock() { try { if (lockSocket.isBound()) lockSocket.close(); } catch (IOException e) { throw new WebDriverException(e); } } /** * Test to see if the lock is free. Returns instantaneously. * * @param address the address to attempt to bind to * @return true if the lock is locked; false if it is not * @throws IOException if something goes catastrophically wrong with the socket */ private boolean isLockFree(InetSocketAddress address) throws IOException { try { lockSocket.bind(address); return true; } catch (BindException e) { return false; } } } PK lC>Lҹ?org/openqa/selenium/internal/.svn/text-base/Trace.java.svn-basepackage org.openqa.selenium.internal; // I am not calling this "log". public interface Trace { void info(String message); void warn(Throwable e); void warn(String message); void warn(String message, Throwable throwable); void error(String message); void error(String message, Throwable throwable); void debug(Throwable e); void debug(String message); void debug(String message, Throwable throwable); } PK lC>[Forg/openqa/selenium/internal/.svn/text-base/TraceFactory.java.svn-base/* Copyright 2011 WebDriver committers Copyright 2011 Google Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package org.openqa.selenium.internal; import com.google.common.base.Function; public class TraceFactory { private static Function, Trace> generator = new NullTraceGenerator(); public static Trace getTrace(Class forClass) { return generator.apply(forClass); } public static synchronized void setGenerator(Function, Trace> generator) { TraceFactory.generator = generator; } } PK lC>~,Eorg/openqa/selenium/internal/.svn/text-base/WrapsDriver.java.svn-base/* Copyright 2007-2010 WebDriver committers Copyright 2007-2010 Google Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package org.openqa.selenium.internal; import org.openqa.selenium.WebDriver; /** * This interface indicates that the implementing class knows about the * driver that contains it and can export it. * * @author eran.mes@gmail.com (Eran Mes) */ public interface WrapsDriver { /** * @return The driver that contains this element. */ WebDriver getWrappedDriver(); } PK lC>VVForg/openqa/selenium/internal/.svn/text-base/WrapsElement.java.svn-base/* Copyright 2007-2009 WebDriver committers Copyright 2007-2009 Google Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package org.openqa.selenium.internal; import org.openqa.selenium.WebElement; /** * Indicates that there is an underlying element that can be used */ public interface WrapsElement { WebElement getWrappedElement(); } PK lC>z?org/openqa/selenium/internal/.svn/text-base/build.desc.svn-base java_library(name = "codecs", srcs = [ "Base64Encoder.java", ]) java_library(name = "logging", srcs = [ "NullTrace.java", "NullTraceGenerator.java", "Trace.java", "TraceFactory.java", ], deps = [ "//third_party/java/guava-libraries", ]) PK (hC>z'org/openqa/selenium/internal/build.desc java_library(name = "codecs", srcs = [ "Base64Encoder.java", ]) java_library(name = "logging", srcs = [ "NullTrace.java", "NullTraceGenerator.java", "Trace.java", "TraceFactory.java", ], deps = [ "//third_party/java/guava-libraries", ]) PK %^D>l:org/openqa/selenium/firefox/internal/FileExtension$1.class1?4org/openqa/selenium/firefox/internal/FileExtension$1java/lang/Object$javax/xml/namespace/NamespaceContextthis$04Lorg/openqa/selenium/firefox/internal/FileExtension;7(Lorg/openqa/selenium/firefox/internal/FileExtension;)VCode    ()VLineNumberTableLocalVariableTablethis6Lorg/openqa/selenium/firefox/internal/FileExtension$1;getNamespaceURI&(Ljava/lang/String;)Ljava/lang/String;em java/lang/String equals(Ljava/lang/Object;)Z #http://www.mozilla.org/2004/em-rdf#"RDF$+http://www.w3.org/1999/02/22-rdf-syntax-ns#&prefixLjava/lang/String; getPrefix+'java/lang/UnsupportedOperationException) *. /(Ljava/lang/String;)Vuri getPrefixes((Ljava/lang/String;)Ljava/util/Iterator; Signature+(Ljava/lang/String;)Ljava/util/Iterator<*>;1 SourceFileFileExtension.javaEnclosingMethod:2org/openqa/selenium/firefox/internal/FileExtension <=readIdFromInstallRdf"(Ljava/io/File;)Ljava/lang/String; InnerClasses   8 *+ * c   _+!+#%e f ghk'() > *Y,-o  0(1234 > *Y5-s  0(6789;> PK %^D>8org/openqa/selenium/firefox/internal/FileExtension.class12org/openqa/selenium/firefox/internal/FileExtensionjava/lang/Object.org/openqa/selenium/firefox/internal/ExtensionEM_NAMESPACE_URILjava/lang/String; ConstantValue #http://www.mozilla.org/2004/em-rdf# toInstallLjava/io/File;(Ljava/io/File;)VCode  ()V  LineNumberTableLocalVariableTablethis4Lorg/openqa/selenium/firefox/internal/FileExtension;writeTo Exceptionsjava/io/IOException !  java/io/File "# isDirectory()Z % &'getAbsolutePath()Ljava/lang/String; )+*"org/openqa/selenium/io/FileHandler ,-isZipped(Ljava/lang/String;)Z/;Can only install from a zip file, an XPI or a directory: %s 132java/lang/String 45format9(Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/String; 7 8(Ljava/lang/String;)V : ;<obtainRootDirectory(Ljava/io/File;)Ljava/io/File; > ?@readIdFromInstallRdf"(Ljava/io/File;)Ljava/lang/String; B C#(Ljava/io/File;Ljava/lang/String;)V E F#exists )H IJdelete(Ljava/io/File;)ZLjava/lang/StringBuilderN/Unable to delete existing extension directory: K7 KQ RSappend-(Ljava/lang/Object;)Ljava/lang/StringBuilder; KU V'toString )X YJ createDir )[ \J makeWritable )^ _`copy(Ljava/io/File;Ljava/io/File;)V bdc*org/openqa/selenium/io/TemporaryFilesystem e deleteTempDir extensionsDirrootidextensionDirectorykjava/io/BufferedInputStreammjava/io/FileInputStream lo  jq r(Ljava/io/InputStream;)V )t uvunzip%(Ljava/io/InputStream;)Ljava/io/File; jx ycloseextensionToInstallbisLjava/io/BufferedInputStream;~ install.rdf (javax/xml/parsers/DocumentBuilderFactory  newInstance,()Ljavax/xml/parsers/DocumentBuilderFactory; setNamespaceAware(Z)V newDocumentBuilder%()Ljavax/xml/parsers/DocumentBuilder; !javax/xml/parsers/DocumentBuilder parse&(Ljava/io/File;)Lorg/w3c/dom/Document; javax/xml/xpath/XPathFactory  ()Ljavax/xml/xpath/XPathFactory; newXPath()Ljavax/xml/xpath/XPath;4org/openqa/selenium/firefox/internal/FileExtension$1 7(Lorg/openqa/selenium/firefox/internal/FileExtension;)V javax/xml/xpath/XPath setNamespaceContext)(Ljavax/xml/namespace/NamespaceContext;)V//em:id compile5(Ljava/lang/String;)Ljavax/xml/xpath/XPathExpression; javax/xml/xpath/XPathConstants NODELjavax/xml/namespace/QName; javax/xml/xpath/XPathExpression evaluateA(Ljava/lang/Object;Ljavax/xml/namespace/QName;)Ljava/lang/Object;org/w3c/dom/Node//RDF:Description  getAttributes()Lorg/w3c/dom/NamedNodeMap;h org/w3c/dom/NamedNodeMap getNamedItemNS8(Ljava/lang/String;Ljava/lang/String;)Lorg/w3c/dom/Node;&org/openqa/selenium/WebDriverException,Cannot locate node containing extension id: K R-(Ljava/lang/String;)Ljava/lang/StringBuilder; 7 ' getNodeValue 'getTextContent 1 'trim 1 equals(Ljava/lang/Object;)Zjava/io/FileNotFoundException"Cannot install extension with ID: 7 (Ljava/lang/Throwable;)Vjava/lang/Exception installRdffactory*Ljavax/xml/parsers/DocumentBuilderFactory;builder#Ljavax/xml/parsers/DocumentBuilder;docLorg/w3c/dom/Document;xpathLjavax/xml/xpath/XPath;idNodeLorg/w3c/dom/Node;descriptionNodeidAttreLjava/lang/Exception; SourceFileFileExtension.java InnerClasses!   F **+-. /  *+*$(Y.Y*$S06**9M*,=NY+-A:D$GYKYMOPT6WWZW,],aF2 345#6+5.429;;A=L?\@uD{EFGH4f ;Qg AKhL@i ;<0+M+(jYlY+npN-sM :-w-w,!!* KL NMP!Q#R'S*R.U*00z .g {|?@ Y+}AMN--:,::Y*::Y:   :  YKYʷO,$̶TϿ : :ضۙYKYO̶TMY,b[ ]^_`"b*c9wQyTzY|o{q}~z g  "*QThq> ,  PK %^D>:&ı5org/openqa/selenium/firefox/internal/Executable.class1/org/openqa/selenium/firefox/internal/Executablejava/lang/Object SYSTEM_BINARYLjava/io/File;PLATFORM_BINARYbinary*$SWITCH_TABLE$org$openqa$selenium$Platform[I()VCode  %locateFirefoxBinaryFromSystemProperty()Ljava/io/File;    locateFirefoxBinaryFromPlatform  LineNumberTableLocalVariableTable(Ljava/io/File;)V   "! java/io/File #$exists()Z & '$isFile ) +&org/openqa/selenium/WebDriverException-java/lang/StringBuilder/HSpecified firefox binary location does not exist or is not a real file: ,1 2(Ljava/lang/String;)V ,4 56append-(Ljava/lang/Object;)Ljava/lang/StringBuilder; ,8 9:toString()Ljava/lang/String; *1=VCannot find firefox binary in PATH. Make sure firefox is installed. OS appears to be: ?A@org/openqa/selenium/Platform BC getCurrent ()Lorg/openqa/selenium/Platform;this1Lorg/openqa/selenium/firefox/internal/Executable;userSpecifiedBinaryPathgetFilegetPath J K:getAbsolutePathsetLibraryPath,(Ljava/lang/ProcessBuilder;Ljava/util/Map;)V SignatureR(Ljava/lang/ProcessBuilder;Ljava/util/Map;)V QSR"org/openqa/selenium/os/CommandLine T:getLibraryPathPropertyName , W XY getEnvVar8(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String; ,[ 5\-(Ljava/lang/String;)Ljava/lang/StringBuilder; ^ _` pathSeparatorLjava/lang/String; bdc java/util/Map efget&(Ljava/lang/Object;)Ljava/lang/Object;hjava/lang/Stringjwebdriver.firefox.library.path l m getParentFile oqpjava/lang/System rY getProperty ?t uvMACLorg/openqa/selenium/Platform; ?x yzis!(Lorg/openqa/selenium/Platform;)Z ?| }~getMinorVersion()I , 53(Ljava/lang/CharSequence;)Ljava/lang/StringBuilder; java/lang/ProcessBuilder  environment()Ljava/util/Map; b put8(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;builderLjava/lang/ProcessBuilder;extraEnvLjava/util/Map; propertyName libraryPathLjava/lang/StringBuilder;envfirefoxLibraryPathLocalVariableTypeTable5Ljava/util/Map;webdriver.firefox.bin o r&(Ljava/lang/String;)Ljava/lang/String; 1  ()[I ? ~ordinal.exe g endsWith(Ljava/lang/String;)Z g valueOf&(Ljava/lang/Object;)Ljava/lang/String;.app/Contents/MacOS/firefox-binS"webdriver.firefox.bin" property set, but unable to locate the requested binary: %s g format9(Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/String; binaryName PROGRAMFILES\Program Files\Mozilla Firefox\firefox.exeProgramFiles(x86) SystemDrivec:\Program Files (x86)4/Applications/Firefox.app/Contents/MacOS/firefox-binfirefox3firefox2firefox   findBinary#([Ljava/lang/String;)Ljava/io/File; o getenvname defaultValuevaluePATH g split'(Ljava/lang/String;)[Ljava/lang/String; '(Ljava/lang/String;Ljava/lang/String;)V $ isDirectory ? vWINDOWS binaryNames[Ljava/lang/String;pathspathfileexegetDefaultOutputStream()Ljava/io/OutputStream;webdriver.firefox.logfile8org/openqa/selenium/remote/internal/CircularOutputStream firefoxLogFilelogFile  ? values!()[Lorg/openqa/selenium/Platform; ? vANDROID ? vANY ? vLINUX ? vUNIX ?  vVISTA ? vXPjava/lang/NoSuchFieldError SourceFileExecutable.java!   5   |*+/++% *+(*Y,Y.0+37; *( *(*Y,Y<0>37;N # $)%-$0#4(C)J*K-Z.a/b2o3x2|DE|FG /*(7 DEH: 2*(I; DELMNO VPN,YU:-V:Z]ZW,-ag:Z]ZWi*(kIn:>sw>{]ZWZ]ZW+-7WB?@ CDE'I3J8KFQHRRQWSmT~VZ[HDE` `WK`   HK* Y*L++>.q @*K,Y*0Z7K4*,Y*0Z7K,Y*0Z7K Y*L++*YY*S;Zbc d fghj!jHnQoephsqtu|}~`   K>. Y,YV0Z7K*H Y,Y,Y¸V0ĶZ7V0Z7K YƷK***gYSYSYSΰ* ,MT  XY W *M,,+   ` `` . ظҲ]L*Y:6>2M+Y: 66i 2: Y,:    >w4 Y,Y,0Z7:    {6 1=MP\z> z`1\`=P z  f L+ Y+MY,  DE`   YW K*OW*OW*OW*sOW*OW* OW*OW* OW*Y(+,69:CFGPST]`ajmnwzPK %^D>;,6org/openqa/selenium/firefox/internal/ProfilesIni.class10org/openqa/selenium/firefox/internal/ProfilesInijava/lang/ObjectprofilesLjava/util/Map; Signature1Ljava/util/Map;*$SWITCH_TABLE$org$openqa$selenium$Platform[I()VCode  com/google/common/collect/Maps  newHashMap()Ljava/util/HashMap;   org/openqa/selenium/Platform  getCurrent ()Lorg/openqa/selenium/Platform;  !locateAppDataDirectory.(Lorg/openqa/selenium/Platform;)Ljava/io/File; # $% readProfiles(Ljava/io/File;)Ljava/util/Map;LineNumberTableLocalVariableTablethis2Lorg/openqa/selenium/firefox/internal/ProfilesIni;appDataLjava/io/File;A(Ljava/io/File;)Ljava/util/Map;. java/io/File0 profiles.ini -2 3#(Ljava/io/File;Ljava/lang/String;)V -5 67exists()Z9java/io/BufferedReader;java/io/FileReader := >(Ljava/io/File;)V 8@ A(Ljava/io/Reader;)V 8C DEreadLine()Ljava/lang/String;G[Profile IKJjava/lang/String LM startsWith(Ljava/lang/String;)Z O PQ newProfileC(Ljava/lang/String;Ljava/io/File;Ljava/lang/String;Z)Ljava/io/File; SUT java/util/Map VWput8(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;YName= I[ \]length()I I_ `a substring(I)Ljava/lang/String;c IsRelative=e1 Ig hMendsWithjPath=l&org/openqa/selenium/WebDriverException kn o(Ljava/lang/Throwable;)V 8q r closetjava/io/IOExceptiontoReturn profilesIni isRelativeZnameLjava/lang/String;pathreaderLjava/io/BufferedReader;lineprofileeLjava/io/IOException;LocalVariableTypeTable - (Ljava/lang/String;)V profileDir getProfile@(Ljava/lang/String;)Lorg/openqa/selenium/firefox/FirefoxProfile; S get&(Ljava/lang/Object;)Ljava/lang/Object; userprofilecopy *org/openqa/selenium/io/TemporaryFilesystem  createTempDir4(Ljava/lang/String;Ljava/lang/String;)Ljava/io/File; "org/openqa/selenium/io/FileHandler (Ljava/io/File;Ljava/io/File;)V compreg.dat - 7deletejava/lang/StringBuilder(Cannot delete file from copy of profile append-(Ljava/lang/String;)Ljava/lang/StringBuilder; EtoString k*org/openqa/selenium/firefox/FirefoxProfile = profileNametempDircompreg  ()[I  ]ordinal{0}\Mozilla\FirefoxAPPDATA java/lang/System getenv&(Ljava/lang/String;)Ljava/lang/String; java/text/MessageFormat format9(Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/String;'{0}/Library/Application Support/FirefoxHOME{0}/.mozilla/firefox - 7 isDirectoryeThe discovered user firefox data directory (which normally contains the profiles) isn't a directory: - EgetAbsolutePathosLorg/openqa/selenium/Platform;   values!()[Lorg/openqa/selenium/Platform;  ANDROID  ANY  LINUX  MAC  UNIX  VISTA  WINDOWS  XPjava/lang/NoSuchFieldError SourceFileProfilesIni.java!   a***L**+"&%# &'('() *+$%,  .M-Y+/1N-4,6:::8Y:Y-<?:B:FH)*+N:  , RW::HXHXZ^:/bHdf6iHiZ^:B:@:kYm: **+N:  , RWp:  **+N:  , RWp: ,$s$s'*s&*+-.0345!7$95;<=?>I?V@[AfCiDoEyFGHIJM=OPQSTUVXZ]STUV"X*Z,_' .().*+*uv+wxyz! {z$ |}<~zV+ + + *uPQ (+%-!-Y,-1 -Y-:&cd#e&g'>(()(yz(*+({z(wx#+ j*+-M,N,--Y-1:4/'kYY+:kYmY-UUs&2 klmpr!u-v5w=xU{W|a'>j()jz\+N+-(+W  ! (+.X <-YYSķM8-YY̸SķM-YY̸SķM,4,КkYYӷ,ն,&6 (AD]`y'4()A*+]*+y-*+  YWܾ K*OW*OW*OW*OW*OW*OW*OW*OW*Yڰ(+,69:CFGPST]`ajmnwz&"'PK %^D>vX 2org/openqa/selenium/firefox/internal/Streams.class1,org/openqa/selenium/firefox/internal/Streamsjava/lang/Object()VCode  LineNumberTableLocalVariableTablethis.Lorg/openqa/selenium/firefox/internal/Streams; drainStream*(Ljava/io/OutputStream;)Ljava/lang/String; Exceptionsjava/io/IOException8org/openqa/selenium/remote/internal/CircularOutputStream  toString()Ljava/lang/String;streamLjava/io/OutputStream; SourceFile Streams.java!/*   N*** "#& '* PK %^D> #2 2 =org/openqa/selenium/firefox/internal/ClasspathExtension.class17org/openqa/selenium/firefox/internal/ClasspathExtensionjava/lang/Object.org/openqa/selenium/firefox/internal/ExtensionloadResourcesUsingLjava/lang/Class; SignatureLjava/lang/Class<*>;loadFromLjava/lang/String;&(Ljava/lang/Class;Ljava/lang/String;)V)(Ljava/lang/Class<*>;Ljava/lang/String;)VCode  ()V    LineNumberTableLocalVariableTablethis9Lorg/openqa/selenium/firefox/internal/ClasspathExtension;LocalVariableTypeTablewriteTo(Ljava/io/File;)V Exceptions!java/io/IOException #%$"org/openqa/selenium/io/FileHandler &'isZipped(Ljava/lang/String;)Z)&org/openqa/selenium/WebDriverException++Will only install zipped extensions for now (- .(Ljava/lang/String;)V0 java/io/File2webdriver-staging /4 5#(Ljava/io/File;Ljava/lang/String;)V #7 89 createDir(Ljava/io/File;)Z /; <= getParentFile()Ljava/io/File; /? @Aexists()Z /C DAmkdirsFwebdriver.development HJIjava/lang/Boolean K' getBoolean MONcom/google/common/io/Resources PQ getResource3(Ljava/lang/Class;Ljava/lang/String;)Ljava/net/URL;Sjava/io/FileOutputStream RU  MW XYcopy'(Ljava/net/URL;Ljava/io/OutputStream;)V []\com/google/common/io/Closeables ^_ closeQuietly(Ljava/io/Closeable;)Vabuild/firefox/webdriver.xpi /-djava/lang/RuntimeExceptionfjava/lang/StringBuilderhCould not find file: e- /k lmgetAbsolutePath()Ljava/lang/String; eo pqappend-(Ljava/lang/String;)Ljava/lang/StringBuilder; es tmtoString c- wyxcom/google/common/io/Files Xz(Ljava/io/File;Ljava/io/File;)V|2org/openqa/selenium/firefox/internal/FileExtension {U {  extensionsDirLjava/io/File; holdingPen extractedXpi parentDir resourceUrlLjava/net/URL;streamLjava/io/OutputStream;builtXpi SourceFileClasspathExtension.java!     k**+*,$% &'     *" (Y*,/Y+13M,6W/Y,*3N-::> BWEG9**L::RY-T:V :ZZ8/Y`b:>cYeYgijnru-v{Y-}+~]qq^* +./$11273?4E7M8Z9]<g=q>s?x@{?BCDFHIR17Z)]&*PK %^D> [4org/openqa/selenium/firefox/internal/Extension.class1 .org/openqa/selenium/firefox/internal/Extensionjava/lang/ObjectwriteTo(Ljava/io/File;)V Exceptions java/io/IOException SourceFileExtension.java  PK %^D>7H==Horg/openqa/selenium/firefox/internal/NewProfileExtensionConnection.class1 Borg/openqa/selenium/firefox/internal/NewProfileExtensionConnectionjava/lang/Object*org/openqa/selenium/remote/CommandExecutor/org/openqa/selenium/firefox/ExtensionConnection BUFFER_SIZEI ConstantValue networkUtils&Lorg/openqa/selenium/net/NetworkUtils;connectTimeoutJprocess+Lorg/openqa/selenium/firefox/FirefoxBinary;profile,Lorg/openqa/selenium/firefox/FirefoxProfile;hostLjava/lang/String;lock#Lorg/openqa/selenium/internal/Lock; profileDirLjava/io/File;delegate0Lorg/openqa/selenium/remote/HttpCommandExecutor;()VCode!$org/openqa/selenium/net/NetworkUtils # $ & LineNumberTableLocalVariableTable(Lorg/openqa/selenium/internal/Lock;Lorg/openqa/selenium/firefox/FirefoxBinary;Lorg/openqa/selenium/firefox/FirefoxProfile;Ljava/lang/String;)V Exceptions,java/lang/Exception # /  132)org/openqa/selenium/firefox/FirefoxBinary 45 getTimeout()J 7  9  ;  = thisDLorg/openqa/selenium/firefox/internal/NewProfileExtensionConnection;binarystartCjava/io/IOException EGF!org/openqa/selenium/internal/Lock H(J)V J KLdetermineNextFreePort(I)INwebdriver_firefox_port PRQ*org/openqa/selenium/firefox/FirefoxProfile ST setPreference(Ljava/lang/String;I)V PV WX layoutOnDisk()Ljava/io/File; Z  1\ ]^clean=(Lorg/openqa/selenium/firefox/FirefoxProfile;Ljava/io/File;)V`.org/openqa/selenium/remote/HttpCommandExecutor b cdbuildUrl#(Ljava/lang/String;I)Ljava/net/URL; _f $g(Ljava/net/URL;)V i kwebdriver.firefox.logfile monjava/lang/System pq getProperty&(Ljava/lang/String;)Ljava/lang/String;s java/io/File ru $v(Ljava/lang/String;)Vx8org/openqa/selenium/remote/internal/CircularOutputStream wz ${(Ljava/io/File;I)V 1} ~setOutputWatcher(Ljava/io/OutputStream;)Vjava/lang/String 1  startProfileP(Lorg/openqa/selenium/firefox/FirefoxProfile;Ljava/io/File;[Ljava/lang/String;)V m 5currentTimeMillis1org/openqa/selenium/firefox/NotConnectedException _ getAddressOfRemoteServer()Ljava/net/URL; $(Ljava/net/URL;J)Vd java/lang/Thread Hsleep   isConnected()Z B printStackTrace&org/openqa/selenium/WebDriverExceptionFFailed to connect to binary %s on port %d; process output follows: %s 1 toString()Ljava/lang/String; java/lang/Integer valueOf(I)Ljava/lang/Integer; 1 getConsoleOutput format9(Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/String; $*(Ljava/lang/String;Ljava/lang/Throwable;)V $(Ljava/lang/Throwable;)V E unlockjava/lang/InterruptedExceptionportfirefoxLogFilelogFile waitUntileLjava/io/IOException;(Lorg/openqa/selenium/WebDriverException;Ljava/lang/Exception;executeK(Lorg/openqa/selenium/remote/Command;)Lorg/openqa/selenium/remote/Response; _ command$Lorg/openqa/selenium/remote/Command;java/net/Socket #java/net/InetSocketAddress localhost $T bind(Ljava/net/SocketAddress;)V close,Cannot find free port in the range %d to %d ujava/net/BindExceptionnewportsocketLjava/net/Socket;addressLjava/net/InetSocketAddress;quit 1  P ](Ljava/io/File;)V equals(Ljava/lang/Object;)Z obtainLoopbackIp4Address java/net/URLhttp/hub $:(Ljava/lang/String;Ljava/lang/String;ILjava/lang/String;)Vjava/net/MalformedURLException hostToUse Ljava/net/MalformedURLException;  openConnection()Ljava/net/URLConnection;  java/net/URLConnection  connect SourceFile"NewProfileExtensionConnection.java!     / Y"%' 0 -($)*+"*-*.*,06*+8*-:*,<';= >?@A!B(4">?""@""A*BJ<*8*6D*I<*:MO**:UY*<*:*Y[*_Y*.aehjlM, rY,tN*<wY-y|*<*:*Y*6a7*Y*h*6:*է{M,YY*<SYSY*<S,MYY*<SYSY*<S,MY,:*8*8B(+22'*EGIJ!L,N;PNQTReSwU]^_`a`ef^jklmnmnlopqr q#r$p(s)t2u4v=w@vIx(RJ>?H Ttec41-) *B= *h+ʰ'{( >? KL*B f=<YNY:-6-:-ۧ :-`YYSYS")"2)+2'B "&)+248;GKb(4f>?f d  ."P*<*Y*:*Y'( >? cd,* %*MY,NY-!"'"#(*,, # Z*hL B' (>?  PK lC>fS5org/openqa/selenium/firefox/internal/.svn/all-wcpropsK 25 svn:wc:ra_dav:version-url V 78 /svn/!svn/ver/11222/trunk/java/client/src/org/openqa/selenium/firefox/internal END ClasspathExtension.java K 25 svn:wc:ra_dav:version-url V 102 /svn/!svn/ver/11222/trunk/java/client/src/org/openqa/selenium/firefox/internal/ClasspathExtension.java END Executable.java K 25 svn:wc:ra_dav:version-url V 94 /svn/!svn/ver/11222/trunk/java/client/src/org/openqa/selenium/firefox/internal/Executable.java END ProfilesIni.java K 25 svn:wc:ra_dav:version-url V 95 /svn/!svn/ver/11222/trunk/java/client/src/org/openqa/selenium/firefox/internal/ProfilesIni.java END NewProfileExtensionConnection.java K 25 svn:wc:ra_dav:version-url V 113 /svn/!svn/ver/11222/trunk/java/client/src/org/openqa/selenium/firefox/internal/NewProfileExtensionConnection.java END FileExtension.java K 25 svn:wc:ra_dav:version-url V 97 /svn/!svn/ver/11222/trunk/java/client/src/org/openqa/selenium/firefox/internal/FileExtension.java END Extension.java K 25 svn:wc:ra_dav:version-url V 93 /svn/!svn/ver/11222/trunk/java/client/src/org/openqa/selenium/firefox/internal/Extension.java END Streams.java K 25 svn:wc:ra_dav:version-url V 91 /svn/!svn/ver/11222/trunk/java/client/src/org/openqa/selenium/firefox/internal/Streams.java END PK lC>1org/openqa/selenium/firefox/internal/.svn/entries8 dir 11264 http://selenium.googlecode.com/svn/trunk/java/client/src/org/openqa/selenium/firefox/internal http://selenium.googlecode.com/svn 2011-01-17T22:36:50.673692Z 10993 simon.m.stewart svn:special svn:externals svn:needs-lock 07704840-8298-11de-bf8c-fd130f914ac9 ClasspathExtension.java file 2011-02-03T12:01:16.000000Z cc256d8e0a11bf5666d561eb9898f752 2011-01-17T21:50:09.122540Z 10988 simon.m.stewart Executable.java file 2011-02-03T12:01:16.000000Z 9922b62838b01ff861fe2c2d5edcb39a 2011-01-17T22:36:50.673692Z 10993 simon.m.stewart ProfilesIni.java file 2011-02-03T12:01:16.000000Z 988580d7a738a38f1d4e12a13fff40e6 2011-01-17T21:50:09.122540Z 10988 simon.m.stewart NewProfileExtensionConnection.java file 2011-02-03T12:01:16.000000Z e0cfea20dea785fc22ad088d68645999 2011-01-17T20:59:07.760402Z 10980 simon.m.stewart FileExtension.java file 2011-02-03T12:01:16.000000Z ca4de5520c07f11dec1c0f36d7dfe657 2011-01-17T21:50:09.122540Z 10988 simon.m.stewart Extension.java file 2011-02-03T12:01:16.000000Z 93905d959c153d235736b3ba0d30cafe 2010-09-04T18:47:03.526226Z 9592 simon.m.stewart Streams.java file 2011-02-03T12:01:16.000000Z a73b591e17cffdcad44bb702c5056d79 2010-03-13T21:05:51.939598Z 8500 simon.m.stewart PK lC>G0org/openqa/selenium/firefox/internal/.svn/format8 PK lC>~f5p p Torg/openqa/selenium/firefox/internal/.svn/text-base/ClasspathExtension.java.svn-base/* Copyright 2010 WebDriver committers Copyright 2010 Google Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package org.openqa.selenium.firefox.internal; import java.io.File; import java.io.FileOutputStream; import java.io.IOException; import java.io.OutputStream; import java.net.URL; import com.google.common.io.Closeables; import com.google.common.io.Files; import com.google.common.io.Resources; import org.openqa.selenium.WebDriverException; import org.openqa.selenium.io.FileHandler; public class ClasspathExtension implements Extension { private final Class loadResourcesUsing; private final String loadFrom; public ClasspathExtension(Class loadResourcesUsing, String loadFrom) { this.loadResourcesUsing = loadResourcesUsing; this.loadFrom = loadFrom; } public void writeTo(File extensionsDir) throws IOException { if (!FileHandler.isZipped(loadFrom)) { throw new WebDriverException("Will only install zipped extensions for now"); } File holdingPen = new File(extensionsDir, "webdriver-staging"); FileHandler.createDir(holdingPen); File extractedXpi = new File(holdingPen, loadFrom); File parentDir = extractedXpi.getParentFile(); if (!parentDir.exists()) { parentDir.mkdirs(); } if (!Boolean.getBoolean("webdriver.development")) { URL resourceUrl = Resources.getResource(loadResourcesUsing, loadFrom); OutputStream stream = null; try { stream = new FileOutputStream(extractedXpi); Resources.copy(resourceUrl, stream); } finally { Closeables.closeQuietly(stream); } } else { File builtXpi = new File("build/firefox/webdriver.xpi"); if (!builtXpi.exists()) { throw new RuntimeException("Could not find file: " + builtXpi.getAbsolutePath()); } Files.copy(builtXpi, extractedXpi); } new FileExtension(extractedXpi).writeTo(extensionsDir); } } PK lC>?eekLorg/openqa/selenium/firefox/internal/.svn/text-base/Executable.java.svn-basepackage org.openqa.selenium.firefox.internal; import org.openqa.selenium.Platform; import org.openqa.selenium.WebDriverException; import org.openqa.selenium.os.CommandLine; import org.openqa.selenium.remote.internal.CircularOutputStream; import java.io.File; import java.io.OutputStream; import java.util.Map; /** * Wrapper around our runtime environment requirements. * Performs discovery of firefox instances. * *

NOTE: System and platform binaries will only be discovered at class initialization. * * @author gregory.block@google.com (Gregory Block) */ public class Executable { private static final File SYSTEM_BINARY = locateFirefoxBinaryFromSystemProperty(); private static final File PLATFORM_BINARY = locateFirefoxBinaryFromPlatform(); private final File binary; public Executable(File userSpecifiedBinaryPath) { if (userSpecifiedBinaryPath != null) { // It should exist and be a file. if (userSpecifiedBinaryPath.exists() && userSpecifiedBinaryPath.isFile()) { binary = userSpecifiedBinaryPath; return; } throw new WebDriverException( "Specified firefox binary location does not exist or is not a real file: " + userSpecifiedBinaryPath); } if (SYSTEM_BINARY != null && SYSTEM_BINARY.exists()) { binary = SYSTEM_BINARY; return; } if (PLATFORM_BINARY != null && PLATFORM_BINARY.exists()) { binary = PLATFORM_BINARY; return; } throw new WebDriverException("Cannot find firefox binary in PATH. " + "Make sure firefox is installed. OS appears to be: " + Platform.getCurrent()); } public File getFile() { return binary; } public String getPath() { return binary.getAbsolutePath(); } public void setLibraryPath(ProcessBuilder builder, final Map extraEnv) { final String propertyName = CommandLine.getLibraryPathPropertyName(); StringBuilder libraryPath = new StringBuilder(); // If we have an env var set for the path, use it. String env = getEnvVar(propertyName, null); if (env != null) { libraryPath.append(env).append(File.pathSeparator); } // Check our extra env vars for the same var, and use it too. env = extraEnv.get(propertyName); if (env != null) { libraryPath.append(env).append(File.pathSeparator); } // Last, add the contents of the specified system property, defaulting to the binary's path. // On Snow Leopard, beware of problems the sqlite library String firefoxLibraryPath = System.getProperty("webdriver.firefox.library.path", binary.getParentFile().getAbsolutePath()); if (Platform.getCurrent().is(Platform.MAC) && Platform.getCurrent().getMinorVersion() > 5) { libraryPath.append(libraryPath).append(File.pathSeparator); } else { libraryPath.append(firefoxLibraryPath).append(File.pathSeparator).append(libraryPath); } // Add the library path to the builder. builder.environment().put(propertyName, libraryPath.toString()); } /** * Locates the firefox binary from a system property. Will throw an exception if the binary * cannot be found. */ private static File locateFirefoxBinaryFromSystemProperty() { String binaryName = System.getProperty("webdriver.firefox.bin"); if (binaryName == null) return null; File binary = new File(binaryName); if (binary.exists()) return binary; switch (Platform.getCurrent()) { case WINDOWS: case VISTA: case XP: if (!binaryName.endsWith(".exe")) binaryName += ".exe"; break; case MAC: if (!binaryName.endsWith(".app")) binaryName += ".app"; binaryName += "/Contents/MacOS/firefox-bin"; break; default: // Fall through } binary = new File(binaryName); if (binary.exists()) return binary; throw new WebDriverException( String.format( "\"webdriver.firefox.bin\" property set, but unable to locate the requested binary: %s", binaryName )); } /** * Locates the firefox binary by platform. */ private static File locateFirefoxBinaryFromPlatform() { File binary = null; switch (Platform.getCurrent()) { case WINDOWS: case VISTA: case XP: binary = new File(getEnvVar("PROGRAMFILES", "\\Program Files") + "\\Mozilla Firefox\\firefox.exe"); if (!binary.exists()) { binary = new File(getEnvVar("ProgramFiles(x86)", getEnvVar("SystemDrive", "c:") + "\\Program Files (x86)") + "\\Mozilla Firefox\\firefox.exe"); } break; case MAC: binary = new File("/Applications/Firefox.app/Contents/MacOS/firefox-bin"); break; default: // Do nothing } return binary != null && binary.exists() ? binary : findBinary("firefox3", "firefox2", "firefox"); } /** * Retrieve an env var; if no var is set, returns the default * * @param name the name of the variable * @param defaultValue the default value of the variable * @return the env var */ private static String getEnvVar(String name, String defaultValue) { final String value = System.getenv(name); if (value != null) { return value; } return defaultValue; } /** * Walk a PATH to locate binaries with a specified name. Binaries will be searched for in the * order they are provided. * * @param binaryNames the binary names to search for * @return the first binary found matching that name. */ private static File findBinary(String... binaryNames) { final String[] paths = System.getenv("PATH").split(File.pathSeparator); for (String binaryName : binaryNames) { for (String path : paths) { File file = new File(path, binaryName); if (file.exists() && !file.isDirectory()) { return file; } if (Platform.getCurrent().is(Platform.WINDOWS)) { File exe = new File(path, binaryName + ".exe"); if (exe.exists() && !exe.isDirectory()) { return exe; } } } } return null; } public OutputStream getDefaultOutputStream() { String firefoxLogFile = System.getProperty("webdriver.firefox.logfile"); File logFile = firefoxLogFile == null ? null : new File(firefoxLogFile); return new CircularOutputStream(logFile); } } PK lC>k&  Korg/openqa/selenium/firefox/internal/.svn/text-base/Extension.java.svn-base/* Copyright 2010 WebDriver committers Copyright 2010 Google Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package org.openqa.selenium.firefox.internal; import java.io.File; import java.io.IOException; public interface Extension { void writeTo(File parentDirectory) throws IOException; } PK lC>?``Oorg/openqa/selenium/firefox/internal/.svn/text-base/FileExtension.java.svn-base/* Copyright 2010 WebDriver committers Copyright 2010 Google Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package org.openqa.selenium.firefox.internal; import javax.xml.XMLConstants; import javax.xml.namespace.NamespaceContext; import javax.xml.parsers.DocumentBuilder; import javax.xml.parsers.DocumentBuilderFactory; import javax.xml.xpath.XPath; import javax.xml.xpath.XPathConstants; import javax.xml.xpath.XPathFactory; import java.io.BufferedInputStream; import java.io.File; import java.io.FileInputStream; import java.io.FileNotFoundException; import java.io.IOException; import java.util.Iterator; import org.openqa.selenium.WebDriverException; import org.openqa.selenium.io.FileHandler; import org.openqa.selenium.io.TemporaryFilesystem; import org.w3c.dom.Document; import org.w3c.dom.Node; public class FileExtension implements Extension { private static final String EM_NAMESPACE_URI = "http://www.mozilla.org/2004/em-rdf#"; private final File toInstall; public FileExtension(File toInstall) { this.toInstall = toInstall; } public void writeTo(File extensionsDir) throws IOException { if (!toInstall.isDirectory() && !FileHandler.isZipped(toInstall.getAbsolutePath())) { throw new IOException( String.format("Can only install from a zip file, an XPI or a directory: %s", toInstall.getAbsolutePath())); } File root = obtainRootDirectory(toInstall); String id = readIdFromInstallRdf(root); File extensionDirectory = new File(extensionsDir, id); if (extensionDirectory.exists() && !FileHandler.delete(extensionDirectory)) { throw new IOException("Unable to delete existing extension directory: " + extensionDirectory); } FileHandler.createDir(extensionDirectory); FileHandler.makeWritable(extensionDirectory); FileHandler.copy(root, extensionDirectory ); TemporaryFilesystem.deleteTempDir(root); } private File obtainRootDirectory(File extensionToInstall) throws IOException { File root = extensionToInstall; if (!extensionToInstall.isDirectory()) { BufferedInputStream bis = new BufferedInputStream(new FileInputStream(extensionToInstall)); try { root = FileHandler.unzip(bis); } finally { bis.close(); } } return root; } private String readIdFromInstallRdf(File root) { try { File installRdf = new File(root, "install.rdf"); DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance(); factory.setNamespaceAware(true); DocumentBuilder builder = factory.newDocumentBuilder(); Document doc = builder.parse(installRdf); XPath xpath = XPathFactory.newInstance().newXPath(); xpath.setNamespaceContext(new NamespaceContext() { public String getNamespaceURI(String prefix) { if ("em".equals(prefix)) { return EM_NAMESPACE_URI; } else if ("RDF".equals(prefix)) { return "http://www.w3.org/1999/02/22-rdf-syntax-ns#"; } return XMLConstants.NULL_NS_URI; } public String getPrefix(String uri) { throw new UnsupportedOperationException("getPrefix"); } public Iterator getPrefixes(String uri) { throw new UnsupportedOperationException("getPrefixes"); } }); Node idNode = (Node) xpath.compile("//em:id").evaluate(doc, XPathConstants.NODE); String id = null; if (idNode == null) { Node descriptionNode = (Node) xpath.compile("//RDF:Description").evaluate(doc, XPathConstants.NODE); Node idAttr = descriptionNode.getAttributes().getNamedItemNS(EM_NAMESPACE_URI, "id"); if (idAttr == null) { throw new WebDriverException( "Cannot locate node containing extension id: " + installRdf.getAbsolutePath()); } id = idAttr.getNodeValue(); } else { id = idNode.getTextContent(); } if (id == null || "".equals(id.trim())) { throw new FileNotFoundException("Cannot install extension with ID: " + id); } return id; } catch (Exception e) { throw new WebDriverException(e); } } } PK lC>t/_org/openqa/selenium/firefox/internal/.svn/text-base/NewProfileExtensionConnection.java.svn-base/* Copyright 2007-2010 WebDriver committers Copyright 2007-2010 Google Inc. Portions copyright 2007 ThoughtWorks, Inc Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package org.openqa.selenium.firefox.internal; import java.io.File; import java.io.IOException; import java.net.BindException; import java.net.InetSocketAddress; import java.net.MalformedURLException; import java.net.Socket; import java.net.URL; import org.openqa.selenium.internal.Lock; import org.openqa.selenium.net.NetworkUtils; import org.openqa.selenium.WebDriverException; import org.openqa.selenium.firefox.ExtensionConnection; import org.openqa.selenium.firefox.FirefoxBinary; import org.openqa.selenium.firefox.FirefoxProfile; import org.openqa.selenium.firefox.NotConnectedException; import org.openqa.selenium.remote.Command; import org.openqa.selenium.remote.CommandExecutor; import org.openqa.selenium.remote.HttpCommandExecutor; import org.openqa.selenium.remote.Response; import org.openqa.selenium.remote.internal.CircularOutputStream; import static org.openqa.selenium.firefox.FirefoxProfile.PORT_PREFERENCE; import static org.openqa.selenium.internal.SocketLock.DEFAULT_PORT; public class NewProfileExtensionConnection implements CommandExecutor, ExtensionConnection { private final static int BUFFER_SIZE = 4096; private static final NetworkUtils networkUtils = new NetworkUtils(); private final long connectTimeout; private final FirefoxBinary process; private final FirefoxProfile profile; private final String host; private final Lock lock; private File profileDir; private HttpCommandExecutor delegate; public NewProfileExtensionConnection(Lock lock, FirefoxBinary binary, FirefoxProfile profile, String host) throws Exception { this.host = host; this.connectTimeout = binary.getTimeout(); this.lock = lock; this.profile = profile; this.process = binary; } public void start() throws IOException { int port = 0; lock.lock(connectTimeout); try { port = determineNextFreePort(DEFAULT_PORT); profile.setPreference(PORT_PREFERENCE, port); profileDir = profile.layoutOnDisk(); process.clean(profile, profileDir); delegate = new HttpCommandExecutor(buildUrl(host, port)); String firefoxLogFile = System.getProperty("webdriver.firefox.logfile"); File logFile = firefoxLogFile == null ? null : new File(firefoxLogFile); process.setOutputWatcher(new CircularOutputStream(logFile, BUFFER_SIZE)); process.startProfile(profile, profileDir); // Just for the record; the critical section is all along while firefox is starting with the profile. // There is currently no mechanism for the profile to notify us when it has started // successfully and is ready for requests. Instead, we must loop until we're able to // open a connection with the server, at which point it should be safe to continue // (since the extension shouldn't accept connections until it is ready for requests). long waitUntil = System.currentTimeMillis() + connectTimeout; while (!isConnected()) { if (waitUntil < System.currentTimeMillis()) { throw new NotConnectedException( delegate.getAddressOfRemoteServer(), connectTimeout); } try { Thread.sleep(100); } catch(InterruptedException ignored) { // Do nothing } } } catch (IOException e) { e.printStackTrace(); throw new WebDriverException( String.format("Failed to connect to binary %s on port %d; process output follows: \n%s", process.toString(), port, process.getConsoleOutput()), e); } catch (WebDriverException e) { throw new WebDriverException( String.format("Failed to connect to binary %s on port %d; process output follows: \n%s", process.toString(), port, process.getConsoleOutput()), e); } catch (Exception e) { throw new WebDriverException(e); } finally { lock.unlock(); } } public Response execute(Command command) throws IOException { return delegate.execute(command); } protected int determineNextFreePort(int port) throws IOException { // Attempt to connect to the given port on the host // If we can't connect, then we're good to use it int newport; for (newport = port; newport < port + 200; newport++) { Socket socket = new Socket(); InetSocketAddress address = new InetSocketAddress("localhost", newport); try { socket.bind(address); return newport; } catch (BindException e) { // Port is already bound. Skip it and continue } finally { socket.close(); } } throw new WebDriverException( String.format("Cannot find free port in the range %d to %d ", port, newport)); } public void quit() { // This should only be called after the QUIT command has been sent, // so go ahead and clean up our process and profile. process.quit(); if (profileDir != null) { profile.clean(profileDir); } } /** * Builds the URL for the Firefox extension running on the given host and * port. If the host is {@code localhost}, an attempt will be made to find the * correct loopback address. * * @param host The hostname the extension is running on. * @param port The port the extension is listening on. * @return The URL of the Firefox extension. */ private static URL buildUrl(String host, int port) { String hostToUse = "localhost".equals(host) ? networkUtils.obtainLoopbackIp4Address() : host; try { return new URL("http", hostToUse, port, "/hub"); } catch (MalformedURLException e) { throw new WebDriverException(e); } } public boolean isConnected() { try { // TODO: use a more intelligent way of testing if the server is ready. delegate.getAddressOfRemoteServer().openConnection().connect(); return true; } catch (IOException e) { // Cannot connect yet. return false; } } } PK lC>0ߣMorg/openqa/selenium/firefox/internal/.svn/text-base/ProfilesIni.java.svn-base/* Copyright 2007-2009 WebDriver committers Copyright 2007-2009 Google Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package org.openqa.selenium.firefox.internal; import java.io.BufferedReader; import java.io.File; import java.io.FileReader; import java.io.IOException; import java.text.MessageFormat; import java.util.Map; import com.google.common.collect.Maps; import org.openqa.selenium.Platform; import org.openqa.selenium.WebDriverException; import org.openqa.selenium.firefox.FirefoxProfile; import org.openqa.selenium.io.FileHandler; import org.openqa.selenium.io.TemporaryFilesystem; public class ProfilesIni { private Map profiles = Maps.newHashMap(); public ProfilesIni() { File appData = locateAppDataDirectory(Platform.getCurrent()); profiles = readProfiles(appData); } protected Map readProfiles(File appData) { Map toReturn = Maps.newHashMap(); File profilesIni = new File(appData, "profiles.ini"); if (!profilesIni.exists()) { // Fine. No profiles.ini file return toReturn; } boolean isRelative = true; String name = null; String path = null; BufferedReader reader = null; try { reader = new BufferedReader(new FileReader(profilesIni)); String line = reader.readLine(); while (line != null) { if (line.startsWith("[Profile")) { File profile = newProfile(name, appData, path, isRelative); if (profile != null) toReturn.put(name, profile); name = null; path = null; } else if (line.startsWith("Name=")) { name = line.substring("Name=".length()); } else if (line.startsWith("IsRelative=")) { isRelative = line.endsWith("1"); } else if (line.startsWith("Path=")) { path = line.substring("Path=".length()); } line = reader.readLine(); } } catch (IOException e) { throw new WebDriverException(e); } finally { try { if (reader != null) { File profile = newProfile(name, appData, path, isRelative); if (profile != null) toReturn.put(name, profile); reader.close(); } } catch (IOException e) { // Nothing that can be done sensibly. Swallowing. } } return toReturn; } protected File newProfile(String name, File appData, String path, boolean isRelative) { if (name != null && path != null) { File profileDir = isRelative ? new File(appData, path) : new File(path); return profileDir; } return null; } public FirefoxProfile getProfile(String profileName) { File profileDir = profiles.get(profileName); if (profileDir == null) return null; // Make a copy of the profile to use File tempDir = TemporaryFilesystem.createTempDir("userprofile", "copy"); try { FileHandler.copy(profileDir, tempDir); // Delete the old compreg.dat file so that our new extension is registered File compreg = new File(tempDir, "compreg.dat"); if (compreg.exists()) { if (!compreg.delete()) { throw new WebDriverException("Cannot delete file from copy of profile " + profileName); } } } catch (IOException e) { throw new WebDriverException(e); } return new FirefoxProfile(tempDir); } protected File locateAppDataDirectory(Platform os) { File appData; switch (os) { case WINDOWS: case VISTA: case XP: appData = new File(MessageFormat.format("{0}\\Mozilla\\Firefox", System.getenv("APPDATA"))); break; case MAC: appData = new File(MessageFormat.format("{0}/Library/Application Support/Firefox", System.getenv("HOME"))); break; default: appData = new File(MessageFormat.format("{0}/.mozilla/firefox", System.getenv("HOME"))); break; } if (!appData.exists()) { // It's possible we're being run as part of an automated build. // Assume the user knows what they're doing return null; } if (!appData.isDirectory()) { throw new WebDriverException("The discovered user firefox data directory " + "(which normally contains the profiles) isn't a directory: " + appData.getAbsolutePath()); } return appData; } } PK lC>ɩIorg/openqa/selenium/firefox/internal/.svn/text-base/Streams.java.svn-base/* Copyright 2007-2009 WebDriver committers Copyright 2007-2009 Google Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package org.openqa.selenium.firefox.internal; import org.openqa.selenium.remote.internal.CircularOutputStream; import java.io.IOException; import java.io.OutputStream; public class Streams { /** * Drains the contents of a stream without blocking on further input from that stream. * * @param stream the stream to drain * @return the contents of the drained stream */ public static String drainStream(OutputStream stream) throws IOException { if (stream == null) { return null; } if (stream instanceof CircularOutputStream) { return stream.toString(); } return null; } } PK %^D>)-org/openqa/selenium/interactions/Action.class1 'org/openqa/selenium/interactions/Actionjava/lang/Objectperform()V SourceFile Action.javaPK %^D>08org/openqa/selenium/interactions/DoubleClickAction.class1'2org/openqa/selenium/interactions/DoubleClickActionF(Lorg/openqa/selenium/Mouse;Lorg/openqa/selenium/internal/Locatable;)VCode  LineNumberTableLocalVariableTablethis4Lorg/openqa/selenium/interactions/DoubleClickAction;mouseLorg/openqa/selenium/Mouse;locationProvider(Lorg/openqa/selenium/internal/Locatable;perform()V  moveToLocation    getActionLocation9()Lorg/openqa/selenium/interactions/internal/Coordinates; "!org/openqa/selenium/Mouse #$ doubleClick:(Lorg/openqa/selenium/interactions/internal/Coordinates;)V SourceFileDoubleClickAction.java! I*+,    D*** %&' %&PK %^D>2&11<org/openqa/selenium/interactions/ActionChainsGenerator.class16org/openqa/selenium/interactions/ActionChainsGeneratorjava/lang/ObjectkeyDownT(Lorg/openqa/selenium/Keys;)Lorg/openqa/selenium/interactions/ActionChainsGenerator;t(Lorg/openqa/selenium/WebElement;Lorg/openqa/selenium/Keys;)Lorg/openqa/selenium/interactions/ActionChainsGenerator;keyUpsendKeysS([Ljava/lang/CharSequence;)Lorg/openqa/selenium/interactions/ActionChainsGenerator;s(Lorg/openqa/selenium/WebElement;[Ljava/lang/CharSequence;)Lorg/openqa/selenium/interactions/ActionChainsGenerator; clickAndHoldZ(Lorg/openqa/selenium/WebElement;)Lorg/openqa/selenium/interactions/ActionChainsGenerator;releaseclick:()Lorg/openqa/selenium/interactions/ActionChainsGenerator; doubleClick moveToElement\(Lorg/openqa/selenium/WebElement;II)Lorg/openqa/selenium/interactions/ActionChainsGenerator; moveByOffset<(II)Lorg/openqa/selenium/interactions/ActionChainsGenerator; contextClick dragAndDropz(Lorg/openqa/selenium/WebElement;Lorg/openqa/selenium/WebElement;)Lorg/openqa/selenium/interactions/ActionChainsGenerator;build+()Lorg/openqa/selenium/interactions/Action; SourceFileActionChainsGenerator.java        PK %^D>Z 2org/openqa/selenium/interactions/ClickAction.class1',org/openqa/selenium/interactions/ClickActionF(Lorg/openqa/selenium/Mouse;Lorg/openqa/selenium/internal/Locatable;)VCode  LineNumberTableLocalVariableTablethis.Lorg/openqa/selenium/interactions/ClickAction;mouseLorg/openqa/selenium/Mouse;locationProvider(Lorg/openqa/selenium/internal/Locatable;perform()V  moveToLocation    getActionLocation9()Lorg/openqa/selenium/interactions/internal/Coordinates; "!org/openqa/selenium/Mouse #$click:(Lorg/openqa/selenium/interactions/internal/Coordinates;)V SourceFileClickAction.java! I*+,  !"  D*** %&' %&PK %^D>,,Corg/openqa/selenium/interactions/DefaultActionChainsGenerator.class1=org/openqa/selenium/interactions/DefaultActionChainsGeneratorjava/lang/Object6org/openqa/selenium/interactions/ActionChainsGeneratormouseLorg/openqa/selenium/Mouse;keyboardLorg/openqa/selenium/Keyboard;action2Lorg/openqa/selenium/interactions/CompositeAction;"(Lorg/openqa/selenium/WebDriver;)VCode#org/openqa/selenium/HasInputDevices   getKeyboard ()Lorg/openqa/selenium/Keyboard;  getMouse()Lorg/openqa/selenium/Mouse;  <(Lorg/openqa/selenium/Keyboard;Lorg/openqa/selenium/Mouse;)VLineNumberTableLocalVariableTablethis?Lorg/openqa/selenium/interactions/DefaultActionChainsGenerator;driverLorg/openqa/selenium/WebDriver; $ %()V '  ) +0org/openqa/selenium/interactions/CompositeAction *$ . keyDown[(Lorg/openqa/selenium/Keys;)Lorg/openqa/selenium/interactions/DefaultActionChainsGenerator; 2 /3{(Lorg/openqa/selenium/WebElement;Lorg/openqa/selenium/Keys;)Lorg/openqa/selenium/interactions/DefaultActionChainsGenerator;theKeyLorg/openqa/selenium/Keys;7.org/openqa/selenium/interactions/KeyDownAction9&org/openqa/selenium/internal/Locatable 6; <~(Lorg/openqa/selenium/Keyboard;Lorg/openqa/selenium/Mouse;Lorg/openqa/selenium/internal/Locatable;Lorg/openqa/selenium/Keys;)V *> ?@ addAction](Lorg/openqa/selenium/interactions/Action;)Lorg/openqa/selenium/interactions/CompositeAction;element Lorg/openqa/selenium/WebElement;keyUp E C3G,org/openqa/selenium/interactions/KeyUpAction F;sendKeysZ([Ljava/lang/CharSequence;)Lorg/openqa/selenium/interactions/DefaultActionChainsGenerator; L IMz(Lorg/openqa/selenium/WebElement;[Ljava/lang/CharSequence;)Lorg/openqa/selenium/interactions/DefaultActionChainsGenerator; keysToSend[Ljava/lang/CharSequence;Q/org/openqa/selenium/interactions/SendKeysAction PS T}(Lorg/openqa/selenium/Keyboard;Lorg/openqa/selenium/Mouse;Lorg/openqa/selenium/internal/Locatable;[Ljava/lang/CharSequence;)Vbuild+()Lorg/openqa/selenium/interactions/Action;toReturn clickAndHolda(Lorg/openqa/selenium/WebElement;)Lorg/openqa/selenium/interactions/DefaultActionChainsGenerator;[3org/openqa/selenium/interactions/ClickAndHoldAction Z] ^F(Lorg/openqa/selenium/Mouse;Lorg/openqa/selenium/internal/Locatable;)V onElementreleaseb4org/openqa/selenium/interactions/ButtonReleaseAction a]clickf,org/openqa/selenium/interactions/ClickAction e]:()Lorg/openqa/selenium/interactions/ActionChainsGenerator; j dY doubleClickm2org/openqa/selenium/interactions/DoubleClickAction l] moveToElementq0org/openqa/selenium/interactions/MoveMouseAction p] toElement\(Lorg/openqa/selenium/WebElement;II)Lorg/openqa/selenium/interactions/ActionChainsGenerator;v3org/openqa/selenium/interactions/MoveToOffsetAction ux yH(Lorg/openqa/selenium/Mouse;Lorg/openqa/selenium/internal/Locatable;II)VxOffsetIyOffset moveByOffset<(II)Lorg/openqa/selenium/interactions/ActionChainsGenerator; contextClick3org/openqa/selenium/interactions/ContextClickAction ] dragAndDrop(Lorg/openqa/selenium/WebElement;Lorg/openqa/selenium/WebElement;)Lorg/openqa/selenium/interactions/DefaultActionChainsGenerator;sourcetargetZ(Lorg/openqa/selenium/WebElement;)Lorg/openqa/selenium/interactions/ActionChainsGenerator;  oY  `Yt(Lorg/openqa/selenium/WebElement;Lorg/openqa/selenium/Keys;)Lorg/openqa/selenium/interactions/ActionChainsGenerator;T(Lorg/openqa/selenium/Keys;)Lorg/openqa/selenium/interactions/ActionChainsGenerator;  C0  /0  kYs(Lorg/openqa/selenium/WebElement;[Ljava/lang/CharSequence;)Lorg/openqa/selenium/interactions/ActionChainsGenerator;S([Ljava/lang/CharSequence;)Lorg/openqa/selenium/interactions/ActionChainsGenerator;  IJ  XYz(Lorg/openqa/selenium/WebElement;Lorg/openqa/selenium/WebElement;)Lorg/openqa/selenium/interactions/ActionChainsGenerator;   Y SourceFile!DefaultActionChainsGenerator.java!   S*++' () !" h*#*,&*+(**Y,-+, -./   /0;*+12 45/3`*-6Y*(*&+8,:=W* 67  AB45C0;*+D; 45C3`*-FY*(*&+8,H=W* ?@  AB45IJ;*+KD NOIM`*-PY*(*&+8,R=W* HI  ABNOUVH *-L*-+NO P  W XYQ*-ZY*&+8\=W* TU _B`YQ*-aY*&+8c=W* YZ _BdYQ*-eY*&+8g=W* ^_ _Bdh0*ic  kYQ*-lY*&+8n=W* gh _BoYQ*-pY*&+8r=W* lm sBotg*-uY*&+8w=W* qr* sBz{|{}~Z*-uY*&w=W* vw  z{|{YQ*-Y*&+8=W* {| _BG*-ZY*&+8\=W*-pY*&,8r=W*-aY*&,8c=W*.E G GBGBAo&*+A`&*+AC'*+,DAC&*+A/'*+,1A/&*+Ad&*+iAk&*+I'*+,KI&*+AX&*+A'*+,A&*+PK %^D>f4,,6org/openqa/selenium/interactions/MoveMouseAction.class1+0org/openqa/selenium/interactions/MoveMouseActionF(Lorg/openqa/selenium/Mouse;Lorg/openqa/selenium/internal/Locatable;)VCode   "java/lang/IllegalArgumentException*Must provide a location for a move action.  (Ljava/lang/String;)VLineNumberTableLocalVariableTablethis2Lorg/openqa/selenium/interactions/MoveMouseAction;mouseLorg/openqa/selenium/Mouse;locationProvider(Lorg/openqa/selenium/internal/Locatable;perform()V    !"getActionLocation9()Lorg/openqa/selenium/interactions/internal/Coordinates; $&%org/openqa/selenium/Mouse '( mouseMove:(Lorg/openqa/selenium/interactions/internal/Coordinates;)V SourceFileMoveMouseAction.java! _*+, , Y!" #%  <**# ( ) )*PK %^D>5P2..5org/openqa/selenium/interactions/SendKeysAction.class1-/org/openqa/selenium/interactions/SendKeysAction;org/openqa/selenium/interactions/internal/KeysRelatedAction'org/openqa/selenium/interactions/Action keysToSend[Ljava/lang/CharSequence;}(Lorg/openqa/selenium/Keyboard;Lorg/openqa/selenium/Mouse;Lorg/openqa/selenium/internal/Locatable;[Ljava/lang/CharSequence;)VCode  d(Lorg/openqa/selenium/Keyboard;Lorg/openqa/selenium/Mouse;Lorg/openqa/selenium/internal/Locatable;)V  LineNumberTableLocalVariableTablethis1Lorg/openqa/selenium/interactions/SendKeysAction;keyboardLorg/openqa/selenium/Keyboard;mouseLorg/openqa/selenium/Mouse;locationProvider(Lorg/openqa/selenium/internal/Locatable;U(Lorg/openqa/selenium/Keyboard;Lorg/openqa/selenium/Mouse;[Ljava/lang/CharSequence;)V  perform()V ! "focusOnElement $  &('org/openqa/selenium/Keyboard )*sendKeys([Ljava/lang/CharSequence;)V SourceFileSendKeysAction.java!  h*+,- *$% &4  U *+,- )**     D* *#*%-/0 +,PK %^D>96org/openqa/selenium/interactions/CompositeAction.class1;0org/openqa/selenium/interactions/CompositeActionjava/lang/Object'org/openqa/selenium/interactions/Action actionsListLjava/util/List; Signature;Ljava/util/List;()VCode  java/util/ArrayList   LineNumberTableLocalVariableTablethis2Lorg/openqa/selenium/interactions/CompositeAction;perform java/util/List iterator()Ljava/util/Iterator; !#"java/util/Iterator $%next()Ljava/lang/Object; '  !) *+hasNext()Zaction)Lorg/openqa/selenium/interactions/Action; addAction](Lorg/openqa/selenium/interactions/Action;)Lorg/openqa/selenium/interactions/CompositeAction; 1 23add(Ljava/lang/Object;)ZgetNumberOfActions()I 7 85size SourceFileCompositeAction.java!    B**Y   g'*M, L+&,(&!',-./ E *+0W* $ %  ,-45 4 *6)  9:PK %^D>.+2org/openqa/selenium/interactions/KeyUpAction.class1,,org/openqa/selenium/interactions/KeyUpAction9org/openqa/selenium/interactions/internal/SingleKeyAction'org/openqa/selenium/interactions/Action~(Lorg/openqa/selenium/Keyboard;Lorg/openqa/selenium/Mouse;Lorg/openqa/selenium/internal/Locatable;Lorg/openqa/selenium/Keys;)VCode  LineNumberTableLocalVariableTablethis.Lorg/openqa/selenium/interactions/KeyUpAction;keyboardLorg/openqa/selenium/Keyboard;mouseLorg/openqa/selenium/Mouse;locationProvider(Lorg/openqa/selenium/internal/Locatable;keyLorg/openqa/selenium/Keys;V(Lorg/openqa/selenium/Keyboard;Lorg/openqa/selenium/Mouse;Lorg/openqa/selenium/Keys;)V  perform()V  focusOnElement !  #  %'&org/openqa/selenium/Keyboard () releaseKey(Lorg/openqa/selenium/Keys;)V SourceFileKeyUpAction.java! ` *+,-  " # 4      T*+,- &' * D** *"$ *,- *+PK %^D>{#gg9org/openqa/selenium/interactions/MoveToOffsetAction.class1.3org/openqa/selenium/interactions/MoveToOffsetActionH(Lorg/openqa/selenium/Mouse;Lorg/openqa/selenium/internal/Locatable;II)VCode  F(Lorg/openqa/selenium/Mouse;Lorg/openqa/selenium/internal/Locatable;)V    LineNumberTableLocalVariableTablethis5Lorg/openqa/selenium/interactions/MoveToOffsetAction;mouseLorg/openqa/selenium/Mouse;locationProvider(Lorg/openqa/selenium/internal/Locatable;xyperform()V !  # $%getActionLocation9()Lorg/openqa/selenium/interactions/internal/Coordinates; ')(org/openqa/selenium/Mouse *+ mouseMove<(Lorg/openqa/selenium/interactions/internal/Coordinates;JJ)V SourceFileMoveToOffsetAction.java!   p*+, **'( )*4 F* *"**& -. ,-PK %^D>̢X9org/openqa/selenium/interactions/ClickAndHoldAction.class1'3org/openqa/selenium/interactions/ClickAndHoldActionF(Lorg/openqa/selenium/Mouse;Lorg/openqa/selenium/internal/Locatable;)VCode  LineNumberTableLocalVariableTablethis5Lorg/openqa/selenium/interactions/ClickAndHoldAction;mouseLorg/openqa/selenium/Mouse;locationProvider(Lorg/openqa/selenium/internal/Locatable;perform()V  moveToLocation    getActionLocation9()Lorg/openqa/selenium/interactions/internal/Coordinates; "!org/openqa/selenium/Mouse #$ mouseDown:(Lorg/openqa/selenium/interactions/internal/Coordinates;)V SourceFileClickAndHoldAction.java! I*+,    D*** ()* %&PK %^D>:org/openqa/selenium/interactions/ButtonReleaseAction.class1'4org/openqa/selenium/interactions/ButtonReleaseActionF(Lorg/openqa/selenium/Mouse;Lorg/openqa/selenium/internal/Locatable;)VCode  LineNumberTableLocalVariableTablethis6Lorg/openqa/selenium/interactions/ButtonReleaseAction;mouseLorg/openqa/selenium/Mouse;locationProvider(Lorg/openqa/selenium/internal/Locatable;perform()V  moveToLocation    getActionLocation9()Lorg/openqa/selenium/interactions/internal/Coordinates; "!org/openqa/selenium/Mouse #$mouseUp:(Lorg/openqa/selenium/interactions/internal/Coordinates;)V SourceFileButtonReleaseAction.java! I*+,  "#  D*** -./ %&PK %^D>Dih9org/openqa/selenium/interactions/ContextClickAction.class1'3org/openqa/selenium/interactions/ContextClickActionF(Lorg/openqa/selenium/Mouse;Lorg/openqa/selenium/internal/Locatable;)VCode  LineNumberTableLocalVariableTablethis5Lorg/openqa/selenium/interactions/ContextClickAction;mouseLorg/openqa/selenium/Mouse;where(Lorg/openqa/selenium/internal/Locatable;perform()V  moveToLocation    getActionLocation9()Lorg/openqa/selenium/interactions/internal/Coordinates; "!org/openqa/selenium/Mouse #$ contextClick:(Lorg/openqa/selenium/interactions/internal/Coordinates;)V SourceFileContextClickAction.java! I*+,  !"  D*** )*+ %&PK %^D>.)Borg/openqa/selenium/interactions/InvalidCoordinatesException.class1(Ljava/lang/String;)VCode  LineNumberTableLocalVariableTablethis>Lorg/openqa/selenium/interactions/InvalidCoordinatesException;messageLjava/lang/String; SourceFile InvalidCoordinatesException.java!>*+   PK %^D>gD>4org/openqa/selenium/interactions/KeyDownAction.class1,.org/openqa/selenium/interactions/KeyDownAction9org/openqa/selenium/interactions/internal/SingleKeyAction'org/openqa/selenium/interactions/Action~(Lorg/openqa/selenium/Keyboard;Lorg/openqa/selenium/Mouse;Lorg/openqa/selenium/internal/Locatable;Lorg/openqa/selenium/Keys;)VCode  LineNumberTableLocalVariableTablethis0Lorg/openqa/selenium/interactions/KeyDownAction;keyboardLorg/openqa/selenium/Keyboard;mouseLorg/openqa/selenium/Mouse;locationProvider(Lorg/openqa/selenium/internal/Locatable;keyLorg/openqa/selenium/Keys;V(Lorg/openqa/selenium/Keyboard;Lorg/openqa/selenium/Mouse;Lorg/openqa/selenium/Keys;)V  perform()V  focusOnElement !  #  %'&org/openqa/selenium/Keyboard ()pressKey(Lorg/openqa/selenium/Keys;)V SourceFileKeyDownAction.java! ` *+,-    4      T*+,- "# * D** *"$ &() *+PK lC>f f 1org/openqa/selenium/interactions/.svn/all-wcpropsK 25 svn:wc:ra_dav:version-url V 74 /svn/!svn/ver/11226/trunk/java/client/src/org/openqa/selenium/interactions END CompositeAction.java K 25 svn:wc:ra_dav:version-url V 95 /svn/!svn/ver/11226/trunk/java/client/src/org/openqa/selenium/interactions/CompositeAction.java END InvalidCoordinatesException.java K 25 svn:wc:ra_dav:version-url V 107 /svn/!svn/ver/11226/trunk/java/client/src/org/openqa/selenium/interactions/InvalidCoordinatesException.java END ActionChainsGenerator.java K 25 svn:wc:ra_dav:version-url V 101 /svn/!svn/ver/11226/trunk/java/client/src/org/openqa/selenium/interactions/ActionChainsGenerator.java END ButtonReleaseAction.java K 25 svn:wc:ra_dav:version-url V 99 /svn/!svn/ver/11226/trunk/java/client/src/org/openqa/selenium/interactions/ButtonReleaseAction.java END MoveMouseAction.java K 25 svn:wc:ra_dav:version-url V 95 /svn/!svn/ver/11226/trunk/java/client/src/org/openqa/selenium/interactions/MoveMouseAction.java END Action.java K 25 svn:wc:ra_dav:version-url V 86 /svn/!svn/ver/11226/trunk/java/client/src/org/openqa/selenium/interactions/Action.java END ClickAndHoldAction.java K 25 svn:wc:ra_dav:version-url V 98 /svn/!svn/ver/11226/trunk/java/client/src/org/openqa/selenium/interactions/ClickAndHoldAction.java END KeyDownAction.java K 25 svn:wc:ra_dav:version-url V 93 /svn/!svn/ver/11226/trunk/java/client/src/org/openqa/selenium/interactions/KeyDownAction.java END MoveToOffsetAction.java K 25 svn:wc:ra_dav:version-url V 98 /svn/!svn/ver/11226/trunk/java/client/src/org/openqa/selenium/interactions/MoveToOffsetAction.java END DoubleClickAction.java K 25 svn:wc:ra_dav:version-url V 97 /svn/!svn/ver/11226/trunk/java/client/src/org/openqa/selenium/interactions/DoubleClickAction.java END DefaultActionChainsGenerator.java K 25 svn:wc:ra_dav:version-url V 108 /svn/!svn/ver/11226/trunk/java/client/src/org/openqa/selenium/interactions/DefaultActionChainsGenerator.java END ClickAction.java K 25 svn:wc:ra_dav:version-url V 91 /svn/!svn/ver/11226/trunk/java/client/src/org/openqa/selenium/interactions/ClickAction.java END SendKeysAction.java K 25 svn:wc:ra_dav:version-url V 94 /svn/!svn/ver/11226/trunk/java/client/src/org/openqa/selenium/interactions/SendKeysAction.java END ContextClickAction.java K 25 svn:wc:ra_dav:version-url V 98 /svn/!svn/ver/11226/trunk/java/client/src/org/openqa/selenium/interactions/ContextClickAction.java END KeyUpAction.java K 25 svn:wc:ra_dav:version-url V 91 /svn/!svn/ver/11226/trunk/java/client/src/org/openqa/selenium/interactions/KeyUpAction.java END build.desc K 25 svn:wc:ra_dav:version-url V 85 /svn/!svn/ver/11226/trunk/java/client/src/org/openqa/selenium/interactions/build.desc END PK lC>1nC+ + -org/openqa/selenium/interactions/.svn/entries8 dir 11264 http://selenium.googlecode.com/svn/trunk/java/client/src/org/openqa/selenium/interactions http://selenium.googlecode.com/svn 2011-02-01T13:59:17.176547Z 11226 simon.m.stewart svn:special svn:externals svn:needs-lock 07704840-8298-11de-bf8c-fd130f914ac9 CompositeAction.java file 2011-02-03T12:01:18.000000Z 364b9e8ed8f1999ae37b7d2424946721 2011-02-01T13:59:17.176547Z 11226 simon.m.stewart InvalidCoordinatesException.java file 2011-02-03T12:01:18.000000Z e01996a205ffbb6350980bbfc2fa4f6b 2011-02-01T13:59:17.176547Z 11226 simon.m.stewart ActionChainsGenerator.java file 2011-02-03T12:01:18.000000Z 692a556daf0cba1c15778b2452b9bb5a 2011-02-01T13:59:17.176547Z 11226 simon.m.stewart ButtonReleaseAction.java file 2011-02-03T12:01:18.000000Z 8d47bd5d749079eeabe3e7cf14acea63 2011-02-01T13:59:17.176547Z 11226 simon.m.stewart MoveMouseAction.java file 2011-02-03T12:01:18.000000Z 560c29672c7808b03897a9dafa8ca375 2011-02-01T13:59:17.176547Z 11226 simon.m.stewart Action.java file 2011-02-03T12:01:18.000000Z 89085324070ee89807ccbd46b6ca60a6 2011-02-01T13:59:17.176547Z 11226 simon.m.stewart ClickAndHoldAction.java file 2011-02-03T12:01:18.000000Z 7dbf68d272008f56af1e4049357e2487 2011-02-01T13:59:17.176547Z 11226 simon.m.stewart KeyDownAction.java file 2011-02-03T12:01:18.000000Z 60f1955fbfd6ea7edcc9fbfa5d2cdeb8 2011-02-01T13:59:17.176547Z 11226 simon.m.stewart MoveToOffsetAction.java file 2011-02-03T12:01:18.000000Z a0a5f2f35482b7010ee8db1f8b6b1060 2011-02-01T13:59:17.176547Z 11226 simon.m.stewart DoubleClickAction.java file 2011-02-03T12:01:18.000000Z a45c635cfb69d6ee58351de87712ff0a 2011-02-01T13:59:17.176547Z 11226 simon.m.stewart DefaultActionChainsGenerator.java file 2011-02-03T12:01:18.000000Z 70eefefcf21ee5777a9df6f79951ce44 2011-02-01T13:59:17.176547Z 11226 simon.m.stewart ClickAction.java file 2011-02-03T12:01:18.000000Z 19f515e72f0af9096810424038315cfa 2011-02-01T13:59:17.176547Z 11226 simon.m.stewart SendKeysAction.java file 2011-02-03T12:01:18.000000Z abfcb656e6a3a7026248d72576c56636 2011-02-01T13:59:17.176547Z 11226 simon.m.stewart ContextClickAction.java file 2011-02-03T12:01:18.000000Z d522ba7612299e41bc252cffe402643b 2011-02-01T13:59:17.176547Z 11226 simon.m.stewart KeyUpAction.java file 2011-02-03T12:01:18.000000Z 429a8f5dff04dbd056b39d66e42b169b 2011-02-01T13:59:17.176547Z 11226 simon.m.stewart internal dir build.desc file 2011-02-03T12:01:18.000000Z b0948988d7bc92fb622984aa2d4fdb5b 2011-02-01T13:59:17.176547Z 11226 simon.m.stewart PK lC>G,org/openqa/selenium/interactions/.svn/format8 PK lC>Dorg/openqa/selenium/interactions/.svn/text-base/Action.java.svn-base/* Copyright 2007-2010 WebDriver committers Copyright 2007-2010 Google Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package org.openqa.selenium.interactions; /** * Interface representing a single user-interaction action. * */ public interface Action { void perform(); } PK lC>4rSorg/openqa/selenium/interactions/.svn/text-base/ActionChainsGenerator.java.svn-base/* Copyright 2007-2011 WebDriver committers Copyright 2007-2011 Google Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package org.openqa.selenium.interactions; import org.openqa.selenium.Keys; import org.openqa.selenium.WebElement; /** * Generate user actions. */ public interface ActionChainsGenerator { // Keyboard-related actions. public ActionChainsGenerator keyDown(Keys theKey); public ActionChainsGenerator keyDown(WebElement element, Keys theKey); public ActionChainsGenerator keyUp(Keys theKey); public ActionChainsGenerator keyUp(WebElement element, Keys theKey); public ActionChainsGenerator sendKeys(CharSequence... keysToSend); public ActionChainsGenerator sendKeys(WebElement element, CharSequence... keysToSend); // Mouse-related actions. public ActionChainsGenerator clickAndHold(WebElement onElement); public ActionChainsGenerator release(WebElement onElement); public ActionChainsGenerator click(WebElement onElement); // Click where the mouse was last moved to. public ActionChainsGenerator click(); public ActionChainsGenerator doubleClick(WebElement onElement); public ActionChainsGenerator moveToElement(WebElement toElement); public ActionChainsGenerator moveToElement(WebElement toElement, int xOffset, int yOffset); public ActionChainsGenerator moveByOffset(int xOffset, int yOffset); public ActionChainsGenerator contextClick(WebElement onElement); public ActionChainsGenerator dragAndDrop(WebElement source, WebElement target); public Action build(); } PK lC>uHHQorg/openqa/selenium/interactions/.svn/text-base/ButtonReleaseAction.java.svn-base/* Copyright 2007-2010 WebDriver committers Copyright 2007-2010 Google Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package org.openqa.selenium.interactions; import org.openqa.selenium.Mouse; import org.openqa.selenium.WebDriver; import org.openqa.selenium.WebElement; import org.openqa.selenium.internal.Locatable; import org.openqa.selenium.interactions.internal.BaseAction; import org.openqa.selenium.interactions.internal.MouseRelatedAction; /** * Releases the left mouse button * */ public class ButtonReleaseAction extends MouseRelatedAction implements Action { public ButtonReleaseAction(Mouse mouse, Locatable locationProvider) { super(mouse, locationProvider); } /** * Releases the mouse button currently left held. This action can be called * for an element different than the one ClickAndHoldAction was called for. * However, if this action is performed out of sequence (without holding * down the mouse button, for example) the results will be different * between browsers. */ public void perform() { moveToLocation(); mouse.mouseUp(getActionLocation()); } } PK lC>{ Iorg/openqa/selenium/interactions/.svn/text-base/ClickAction.java.svn-base/* Copyright 2007-2010 WebDriver committers Copyright 2007-2010 Google Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package org.openqa.selenium.interactions; import org.openqa.selenium.Mouse; import org.openqa.selenium.WebDriver; import org.openqa.selenium.WebElement; import org.openqa.selenium.internal.Locatable; import org.openqa.selenium.interactions.internal.BaseAction; import org.openqa.selenium.interactions.internal.MouseRelatedAction; /** * clicks an element. * */ public class ClickAction extends MouseRelatedAction implements Action { public ClickAction(Mouse mouse, Locatable locationProvider) { super(mouse, locationProvider); } public void perform() { moveToLocation(); mouse.click(getActionLocation()); } } PK lC>o`xxPorg/openqa/selenium/interactions/.svn/text-base/ClickAndHoldAction.java.svn-base/* Copyright 2007-2010 WebDriver committers Copyright 2007-2010 Google Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package org.openqa.selenium.interactions; import org.openqa.selenium.Mouse; import org.openqa.selenium.internal.Locatable; import org.openqa.selenium.interactions.internal.MouseRelatedAction; /** * Presses the left mouse button without releasing it. * */ public class ClickAndHoldAction extends MouseRelatedAction implements Action { public ClickAndHoldAction(Mouse mouse, Locatable locationProvider) { super(mouse, locationProvider); } /** * Holds down the mouse button on a selected element. If this action is * called out of sequence (i.e. twice in a row, without releasing the * button after the first action) the results will be different between * browsers. */ public void perform() { moveToLocation(); mouse.mouseDown(getActionLocation()); } } PK lC>J[؞Morg/openqa/selenium/interactions/.svn/text-base/CompositeAction.java.svn-base/* Copyright 2007-2010 WebDriver committers Copyright 2007-2010 Google Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package org.openqa.selenium.interactions; import java.util.ArrayList; import java.util.List; /** * An action for aggregating actions and triggering all of them at the same time. * */ public class CompositeAction implements Action { private List actionsList = new ArrayList(); public void perform() { for (Action action : actionsList) { action.perform(); } } public CompositeAction addAction(Action action) { actionsList.add(action); return this; } public int getNumberOfActions() { return actionsList.size(); } } PK lC>5ZZPorg/openqa/selenium/interactions/.svn/text-base/ContextClickAction.java.svn-base/* Copyright 2007-2010 WebDriver committers Copyright 2007-2010 Google Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package org.openqa.selenium.interactions; import org.openqa.selenium.Mouse; import org.openqa.selenium.WebDriver; import org.openqa.selenium.WebElement; import org.openqa.selenium.internal.Locatable; import org.openqa.selenium.interactions.internal.BaseAction; import org.openqa.selenium.interactions.internal.MouseRelatedAction; /** * Context-clicks an element * */ public class ContextClickAction extends MouseRelatedAction implements Action { public ContextClickAction(Mouse mouse, Locatable where) { super(mouse, where); } /** * Emulates clicking on the mouse button that would bring up contextual * menus (usually right-clicking). */ public void perform() { moveToLocation(); mouse.contextClick(getActionLocation()); } } PK lC>XZorg/openqa/selenium/interactions/.svn/text-base/DefaultActionChainsGenerator.java.svn-base/* Copyright 2007-2011 WebDriver committers Copyright 2007-2011 Google Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package org.openqa.selenium.interactions; import org.openqa.selenium.HasInputDevices; import org.openqa.selenium.Keyboard; import org.openqa.selenium.Keys; import org.openqa.selenium.Mouse; import org.openqa.selenium.WebDriver; import org.openqa.selenium.WebElement; import org.openqa.selenium.internal.Locatable; /** * Implements the builder pattern: * Builds a CompositeAction containing all actions specified * by the method calls. */ public class DefaultActionChainsGenerator implements ActionChainsGenerator { protected Mouse mouse; protected Keyboard keyboard; private CompositeAction action; public DefaultActionChainsGenerator(WebDriver driver) { this(((HasInputDevices) driver).getKeyboard(), ((HasInputDevices) driver).getMouse()); } public DefaultActionChainsGenerator(Keyboard keyboard, Mouse mouse) { this.mouse = mouse; this.keyboard = keyboard; action = new CompositeAction(); } public DefaultActionChainsGenerator keyDown(Keys theKey) { return this.keyDown(null, theKey); } public DefaultActionChainsGenerator keyDown(WebElement element, Keys theKey) { action.addAction(new KeyDownAction(keyboard, mouse, (Locatable) element, theKey)); return this; } public DefaultActionChainsGenerator keyUp(Keys theKey) { return this.keyUp(null, theKey); } public DefaultActionChainsGenerator keyUp(WebElement element, Keys theKey) { action.addAction(new KeyUpAction(keyboard, mouse, (Locatable) element, theKey)); return this; } public DefaultActionChainsGenerator sendKeys(CharSequence... keysToSend) { return this.sendKeys(null, keysToSend); } public DefaultActionChainsGenerator sendKeys(WebElement element, CharSequence... keysToSend) { action.addAction(new SendKeysAction(keyboard, mouse, (Locatable) element, keysToSend)); return this; } public Action build() { CompositeAction toReturn = action; action = null; return toReturn; } public DefaultActionChainsGenerator clickAndHold(WebElement onElement) { action.addAction(new ClickAndHoldAction(mouse, (Locatable) onElement)); return this; } public DefaultActionChainsGenerator release(WebElement onElement) { action.addAction(new ButtonReleaseAction(mouse, (Locatable) onElement)); return this; } public DefaultActionChainsGenerator click(WebElement onElement) { action.addAction(new ClickAction(mouse, (Locatable) onElement)); return this; } public ActionChainsGenerator click() { return this.click(null); } public DefaultActionChainsGenerator doubleClick(WebElement onElement) { action.addAction(new DoubleClickAction(mouse, (Locatable) onElement)); return this; } public DefaultActionChainsGenerator moveToElement(WebElement toElement) { action.addAction(new MoveMouseAction(mouse, (Locatable) toElement)); return this; } public ActionChainsGenerator moveToElement(WebElement toElement, int xOffset, int yOffset) { action.addAction(new MoveToOffsetAction(mouse, (Locatable) toElement, xOffset, yOffset)); return this; } public ActionChainsGenerator moveByOffset(int xOffset, int yOffset) { action.addAction(new MoveToOffsetAction(mouse, null, xOffset, yOffset)); return this; } public DefaultActionChainsGenerator contextClick(WebElement onElement) { action.addAction(new ContextClickAction(mouse, (Locatable) onElement)); return this; } public DefaultActionChainsGenerator dragAndDrop(WebElement source, WebElement target) { action.addAction(new ClickAndHoldAction(mouse, (Locatable) source)); action.addAction(new MoveMouseAction(mouse, (Locatable) target)); action.addAction(new ButtonReleaseAction(mouse, (Locatable) target)); return this; } } PK lC>SOorg/openqa/selenium/interactions/.svn/text-base/DoubleClickAction.java.svn-base/* Copyright 2007-2010 WebDriver committers Copyright 2007-2010 Google Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package org.openqa.selenium.interactions; import org.openqa.selenium.Mouse; import org.openqa.selenium.internal.Locatable; import org.openqa.selenium.interactions.internal.MouseRelatedAction; /** * Double-clicks an element. * */ public class DoubleClickAction extends MouseRelatedAction implements Action { public DoubleClickAction(Mouse mouse, Locatable locationProvider) { super(mouse, locationProvider); } /** * Double-clicks on the given element. */ public void perform() { moveToLocation(); mouse.doubleClick(getActionLocation()); } } PK lC>qqqYorg/openqa/selenium/interactions/.svn/text-base/InvalidCoordinatesException.java.svn-base/* Copyright 2007-2011 WebDriver committers Copyright 2007-2011 Google Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package org.openqa.selenium.interactions; import org.openqa.selenium.WebDriverException; /** * Indicates that the coordinates provided to an interactions operation is * invalid. This, most likely, means that a move operation was provided * with invalid coordinates or that an action that depends on mouse * position (like click) was not preceeded by a move operation. */ public class InvalidCoordinatesException extends WebDriverException { public InvalidCoordinatesException(String message) { super(message); } } PK lC>AKorg/openqa/selenium/interactions/.svn/text-base/KeyDownAction.java.svn-base/* Copyright 2007-2010 WebDriver committers Copyright 2007-2010 Google Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package org.openqa.selenium.interactions; import org.openqa.selenium.*; import org.openqa.selenium.internal.Locatable; import org.openqa.selenium.interactions.internal.SingleKeyAction; /** * Emulates key press only, without the release. * */ public class KeyDownAction extends SingleKeyAction implements Action { public KeyDownAction(Keyboard keyboard, Mouse mouse, Locatable locationProvider, Keys key) { super(keyboard, mouse, locationProvider, key); } public KeyDownAction(Keyboard keyboard, Mouse mouse, Keys key) { super(keyboard, mouse, key); } public void perform() { focusOnElement(); keyboard.pressKey(key); } } PK lC>LJ.L\\Morg/openqa/selenium/interactions/.svn/text-base/MoveMouseAction.java.svn-base/* Copyright 2007-2010 WebDriver committers Copyright 2007-2010 Google Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package org.openqa.selenium.interactions; import org.openqa.selenium.Mouse; import org.openqa.selenium.WebDriver; import org.openqa.selenium.WebElement; import org.openqa.selenium.internal.Locatable; import org.openqa.selenium.interactions.internal.BaseAction; import org.openqa.selenium.interactions.internal.MouseRelatedAction; /** * Moves the mouse to an element. * */ public class MoveMouseAction extends MouseRelatedAction implements Action { public MoveMouseAction(Mouse mouse, Locatable locationProvider) { super(mouse, locationProvider); if (locationProvider == null) { throw new IllegalArgumentException("Must provide a location for a move action."); } } public void perform() { mouse.mouseMove(getActionLocation()); } } PK lC>*Porg/openqa/selenium/interactions/.svn/text-base/MoveToOffsetAction.java.svn-base/* Copyright 2007-2010 WebDriver committers Copyright 2007-2010 Google Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package org.openqa.selenium.interactions; import org.openqa.selenium.Mouse; import org.openqa.selenium.RenderedWebElement; import org.openqa.selenium.WebDriver; import org.openqa.selenium.WebElement; import org.openqa.selenium.internal.Locatable; import org.openqa.selenium.interactions.internal.BaseAction; import org.openqa.selenium.interactions.internal.MouseRelatedAction; import java.awt.*; /** * Move the mouse to a location within the element provided. The coordinates * provided specify the offset from the top-left corner of the element. */ public class MoveToOffsetAction extends MouseRelatedAction implements Action { private final int xOffset; private final int yOffset; public MoveToOffsetAction(Mouse mouse, Locatable locationProvider, int x, int y) { super(mouse, locationProvider); xOffset = x; yOffset = y; } public void perform() { mouse.mouseMove(getActionLocation(), xOffset, yOffset); } } PK lC>6OLorg/openqa/selenium/interactions/.svn/text-base/SendKeysAction.java.svn-base/* Copyright 2007-2010 WebDriver committers Copyright 2007-2010 Google Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package org.openqa.selenium.interactions; import org.openqa.selenium.Mouse; import org.openqa.selenium.WebDriver; import org.openqa.selenium.WebElement; import org.openqa.selenium.Keyboard; import org.openqa.selenium.internal.Locatable; import org.openqa.selenium.interactions.internal.KeysRelatedAction; /** * Sending a sequence of keys to an element. * */ public class SendKeysAction extends KeysRelatedAction implements Action { private final CharSequence[] keysToSend; public SendKeysAction(Keyboard keyboard, Mouse mouse, Locatable locationProvider, CharSequence... keysToSend) { super(keyboard, mouse, locationProvider); this.keysToSend = keysToSend; } public SendKeysAction(Keyboard keyboard, Mouse mouse, CharSequence... keysToSend) { this(keyboard, mouse, null, keysToSend); } public void perform() { focusOnElement(); keyboard.sendKeys(keysToSend); } } PK lC>wCorg/openqa/selenium/interactions/.svn/text-base/build.desc.svn-base java_library(name = "api", srcs = [ "Action.java", ]) java_library(name = "interactions", srcs = [ "*.java", "internal/*.java", ], deps = [ "//java/client/src/org/openqa/selenium:webdriver-api", ]) PK )hC>w+org/openqa/selenium/interactions/build.desc java_library(name = "api", srcs = [ "Action.java", ]) java_library(name = "interactions", srcs = [ "*.java", "internal/*.java", ], deps = [ "//java/client/src/org/openqa/selenium:webdriver-api", ]) PK %^D>?(>org/openqa/selenium/remote/internal/CircularOutputStream.class1M8org/openqa/selenium/remote/internal/CircularOutputStreamjava/io/OutputStream DEFAULT_SIZEI ConstantValuestartendfilledZbuffer[Bout_logLjava/io/FileOutputStream;(Ljava/io/File;I)VCode  ()V   java/io/FileOutputStream  (Ljava/io/File;)V ! #java/io/FileNotFoundExceptionLineNumberTableLocalVariableTablethis:Lorg/openqa/selenium/remote/internal/CircularOutputStream; outputFileLjava/io/File;maxSizeeLjava/io/FileNotFoundException; . (I)Vwrite Exceptions3java/io/IOException 5  7  9 0/btoString()Ljava/lang/String; >@?java/lang/System AB arraycopy*(Ljava/lang/Object;ILjava/lang/Object;II)VDjava/lang/String CF G([B)VsizetoReturn copyStart SourceFileCircularOutputStream.java!    ****+*Y+ N*  #"$"%! &')#*$+).%**&'*()**$+,A *+-$ 12% &' ()/?*-$ 56%&'*0/12f*4* **4***4*6**6*d *6`6**Y4Z`4T* * 8$& : ;<?(@DCVD]EeH%f&'f:;<q* **4<M**,*4=CY,E**6d>*>**6,=*,*4=CY,E$. LMPQ-R6UAVJWLZZ[h\%*q&']HYIA0JKLPK %^D>[sPKK7org/openqa/selenium/remote/internal/OutputWatcher.class1?1org/openqa/selenium/remote/internal/OutputWatcherjava/lang/Objectjava/lang/RunnableinputLjava/io/InputStream;outputLjava/io/OutputStream;BUFSIZEI ConstantValuebuffer[B.(Ljava/io/InputStream;Ljava/io/OutputStream;)VCode  ()V      LineNumberTableLocalVariableTablethis3Lorg/openqa/selenium/remote/internal/OutputWatcher;run #%$java/io/InputStream &' available()I )+*java/lang/Math ,-max(II)I #/ 01read([BII)I 354java/io/OutputStream 67write([BII)V9java/io/IOExceptionavailignoredLjava/io/IOException; SourceFileOutputWatcher.java!   f***+*,    !?<=5*"(=**.<**2Ṉ258. ! %!5#6&9>)*? =0 ;: 6;<=>PK %^D>f0. . Corg/openqa/selenium/remote/internal/WebElementToJsonConverter.class1=org/openqa/selenium/remote/internal/WebElementToJsonConverterjava/lang/Objectcom/google/common/base/Function()VCode  LineNumberTableLocalVariableTablethis?Lorg/openqa/selenium/remote/internal/WebElementToJsonConverter;apply&(Ljava/lang/Object;)Ljava/lang/Object;java/lang/Stringjava/lang/Booleanjava/lang/Number)org/openqa/selenium/internal/WrapsElement  getWrappedElement"()Lorg/openqa/selenium/WebElement;+org/openqa/selenium/remote/RemoteWebElement!ELEMENT # $%getId()Ljava/lang/String; ')(&com/google/common/collect/ImmutableMap *+ofN(Ljava/lang/Object;Ljava/lang/Object;)Lcom/google/common/collect/ImmutableMap;-java/util/Collection /10&com/google/common/collect/Collections2 23 transformO(Ljava/util/Collection;Lcom/google/common/base/Function;)Ljava/util/Collection;5 java/util/Map 47 89size()I ;=<com/google/common/collect/Maps >?newHashMapWithExpectedSize(I)Ljava/util/HashMap; 4A BCentrySet()Ljava/util/Set; EGF java/util/Set HIiterator()Ljava/util/Iterator; KMLjava/util/Iterator NOnext()Ljava/lang/Object;Qjava/util/Map$Entry PS TOgetKeyV"java/lang/IllegalArgumentExceptionXjava/lang/StringBuilderZ2All keys in Map script arguments must be strings: W\ ](Ljava/lang/String;)V _ `agetClass()Ljava/lang/Class; cedjava/lang/Class f%getName Wh ijappend-(Ljava/lang/String;)Ljava/lang/StringBuilder; Wl m%toString U\ Pp qOgetValue s  4u vwput8(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object; Ky z{hasNext()Z} Argument is of an illegal type: argLjava/lang/Object;argsLjava/util/Collection;Ljava/util/Map; convertedentryLjava/util/Map$Entry;keyLocalVariableTypeTableLjava/util/Collection<*>;Ljava/util/Map<**>;5Ljava/util/Map;Ljava/util/Map$Entry<**>; SourceFileWebElementToJsonConverter.java SignatureYLjava/lang/Object;Lcom/google/common/base/Function; InnerClassesEntry! /*  $  +++ +++ +L+ +"&+,+,M,*.+4+4M,6:N,@D:VJP:R:"UYWYY[^bgkn-*ortWx-UYWY|[+^bgkn f&'(+",,/30@3G4L5R8Y9^:h;<=>?>A;CFGF H~L^yhoG>*L^yhoG P4 PK %^D> ()VCode  LineNumberTableLocalVariableTablethis2Lorg/openqa/selenium/remote/internal/SubProcess$1;write(I)V Exceptionsjava/io/IOExceptioniI SourceFileSubProcess.javaEnclosingMethod.org/openqa/selenium/remote/internal/SubProcess nullOutputStream()Ljava/io/OutputStream; InnerClasses 3*   5    PK %^D>/Pԭ 4org/openqa/selenium/remote/internal/SubProcess.class1.org/openqa/selenium/remote/internal/SubProcessjava/lang/ObjectlockLjava/lang/Object;processBuilderLjava/lang/ProcessBuilder; outputStreamLjava/io/OutputStream;executorService&Ljava/util/concurrent/ExecutorService;currentProcessLjava/lang/Process; outputWatcherLjava/util/concurrent/Future; Signature Ljava/util/concurrent/Future<*>;(Ljava/lang/ProcessBuilder;)VCode  nullOutputStream()Ljava/io/OutputStream;  3(Ljava/lang/ProcessBuilder;Ljava/io/OutputStream;)VLineNumberTableLocalVariableTablethis0Lorg/openqa/selenium/remote/internal/SubProcess; " #()V %  ')(java/lang/ProcessBuilder *+redirectErrorStream(Z)Ljava/lang/ProcessBuilder; -  / 1 3 launch 6 78 isRunning()Z ': ;<start()Ljava/lang/Process; >@?java/util/concurrent/Executors ABnewSingleThreadExecutor(()Ljava/util/concurrent/ExecutorService;D1org/openqa/selenium/remote/internal/OutputWatcher FHGjava/lang/Process IJgetInputStream()Ljava/io/InputStream; CL M.(Ljava/io/InputStream;Ljava/io/OutputStream;)V OQP$java/util/concurrent/ExecutorService RSsubmit3(Ljava/lang/Runnable;)Ljava/util/concurrent/Future; U W&org/openqa/selenium/WebDriverException VY Z(Ljava/lang/Throwable;)V\java/io/IOExceptioneLjava/io/IOException; exitValue()Ib%java/lang/IllegalThreadStateExceptiondProcess has not yet launched af g(Ljava/lang/String;)V Fi _` iignored'Ljava/lang/IllegalThreadStateException;shutdown oqpjava/util/concurrent/Future rscancel(Z)Z Ou vw shutdownNow()Ljava/util/List; y{z#org/openqa/selenium/os/ProcessUtils |} killProcess(Ljava/lang/Process;)I0org/openqa/selenium/remote/internal/SubProcess$1 ~" SourceFileSubProcess.java InnerClasses!   A *+ &'  ~(*!*Y!$*+&,*,.*0*21345"6'7 ( (( 4#U*$YL*5A**,92*=0**0CY*2E*.KNT MVY,X+ç+ÿ?B[NQQSQ. ABDE F%G7FBHCILATMU C ]^_`o%*$YL*2 aYce*2h+ì+ÿ!""$"VWXZ"V % 78#*$YL*2+*jW+M++ÿa   " "bcdghij b# klm#4*$YL*5 *TnW*0tW*2xW+ç+ÿ-0020vwxy#z+v3} 4 (~Y ~PK %^D>pUYQ Q Corg/openqa/selenium/remote/internal/JsonToWebElementConverter.class1=org/openqa/selenium/remote/internal/JsonToWebElementConverterjava/lang/Objectcom/google/common/base/Functiondriver,Lorg/openqa/selenium/remote/RemoteWebDriver;/(Lorg/openqa/selenium/remote/RemoteWebDriver;)VCode  ()V  LineNumberTableLocalVariableTablethis?Lorg/openqa/selenium/remote/internal/JsonToWebElementConverter;apply&(Ljava/lang/Object;)Ljava/lang/Object;java/util/Collection #com/google/common/collect/Iterables  transformK(Ljava/lang/Iterable;Lcom/google/common/base/Function;)Ljava/lang/Iterable; "!com/google/common/collect/Lists #$ newArrayList+(Ljava/lang/Iterable;)Ljava/util/ArrayList;& java/util/Map(ELEMENT %* +, containsKey(Ljava/lang/Object;)Z . /0newRemoteWebElement/()Lorg/openqa/selenium/remote/RemoteWebElement; %2 3get 576java/lang/String 89valueOf&(Ljava/lang/Object;)Ljava/lang/String; ;=<+org/openqa/selenium/remote/RemoteWebElement >?setId(Ljava/lang/String;)V ACBcom/google/common/collect/Maps DEtransformValuesA(Ljava/util/Map;Lcom/google/common/base/Function;)Ljava/util/Map;Gjava/lang/NumberIjava/lang/FloatKjava/lang/Double FM NO doubleValue()D JQ 8R(D)Ljava/lang/Double; FT UV longValue()J XZYjava/lang/Long 8[(J)Ljava/lang/Long;resultLjava/lang/Object;resultsLjava/util/Collection; resultAsMapLjava/util/Map;element-Lorg/openqa/selenium/remote/RemoteWebElement;LocalVariableTypeTableLjava/util/Collection<*>;Ljava/util/Map<**>; hji*org/openqa/selenium/remote/RemoteWebDriver klgetCapabilities$()Lorg/openqa/selenium/Capabilities; npo org/openqa/selenium/Capabilities qrisJavascriptEnabled()Zt3org/openqa/selenium/remote/RenderedRemoteWebElement s ; ;x y  setParenttoReturn SourceFileJsonToWebElementConverter.java SignatureYLjava/lang/Object;Lcom/google/common/base/Function;!  F * *+)* +   u++M,*+%/+%M,')*-N-,'14:-,*@+F'+H +J+FLP+FSW+>./ 034!5,617@8B:H>O?]@hBsE4uu\] ^_!'`a1bcd ^e!'`f/0 z,*gmsYuL ;YvL+*w+JKM"O*P ,zc" zc{|}~PK lC>ŲEϽ4org/openqa/selenium/remote/internal/.svn/all-wcpropsK 25 svn:wc:ra_dav:version-url V 77 /svn/!svn/ver/11222/trunk/java/client/src/org/openqa/selenium/remote/internal END CircularOutputStream.java K 25 svn:wc:ra_dav:version-url V 103 /svn/!svn/ver/11222/trunk/java/client/src/org/openqa/selenium/remote/internal/CircularOutputStream.java END SubProcess.java K 25 svn:wc:ra_dav:version-url V 93 /svn/!svn/ver/11222/trunk/java/client/src/org/openqa/selenium/remote/internal/SubProcess.java END JsonToWebElementConverter.java K 25 svn:wc:ra_dav:version-url V 108 /svn/!svn/ver/11222/trunk/java/client/src/org/openqa/selenium/remote/internal/JsonToWebElementConverter.java END WebElementToJsonConverter.java K 25 svn:wc:ra_dav:version-url V 108 /svn/!svn/ver/11222/trunk/java/client/src/org/openqa/selenium/remote/internal/WebElementToJsonConverter.java END OutputWatcher.java K 25 svn:wc:ra_dav:version-url V 96 /svn/!svn/ver/11222/trunk/java/client/src/org/openqa/selenium/remote/internal/OutputWatcher.java END PK lC>* 0org/openqa/selenium/remote/internal/.svn/entries8 dir 11264 http://selenium.googlecode.com/svn/trunk/java/client/src/org/openqa/selenium/remote/internal http://selenium.googlecode.com/svn 2011-02-01T12:22:07.764961Z 11222 simon.m.stewart svn:special svn:externals svn:needs-lock 07704840-8298-11de-bf8c-fd130f914ac9 CircularOutputStream.java file 2011-02-03T12:01:17.000000Z f69366e4c7dece3de9c531d255c1c731 2010-03-13T21:05:51.939598Z 8500 simon.m.stewart SubProcess.java file 2011-02-03T12:01:17.000000Z 0a136010da6763a5bffb533d5dbc9dd7 2011-01-17T22:05:25.849355Z 10990 simon.m.stewart JsonToWebElementConverter.java file 2011-02-03T12:01:17.000000Z ed1ad24a0ed0575ea509f981618418dc 2010-10-16T15:38:20.242544Z 9993 dawagner WebElementToJsonConverter.java file 2011-02-03T12:01:17.000000Z d6e33b62fe1f9ffb7eee9c94e64475cd 2010-07-31T13:04:31.641314Z 9426 simon.m.stewart OutputWatcher.java file 2011-02-03T12:01:17.000000Z 20156dc0c179f177f98aff9263cfa5ee 2010-10-13T12:22:50.571393Z 9941 dawagner PK lC>G/org/openqa/selenium/remote/internal/.svn/format8 PK lC> Uorg/openqa/selenium/remote/internal/.svn/text-base/CircularOutputStream.java.svn-base/* Copyright 2009 WebDriver committers Copyright 2009 Google Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package org.openqa.selenium.remote.internal; import java.io.File; import java.io.FileNotFoundException; import java.io.FileOutputStream; import java.io.IOException; import java.io.OutputStream; /** * Captures the last N bytes of output. */ public class CircularOutputStream extends OutputStream { private static final int DEFAULT_SIZE = 4096; private int start; private int end; private boolean filled = false; private byte[] buffer; private FileOutputStream out_log; public CircularOutputStream(File outputFile, int maxSize) { buffer = new byte[maxSize]; if (outputFile != null) { try { out_log = new FileOutputStream(outputFile); } catch (FileNotFoundException e) { out_log = null; } } } public CircularOutputStream(File outputFile) { this(outputFile, DEFAULT_SIZE); } public CircularOutputStream(int maxSize) { this(null, maxSize); } @Override public void write(int b) throws IOException { if (end == buffer.length) { filled = true; end = 0; } if (filled && end == start) { start = start == buffer.length - 1 ? 0 : start + 1; } buffer[end++] = (byte) b; if (out_log != null) { out_log.write(b); } } @Override public String toString() { int size = filled ? buffer.length : end; byte[] toReturn = new byte[size]; // Handle the partially filled array as a special case if (!filled) { System.arraycopy(buffer, 0, toReturn, 0, end); return new String(toReturn); } int copyStart = buffer.length - start; if (copyStart == buffer.length) { copyStart = 0; } System.arraycopy(buffer, start, toReturn, 0, copyStart); System.arraycopy(buffer, 0, toReturn, copyStart, end); return new String(toReturn); } } PK lC>E Zorg/openqa/selenium/remote/internal/.svn/text-base/JsonToWebElementConverter.java.svn-base/* Copyright 2007-2010 WebDriver committers Copyright 2007-2010 Google Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package org.openqa.selenium.remote.internal; import java.util.Collection; import java.util.Map; import org.openqa.selenium.WebElement; import org.openqa.selenium.remote.RemoteWebDriver; import org.openqa.selenium.remote.RemoteWebElement; import org.openqa.selenium.remote.RenderedRemoteWebElement; import com.google.common.base.Function; import com.google.common.collect.Iterables; import com.google.common.collect.Lists; import com.google.common.collect.Maps; /** * Reconstitutes {@link WebElement}s from their JSON representation. Will * recursively convert Lists and Maps to catch nested references. All other * values pass through the converter unchanged. */ public class JsonToWebElementConverter implements Function { private final RemoteWebDriver driver; public JsonToWebElementConverter(RemoteWebDriver driver) { this.driver = driver; } public Object apply(Object result) { if (result instanceof Collection) { Collection results = (Collection) result; return Lists.newArrayList(Iterables.transform(results, this)); } if (result instanceof Map) { Map resultAsMap = (Map) result; if (resultAsMap.containsKey("ELEMENT")) { RemoteWebElement element = newRemoteWebElement(); element.setId(String.valueOf(resultAsMap.get("ELEMENT"))); return element; } else { return Maps.transformValues(resultAsMap, this); } } if (result instanceof Number) { if (result instanceof Float || result instanceof Double) { return ((Number) result).doubleValue(); } return ((Number) result).longValue(); } return result; } protected RemoteWebElement newRemoteWebElement() { RemoteWebElement toReturn; if (driver.getCapabilities().isJavascriptEnabled()) { toReturn = new RenderedRemoteWebElement(); } else { toReturn = new RemoteWebElement(); } toReturn.setParent(driver); return toReturn; } } PK lC>v@@Norg/openqa/selenium/remote/internal/.svn/text-base/OutputWatcher.java.svn-basepackage org.openqa.selenium.remote.internal; import java.io.IOException; import java.io.InputStream; import java.io.OutputStream; /** * Consumes all output from an {@link InputStream} and writes it to an * {@link OutputStream}. * * @author jmleyba@gmail.com (Jason Leyba) */ public class OutputWatcher implements Runnable { private final InputStream input; private final OutputStream output; private static final int BUFSIZE = 2048; final byte[] buffer = new byte[BUFSIZE]; public OutputWatcher(InputStream input, OutputStream output) { this.input = input; this.output = output; } public void run() { int read = 0; int avail = 0; while (read != -1) { try { avail = Math.max(input.available(), 1); read = input.read(buffer, 0, avail); if (read > 0){ output.write(buffer, 0, read); } } catch (IOException ignored) { // This exception is thrown when the thread running this instance is interrupted. // Ignore the error and silently return. break; } } } } PK lC>$$Korg/openqa/selenium/remote/internal/.svn/text-base/SubProcess.java.svn-basepackage org.openqa.selenium.remote.internal; import org.openqa.selenium.os.ProcessUtils; import org.openqa.selenium.WebDriverException; import java.io.IOException; import java.io.OutputStream; import java.util.concurrent.ExecutorService; import java.util.concurrent.Executors; import java.util.concurrent.Future; /** * Basic class for working with subprocesses. Methods are provided for * starting and stopping a subprocess. Also provides a mechanism for * detecting if a subprocess dies before it is explicitly stopped. * * @author jmleyba@gmail.com (Jason Leyba) */ // TODO(simon): Consider moving to oos.os public class SubProcess { private final Object lock = new Object(); private final ProcessBuilder processBuilder; private final OutputStream outputStream; private ExecutorService executorService; private Process currentProcess; private Future outputWatcher; /** * Creates a new {@link SubProcess} that will ignore all output from any * spawned process. * * @param processBuilder Used to launch new processes. * @see SubProcess(ProcessBuilder, OutputStream) */ public SubProcess(ProcessBuilder processBuilder) { this(processBuilder, nullOutputStream()); } /** * Creates a new {@link SubProcess} that will redirect all output to the * specified stream. The output written to stderr is always merged with the * output to stdout. * * @param processBuilder Used to launch new processes. * @param outputStream The stream to redirect all process output to. */ public SubProcess(ProcessBuilder processBuilder, OutputStream outputStream) { this.processBuilder = processBuilder.redirectErrorStream(true); this.outputStream = outputStream; this.executorService = null; this.currentProcess = null; } /** * Starts a new {@link Process} using this instance's {@link ProcessBuilder}. * If a {@code Process} is already running, this method will be a no-op. * * @throws WebDriverException If an I/O error occurs while starting the new * process. */ public void launch() { synchronized (lock) { if (!isRunning()) { try { currentProcess = processBuilder.start(); executorService = Executors.newSingleThreadExecutor(); outputWatcher = executorService.submit( new OutputWatcher(currentProcess.getInputStream(), outputStream)); } catch (IOException e) { throw new WebDriverException(e); } } } } /** * * @return The exit value for the managed subprocess. * @throws IllegalThreadStateException If the managed subprocess was never * started, or if it was started but has not terminated yet. */ public int exitValue() { synchronized (lock) { if (currentProcess == null) { throw new IllegalThreadStateException("Process has not yet launched"); } return currentProcess.exitValue(); } } /** * @return Whether the managed subprocess is currently running. */ public boolean isRunning() { synchronized (lock) { if (currentProcess == null) { return false; } try { exitValue(); return false; } catch (IllegalThreadStateException ignored) { return true; } } } /** * Shutsdown the {@link Process} currently being managed by this instance, * if any. * * @see Process#destroy() */ public void shutdown() { synchronized (lock) { if (isRunning()) { outputWatcher.cancel(true); executorService.shutdownNow(); ProcessUtils.killProcess(currentProcess); } } } private static OutputStream nullOutputStream() { return new OutputStream() { @Override public void write(int i) throws IOException { // Do nothing } }; } } PK lC> Zorg/openqa/selenium/remote/internal/.svn/text-base/WebElementToJsonConverter.java.svn-base/* Copyright 2007-2010 WebDriver committers Copyright 2007-2010 Google Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package org.openqa.selenium.remote.internal; import java.util.Collection; import java.util.Map; import org.openqa.selenium.WebElement; import org.openqa.selenium.internal.WrapsElement; import org.openqa.selenium.remote.RemoteWebElement; import com.google.common.base.Function; import com.google.common.collect.Collections2; import com.google.common.collect.ImmutableMap; import com.google.common.collect.Maps; /** * Converts {@link WebElement} objects to their JSON representation. Will * recursively convert Lists and Maps to catch nested references. */ public class WebElementToJsonConverter implements Function { public Object apply(Object arg) { if (arg == null || arg instanceof String || arg instanceof Boolean || arg instanceof Number) { return arg; } if (arg instanceof WrapsElement) { arg = ((WrapsElement) arg).getWrappedElement(); } if (arg instanceof RemoteWebElement) { return ImmutableMap.of("ELEMENT", ((RemoteWebElement) arg).getId()); } if (arg instanceof Collection) { Collection args = (Collection) arg; return Collections2.transform(args, this); } if (arg instanceof Map) { Map args = (Map) arg; Map converted = Maps.newHashMapWithExpectedSize(args.size()); for (Map.Entry entry : args.entrySet()) { Object key = entry.getKey(); if (!(key instanceof String)) { throw new IllegalArgumentException( "All keys in Map script arguments must be strings: " + key.getClass().getName()); } converted.put((String) key, apply(entry.getValue())); } return converted; } throw new IllegalArgumentException("Argument is of an illegal type: " + arg.getClass().getName()); } } PK %^D>__?org/openqa/selenium/support/events/WebDriverEventListener.class19org/openqa/selenium/support/events/WebDriverEventListenerjava/lang/ObjectbeforeNavigateTo4(Ljava/lang/String;Lorg/openqa/selenium/WebDriver;)VafterNavigateTobeforeNavigateBack"(Lorg/openqa/selenium/WebDriver;)VafterNavigateBackbeforeNavigateForwardafterNavigateForward beforeFindByZ(Lorg/openqa/selenium/By;Lorg/openqa/selenium/WebElement;Lorg/openqa/selenium/WebDriver;)V afterFindBy beforeClickOnB(Lorg/openqa/selenium/WebElement;Lorg/openqa/selenium/WebDriver;)V afterClickOnbeforeChangeValueOfafterChangeValueOf beforeScript afterScript onException7(Ljava/lang/Throwable;Lorg/openqa/selenium/WebDriver;)V SourceFileWebDriverEventListener.java     PK %^D>_&%%?org/openqa/selenium/support/events/EventFiringWebDriver$1.class1C9org/openqa/selenium/support/events/EventFiringWebDriver$1java/lang/Object#java/lang/reflect/InvocationHandlerthis$09Lorg/openqa/selenium/support/events/EventFiringWebDriver;<(Lorg/openqa/selenium/support/events/EventFiringWebDriver;)VCode    ()VLineNumberTableLocalVariableTablethis;Lorg/openqa/selenium/support/events/EventFiringWebDriver$1;invokeS(Ljava/lang/Object;Ljava/lang/reflect/Method;[Ljava/lang/Object;)Ljava/lang/Object; Exceptionsjava/lang/Throwable 7org/openqa/selenium/support/events/EventFiringWebDriver access$0K(Lorg/openqa/selenium/support/events/EventFiringWebDriver;)Ljava/util/List; !#"java/util/List $%iterator()Ljava/util/Iterator; ')(java/util/Iterator *+next()Ljava/lang/Object;-9org/openqa/selenium/support/events/WebDriverEventListener /10java/lang/reflect/Method 29(Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/Object; '4 56hasNext()ZproxyLjava/lang/Object;methodLjava/lang/reflect/Method;args[Ljava/lang/Object; eventListener;Lorg/openqa/selenium/support/events/WebDriverEventListener; SourceFileEventFiringWebDriver.javaEnclosingMethod InnerClasses   8 *+ * I   1*  :&,:,-.W3KL%K/N4117819:1;<=>?@AB PK %^D> ~~?org/openqa/selenium/support/events/EventFiringWebDriver$2.class1O9org/openqa/selenium/support/events/EventFiringWebDriver$2java/lang/Object#java/lang/reflect/InvocationHandlerthis$09Lorg/openqa/selenium/support/events/EventFiringWebDriver; val$driverLorg/openqa/selenium/WebDriver;[(Lorg/openqa/selenium/support/events/EventFiringWebDriver;Lorg/openqa/selenium/WebDriver;)VCode     ()VLineNumberTableLocalVariableTablethis;Lorg/openqa/selenium/support/events/EventFiringWebDriver$2;invokeS(Ljava/lang/Object;Ljava/lang/reflect/Method;[Ljava/lang/Object;)Ljava/lang/Object; Exceptionsjava/lang/ThrowablegetWrappedDriver !#"java/lang/reflect/Method $%getName()Ljava/lang/String; ')(java/lang/String *+equals(Ljava/lang/Object;)Z !- .9(Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/Object; 0217org/openqa/selenium/support/events/EventFiringWebDriver 34access$2v(Lorg/openqa/selenium/support/events/EventFiringWebDriver;)Lorg/openqa/selenium/support/events/WebDriverEventListener; 687+java/lang/reflect/InvocationTargetException 9:getTargetException()Ljava/lang/Throwable; <>=9org/openqa/selenium/support/events/WebDriverEventListener ?@ onException7(Ljava/lang/Throwable;Lorg/openqa/selenium/WebDriver;)VproxyLjava/lang/Object;methodLjava/lang/reflect/Method;args[Ljava/lang/Object;e-Ljava/lang/reflect/InvocationTargetException; SourceFileEventFiringWebDriver.javaEnclosingMethod M"(Lorg/openqa/selenium/WebDriver;)V InnerClasses    =*+*,*  Y  8, &*,*-,:*/5*;56[ \`ab2c488AB8CD8EFGHIJK0LN PK %^D>`Sorg/openqa/selenium/support/events/EventFiringWebDriver$EventFiringNavigation.class1XMorg/openqa/selenium/support/events/EventFiringWebDriver$EventFiringNavigationjava/lang/Object(org/openqa/selenium/WebDriver$Navigation navigation*Lorg/openqa/selenium/WebDriver$Navigation;this$09Lorg/openqa/selenium/support/events/EventFiringWebDriver;f(Lorg/openqa/selenium/support/events/EventFiringWebDriver;Lorg/openqa/selenium/WebDriver$Navigation;)VCode   ()V  LineNumberTableLocalVariableTablethisOLorg/openqa/selenium/support/events/EventFiringWebDriver$EventFiringNavigation;to(Ljava/lang/String;)V 7org/openqa/selenium/support/events/EventFiringWebDriver  access$2v(Lorg/openqa/selenium/support/events/EventFiringWebDriver;)Lorg/openqa/selenium/support/events/WebDriverEventListener; " #$access$3Z(Lorg/openqa/selenium/support/events/EventFiringWebDriver;)Lorg/openqa/selenium/WebDriver; &('9org/openqa/selenium/support/events/WebDriverEventListener )*beforeNavigateTo4(Ljava/lang/String;Lorg/openqa/selenium/WebDriver;)V ,  &. /*afterNavigateTourlLjava/lang/String;(Ljava/net/URL;)V 465java/lang/String 78valueOf&(Ljava/lang/Object;)Ljava/lang/String; ,Ljava/net/URL;back &= >?beforeNavigateBack"(Lorg/openqa/selenium/WebDriver;)V A ; &C D?afterNavigateBackforward &G H?beforeNavigateForward J E &L M?afterNavigateForwardrefresh P N SourceFileEventFiringWebDriver.java InnerClassesUorg/openqa/selenium/WebDriver NavigationEventFiringNavigation    K*+**,  s3*+*!%*++*+*!-233012 A *+39   0:; f0**!<*@**!B/ 0E f0**!F*I**!K/ 0N 8 *O    QRSTV WPK %^D>Yۭ Porg/openqa/selenium/support/events/EventFiringWebDriver$EventFiringOptions.class1XJorg/openqa/selenium/support/events/EventFiringWebDriver$EventFiringOptionsjava/lang/Object%org/openqa/selenium/WebDriver$Optionsoptions'Lorg/openqa/selenium/WebDriver$Options;this$09Lorg/openqa/selenium/support/events/EventFiringWebDriver;c(Lorg/openqa/selenium/support/events/EventFiringWebDriver;Lorg/openqa/selenium/WebDriver$Options;)VCode   ()V  LineNumberTableLocalVariableTablethisLLorg/openqa/selenium/support/events/EventFiringWebDriver$EventFiringOptions; addCookie(Lorg/openqa/selenium/Cookie;)V  cookieLorg/openqa/selenium/Cookie;deleteCookieNamed(Ljava/lang/String;)V "  nameLjava/lang/String; deleteCookie ' %deleteAllCookies * ( getCookies()Ljava/util/Set; Signature/()Ljava/util/Set; 0 +,getCookieNamed0(Ljava/lang/String;)Lorg/openqa/selenium/Cookie; 4 12getSpeed()Lorg/openqa/selenium/Speed; 8 56setSpeed(Lorg/openqa/selenium/Speed;)V < 9:speedLorg/openqa/selenium/Speed;timeouts*()Lorg/openqa/selenium/WebDriver$Timeouts;BKorg/openqa/selenium/support/events/EventFiringWebDriver$EventFiringTimeouts D ?@ AF Gd(Lorg/openqa/selenium/support/events/EventFiringWebDriver;Lorg/openqa/selenium/WebDriver$Timeouts;)V(Lorg/openqa/selenium/support/events/EventFiringWebDriver;Lorg/openqa/selenium/WebDriver$Options;Lorg/openqa/selenium/support/events/EventFiringWebDriver$EventFiringOptions;)V J  SourceFileEventFiringWebDriver.java InnerClassesOorg/openqa/selenium/WebDriverOptionsR&org/openqa/selenium/WebDriver$TimeoutsTimeoutsU7org/openqa/selenium/support/events/EventFiringWebDriverEventFiringOptionsEventFiringTimeouts    K*+**,  C *+      C *+!    #$% C *+&    ( 8 *)    +,-. 4 */  12 ? *+3  #$56 4 *7   9: C *+;    =>?@ ?AY**CE  H '*+,IKLM"NP QNS TVATWPK %^D>alU [org/openqa/selenium/support/events/EventFiringWebDriver$EventFiringRenderedWebElement.class1LUorg/openqa/selenium/support/events/EventFiringWebDriver$EventFiringRenderedWebElementMorg/openqa/selenium/support/events/EventFiringWebDriver$EventFiringWebElement&org/openqa/selenium/RenderedWebElement&org/openqa/selenium/internal/Locatabledelegate(Lorg/openqa/selenium/RenderedWebElement;this$09Lorg/openqa/selenium/support/events/EventFiringWebDriver;\(Lorg/openqa/selenium/support/events/EventFiringWebDriver;Lorg/openqa/selenium/WebElement;)VCode   (Lorg/openqa/selenium/support/events/EventFiringWebDriver;Lorg/openqa/selenium/WebElement;Lorg/openqa/selenium/support/events/EventFiringWebDriver$EventFiringWebElement;)V  LineNumberTableLocalVariableTablethisWLorg/openqa/selenium/support/events/EventFiringWebDriver$EventFiringRenderedWebElement;element Lorg/openqa/selenium/WebElement; isDisplayed()Z  hover()V $ !" getLocation()Lorg/openqa/selenium/Point; ( %&getSize!()Lorg/openqa/selenium/Dimension; , )* dragAndDropBy(II)V 0 -. moveRightByI moveDownBy dragAndDropOn+(Lorg/openqa/selenium/RenderedWebElement;)V 7 45getValueOfCssProperty&(Ljava/lang/String;)Ljava/lang/String; ; 89 propertyNameLjava/lang/String;'getLocationOnScreenOnceScrolledIntoView @ >&getCoordinates9()Lorg/openqa/selenium/interactions/internal/Coordinates; D AB SourceFileEventFiringWebDriver.java InnerClassesI7org/openqa/selenium/support/events/EventFiringWebDriverEventFiringRenderedWebElementEventFiringWebElement    Q*+*+,*, 4 *  !"8 *#    %&4 *'  )*4 *+  -.N */     12 3245C *+6     89? *+:  <=>&7 *?  AB7 *C  EFGHJHKPK %^D>,˛Vorg/openqa/selenium/support/events/EventFiringWebDriver$EventFiringTargetLocator.class1EPorg/openqa/selenium/support/events/EventFiringWebDriver$EventFiringTargetLocatorjava/lang/Object+org/openqa/selenium/WebDriver$TargetLocator targetLocator-Lorg/openqa/selenium/WebDriver$TargetLocator;this$09Lorg/openqa/selenium/support/events/EventFiringWebDriver;i(Lorg/openqa/selenium/support/events/EventFiringWebDriver;Lorg/openqa/selenium/WebDriver$TargetLocator;)VCode   ()V  LineNumberTableLocalVariableTablethisRLorg/openqa/selenium/support/events/EventFiringWebDriver$EventFiringTargetLocator;frame"(I)Lorg/openqa/selenium/WebDriver;   frameIndexI3(Ljava/lang/String;)Lorg/openqa/selenium/WebDriver; !  frameNameLjava/lang/String;A(Lorg/openqa/selenium/WebElement;)Lorg/openqa/selenium/WebDriver; & $ frameElement Lorg/openqa/selenium/WebElement;window + ) windowNamedefaultContent!()Lorg/openqa/selenium/WebDriver; 0 -. activeElement"()Lorg/openqa/selenium/WebElement; 4 12alert()Lorg/openqa/selenium/Alert; 8 56(Lorg/openqa/selenium/support/events/EventFiringWebDriver;Lorg/openqa/selenium/WebDriver$TargetLocator;Lorg/openqa/selenium/support/events/EventFiringWebDriver$EventFiringTargetLocator;)V ;  SourceFileEventFiringWebDriver.java InnerClasses@org/openqa/selenium/WebDriver TargetLocatorC7org/openqa/selenium/support/events/EventFiringWebDriverEventFiringTargetLocator    K*+**,/- . ? *2   ? *+ 6  "#$ ? *+%:  '() ? *+*>  ,#-. 4 */B  12 4 *3F  56 4 *7J   9 '*+,:-<=>?A BDPK %^D>cm!Qorg/openqa/selenium/support/events/EventFiringWebDriver$EventFiringTimeouts.class1-Korg/openqa/selenium/support/events/EventFiringWebDriver$EventFiringTimeoutsjava/lang/Object&org/openqa/selenium/WebDriver$Timeoutstimeouts(Lorg/openqa/selenium/WebDriver$Timeouts;this$09Lorg/openqa/selenium/support/events/EventFiringWebDriver;d(Lorg/openqa/selenium/support/events/EventFiringWebDriver;Lorg/openqa/selenium/WebDriver$Timeouts;)VCode   ()V  LineNumberTableLocalVariableTablethisMLorg/openqa/selenium/support/events/EventFiringWebDriver$EventFiringTimeouts;implicitlyWaitJ(JLjava/util/concurrent/TimeUnit;)Lorg/openqa/selenium/WebDriver$Timeouts;  timeJunitLjava/util/concurrent/TimeUnit;setScriptTimeout # ! SourceFileEventFiringWebDriver.java InnerClasses(org/openqa/selenium/WebDriverTimeouts+7org/openqa/selenium/support/events/EventFiringWebDriverEventFiringTimeouts    K*+**,  P*-W*  !  ! P*-"W* % &  $%&') *,PK %^D>ִUorg/openqa/selenium/support/events/EventFiringWebDriver$EventFiringWebElement$1.class1MOorg/openqa/selenium/support/events/EventFiringWebDriver$EventFiringWebElement$1java/lang/Object#java/lang/reflect/InvocationHandlerthis$1OLorg/openqa/selenium/support/events/EventFiringWebDriver$EventFiringWebElement; val$element Lorg/openqa/selenium/WebElement;r(Lorg/openqa/selenium/support/events/EventFiringWebDriver$EventFiringWebElement;Lorg/openqa/selenium/WebElement;)VCode     ()VLineNumberTableLocalVariableTablethisQLorg/openqa/selenium/support/events/EventFiringWebDriver$EventFiringWebElement$1;invokeS(Ljava/lang/Object;Ljava/lang/reflect/Method;[Ljava/lang/Object;)Ljava/lang/Object; Exceptionsjava/lang/Throwable ! java/lang/reflect/Method "9(Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/Object; $&%Morg/openqa/selenium/support/events/EventFiringWebDriver$EventFiringWebElement '(access$2(Lorg/openqa/selenium/support/events/EventFiringWebDriver$EventFiringWebElement;)Lorg/openqa/selenium/support/events/EventFiringWebDriver; *,+7org/openqa/selenium/support/events/EventFiringWebDriver '-v(Lorg/openqa/selenium/support/events/EventFiringWebDriver;)Lorg/openqa/selenium/support/events/WebDriverEventListener; /10+java/lang/reflect/InvocationTargetException 23getTargetException()Ljava/lang/Throwable; *5 67access$3Z(Lorg/openqa/selenium/support/events/EventFiringWebDriver;)Lorg/openqa/selenium/WebDriver; 9;:9org/openqa/selenium/support/events/WebDriverEventListener <= onException7(Ljava/lang/Throwable;Lorg/openqa/selenium/WebDriver;)VproxyLjava/lang/Object;methodLjava/lang/reflect/Method;args[Ljava/lang/Object;e-Ljava/lang/reflect/InvocationTargetException; SourceFileEventFiringWebDriver.javaEnclosingMethod J\(Lorg/openqa/selenium/support/events/EventFiringWebDriver;Lorg/openqa/selenium/WebElement;)V InnerClassesEventFiringWebElement    =*+*,*  '  0,*-:*#).*#48. /* + ,*-400>?0@A0BC $DEFGH$IK$*LPK %^D>c>?CCSorg/openqa/selenium/support/events/EventFiringWebDriver$EventFiringWebElement.class1Morg/openqa/selenium/support/events/EventFiringWebDriver$EventFiringWebElementjava/lang/Objectorg/openqa/selenium/WebElement)org/openqa/selenium/internal/WrapsElement (org/openqa/selenium/internal/WrapsDriverelement Lorg/openqa/selenium/WebElement;underlyingElementthis$09Lorg/openqa/selenium/support/events/EventFiringWebDriver;\(Lorg/openqa/selenium/support/events/EventFiringWebDriver;Lorg/openqa/selenium/WebElement;)VCode    ()V9org/openqa/selenium/support/events/WebDriverEventListener java/lang/Class getClassLoader()Ljava/lang/ClassLoader; !#"7org/openqa/selenium/support/events/EventFiringWebDriver $%access$1_(Lorg/openqa/selenium/support/events/EventFiringWebDriver;Ljava/lang/Object;)[Ljava/lang/Class;'Oorg/openqa/selenium/support/events/EventFiringWebDriver$EventFiringWebElement$1 &) *r(Lorg/openqa/selenium/support/events/EventFiringWebDriver$EventFiringWebElement;Lorg/openqa/selenium/WebElement;)V ,.-java/lang/reflect/Proxy /0newProxyInstanceb(Ljava/lang/ClassLoader;[Ljava/lang/Class;Ljava/lang/reflect/InvocationHandler;)Ljava/lang/Object; 2 4 LineNumberTableLocalVariableTablethisOLorg/openqa/selenium/support/events/EventFiringWebDriver$EventFiringWebElement;click !; <=access$2v(Lorg/openqa/selenium/support/events/EventFiringWebDriver;)Lorg/openqa/selenium/support/events/WebDriverEventListener; !? @Aaccess$3Z(Lorg/openqa/selenium/support/events/EventFiringWebDriver;)Lorg/openqa/selenium/WebDriver; C DE beforeClickOnB(Lorg/openqa/selenium/WebElement;Lorg/openqa/selenium/WebDriver;)V G 9 I JE afterClickOnsubmit M KgetValue()Ljava/lang/String; Q NOsendKeys([Ljava/lang/CharSequence;)V U VEbeforeChangeValueOf X RS Z [EafterChangeValueOf keysToSend[Ljava/lang/CharSequence;clear ` ^ getTagName c aO getAttribute&(Ljava/lang/String;)Ljava/lang/String; g denameLjava/lang/String;toggle()Z m jkresultZ isSelected r pk setSelected u s isEnabled x vkgetText { yO findElement:(Lorg/openqa/selenium/By;)Lorg/openqa/selenium/WebElement;   beforeFindByZ(Lorg/openqa/selenium/By;Lorg/openqa/selenium/WebElement;Lorg/openqa/selenium/WebDriver;)V  |}   afterFindBy ! access$4{(Lorg/openqa/selenium/support/events/EventFiringWebDriver;Lorg/openqa/selenium/WebElement;)Lorg/openqa/selenium/WebElement;byLorg/openqa/selenium/By;temp findElements*(Lorg/openqa/selenium/By;)Ljava/util/List; SignatureL(Lorg/openqa/selenium/By;)Ljava/util/List;  java/util/ArrayList java/util/List size()I (I)V iterator()Ljava/util/Iterator; java/util/Iterator next()Ljava/lang/Object; add(Ljava/lang/Object;)Z khasNextLjava/util/List;LocalVariableTypeTable2Ljava/util/List;getWrappedElement"()Lorg/openqa/selenium/WebElement;equals   objLjava/lang/Object;otherhashCode  getWrappedDriver!()Lorg/openqa/selenium/WebDriver;(Lorg/openqa/selenium/support/events/EventFiringWebDriver;Lorg/openqa/selenium/WebElement;Lorg/openqa/selenium/support/events/EventFiringWebDriver$EventFiringWebElement;)V  (Lorg/openqa/selenium/support/events/EventFiringWebDriver;Lorg/openqa/selenium/WebElement;Lorg/openqa/selenium/support/events/EventFiringWebDriver$EventFiringWebElement;Lorg/openqa/selenium/support/events/EventFiringWebDriver$EventFiringWebElement;)V(Lorg/openqa/selenium/support/events/EventFiringWebDriver$EventFiringWebElement;)Lorg/openqa/selenium/support/events/EventFiringWebDriver; SourceFileEventFiringWebDriver.java InnerClassesEventFiringWebElement    |,*+**+, &Y*,(+1*,35"3# $ %&'$&26,78, 9n8*:*1*>B*1F*:*1*>H567 8796 878K8 *1L5 < =6  78NO4 *1P5@6  78RSy9*:*1*>T*1+W*:*1*>Y5DE!F8G69789\]^n8*:*1*>T*1_*:*1*>Y5JK L7M6 878aO4 *1b5P6  78de? *1+f5T6 78 hijkz:*:*1*>T*1l<*:*1*>Y5XY!Z8[6:78!nopk4 *1q5_6  78s8 *1t5 c d6  78vk4 *1w5g6  78yO4 *1z5k6  78|}D*:+*1*>~*1+M*:+*1*>*,5op#q;r6 D78D#! |*:+*1*>~*1+M*:+*1*>Y,N,::-*W-5"vw#x;yIz`{pzz}64|78|#YI3n` #YI3n/*356 78z(++M, ,M*3,5 6 (78( 2*356 782*>56 78'*+,ñ5#6'*+,ñ5#6<%*56!&PK %^D>r}5,5,=org/openqa/selenium/support/events/EventFiringWebDriver.class1k7org/openqa/selenium/support/events/EventFiringWebDriverjava/lang/Objectorg/openqa/selenium/WebDriver&org/openqa/selenium/JavascriptExecutor #org/openqa/selenium/TakesScreenshot (org/openqa/selenium/internal/WrapsDriver#org/openqa/selenium/HasInputDevicesdriverLorg/openqa/selenium/WebDriver;eventListenersLjava/util/List; SignatureMLjava/util/List; dispatcher;Lorg/openqa/selenium/support/events/WebDriverEventListener;"(Lorg/openqa/selenium/WebDriver;)VCode  ()Vjava/util/ArrayList  ! #9org/openqa/selenium/support/events/WebDriverEventListener %'&java/lang/Class ()getClassLoader()Ljava/lang/ClassLoader;+9org/openqa/selenium/support/events/EventFiringWebDriver$1 *- .<(Lorg/openqa/selenium/support/events/EventFiringWebDriver;)V 021java/lang/reflect/Proxy 34newProxyInstanceb(Ljava/lang/ClassLoader;[Ljava/lang/Class;Ljava/lang/reflect/InvocationHandler;)Ljava/lang/Object; 6  8 9:extractInterfaces&(Ljava/lang/Object;)[Ljava/lang/Class;<9org/openqa/selenium/support/events/EventFiringWebDriver$2 ;> ?[(Lorg/openqa/selenium/support/events/EventFiringWebDriver;Lorg/openqa/selenium/WebDriver;)V A LineNumberTableLocalVariableTablethis9Lorg/openqa/selenium/support/events/EventFiringWebDriver; allInterfaces[Ljava/lang/Class;)(Ljava/lang/Object;)[Ljava/lang/Class<*>;Jjava/util/HashSet I MON java/util/Set PQadd(Ljava/lang/Object;)Z S TUgetClass()Ljava/lang/Class; W 9X#(Ljava/util/Set;Ljava/lang/Class;)V MZ [\size()I M^ _`toArray(([Ljava/lang/Object;)[Ljava/lang/Object;GobjectLjava/lang/Object;Ljava/util/Set;LocalVariableTypeTable%Ljava/util/Set;>;<(Ljava/util/Set;>;Ljava/lang/Class<*>;)V i jQequals %l mn getInterfaces()[Ljava/lang/Class; prqjava/util/Arrays stasList%([Ljava/lang/Object;)Ljava/util/List; Mv wxaddAll(Ljava/util/Collection;)Z %z {U getSuperclassaddToclazzLjava/lang/Class;classesLjava/lang/Class<*>;registerv(Lorg/openqa/selenium/support/events/WebDriverEventListener;)Lorg/openqa/selenium/support/events/EventFiringWebDriver; Ojava/util/List eventListener unregister QremovegetWrappedDriver!()Lorg/openqa/selenium/WebDriver;get(Ljava/lang/String;)V " beforeNavigateTo4(Ljava/lang/String;Lorg/openqa/selenium/WebDriver;)V  " afterNavigateTourlLjava/lang/String; getCurrentUrl()Ljava/lang/String;  getTitle   findElements*(Lorg/openqa/selenium/By;)Ljava/util/List;L(Lorg/openqa/selenium/By;)Ljava/util/List; "  beforeFindByZ(Lorg/openqa/selenium/By;Lorg/openqa/selenium/WebElement;Lorg/openqa/selenium/WebDriver;)V  "  afterFindBy Z  (I)V iterator()Ljava/util/Iterator; java/util/Iterator next()Ljava/lang/Object;org/openqa/selenium/WebElement  createWebElementB(Lorg/openqa/selenium/WebElement;)Lorg/openqa/selenium/WebElement; hasNext()ZbyLorg/openqa/selenium/By;tempresultelement Lorg/openqa/selenium/WebElement;2Ljava/util/List; findElement:(Lorg/openqa/selenium/By;)Lorg/openqa/selenium/WebElement;   getPageSource  close  quit  getWindowHandles()Ljava/util/Set;%()Ljava/util/Set;  getWindowHandle   executeScript9(Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/Object; "  beforeScript  `unpackWrappedArgs  "  afterScript'java/lang/UnsupportedOperationException@Underlying driver instance does not support executing javascript scriptargs[Ljava/lang/Object;usedArgsexecuteAsyncScript  isJavascriptEnabled  Morg/openqa/selenium/support/events/EventFiringWebDriver$EventFiringWebElement  getWrappedElement"()Lorg/openqa/selenium/WebElement;iIgetScreenshotAs4(Lorg/openqa/selenium/OutputType;)Ljava/lang/Object; Exceptions &org/openqa/selenium/WebDriverException@(Lorg/openqa/selenium/OutputType;)TX;  >Underlying driver instance does not support taking screenshotstarget Lorg/openqa/selenium/OutputType;%Lorg/openqa/selenium/OutputType;switchTo/()Lorg/openqa/selenium/WebDriver$TargetLocator;Porg/openqa/selenium/support/events/EventFiringWebDriver$EventFiringTargetLocator    (Lorg/openqa/selenium/support/events/EventFiringWebDriver;Lorg/openqa/selenium/WebDriver$TargetLocator;Lorg/openqa/selenium/support/events/EventFiringWebDriver$EventFiringTargetLocator;)Vnavigate,()Lorg/openqa/selenium/WebDriver$Navigation;Morg/openqa/selenium/support/events/EventFiringWebDriver$EventFiringNavigation !  # $f(Lorg/openqa/selenium/support/events/EventFiringWebDriver;Lorg/openqa/selenium/WebDriver$Navigation;)Vmanage)()Lorg/openqa/selenium/WebDriver$Options;(Jorg/openqa/selenium/support/events/EventFiringWebDriver$EventFiringOptions * %& ', -(Lorg/openqa/selenium/support/events/EventFiringWebDriver;Lorg/openqa/selenium/WebDriver$Options;Lorg/openqa/selenium/support/events/EventFiringWebDriver$EventFiringOptions;)V/&org/openqa/selenium/RenderedWebElement1Uorg/openqa/selenium/support/events/EventFiringWebDriver$EventFiringRenderedWebElement 03 4\(Lorg/openqa/selenium/support/events/EventFiringWebDriver;Lorg/openqa/selenium/WebElement;)V 6 7(Lorg/openqa/selenium/support/events/EventFiringWebDriver;Lorg/openqa/selenium/WebElement;Lorg/openqa/selenium/support/events/EventFiringWebDriver$EventFiringWebElement;Lorg/openqa/selenium/support/events/EventFiringWebDriver$EventFiringWebElement;)Vfrom getKeyboard ()Lorg/openqa/selenium/Keyboard;<?org/openqa/selenium/support/events/internal/EventFiringKeyboard ;> ?](Lorg/openqa/selenium/WebDriver;Lorg/openqa/selenium/support/events/WebDriverEventListener;)VADUnderlying driver does not implement advanced user interactions yet.getMouse()Lorg/openqa/selenium/Mouse;EactionsBuilder:()Lorg/openqa/selenium/interactions/ActionChainsGenerator;J=org/openqa/selenium/interactions/DefaultActionChainsGenerator IL access$0K(Lorg/openqa/selenium/support/events/EventFiringWebDriver;)Ljava/util/List;access$1_(Lorg/openqa/selenium/support/events/EventFiringWebDriver;Ljava/lang/Object;)[Ljava/lang/Class;access$2v(Lorg/openqa/selenium/support/events/EventFiringWebDriver;)Lorg/openqa/selenium/support/events/WebDriverEventListener;access$3Z(Lorg/openqa/selenium/support/events/EventFiringWebDriver;)Lorg/openqa/selenium/WebDriver;access$4{(Lorg/openqa/selenium/support/events/EventFiringWebDriver;Lorg/openqa/selenium/WebElement;)Lorg/openqa/selenium/WebElement; SourceFileEventFiringWebDriver.java InnerClasses[(org/openqa/selenium/WebDriver$Navigation Navigation^%org/openqa/selenium/WebDriver$OptionsOptionsa+org/openqa/selenium/WebDriver$TargetLocator TargetLocatorEventFiringNavigationEventFiringOptionsEventFiringRenderedWebElementEventFiringTargetLocatorhKorg/openqa/selenium/support/events/EventFiringWebDriver$EventFiringTimeoutsEventFiringTimeoutsEventFiringWebElement! !O**Y *"$%Y"S*Y*,/"5*+7M*"$,;Y*+=/@B6 SEFGHI/T5V6W;X<YEVNhC ODEO5FG9:H-IYKM, LW*,+RV,,Y%]aBklmoC -DE-bc%Fde %Ff9Xg$,h,kN+-ouW*+,yVBs t wxy#zC*$DE$|d$}~Ge$|f$}E * +W*B  C DE E * +W*B  C DE /*@BC DEg'*5+*@*@+*5+*@B&C'DE'4 *@BC  DE4 *@BC  DEg*5+*@*@+M*5+*@Y,N,::-*W-B")7N[eC4gDEgM70N eM70y/*5+*@*@+M*5+*@*,B)C /DE/4 *@BC  DE8 *@B  C  DE8 *@B  C  DE4 *@BC  DE4 *@BC  DEI*@8*5+*@*,N*@+-:*5+*@YB .<?C4IDEII!.cI*@8*5+*@*,N*@+-:*5+*@YB .<?C4IDEII!.cS!*@*@YB C !DE`4+M>$+2,+2S ,+2S+,B #)2C*4DE4.*  q#*@ *@ + YB C#DE#e #=Y**@BC DE<Y**@ "BC DE%&='Y**@)+BC DE[+.0Y*+2Y*+5BCDE89:W%*@ ;Y*@*5=Y@B   C %DEBCW%*@ DY*@*5FY@B C %DEGH3 IY*KBC  DEMN%* BECOP&*+7BjCQR%*5BFCST%*@BCCUV&*+BCWXYZ Z\ ]_ `b *;c'd0efgijPK %^D> Y:U8 8 Gorg/openqa/selenium/support/events/AbstractWebDriverEventListener.class11Aorg/openqa/selenium/support/events/AbstractWebDriverEventListenerjava/lang/Object9org/openqa/selenium/support/events/WebDriverEventListener()VCode  LineNumberTableLocalVariableTablethisCLorg/openqa/selenium/support/events/AbstractWebDriverEventListener;beforeNavigateTo4(Ljava/lang/String;Lorg/openqa/selenium/WebDriver;)VurlLjava/lang/String;driverLorg/openqa/selenium/WebDriver;afterNavigateTobeforeNavigateBack"(Lorg/openqa/selenium/WebDriver;)VafterNavigateBackbeforeNavigateForwardafterNavigateForward beforeFindByZ(Lorg/openqa/selenium/By;Lorg/openqa/selenium/WebElement;Lorg/openqa/selenium/WebDriver;)VbyLorg/openqa/selenium/By;element Lorg/openqa/selenium/WebElement; afterFindBy beforeClickOnB(Lorg/openqa/selenium/WebElement;Lorg/openqa/selenium/WebDriver;)V afterClickOnbeforeChangeValueOfafterChangeValueOf beforeScriptscript afterScript onException7(Ljava/lang/Throwable;Lorg/openqa/selenium/WebDriver;)V throwableLjava/lang/Throwable; SourceFile#AbstractWebDriverEventListener.java! /*    ? $  ? (  5 ,  5 0  5 4  5 8  I < * !" I @ * !#$ ? D  !%$ ? H  !&$ ? L  !'$ ? P  !( ? T )* ? X )+, ? \ -./0PK lC>6't3org/openqa/selenium/support/events/.svn/all-wcpropsK 25 svn:wc:ra_dav:version-url V 76 /svn/!svn/ver/11240/trunk/java/client/src/org/openqa/selenium/support/events END WebDriverEventListener.java K 25 svn:wc:ra_dav:version-url V 104 /svn/!svn/ver/11224/trunk/java/client/src/org/openqa/selenium/support/events/WebDriverEventListener.java END AbstractWebDriverEventListener.java K 25 svn:wc:ra_dav:version-url V 112 /svn/!svn/ver/11224/trunk/java/client/src/org/openqa/selenium/support/events/AbstractWebDriverEventListener.java END EventFiringWebDriver.java K 25 svn:wc:ra_dav:version-url V 102 /svn/!svn/ver/11240/trunk/java/client/src/org/openqa/selenium/support/events/EventFiringWebDriver.java END build.desc K 25 svn:wc:ra_dav:version-url V 87 /svn/!svn/ver/11226/trunk/java/client/src/org/openqa/selenium/support/events/build.desc END PK lC>p~~/org/openqa/selenium/support/events/.svn/entries8 dir 11264 http://selenium.googlecode.com/svn/trunk/java/client/src/org/openqa/selenium/support/events http://selenium.googlecode.com/svn 2011-02-01T18:15:27.349016Z 11240 eran.mes@gmail.com svn:special svn:externals svn:needs-lock 07704840-8298-11de-bf8c-fd130f914ac9 WebDriverEventListener.java file 2011-02-03T12:01:18.000000Z 8a165ca01a2cfcd9a4321eae26f9b72a 2009-02-23T08:53:18.265685Z 6321 simon.m.stewart AbstractWebDriverEventListener.java file 2011-02-03T12:01:18.000000Z 8047cb4e58c857046dc2916ad9cc19f5 2009-02-23T08:53:18.265685Z 6321 simon.m.stewart EventFiringWebDriver.java file 2011-02-03T12:01:18.000000Z 45370b291508db1bfe4875b2794eca40 2011-02-01T18:15:27.349016Z 11240 eran.mes@gmail.com internal dir build.desc file 2011-02-03T12:01:18.000000Z 990127e69591d37c02edfbce72c52032 2011-02-01T13:59:17.176547Z 11226 simon.m.stewart PK lC>G.org/openqa/selenium/support/events/.svn/format8 PK lC>V: : ^org/openqa/selenium/support/events/.svn/text-base/AbstractWebDriverEventListener.java.svn-base/* Copyright 2007-2009 WebDriver committers Copyright 2007-2009 Google Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package org.openqa.selenium.support.events; import org.openqa.selenium.By; import org.openqa.selenium.WebDriver; import org.openqa.selenium.WebElement; /** * Use this class as base class, if you want to implement * a {@link WebDriverEventListener} and are only interested * in some events. All methods provided by this class have * an empty method body. * * @author Michael Tamm */ public abstract class AbstractWebDriverEventListener implements WebDriverEventListener { public void beforeNavigateTo(String url, WebDriver driver) { // Do nothing. } public void afterNavigateTo(String url, WebDriver driver) { // Do nothing. } public void beforeNavigateBack(WebDriver driver) { // Do nothing. } public void afterNavigateBack(WebDriver driver) { // Do nothing. } public void beforeNavigateForward(WebDriver driver) { // Do nothing. } public void afterNavigateForward(WebDriver driver) { // Do nothing. } public void beforeFindBy(By by, WebElement element, WebDriver driver) { // Do nothing. } public void afterFindBy(By by, WebElement element, WebDriver driver) { // Do nothing. } public void beforeClickOn(WebElement element, WebDriver driver) { // Do nothing. } public void afterClickOn(WebElement element, WebDriver driver) { // Do nothing. } public void beforeChangeValueOf(WebElement element, WebDriver driver) { // Do nothing. } public void afterChangeValueOf(WebElement element, WebDriver driver) { // Do nothing. } public void beforeScript(String script, WebDriver driver) { // Do nothing } public void afterScript(String script, WebDriver driver) { // Do nothing } public void onException(Throwable throwable, WebDriver driver) { // Do nothing } } PK lC>\1DDTorg/openqa/selenium/support/events/.svn/text-base/EventFiringWebDriver.java.svn-base/* Copyright 2007-2009 WebDriver committers Copyright 2007-2009 Google Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package org.openqa.selenium.support.events; import org.openqa.selenium.interactions.ActionChainsGenerator; import org.openqa.selenium.Alert; import org.openqa.selenium.By; import org.openqa.selenium.Cookie; import org.openqa.selenium.Dimension; import org.openqa.selenium.HasInputDevices; import org.openqa.selenium.JavascriptExecutor; import org.openqa.selenium.Keyboard; import org.openqa.selenium.Mouse; import org.openqa.selenium.OutputType; import org.openqa.selenium.Point; import org.openqa.selenium.RenderedWebElement; import org.openqa.selenium.Speed; import org.openqa.selenium.TakesScreenshot; import org.openqa.selenium.WebDriver; import org.openqa.selenium.WebDriverException; import org.openqa.selenium.WebElement; import org.openqa.selenium.interactions.DefaultActionChainsGenerator; import org.openqa.selenium.interactions.internal.Coordinates; import org.openqa.selenium.internal.Locatable; import org.openqa.selenium.internal.WrapsDriver; import org.openqa.selenium.internal.WrapsElement; import org.openqa.selenium.support.events.internal.EventFiringKeyboard; import org.openqa.selenium.support.events.internal.EventFiringMouse; import java.lang.reflect.InvocationHandler; import java.lang.reflect.InvocationTargetException; import java.lang.reflect.Method; import java.lang.reflect.Proxy; import java.net.URL; import java.util.ArrayList; import java.util.Arrays; import java.util.HashSet; import java.util.List; import java.util.Set; import java.util.concurrent.TimeUnit; /** * A wrapper around an arbitrary {@link WebDriver} instance * which supports registering of a {@link WebDriverEventListener}, * e.g. for logging purposes. * * @author Michael Tamm */ public class EventFiringWebDriver implements WebDriver, JavascriptExecutor, TakesScreenshot, WrapsDriver, HasInputDevices { private final WebDriver driver; private final List eventListeners = new ArrayList(); private final WebDriverEventListener dispatcher = (WebDriverEventListener) Proxy.newProxyInstance( WebDriverEventListener.class.getClassLoader(), new Class[] { WebDriverEventListener.class }, new InvocationHandler() { public Object invoke(Object proxy, Method method, Object[] args) throws Throwable { for (WebDriverEventListener eventListener : eventListeners) { method.invoke(eventListener, args); } return null; } } ); public EventFiringWebDriver(final WebDriver driver) { Class[] allInterfaces = extractInterfaces(driver); this.driver = (WebDriver) Proxy.newProxyInstance( WebDriverEventListener.class.getClassLoader(), allInterfaces, new InvocationHandler() { public Object invoke(Object proxy, Method method, Object[] args) throws Throwable { if ("getWrappedDriver".equals(method.getName())) { return driver; } try { return method.invoke(driver, args); } catch (InvocationTargetException e) { dispatcher.onException(e.getTargetException(), driver); throw e.getTargetException(); } } } ); } private Class[] extractInterfaces(Object object) { Set> allInterfaces = new HashSet>(); allInterfaces.add(WrapsDriver.class); extractInterfaces(allInterfaces, object.getClass()); return allInterfaces.toArray(new Class[allInterfaces.size()]); } private void extractInterfaces(Set> addTo, Class clazz) { if (Object.class.equals(clazz)) { return; // Done } Class[] classes = clazz.getInterfaces(); addTo.addAll(Arrays.asList(classes)); extractInterfaces(addTo, clazz.getSuperclass()); } /** * @return this for method chaining. */ public EventFiringWebDriver register(WebDriverEventListener eventListener) { eventListeners.add(eventListener); return this; } /** * @return this for method chaining. */ public EventFiringWebDriver unregister(WebDriverEventListener eventListener) { eventListeners.remove(eventListener); return this; } public WebDriver getWrappedDriver() { return driver; } public void get(String url) { dispatcher.beforeNavigateTo(url, driver); driver.get(url); dispatcher.afterNavigateTo(url, driver); } public String getCurrentUrl() { return driver.getCurrentUrl(); } public String getTitle() { return driver.getTitle(); } public List findElements(By by) { dispatcher.beforeFindBy(by, null, driver); List temp = driver.findElements(by); dispatcher.afterFindBy(by, null, driver); List result = new ArrayList(temp.size()); for (WebElement element : temp) { result.add(createWebElement(element)); } return result; } public WebElement findElement(By by) { dispatcher.beforeFindBy(by, null, driver); WebElement temp = driver.findElement(by); dispatcher.afterFindBy(by, null, driver); return createWebElement(temp); } public String getPageSource() { return driver.getPageSource(); } public void close() { driver.close(); } public void quit() { driver.quit(); } public Set getWindowHandles() { return driver.getWindowHandles(); } public String getWindowHandle() { return driver.getWindowHandle(); } public Object executeScript(String script, Object... args) { if (driver instanceof JavascriptExecutor) { dispatcher.beforeScript(script, driver); Object[] usedArgs = unpackWrappedArgs(args); Object result = ((JavascriptExecutor) driver).executeScript(script, usedArgs); dispatcher.afterScript(script, driver); return result; } throw new UnsupportedOperationException("Underlying driver instance does not support executing javascript"); } public Object executeAsyncScript(String script, Object... args) { if (driver instanceof JavascriptExecutor) { dispatcher.beforeScript(script, driver); Object[] usedArgs = unpackWrappedArgs(args); Object result = ((JavascriptExecutor) driver).executeAsyncScript(script, usedArgs); dispatcher.afterScript(script, driver); return result; } throw new UnsupportedOperationException("Underlying driver instance does not support executing javascript"); } public boolean isJavascriptEnabled() { if (driver instanceof JavascriptExecutor) { return ((JavascriptExecutor) driver).isJavascriptEnabled(); } throw new UnsupportedOperationException("Underlying driver instance does not support executing javascript"); } private Object[] unpackWrappedArgs(Object... args) { // Walk the args: the various drivers expect unpacked versions of the elements Object[] usedArgs = new Object[args.length]; for (int i = 0; i < args.length; i++) { if (args[i] instanceof EventFiringWebElement) { usedArgs[i] = ((EventFiringWebElement) args[i]).getWrappedElement(); } else { usedArgs[i] = args[i]; } } return usedArgs; } public X getScreenshotAs(OutputType target) throws WebDriverException { if (driver instanceof TakesScreenshot) { return ((TakesScreenshot) driver).getScreenshotAs(target); } throw new UnsupportedOperationException("Underlying driver instance does not support taking screenshots"); } public TargetLocator switchTo() { return new EventFiringTargetLocator(driver.switchTo()); } public Navigation navigate() { return new EventFiringNavigation(driver.navigate()); } public Options manage() { return new EventFiringOptions(driver.manage()); } private WebElement createWebElement(WebElement from) { return from instanceof RenderedWebElement ? new EventFiringRenderedWebElement(from) : new EventFiringWebElement(from); } public Keyboard getKeyboard() { if (driver instanceof HasInputDevices) { return new EventFiringKeyboard(driver, dispatcher); } else { throw new UnsupportedOperationException("Underlying driver does not implement advanced" + " user interactions yet."); } } public Mouse getMouse() { if (driver instanceof HasInputDevices) { return new EventFiringMouse(driver, dispatcher); } else { throw new UnsupportedOperationException("Underlying driver does not implement advanced" + " user interactions yet."); } } public ActionChainsGenerator actionsBuilder() { return new DefaultActionChainsGenerator(this); } private class EventFiringWebElement implements WebElement, WrapsElement, WrapsDriver { private final WebElement element; private final WebElement underlyingElement; private EventFiringWebElement(final WebElement element) { this.element = (WebElement) Proxy.newProxyInstance( WebDriverEventListener.class.getClassLoader(), extractInterfaces(element), new InvocationHandler() { public Object invoke(Object proxy, Method method, Object[] args) throws Throwable { try { return method.invoke(element, args); } catch (InvocationTargetException e) { dispatcher.onException(e.getTargetException(), driver); throw e.getTargetException(); } } } ); this.underlyingElement = element; } public void click() { dispatcher.beforeClickOn(element, driver); element.click(); dispatcher.afterClickOn(element, driver); } public void submit() { element.submit(); } public String getValue() { return element.getValue(); } public void sendKeys(CharSequence... keysToSend) { dispatcher.beforeChangeValueOf(element, driver); element.sendKeys(keysToSend); dispatcher.afterChangeValueOf(element, driver); } public void clear() { dispatcher.beforeChangeValueOf(element, driver); element.clear(); dispatcher.afterChangeValueOf(element, driver); } public String getTagName() { return element.getTagName(); } public String getAttribute(String name) { return element.getAttribute(name); } public boolean toggle() { dispatcher.beforeChangeValueOf(element, driver); boolean result = element.toggle(); dispatcher.afterChangeValueOf(element, driver); return result; } public boolean isSelected() { return element.isSelected(); } public void setSelected() { element.setSelected(); } public boolean isEnabled() { return element.isEnabled(); } public String getText() { return element.getText(); } public WebElement findElement(By by) { dispatcher.beforeFindBy(by, element, driver); WebElement temp = element.findElement(by); dispatcher.afterFindBy(by, element, driver); return createWebElement(temp); } public List findElements(By by) { dispatcher.beforeFindBy(by, element, driver); List temp = element.findElements(by); dispatcher.afterFindBy(by, element, driver); List result = new ArrayList(temp.size()); for (WebElement element : temp) { result.add(createWebElement(element)); } return result; } public WebElement getWrappedElement() { return underlyingElement; } @Override public boolean equals(Object obj) { if (!(obj instanceof WebElement)) { return false; } WebElement other = (WebElement) obj; if (other instanceof WrapsElement) { other = ((WrapsElement) other).getWrappedElement(); } return underlyingElement.equals(other); } @Override public int hashCode() { return underlyingElement.hashCode(); } public WebDriver getWrappedDriver() { return driver; } } private class EventFiringRenderedWebElement extends EventFiringWebElement implements RenderedWebElement, Locatable { private final RenderedWebElement delegate; public EventFiringRenderedWebElement(WebElement element) { super(element); delegate = (RenderedWebElement) element; } public boolean isDisplayed() { return delegate.isDisplayed(); } public void hover() { delegate.hover(); } public Point getLocation() { return delegate.getLocation(); } public Dimension getSize() { return delegate.getSize(); } public void dragAndDropBy(int moveRightBy, int moveDownBy) { delegate.dragAndDropBy(moveRightBy, moveDownBy); } public void dragAndDropOn(RenderedWebElement element) { delegate.dragAndDropOn(element); } public String getValueOfCssProperty(String propertyName) { return delegate.getValueOfCssProperty(propertyName); } public Point getLocationOnScreenOnceScrolledIntoView() { return ((Locatable) delegate).getLocationOnScreenOnceScrolledIntoView(); } public Coordinates getCoordinates() { return ((Locatable) delegate).getCoordinates(); } } private class EventFiringNavigation implements Navigation { private final WebDriver.Navigation navigation; EventFiringNavigation(Navigation navigation) { this.navigation = navigation; } public void to(String url) { dispatcher.beforeNavigateTo(url, driver); navigation.to(url); dispatcher.afterNavigateTo(url, driver); } public void to(URL url) { to(String.valueOf(url)); } public void back() { dispatcher.beforeNavigateBack(driver); navigation.back(); dispatcher.afterNavigateBack(driver); } public void forward() { dispatcher.beforeNavigateForward(driver); navigation.forward(); dispatcher.afterNavigateForward(driver); } public void refresh() { navigation.refresh(); } } private class EventFiringOptions implements Options { private Options options; private EventFiringOptions(Options options) { this.options = options; } public void addCookie(Cookie cookie) { options.addCookie(cookie); } public void deleteCookieNamed(String name) { options.deleteCookieNamed(name); } public void deleteCookie(Cookie cookie) { options.deleteCookie(cookie); } public void deleteAllCookies() { options.deleteAllCookies(); } public Set getCookies() { return options.getCookies(); } public Cookie getCookieNamed(String name) { return options.getCookieNamed(name); } public Speed getSpeed() { return options.getSpeed(); } public void setSpeed(Speed speed) { options.setSpeed(speed); } public Timeouts timeouts() { return new EventFiringTimeouts(options.timeouts()); } } private class EventFiringTimeouts implements Timeouts { private final Timeouts timeouts; EventFiringTimeouts(Timeouts timeouts) { this.timeouts = timeouts; } public Timeouts implicitlyWait(long time, TimeUnit unit) { timeouts.implicitlyWait(time, unit); return this; } public Timeouts setScriptTimeout(long time, TimeUnit unit) { timeouts.setScriptTimeout(time, unit); return this; } } private class EventFiringTargetLocator implements TargetLocator { private TargetLocator targetLocator; private EventFiringTargetLocator(TargetLocator targetLocator) { this.targetLocator = targetLocator; } public WebDriver frame(int frameIndex) { return targetLocator.frame(frameIndex); } public WebDriver frame(String frameName) { return targetLocator.frame(frameName); } public WebDriver frame(WebElement frameElement) { return targetLocator.frame(frameElement); } public WebDriver window(String windowName) { return targetLocator.window(windowName); } public WebDriver defaultContent() { return targetLocator.defaultContent(); } public WebElement activeElement() { return targetLocator.activeElement(); } public Alert alert() { return targetLocator.alert(); } } } PK lC>Î)yyVorg/openqa/selenium/support/events/.svn/text-base/WebDriverEventListener.java.svn-base/* Copyright 2007-2009 WebDriver committers Copyright 2007-2009 Google Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package org.openqa.selenium.support.events; import org.openqa.selenium.By; import org.openqa.selenium.WebDriver; import org.openqa.selenium.WebElement; /** * @author Michael Tamm */ public interface WebDriverEventListener { /** * Called before {@link WebDriver#get WebDriver.get(String url)} * respectively {@link WebDriver.Navigation#to WebDriver.navigate().to(String url)}. */ void beforeNavigateTo(String url, WebDriver driver); /** * Called after {@link WebDriver#get WebDriver.get(String url)} * respectively {@link WebDriver.Navigation#to WebDriver.navigate().to(String url)}. * Not called, if an exception is thrown. */ void afterNavigateTo(String url, WebDriver driver); /** * Called before {@link WebDriver.Navigation#back WebDriver.navigate().back()}. */ void beforeNavigateBack(WebDriver driver); /** * Called after {@link WebDriver.Navigation#back WebDriver.navigate().back()}. * Not called, if an exception is thrown. */ void afterNavigateBack(WebDriver driver); /** * Called before {@link WebDriver.Navigation#forward WebDriver.navigate().forward()}. */ void beforeNavigateForward(WebDriver driver); /** * Called after {@link WebDriver.Navigation#forward WebDriver.navigate().forward()}. * Not called, if an exception is thrown. */ void afterNavigateForward(WebDriver driver); /** * Called before {@link WebDriver#findElement WebDriver.findElement(...)}, * or {@link WebDriver#findElements WebDriver.findElements(...)}, * or {@link WebElement#findElement WebElement.findElement(...)}, * or {@link WebElement#findElement WebElement.findElements(...)}. * * @param element will be null, if a find method of WebDriver is called. */ void beforeFindBy(By by, WebElement element, WebDriver driver); /** * Called after {@link WebDriver#findElement WebDriver.findElement(...)}, * or {@link WebDriver#findElements WebDriver.findElements(...)}, * or {@link WebElement#findElement WebElement.findElement(...)}, * or {@link WebElement#findElement WebElement.findElements(...)}. * * @param element will be null, if a find method of WebDriver is called. */ void afterFindBy(By by, WebElement element, WebDriver driver); /** * Called before {@link WebElement#click WebElement.click()}. */ void beforeClickOn(WebElement element, WebDriver driver); /** * Called after {@link WebElement#click WebElement.click()}. * Not called, if an exception is thrown. */ void afterClickOn(WebElement element, WebDriver driver); /** * Called before {@link WebElement#clear WebElement.clear()}, * {@link WebElement#sendKeys WebElement.sendKeys(...)}, or * {@link WebElement#toggle WebElement.toggle()}. */ void beforeChangeValueOf(WebElement element, WebDriver driver); /** * Called after {@link WebElement#clear WebElement.clear()}, * {@link WebElement#sendKeys WebElement.sendKeys(...)}, or * {@link WebElement#toggle WebElement.toggle()}. * Not called, if an exception is thrown. */ void afterChangeValueOf(WebElement element, WebDriver driver); /** * Called before {@link WebDriver#executeScript(String)} */ void beforeScript(String script, WebDriver driver); /** * Called after {@link WebDriver#executeScript(String)}. Not called * if an exception is thrown */ void afterScript(String script, WebDriver driver); /** * Called whenever an exception would be thrown. */ void onException(Throwable throwable, WebDriver driver); } PK lC>RY!Eorg/openqa/selenium/support/events/.svn/text-base/build.desc.svn-base java_library(name = "events", srcs = [ "*.java", "internal/*.java", ], deps = [ "//java/client/src/org/openqa/selenium:webdriver-api", "//java/client/src/org/openqa/selenium/interactions", ]) PK )hC>RY!-org/openqa/selenium/support/events/build.desc java_library(name = "events", srcs = [ "*.java", "internal/*.java", ], deps = [ "//java/client/src/org/openqa/selenium:webdriver-api", "//java/client/src/org/openqa/selenium/interactions", ]) PK lC>ERR.svn/all-wcpropsK 25 svn:wc:ra_dav:version-url V 41 /svn/!svn/ver/11261/trunk/java/client/src END PK lC>gD .svn/entries8 dir 11264 http://selenium.googlecode.com/svn/trunk/java/client/src http://selenium.googlecode.com/svn 2011-02-02T20:36:39.437809Z 11261 simon.m.stewart svn:special svn:externals svn:needs-lock 07704840-8298-11de-bf8c-fd130f914ac9 org dir com dir PK lC>G .svn/format8 PK %^D>Jorg/openqa/selenium/support/pagefactory/DefaultElementLocatorFactory.class1 Dorg/openqa/selenium/support/pagefactory/DefaultElementLocatorFactoryjava/lang/Object=org/openqa/selenium/support/pagefactory/ElementLocatorFactory driverRefLorg/openqa/selenium/WebDriver;"(Lorg/openqa/selenium/WebDriver;)VCode  ()V  LineNumberTableLocalVariableTablethisFLorg/openqa/selenium/support/pagefactory/DefaultElementLocatorFactory; createLocatorS(Ljava/lang/reflect/Field;)Lorg/openqa/selenium/support/pagefactory/ElementLocator;=org/openqa/selenium/support/pagefactory/DefaultElementLocator  ;(Lorg/openqa/selenium/WebDriver;Ljava/lang/reflect/Field;)VfieldLjava/lang/reflect/Field; SourceFile!DefaultElementLocatorFactory.java1  F * *+    A Y*+   PK %^D>g::Sorg/openqa/selenium/support/pagefactory/AjaxElementLocator$NoSuchElementError.class1Morg/openqa/selenium/support/pagefactory/AjaxElementLocator$NoSuchElementErrorjava/lang/Error*(Ljava/lang/String;Ljava/lang/Throwable;)VCode  LineNumberTableLocalVariableTablethisOLorg/openqa/selenium/support/pagefactory/AjaxElementLocator$NoSuchElementError;messageLjava/lang/String; throwableLjava/lang/Throwable;y(Ljava/lang/String;Ljava/lang/Throwable;Lorg/openqa/selenium/support/pagefactory/AjaxElementLocator$NoSuchElementError;)V   SourceFileAjaxElementLocator.java InnerClasses:org/openqa/selenium/support/pagefactory/AjaxElementLocatorNoSuchElementError I*+,   '*+,    PK %^D>"7ME E Sorg/openqa/selenium/support/pagefactory/AjaxElementLocator$SlowLoadingElement.class1MMorg/openqa/selenium/support/pagefactory/AjaxElementLocator$SlowLoadingElement4org/openqa/selenium/support/ui/SlowLoadableComponent lastException,Lorg/openqa/selenium/NoSuchElementException;element Lorg/openqa/selenium/WebElement;this$0f(Lorg/openqa/selenium/support/pagefactory/AjaxElementLocator;Lorg/openqa/selenium/support/ui/Clock;I)VCode   *(Lorg/openqa/selenium/support/ui/Clock;I)VLineNumberTableLocalVariableTablethisOLorg/openqa/selenium/support/pagefactory/AjaxElementLocator$SlowLoadingElement;clock&Lorg/openqa/selenium/support/ui/Clock;timeOutInSecondsIload()VsleepFor()J "!:org/openqa/selenium/support/pagefactory/AjaxElementLocator isLoaded Exceptions&java/lang/Error ( )*access$0^(Lorg/openqa/selenium/support/pagefactory/AjaxElementLocator;)Lorg/openqa/selenium/WebElement; ,  . /0isElementUsable#(Lorg/openqa/selenium/WebElement;)Z2*org/openqa/selenium/NoSuchElementException4Element is not usable 16 7(Ljava/lang/String;)V 9 ;Morg/openqa/selenium/support/pagefactory/AjaxElementLocator$NoSuchElementError=Unable to locate the element :? @y(Ljava/lang/String;Ljava/lang/Throwable;Lorg/openqa/selenium/support/pagefactory/AjaxElementLocator$NoSuchElementError;)VegetLastException.()Lorg/openqa/selenium/NoSuchElementException; getElement"()Lorg/openqa/selenium/WebElement; SourceFileAjaxElementLocator.java SignatureLorg/openqa/selenium/support/ui/SlowLoadableComponent; InnerClassesNoSuchElementErrorSlowLoadingElement    N *+*, ml     +q  2*t #$% 6**'+**+-1Y35L*+8:Y<+>##1y z{#}$~)56$ABC /*8 DE /*+ FGHIJ: K  LPK %^D>"+ @org/openqa/selenium/support/pagefactory/AjaxElementLocator.class1e:org/openqa/selenium/support/pagefactory/AjaxElementLocator=org/openqa/selenium/support/pagefactory/DefaultElementLocatortimeOutInSecondsIclock&Lorg/openqa/selenium/support/ui/Clock;<(Lorg/openqa/selenium/WebDriver;Ljava/lang/reflect/Field;I)VCode *org/openqa/selenium/support/ui/SystemClock  ()V  b(Lorg/openqa/selenium/support/ui/Clock;Lorg/openqa/selenium/WebDriver;Ljava/lang/reflect/Field;I)VLineNumberTableLocalVariableTablethis@?Morg/openqa/selenium/support/pagefactory/AjaxElementLocator$NoSuchElementError AB getMessage()Ljava/lang/String; DFEjava/lang/String GHformat9(Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/String; >J KLgetCause()Ljava/lang/Throwable; 1N O*(Ljava/lang/String;Ljava/lang/Throwable;)VloadingElementOLorg/openqa/selenium/support/pagefactory/AjaxElementLocator$SlowLoadingElement;eOLorg/openqa/selenium/support/pagefactory/AjaxElementLocator$NoSuchElementError;sleepFor()JisElementUsable#(Lorg/openqa/selenium/WebElement;)Zelement Lorg/openqa/selenium/WebElement;access$0^(Lorg/openqa/selenium/support/pagefactory/AjaxElementLocator;)Lorg/openqa/selenium/WebElement; _ #$ SourceFileAjaxElementLocator.java InnerClassesNoSuchElementErrorSlowLoadingElement!  [* Y+, 45*  p*,-**+!89 :;4#$ C%Y**!*'L+*%.M1Y35Y*7SY,=SC,IM>CEFG!H?G C2PQ&RSTU .VS XY 6dZ[\] %*^`ab>c %dPK %^D>w9org/openqa/selenium/support/pagefactory/Annotations.class13org/openqa/selenium/support/pagefactory/Annotationsjava/lang/ObjectfieldLjava/lang/reflect/Field;-$SWITCH_TABLE$org$openqa$selenium$support$How[I(Ljava/lang/reflect/Field;)VCode  ()V  LineNumberTableLocalVariableTablethis5Lorg/openqa/selenium/support/pagefactory/Annotations;isLookupCached()Z'org/openqa/selenium/support/CacheLookup java/lang/reflect/Field  getAnnotation4(Ljava/lang/Class;)Ljava/lang/annotation/Annotation;buildBy()Lorg/openqa/selenium/By; " #assertValidAnnotations%#org/openqa/selenium/support/FindBys ' ()buildByFromFindBys?(Lorg/openqa/selenium/support/FindBys;)Lorg/openqa/selenium/By;+"org/openqa/selenium/support/FindBy - ./buildByFromFindBy>(Lorg/openqa/selenium/support/FindBy;)Lorg/openqa/selenium/By; 1 2 buildByFromDefault4"java/lang/IllegalArgumentException6java/lang/StringBuilder8'Cannot determine how to locate element 5: ;(Ljava/lang/String;)V 5= >?append-(Ljava/lang/Object;)Ljava/lang/StringBuilder; 5A BCtoString()Ljava/lang/String; 3:ansLorg/openqa/selenium/By;findBys%Lorg/openqa/selenium/support/FindBys;findBy$Lorg/openqa/selenium/support/FindBy;L&org/openqa/selenium/support/ByIdOrName N OCgetName K: R STassertValidFindBys((Lorg/openqa/selenium/support/FindBys;)V $V WXvalue'()[Lorg/openqa/selenium/support/FindBy;Zorg/openqa/selenium/By\1org/openqa/selenium/support/pagefactory/ByChained [^ _([Lorg/openqa/selenium/By;)V findByArray%[Lorg/openqa/selenium/support/FindBy;byArray[Lorg/openqa/selenium/By;iI g hiassertValidFindBy'(Lorg/openqa/selenium/support/FindBy;)V k l/buildByFromShortFindBy n o/buildByFromLongFindBy *q rshow#()Lorg/openqa/selenium/support/How; *u vCusing x y()[I {}|org/openqa/selenium/support/How ~ordinal()I Y  className,(Ljava/lang/String;)Lorg/openqa/selenium/By; Y  cssSelector Y id Y linkText Y name Y partialLinkText Y tagName Y xpath!Lorg/openqa/selenium/support/How;Ljava/lang/String; * C java/lang/String equals(Ljava/lang/Object;)Z * Ccss * C * C * C * C * C * CPIf you use a '@FindBys' annotation, you must not also use a '@FindBy' annotation8If you set the 'how' property, you must also set 'using'java/util/HashSet how: 5 >-(Ljava/lang/String;)Ljava/lang/StringBuilder;  java/util/Set add class name:css:id:  link text: name: partial link text:  tag name: xpath: sizeEYou must specify at most one location strategy. Number found: %d (%s) java/lang/Integer valueOf(I)Ljava/lang/Integer; A format9(Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/String;findersLjava/util/Set;LocalVariableTypeTable#Ljava/util/Set;   { values$()[Lorg/openqa/selenium/support/How; {  CLASS_NAME { CSS { ID {  ID_OR_NAME {  LINK_TEXT { NAME { PARTIAL_LINK_TEXT { TAG_NAME {  XPATH java/lang/NoSuchFieldError SourceFileAnnotations.java!    F * *+$% &   :*)   f*!L*$$M+ , *,&L***N+ - *-,L+*0L+3Y5Y79*<@D+6 -/123!6.768<;@<E?I@dC*f`EFSGH.8IJ2  9KY*MPG () 7*+Q+UM,YN6-*,2,S,[Y-]KM NOP$O.S477GH +`a%bcde./ e*+f*+jM, *+mM,WY Z[^ IJ EFo/ +pM+tNw,z.c 27<AJOTY^---KY-P-----3Y5Y79*<@D:bceeHgMjRmWp`sevjyo|ty*IJrvl/ 6+ ++ ++ ++ ++ ++ ++ ++ +F&0>HV`nxIJ# {-*$$L***M+, 3YD ", - GHIJST o%+UY:6>2M*,f$ %%GHIJhi i+p+t 3YDYM+t,5Y9+t@W+,5Yŷ9+@W+,5YǷ9+@W+,5Yɷ9+@W+,5Y˷9+@W+,5Yͷ9+@W+,5YϷ9+@W+,5Yѷ9+@W+,5Yӷ9+@W,'3YY,SY,SDR $Nx Jt IJ$ $y YW뾼 K*zOW*zOW*zOW*zOW*zOW*zOW*zOW*zOW*z OW*Y  &) *36 7@C DMP Q[^ _il mwz {    PK %^D>Q<org/openqa/selenium/support/pagefactory/FieldDecorator.class1 6org/openqa/selenium/support/pagefactory/FieldDecoratorjava/lang/ObjectdecorateD(Ljava/lang/ClassLoader;Ljava/lang/reflect/Field;)Ljava/lang/Object; SourceFileFieldDecorator.javaPK %^D>S__Corg/openqa/selenium/support/pagefactory/DefaultElementLocator.class1<=org/openqa/selenium/support/pagefactory/DefaultElementLocatorjava/lang/Object6org/openqa/selenium/support/pagefactory/ElementLocatordriverLorg/openqa/selenium/WebDriver; cacheElementZbyLorg/openqa/selenium/By; cachedElement Lorg/openqa/selenium/WebElement;;(Lorg/openqa/selenium/WebDriver;Ljava/lang/reflect/Field;)VCode  ()V  3org/openqa/selenium/support/pagefactory/Annotations  (Ljava/lang/reflect/Field;)V  isLookupCached()Z ! # $%buildBy()Lorg/openqa/selenium/By; ' LineNumberTableLocalVariableTablethis?Lorg/openqa/selenium/support/pagefactory/DefaultElementLocator;fieldLjava/lang/reflect/Field; annotations5Lorg/openqa/selenium/support/pagefactory/Annotations; findElement"()Lorg/openqa/selenium/WebElement; 3  576org/openqa/selenium/WebDriver 08:(Lorg/openqa/selenium/By;)Lorg/openqa/selenium/WebElement;element SourceFileDefaultElementLocator.java!   #**+Y,N*- *-"&(+, -./"0)*#*+##,-./01w/*2* *2**&4L* *+2+(67:!;(<-?)/*+!9:;PK %^D>fY 7org/openqa/selenium/support/pagefactory/ByChained.class1r1org/openqa/selenium/support/pagefactory/ByChainedorg/openqa/selenium/Bybys[Lorg/openqa/selenium/By;([Lorg/openqa/selenium/By;)VCode   ()V  LineNumberTableLocalVariableTablethis3Lorg/openqa/selenium/support/pagefactory/ByChained; findElementE(Lorg/openqa/selenium/SearchContext;)Lorg/openqa/selenium/WebElement;   findElements5(Lorg/openqa/selenium/SearchContext;)Ljava/util/List; java/util/List size()I *org/openqa/selenium/NoSuchElementException"java/lang/StringBuilder$Cannot locate an element using !& '(Ljava/lang/String;)V ) *+toString()Ljava/lang/String; !- ./append-(Ljava/lang/String;)Ljava/lang/StringBuilder; !) & 3 45get(I)Ljava/lang/Object;7org/openqa/selenium/WebElementcontext#Lorg/openqa/selenium/SearchContext;elementsLjava/util/List;LocalVariableTypeTable2Ljava/util/List; SignatureW(Lorg/openqa/selenium/SearchContext;)Ljava/util/List;Ajava/util/ArrayList @  E FGaddAll(Ljava/util/Collection;)Z I JKiterator()Ljava/util/Iterator; MONjava/util/Iterator PQnext()Ljava/lang/Object; 6S T*(Lorg/openqa/selenium/By;)Ljava/util/List; MV WXhasNext()ZelemsbyLorg/openqa/selenium/By;newElemselem Lorg/openqa/selenium/WebElement;` By.chained(b{df, !h .i-(Ljava/lang/Object;)Ljava/lang/StringBuilder;k}) stringBuilderLjava/lang/StringBuilder;firstZ SourceFileByChained.java! F * *+ ,- .   5*+M,Y!Y#%*(,01,26234*5 5589/:;< /:=>? - * @YBM* Y:66]2N@YB:,-+CDW4,H:  L6:-RDW UM,6 :;>?(@1B5CEE\FlEvIy?L>89sY;(QZ[1H\;\]^<sY=1H\=*+ U!Y_%L+a,W=* Y:66"2N+ce,-gW=+j,W+0& Q RTU)V=W?UIYPZ*U KlmBno)Z[pqPK %^D>_ZCorg/openqa/selenium/support/pagefactory/DefaultFieldDecorator.class1P=org/openqa/selenium/support/pagefactory/DefaultFieldDecoratorjava/lang/Object6org/openqa/selenium/support/pagefactory/FieldDecoratorfactory?Lorg/openqa/selenium/support/pagefactory/ElementLocatorFactory;B(Lorg/openqa/selenium/support/pagefactory/ElementLocatorFactory;)VCode  ()V  LineNumberTableLocalVariableTablethis?Lorg/openqa/selenium/support/pagefactory/DefaultFieldDecorator;decorateD(Ljava/lang/ClassLoader;Ljava/lang/reflect/Field;)Ljava/lang/Object;org/openqa/selenium/WebElement java/lang/reflect/Field getType()Ljava/lang/Class; "!java/lang/Class #$isAssignableFrom(Ljava/lang/Class;)Z &('=org/openqa/selenium/support/pagefactory/ElementLocatorFactory )* createLocatorS(Ljava/lang/reflect/Field;)Lorg/openqa/selenium/support/pagefactory/ElementLocator;,&org/openqa/selenium/RenderedWebElement . /0equals(Ljava/lang/Object;)Z 2 34proxyForLocatorr(Ljava/lang/ClassLoader;Lorg/openqa/selenium/support/pagefactory/ElementLocator;Z)Lorg/openqa/selenium/WebElement;loaderLjava/lang/ClassLoader;fieldLjava/lang/reflect/Field;locator8Lorg/openqa/selenium/support/pagefactory/ElementLocator;<Gorg/openqa/selenium/support/pagefactory/internal/LocatingElementHandler ;> ?;(Lorg/openqa/selenium/support/pagefactory/ElementLocator;)VA)org/openqa/selenium/internal/WrapsElement CEDjava/lang/reflect/Proxy FGnewProxyInstanceb(Ljava/lang/ClassLoader;[Ljava/lang/Class;Ljava/lang/reflect/InvocationHandler;)Ljava/lang/Object; renderedProxyZhandler%Ljava/lang/reflect/InvocationHandler;proxy Lorg/openqa/selenium/WebElement; SourceFileDefaultFieldDecorator.java!  F * *+() *   /,*,%N-*+-,+-1"- .1236"7+6*//56/789:34 F;Y,=:+ Y+SY@SB+:+ YSY@SB:= @BA*E;DCGHFF56F9:FHI <JK'LMCLMNOPK %^D> ,Gorg/openqa/selenium/support/pagefactory/AjaxElementLocatorFactory.class1$Aorg/openqa/selenium/support/pagefactory/AjaxElementLocatorFactoryjava/lang/Object=org/openqa/selenium/support/pagefactory/ElementLocatorFactorydriverLorg/openqa/selenium/WebDriver;timeOutInSecondsI#(Lorg/openqa/selenium/WebDriver;I)VCode  ()V    LineNumberTableLocalVariableTablethisCLorg/openqa/selenium/support/pagefactory/AjaxElementLocatorFactory; createLocatorS(Ljava/lang/reflect/Field;)Lorg/openqa/selenium/support/pagefactory/ElementLocator;:org/openqa/selenium/support/pagefactory/AjaxElementLocator  <(Lorg/openqa/selenium/WebDriver;Ljava/lang/reflect/Field;I)VfieldLjava/lang/reflect/Field; SourceFileAjaxElementLocatorFactory.java!   Y**+*    EY*+*" !"#PK %^D>Corg/openqa/selenium/support/pagefactory/ElementLocatorFactory.class1 =org/openqa/selenium/support/pagefactory/ElementLocatorFactoryjava/lang/Object createLocatorS(Ljava/lang/reflect/Field;)Lorg/openqa/selenium/support/pagefactory/ElementLocator; SourceFileElementLocatorFactory.javaPK %^D>8<org/openqa/selenium/support/pagefactory/ElementLocator.class1 6org/openqa/selenium/support/pagefactory/ElementLocatorjava/lang/Object findElement"()Lorg/openqa/selenium/WebElement; SourceFileElementLocator.javaPK lC>m**8org/openqa/selenium/support/pagefactory/.svn/all-wcpropsK 25 svn:wc:ra_dav:version-url V 81 /svn/!svn/ver/11224/trunk/java/client/src/org/openqa/selenium/support/pagefactory END AjaxElementLocator.java K 25 svn:wc:ra_dav:version-url V 105 /svn/!svn/ver/11224/trunk/java/client/src/org/openqa/selenium/support/pagefactory/AjaxElementLocator.java END DefaultElementLocator.java K 25 svn:wc:ra_dav:version-url V 108 /svn/!svn/ver/11224/trunk/java/client/src/org/openqa/selenium/support/pagefactory/DefaultElementLocator.java END ElementLocatorFactory.java K 25 svn:wc:ra_dav:version-url V 108 /svn/!svn/ver/11224/trunk/java/client/src/org/openqa/selenium/support/pagefactory/ElementLocatorFactory.java END ByChained.java K 25 svn:wc:ra_dav:version-url V 96 /svn/!svn/ver/11224/trunk/java/client/src/org/openqa/selenium/support/pagefactory/ByChained.java END FieldDecorator.java K 25 svn:wc:ra_dav:version-url V 101 /svn/!svn/ver/11224/trunk/java/client/src/org/openqa/selenium/support/pagefactory/FieldDecorator.java END AjaxElementLocatorFactory.java K 25 svn:wc:ra_dav:version-url V 112 /svn/!svn/ver/11224/trunk/java/client/src/org/openqa/selenium/support/pagefactory/AjaxElementLocatorFactory.java END DefaultElementLocatorFactory.java K 25 svn:wc:ra_dav:version-url V 115 /svn/!svn/ver/11224/trunk/java/client/src/org/openqa/selenium/support/pagefactory/DefaultElementLocatorFactory.java END DefaultFieldDecorator.java K 25 svn:wc:ra_dav:version-url V 108 /svn/!svn/ver/11224/trunk/java/client/src/org/openqa/selenium/support/pagefactory/DefaultFieldDecorator.java END Annotations.java K 25 svn:wc:ra_dav:version-url V 98 /svn/!svn/ver/11224/trunk/java/client/src/org/openqa/selenium/support/pagefactory/Annotations.java END ElementLocator.java K 25 svn:wc:ra_dav:version-url V 101 /svn/!svn/ver/11224/trunk/java/client/src/org/openqa/selenium/support/pagefactory/ElementLocator.java END PK lC>#\K4org/openqa/selenium/support/pagefactory/.svn/entries8 dir 11264 http://selenium.googlecode.com/svn/trunk/java/client/src/org/openqa/selenium/support/pagefactory http://selenium.googlecode.com/svn 2010-11-16T11:14:46.441555Z 10333 simon.m.stewart svn:special svn:externals svn:needs-lock 07704840-8298-11de-bf8c-fd130f914ac9 AjaxElementLocator.java file 2011-02-03T12:01:18.000000Z 85493e42e71c0d6161869a578ea5ed1e 2010-03-05T11:36:26.627529Z 8483 eran.mes DefaultElementLocator.java file 2011-02-03T12:01:18.000000Z 5e72ff357c854f68de89ff1cc5022aca 2009-01-05T15:17:38.587344Z 6031 simon.m.stewart ElementLocatorFactory.java file 2011-02-03T12:01:18.000000Z d9d3ec6e32a6d4457b57e84000fd5636 2009-01-05T15:17:38.587344Z 6031 simon.m.stewart ByChained.java file 2011-02-03T12:01:18.000000Z e46d59cf1ebfcc21a5f2db28399840b8 2009-12-17T17:43:13.087187Z 7908 jmleyba FieldDecorator.java file 2011-02-03T12:01:18.000000Z feb1680d1220c893bc7454eea9511947 2009-08-27T19:10:00.567251Z 7172 simon.m.stewart AjaxElementLocatorFactory.java file 2011-02-03T12:01:18.000000Z 94c0c81e60e9a20b8d01651e166c4b0f 2009-01-05T15:17:38.587344Z 6031 simon.m.stewart DefaultElementLocatorFactory.java file 2011-02-03T12:01:18.000000Z 16573e5a3922144d38209ea69bb7fbe2 2009-01-05T15:17:38.587344Z 6031 simon.m.stewart DefaultFieldDecorator.java file 2011-02-03T12:01:18.000000Z 23cbb4bdc622dfa5fef2678f7a3236ed 2010-02-28T03:16:36.140654Z 8468 dawagner internal dir Annotations.java file 2011-02-03T12:01:18.000000Z 1b8c0f16476feeda035c86c93f502f19 2010-11-16T11:14:46.441555Z 10333 simon.m.stewart ElementLocator.java file 2011-02-03T12:01:18.000000Z 2ceea0c1b7f0c63af3578177e6b09e66 2009-01-05T15:17:38.587344Z 6031 simon.m.stewart PK lC>G3org/openqa/selenium/support/pagefactory/.svn/format8 PK lC>j tqqWorg/openqa/selenium/support/pagefactory/.svn/text-base/AjaxElementLocator.java.svn-base/* Copyright 2007-2009 WebDriver committers Copyright 2007-2009 Google Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package org.openqa.selenium.support.pagefactory; import org.openqa.selenium.NoSuchElementException; import org.openqa.selenium.WebDriver; import org.openqa.selenium.WebElement; import org.openqa.selenium.support.ui.Clock; import org.openqa.selenium.support.ui.SystemClock; import org.openqa.selenium.support.ui.SlowLoadableComponent; import java.lang.reflect.Field; /** * An element locator that will wait for the specified number of seconds for an * element to appear, rather than failing instantly if it's not present. This * works by polling the UI on a regular basis. The element returned will be * present on the DOM, but may not actually be visible: override * {@link #isElementUsable(WebElement)} if this is important to you. * * Because this class polls the interface on a regular basis, it is strongly * recommended that users avoid locating elements by XPath. */ public class AjaxElementLocator extends DefaultElementLocator { protected final int timeOutInSeconds; private final Clock clock; /** * Main constructor. * * @param driver The WebDriver to use when locating elements * @param field The field representing this element * @param timeOutInSeconds How long to wait for the element to appear. * Measured in seconds. */ public AjaxElementLocator(WebDriver driver, Field field, int timeOutInSeconds) { this(new SystemClock(), driver, field, timeOutInSeconds); } public AjaxElementLocator(Clock clock, WebDriver driver, Field field, int timeOutInSeconds) { super(driver, field); this.timeOutInSeconds = timeOutInSeconds; this.clock = clock; } /** * {@inheritDoc} * * Will poll the interface on a regular basis until the element is present. */ public WebElement findElement() { SlowLoadingElement loadingElement = new SlowLoadingElement(clock, timeOutInSeconds); try { return loadingElement.get().getElement(); } catch (NoSuchElementError e) { throw new NoSuchElementException( String.format("Timed out after %d seconds. %s", timeOutInSeconds, e.getMessage()), e.getCause()); } } /** * By default, we sleep for 250ms between polls. You may override this method * in order to change how it sleeps. * * @return Duration to sleep in milliseconds */ protected long sleepFor() { return 250; } /** * By default, elements are considered "found" if they are in the DOM. * Override this method in order to change whether or not you consider * the elemet loaded. For example, perhaps you need the element to be * displayed: * *

 {
    private NoSuchElementException lastException;
    private WebElement element;

    public SlowLoadingElement(Clock clock, int timeOutInSeconds) {
      super(clock, timeOutInSeconds);
    }

    protected void load() {
      // Does nothing
    }

    protected long sleepFor() {
      return AjaxElementLocator.this.sleepFor();
    }

    protected void isLoaded() throws Error {
      try {
        element = AjaxElementLocator.super.findElement();
        if (!isElementUsable(element)) {
          throw new NoSuchElementException("Element is not usable");
        }
      } catch (NoSuchElementException e) {
        lastException = e;
        // Should use JUnit's AssertionError, but it may not be present
        throw new NoSuchElementError("Unable to locate the element", e);
      }
    }

    public NoSuchElementException getLastException() {
      return lastException;
    }

    public WebElement getElement() {
      return element;
    }
  }

  private static class NoSuchElementError extends Error {
    private NoSuchElementError(String message, Throwable throwable) {
      super(message, throwable);
    }
  }
}
PK
lC>eX^org/openqa/selenium/support/pagefactory/.svn/text-base/AjaxElementLocatorFactory.java.svn-base/*
Copyright 2007-2009 WebDriver committers
Copyright 2007-2009 Google Inc.

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

     http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/

package org.openqa.selenium.support.pagefactory;

import org.openqa.selenium.WebDriver;

import java.lang.reflect.Field;

public class AjaxElementLocatorFactory implements ElementLocatorFactory {
  private final WebDriver driver;
  private final int timeOutInSeconds;

  public AjaxElementLocatorFactory(WebDriver driver, int timeOutInSeconds) {
    this.driver = driver;
    this.timeOutInSeconds = timeOutInSeconds;
  }
  
  public ElementLocator createLocator(Field field) {
    return new AjaxElementLocator(driver, field, timeOutInSeconds);
  }
}
PK
lC>~  Porg/openqa/selenium/support/pagefactory/.svn/text-base/Annotations.java.svn-base/*
Copyright 2007-2009 WebDriver committers
Copyright 2007-2009 Google Inc.

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

     http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/

package org.openqa.selenium.support.pagefactory;

import org.openqa.selenium.By;
import org.openqa.selenium.support.pagefactory.ByChained;
import org.openqa.selenium.support.ByIdOrName;
import org.openqa.selenium.support.CacheLookup;
import org.openqa.selenium.support.FindBy;
import org.openqa.selenium.support.FindBys;
import org.openqa.selenium.support.How;

import java.lang.reflect.Field;
import java.util.HashSet;
import java.util.Set;

public class Annotations {

  private Field field;

  public Annotations(Field field) {
    this.field = field;
  }

  public boolean isLookupCached() {
    return (field.getAnnotation(CacheLookup.class) != null);
  }

  public By buildBy() {
    assertValidAnnotations();

    By ans = null;

    FindBys findBys = field.getAnnotation(FindBys.class);
    if (ans == null && findBys != null) {
      ans = buildByFromFindBys(findBys);
    }

    FindBy findBy = field.getAnnotation(FindBy.class);
    if (ans == null && findBy != null) {
      ans = buildByFromFindBy(findBy);
    }

    if (ans == null) {
      ans = buildByFromDefault();
    }

    if (ans == null) {
      throw new IllegalArgumentException("Cannot determine how to locate element " + field);
    }

    return ans;
  }

  protected By buildByFromDefault() {
    return new ByIdOrName(field.getName());
  }

  protected By buildByFromFindBys(FindBys findBys) {
    assertValidFindBys(findBys);

    FindBy[] findByArray = findBys.value();
    By[] byArray = new By[findByArray.length];
    for (int i = 0; i < findByArray.length; i++) {
      byArray[i] = buildByFromFindBy(findByArray[i]);
    }

    return new ByChained(byArray);
  }

  protected By buildByFromFindBy(FindBy findBy) {
    assertValidFindBy(findBy);

    By ans = buildByFromShortFindBy(findBy);
    if (ans == null) {
      ans = buildByFromLongFindBy(findBy);
    }

    return ans;
  }

  protected By buildByFromLongFindBy(FindBy findBy) {
    How how = findBy.how();
    String using = findBy.using();

    switch (how) {
      case CLASS_NAME:
        return By.className(using);

      case CSS:
        return By.cssSelector(using);

      case ID:
        return By.id(using);

      case ID_OR_NAME:
        return new ByIdOrName(using);

      case LINK_TEXT:
        return By.linkText(using);

      case NAME:
        return By.name(using);

      case PARTIAL_LINK_TEXT:
        return By.partialLinkText(using);

      case TAG_NAME:
        return By.tagName(using);

      case XPATH:
        return By.xpath(using);

      default:
        // Note that this shouldn't happen (eg, the above matches all
        // possible values for the How enum)
        throw new IllegalArgumentException("Cannot determine how to locate element " + field);
    }
  }

  protected By buildByFromShortFindBy(FindBy findBy) {
    if (!"".equals(findBy.className()))
      return By.className(findBy.className());

    if (!"".equals(findBy.css()))
      return By.cssSelector(findBy.css());

    if (!"".equals(findBy.id()))
      return By.id(findBy.id());

    if (!"".equals(findBy.linkText()))
      return By.linkText(findBy.linkText());

    if (!"".equals(findBy.name()))
      return By.name(findBy.name());

    if (!"".equals(findBy.partialLinkText()))
      return By.partialLinkText(findBy.partialLinkText());

    if (!"".equals(findBy.tagName()))
      return By.tagName(findBy.tagName());

    if (!"".equals(findBy.xpath()))
      return By.xpath(findBy.xpath());

    // Fall through
    return null;
  }

  private void assertValidAnnotations() {
    FindBys findBys = field.getAnnotation(FindBys.class);
    FindBy findBy = field.getAnnotation(FindBy.class);
    if (findBys != null && findBy != null) {
      throw new IllegalArgumentException("If you use a '@FindBys' annotation, "
          + "you must not also use a '@FindBy' annotation");
    }
  }

  private void assertValidFindBys(FindBys findBys) {
    for (FindBy findBy : findBys.value()) {
      assertValidFindBy(findBy);
    }
  }

  private void assertValidFindBy(FindBy findBy) {
    if (findBy.how() != null) {
      if (findBy.using() == null) {
        throw new IllegalArgumentException("If you set the 'how' property, you must also set 'using'");
      }
    }

    Set finders = new HashSet();
    if (!"".equals(findBy.using())) finders.add("how: " + findBy.using());
    if (!"".equals(findBy.className())) finders.add("class name:" + findBy.className());
    if (!"".equals(findBy.css())) finders.add("css:" + findBy.css());
    if (!"".equals(findBy.id())) finders.add("id: " + findBy.id());
    if (!"".equals(findBy.linkText())) finders.add("link text: " + findBy.linkText());
    if (!"".equals(findBy.name())) finders.add("name: " + findBy.name());
    if (!"".equals(findBy.partialLinkText())) finders.add("partial link text: " + findBy.partialLinkText());
    if (!"".equals(findBy.tagName())) finders.add("tag name: " + findBy.tagName());
    if (!"".equals(findBy.xpath())) finders.add("xpath: " + findBy.xpath());

    // A zero count is okay: it means to look by name or id.
    if (finders.size() > 1) {
      throw new IllegalArgumentException(
      				String.format("You must specify at most one location strategy. Number found: %d (%s)",
      								finders.size(), finders.toString()));
    }
  }
}
PK
lC>B}

Norg/openqa/selenium/support/pagefactory/.svn/text-base/ByChained.java.svn-base/*
Copyright 2007-2009 WebDriver committers
Copyright 2007-2009 Google Inc.

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

     http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/

package org.openqa.selenium.support.pagefactory;

import org.openqa.selenium.By;
import org.openqa.selenium.SearchContext;
import org.openqa.selenium.WebElement;
import org.openqa.selenium.NoSuchElementException;

import java.util.ArrayList;
import java.util.List;

/**
 * Mechanism used to locate elements within a document using a series
 * of other lookups.  This class will find all DOM elements that much each
 * of the locators in sequence, eg.
 *
 * 
 * driver.findElements(new ByChained(by1, by2))
 * 
* * will find all elements that match by2 and appear under an element * that matches by1. */ public class ByChained extends By { private By[] bys; public ByChained(By... bys) { this.bys = bys; } @Override public WebElement findElement(SearchContext context) { List elements = findElements(context); if (elements.size() == 0) throw new NoSuchElementException("Cannot locate an element using " + toString()); return elements.get(0); } @Override public List findElements(SearchContext context) { if (bys.length == 0) { return new ArrayList(); } List elems = null; for (By by : bys) { List newElems = new ArrayList(); if (elems == null) { newElems.addAll(by.findElements(context)); } else { for (WebElement elem : elems) { newElems.addAll(elem.findElements(by)); } } elems = newElems; } return elems; } @Override public String toString() { StringBuilder stringBuilder = new StringBuilder("By.chained("); stringBuilder.append("{"); boolean first = true; for (By by : bys) { stringBuilder.append((first ? "" : ",")).append(by); first = false; } stringBuilder.append("})"); return stringBuilder.toString(); } } PK lC>M)Zorg/openqa/selenium/support/pagefactory/.svn/text-base/DefaultElementLocator.java.svn-base/* Copyright 2007-2009 WebDriver committers Copyright 2007-2009 Google Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package org.openqa.selenium.support.pagefactory; import org.openqa.selenium.By; import org.openqa.selenium.WebDriver; import org.openqa.selenium.WebElement; import java.lang.reflect.Field; /** * The default element locator, which will lazily locate an element on a page. * This class is designed for use with the {@link org.openqa.selenium.support.PageFactory} and understands * the annotations {@link org.openqa.selenium.support.FindBy} and {@link org.openqa.selenium.support.CacheLookup}. */ public class DefaultElementLocator implements ElementLocator { private final WebDriver driver; private final boolean cacheElement; private final By by; private WebElement cachedElement; /** * Creates a new element locator. * * @param driver The driver to use when finding the element * @param field The field on the Page Object that will hold the located value */ public DefaultElementLocator(WebDriver driver, Field field) { this.driver = driver; Annotations annotations = new Annotations(field); cacheElement = annotations.isLookupCached(); by = annotations.buildBy(); } /** * Find the element. */ public WebElement findElement() { if (cachedElement != null && cacheElement) { return cachedElement; } WebElement element = driver.findElement(by); if (cacheElement) { cachedElement = element; } return element; } } PK lC>lK%%aorg/openqa/selenium/support/pagefactory/.svn/text-base/DefaultElementLocatorFactory.java.svn-base/* Copyright 2007-2009 WebDriver committers Copyright 2007-2009 Google Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package org.openqa.selenium.support.pagefactory; import org.openqa.selenium.WebDriver; import java.lang.reflect.Field; public final class DefaultElementLocatorFactory implements ElementLocatorFactory { private final WebDriver driverRef; public DefaultElementLocatorFactory(WebDriver driverRef) { this.driverRef = driverRef; } public ElementLocator createLocator(Field field) { return new DefaultElementLocator(driverRef, field); } }PK lC> W4 Zorg/openqa/selenium/support/pagefactory/.svn/text-base/DefaultFieldDecorator.java.svn-base/* Copyright 2007-2009 WebDriver committers Copyright 2007-2009 Google Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package org.openqa.selenium.support.pagefactory; import org.openqa.selenium.RenderedWebElement; import org.openqa.selenium.WebElement; import org.openqa.selenium.internal.WrapsElement; import org.openqa.selenium.support.pagefactory.ElementLocator; import org.openqa.selenium.support.pagefactory.ElementLocatorFactory; import org.openqa.selenium.support.pagefactory.internal.LocatingElementHandler; import java.lang.reflect.Field; import java.lang.reflect.InvocationHandler; import java.lang.reflect.Proxy; /** * Default decorator for use with PageFactory. Will decorate all of * the WebElement fields with a proxy that locates the elements using * the passed in ElementLocatorFactory. */ public class DefaultFieldDecorator implements FieldDecorator { protected ElementLocatorFactory factory; public DefaultFieldDecorator(ElementLocatorFactory factory) { this.factory = factory; } public Object decorate(ClassLoader loader, Field field) { if (!WebElement.class.isAssignableFrom(field.getType())) { return null; } ElementLocator locator = factory.createLocator(field); if (locator == null) { return null; } return proxyForLocator(loader, locator, field.getType().equals(RenderedWebElement.class)); } protected WebElement proxyForLocator(ClassLoader loader, ElementLocator locator, boolean renderedProxy) { InvocationHandler handler = new LocatingElementHandler(locator); WebElement proxy; if (renderedProxy) { proxy = (RenderedWebElement) Proxy.newProxyInstance( loader, new Class[]{RenderedWebElement.class, WrapsElement.class}, handler); } else { proxy = (WebElement) Proxy.newProxyInstance( loader, new Class[]{WebElement.class, WrapsElement.class}, handler); } return proxy; } } PK lC>yneSorg/openqa/selenium/support/pagefactory/.svn/text-base/ElementLocator.java.svn-base/* Copyright 2007-2009 WebDriver committers Copyright 2007-2009 Google Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package org.openqa.selenium.support.pagefactory; import org.openqa.selenium.WebElement; public interface ElementLocator { WebElement findElement(); } PK lC>uԗ++Zorg/openqa/selenium/support/pagefactory/.svn/text-base/ElementLocatorFactory.java.svn-base/* Copyright 2007-2009 WebDriver committers Copyright 2007-2009 Google Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package org.openqa.selenium.support.pagefactory; import java.lang.reflect.Field; /** * A factory for producing {@link ElementLocator}s. It is expected that * a new ElementLocator will be returned per call. */ public interface ElementLocatorFactory { /** * When a field on a class needs to be decorated with an * {@link ElementLocator} this method will be called. * @param field * @return */ ElementLocator createLocator(Field field); } PK lC>8Sorg/openqa/selenium/support/pagefactory/.svn/text-base/FieldDecorator.java.svn-base/* Copyright 2007-2009 WebDriver committers Copyright 2007-2009 Google Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package org.openqa.selenium.support.pagefactory; import java.lang.reflect.Field; /** * Allows the PageFactory to decorate fields. */ public interface FieldDecorator { /** * This method is called by PageFactory on all fields to decide how to * decorate the field. * @param loader The class loader that was used for the page object * @param field The field that may be decorated. * @return Value to decorate the field with or null if it shouldn't be * decorated. If non-null, must be assignable to the field. */ Object decorate(ClassLoader loader, Field field); } PK %^D>.=org/openqa/selenium/internal/selenesedriver/FindElement.class1C7org/openqa/selenium/internal/selenesedriver/FindElementAorg/openqa/selenium/internal/selenesedriver/AbstractElementFinderSCRIPTLjava/lang/String; ConstantValue fvar by = {}; by['%s'] = '%s'; var e = bot.locators.findElement(by, %s);bot.inject.cache.addElement(e);()VCode  LineNumberTableLocalVariableTablethis9Lorg/openqa/selenium/internal/selenesedriver/FindElement; executeFindk(Lcom/thoughtworks/selenium/Selenium;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)Ljava/util/Map; Signature(Lcom/thoughtworks/selenium/Selenium;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)Ljava/util/Map;java/lang/Object java/lang/String format9(Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/String; "!"com/thoughtworks/selenium/Selenium #$getEval&(Ljava/lang/String;)Ljava/lang/String; & '( newElement#(Ljava/lang/String;)Ljava/util/Map;selenium$Lcom/thoughtworks/selenium/Selenium;howusing parentLocatorlocatorkey onFailure5(Ljava/lang/String;Ljava/lang/String;)Ljava/util/Map;[(Ljava/lang/String;Ljava/lang/String;)Ljava/util/Map;4*org/openqa/selenium/NoSuchElementException6No elements were found: %s=%s 38 9(Ljava/lang/String;)Vn(Lcom/thoughtworks/selenium/Selenium;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)Ljava/lang/Object; < 8(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/Object; ? 01 SourceFileFindElement.javazLorg/openqa/selenium/internal/selenesedriver/AbstractElementFinder;>;!  /*   )Y,SY-SYS:+:*%#%"&H)))*)+),)-."/012 _3Y5Y+SY,S7+,+ +,D: * *+,-;D0= '*+,>@ABPK %^D>| ?org/openqa/selenium/internal/selenesedriver/SwitchToFrame.class19org/openqa/selenium/internal/selenesedriver/SwitchToFramejava/lang/Object()VCode  LineNumberTableLocalVariableTablethis;Lorg/openqa/selenium/internal/selenesedriver/SwitchToFrame;applyE(Lcom/thoughtworks/selenium/Selenium;Ljava/util/Map;)Ljava/lang/Void; SignatureZ(Lcom/thoughtworks/selenium/Selenium;Ljava/util/Map;)Ljava/lang/Void;id  java/util/Map get&(Ljava/lang/Object;)Ljava/lang/Object; relative=top ! "com/thoughtworks/selenium/Selenium "# selectFrame(Ljava/lang/String;)V%java/lang/Number'java/lang/StringBuilder)index= &+ # $- ./ longValue()J &1 23append(J)Ljava/lang/StringBuilder; &5 67toString()Ljava/lang/String;9java/lang/String ; <= getLocator#(Ljava/util/Map;)Ljava/lang/String;?"java/lang/IllegalArgumentExceptionAIllegal frame switch target: ( C DEgetClass()Ljava/lang/Class; GIHjava/lang/Class J7getName &L 2M-(Ljava/lang/String;)Ljava/lang/StringBuilder;O) &Q 2R-(Ljava/lang/Object;)Ljava/lang/StringBuilder; >+U(org/openqa/selenium/NoSuchFrameException WYX+com/thoughtworks/selenium/SeleniumException Z7 getMessage T\ ]*(Ljava/lang/String;Ljava/lang/Throwable;)Vselenium$Lcom/thoughtworks/selenium/Selenium;argsLjava/util/Map;Ljava/lang/Object;locatorLjava/lang/String;e-Lcom/thoughtworks/selenium/SeleniumException;LocalVariableTypeTable$Ljava/util/Map;8(Ljava/util/Map;)Ljava/lang/String;kELEMENT m no containsKey(Ljava/lang/Object;)Zqutf-8 sutjava/net/URLDecoder vwdecode8(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;y&org/openqa/selenium/WebDriverException x{ |(Ljava/lang/Throwable;)V~ Map does not define a WebElement$java/io/UnsupportedEncodingException elementMap&Ljava/io/UnsupportedEncodingException;G(Lcom/thoughtworks/selenium/Selenium;Ljava/util/Map;)Ljava/lang/Object;   SourceFileSwitchToFrame.javabLjava/lang/Object;Lorg/openqa/selenium/internal/selenesedriver/SeleneseFunction;! /*    ],N- +-$"+&Y(*-$,04k-8+-8W-*-::+;>Y&Y@*-BFKNK-P4S:TYV[W F " #$()=*D+Q,X.b/m1z21458 >^_`a bb cdefg `h<=i 0+jl+j8prMxY,z>Y}S  < >?A&E 00a eg 0hA '*+,  PK %^D>wUDorg/openqa/selenium/internal/selenesedriver/SetElementSelected.class1U>org/openqa/selenium/internal/selenesedriver/SetElementSelected;org/openqa/selenium/internal/selenesedriver/ElementFunction()VCode  LineNumberTableLocalVariableTablethis@Lorg/openqa/selenium/internal/selenesedriver/SetElementSelected;applyE(Lcom/thoughtworks/selenium/Selenium;Ljava/util/Map;)Ljava/lang/Void; SignatureZ(Lcom/thoughtworks/selenium/Selenium;Ljava/util/Map;)Ljava/lang/Void;   getLocator#(Ljava/util/Map;)Ljava/lang/String;6org/openqa/selenium/internal/selenesedriver/GetTagName   G(Lcom/thoughtworks/selenium/Selenium;Ljava/util/Map;)Ljava/lang/String;option ! java/lang/String "#equals(Ljava/lang/Object;)Z%&org/openqa/selenium/WebDriverException'*Selecting options is currently unsupported $) *(Ljava/lang/String;)V,input .0/"com/thoughtworks/selenium/Selenium 12 isEditable(Ljava/lang/String;)Z .4 5*check7'java/lang/UnsupportedOperationException9java/lang/StringBuilder;Element is not selectable: 8) 8> ?@append-(Ljava/lang/String;)Ljava/lang/StringBuilder; 8B CDtoString()Ljava/lang/String; 6)selenium$Lcom/thoughtworks/selenium/Selenium;argsLjava/util/Map;locatorLjava/lang/String;tagNameLocalVariableTypeTable$Ljava/util/Map;G(Lcom/thoughtworks/selenium/Selenium;Ljava/util/Map;)Ljava/lang/Object; Q  SourceFileSetElementSelected.javaOLorg/openqa/selenium/internal/selenesedriver/ElementFunction;!/*   x*,NY+,: $Y&(+/+-- +-336Y8Y:<-=AE6Y8Y:<-=AE *  (#2$<%F'^*v- 4x xFGxHIrJKdLKM xHNAO'*+,P  RSTPK %^D>ކEEDorg/openqa/selenium/internal/selenesedriver/IsElementDisplayed.class10>org/openqa/selenium/internal/selenesedriver/IsElementDisplayed;org/openqa/selenium/internal/selenesedriver/ElementFunction()VCode  LineNumberTableLocalVariableTablethis@Lorg/openqa/selenium/internal/selenesedriver/IsElementDisplayed;applyH(Lcom/thoughtworks/selenium/Selenium;Ljava/util/Map;)Ljava/lang/Boolean; Signature](Lcom/thoughtworks/selenium/Selenium;Ljava/util/Map;)Ljava/lang/Boolean;   getLocator#(Ljava/util/Map;)Ljava/lang/String; "com/thoughtworks/selenium/Selenium  isVisible(Ljava/lang/String;)Z java/lang/Boolean !valueOf(Z)Ljava/lang/Boolean;selenium$Lcom/thoughtworks/selenium/Selenium;argsLjava/util/Map;locatorLjava/lang/String;LocalVariableTypeTable$Ljava/util/Map;G(Lcom/thoughtworks/selenium/Selenium;Ljava/util/Map;)Ljava/lang/Object; ,  SourceFileIsElementDisplayed.javaRLorg/openqa/selenium/internal/selenesedriver/ElementFunction;!/*   o*,N+-  * "#$% &'( $)A*'*+,+  -./PK %^D>I<<org/openqa/selenium/internal/selenesedriver/GetTagName.class1=6org/openqa/selenium/internal/selenesedriver/GetTagName;org/openqa/selenium/internal/selenesedriver/ElementFunction getTagNameJsLjava/lang/String;()VCode V(function tagName() { return selenium.browserbot.findElement('LOCATOR').tagName;})();  LineNumberTableLocalVariableTable  this8Lorg/openqa/selenium/internal/selenesedriver/GetTagName;applyG(Lcom/thoughtworks/selenium/Selenium;Ljava/util/Map;)Ljava/lang/String; Signature\(Lcom/thoughtworks/selenium/Selenium;Ljava/util/Map;)Ljava/lang/String;   getLocator#(Ljava/util/Map;)Ljava/lang/String;LOCATOR "!java/lang/String #$replaceD(Ljava/lang/CharSequence;Ljava/lang/CharSequence;)Ljava/lang/String; &('"com/thoughtworks/selenium/Selenium )*getEval&(Ljava/lang/String;)Ljava/lang/String; , -. toLowerCase()Ljava/lang/String;selenium$Lcom/thoughtworks/selenium/Selenium;argsLjava/util/Map;locatorvalueLocalVariableTypeTable$Ljava/util/Map;G(Lcom/thoughtworks/selenium/Selenium;Ljava/util/Map;)Ljava/lang/Object; 9  SourceFileGetTagName.javaQLorg/openqa/selenium/internal/selenesedriver/ElementFunction;!  . !  /*  &*,N+ -%:+4&&/0&12 345 &16A7 '*+,8:;"k?org/openqa/selenium/internal/selenesedriver/SubmitElement.class1[9org/openqa/selenium/internal/selenesedriver/SubmitElement;org/openqa/selenium/internal/selenesedriver/ElementFunctionsubmitJsLjava/lang/String; ConstantValue (function submit() { var curr = selenium.browserbot.findElement('LOCATOR'); while (curr != null && curr.tagName != 'FORM') { curr = curr.parentNode || curr.parentElement; } if (curr) { curr.submit(); return 'true'; } return 'false'; })()()VCode   LineNumberTableLocalVariableTablethis;Lorg/openqa/selenium/internal/selenesedriver/SubmitElement;applyE(Lcom/thoughtworks/selenium/Selenium;Ljava/util/Map;)Ljava/lang/Void; SignatureZ(Lcom/thoughtworks/selenium/Selenium;Ljava/util/Map;)Ljava/lang/Void;   getLocator#(Ljava/util/Map;)Ljava/lang/String;' \' "$#java/lang/String %&replaceD(Ljava/lang/CharSequence;Ljava/lang/CharSequence;)Ljava/lang/String;(LOCATOR *,+"com/thoughtworks/selenium/Selenium -.getEval&(Ljava/lang/String;)Ljava/lang/String;0true "2 34equals(Ljava/lang/Object;)Z6&org/openqa/selenium/WebDriverException 58 9(Ljava/lang/String;)Vd = >?sleep(J)Vselenium$Lcom/thoughtworks/selenium/Selenium;argsLjava/util/Map;locatorevalresultLocalVariableTypeTable$Ljava/util/Map; J=Kjava/lang/Thread 5M N(Ljava/lang/Throwable;)VPjava/lang/InterruptedExceptiontimeoutJe Ljava/lang/InterruptedException;G(Lcom/thoughtworks/selenium/Selenium;Ljava/util/Map;)Ljava/lang/Object; W  SourceFileSubmitElement.javaOLorg/openqa/selenium/internal/selenesedriver/ElementFunction;!  A * *56    >*,!N'-!:+):/1 5Y7*:<  !"+#5(<*>>>@A>BC 1D'E!FG >BH>? dI N5Y-LO/013 QR STAU '*+,VXYZPK %^D>3~T>org/openqa/selenium/internal/selenesedriver/ClearElement.class1*8org/openqa/selenium/internal/selenesedriver/ClearElement;org/openqa/selenium/internal/selenesedriver/ElementFunction()VCode  LineNumberTableLocalVariableTablethis:Lorg/openqa/selenium/internal/selenesedriver/ClearElement;applyE(Lcom/thoughtworks/selenium/Selenium;Ljava/util/Map;)Ljava/lang/Void; SignatureZ(Lcom/thoughtworks/selenium/Selenium;Ljava/util/Map;)Ljava/lang/Void;   getLocator#(Ljava/util/Map;)Ljava/lang/String; "com/thoughtworks/selenium/Selenium type'(Ljava/lang/String;Ljava/lang/String;)Vselenium$Lcom/thoughtworks/selenium/Selenium;argsLjava/util/Map;LocalVariableTypeTable$Ljava/util/Map;G(Lcom/thoughtworks/selenium/Selenium;Ljava/util/Map;)Ljava/lang/Object; &  SourceFileClearElement.javaOLorg/openqa/selenium/internal/selenesedriver/ElementFunction;!/*   c+*,     !"  #A$'*+,%  '()PK %^D>Eorg/openqa/selenium/internal/selenesedriver/GetElementAttribute.class1G?org/openqa/selenium/internal/selenesedriver/GetElementAttribute;org/openqa/selenium/internal/selenesedriver/ElementFunction()VCode  LineNumberTableLocalVariableTablethisALorg/openqa/selenium/internal/selenesedriver/GetElementAttribute;applyG(Lcom/thoughtworks/selenium/Selenium;Ljava/util/Map;)Ljava/lang/String; Signature\(Lcom/thoughtworks/selenium/Selenium;Ljava/util/Map;)Ljava/lang/String;   getLocator#(Ljava/util/Map;)Ljava/lang/String;name  java/util/Map get&(Ljava/lang/Object;)Ljava/lang/Object;java/lang/String!Vvar e = selenium.browserbot.findElement('%s');webdriver.element.getAttribute(e, '%s');#java/lang/Object % &'escape&(Ljava/lang/String;)Ljava/lang/String; ) *+format9(Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/String; -/."com/thoughtworks/selenium/Selenium 0'getEval2null 4 56equals(Ljava/lang/Object;)Zselenium$Lcom/thoughtworks/selenium/Selenium;argsLjava/util/Map;locatorLjava/lang/String;scriptresultLocalVariableTypeTable$Ljava/util/Map;G(Lcom/thoughtworks/selenium/Selenium;Ljava/util/Map;)Ljava/lang/Object; C  SourceFileGetElementAttribute.javaQLorg/openqa/selenium/internal/selenesedriver/ElementFunction;!/*   F*,N,: "Y-SY*$S(:+,:13  "&+$5& HF F78F9:@;<3<+=<5><? F9@AA'*+,B  DEFPK %^D>?org/openqa/selenium/internal/selenesedriver/GetPageSource.class1&9org/openqa/selenium/internal/selenesedriver/GetPageSourcejava/lang/Object()VCode  LineNumberTableLocalVariableTablethis;Lorg/openqa/selenium/internal/selenesedriver/GetPageSource;applyG(Lcom/thoughtworks/selenium/Selenium;Ljava/util/Map;)Ljava/lang/String; Signature\(Lcom/thoughtworks/selenium/Selenium;Ljava/util/Map;)Ljava/lang/String; "com/thoughtworks/selenium/Selenium  getHtmlSource()Ljava/lang/String;selenium$Lcom/thoughtworks/selenium/Selenium;argsLjava/util/Map;LocalVariableTypeTable$Ljava/util/Map;G(Lcom/thoughtworks/selenium/Selenium;Ljava/util/Map;)Ljava/lang/Object; "  SourceFileGetPageSource.javadLjava/lang/Object;Lorg/openqa/selenium/internal/selenesedriver/SeleneseFunction;! /*    W+   A  '*+,!  #$%PK %^D>:Ю:org/openqa/selenium/internal/selenesedriver/GetTitle.class1&4org/openqa/selenium/internal/selenesedriver/GetTitlejava/lang/Object()VCode  LineNumberTableLocalVariableTablethis6Lorg/openqa/selenium/internal/selenesedriver/GetTitle;applyG(Lcom/thoughtworks/selenium/Selenium;Ljava/util/Map;)Ljava/lang/String; Signature\(Lcom/thoughtworks/selenium/Selenium;Ljava/util/Map;)Ljava/lang/String; "com/thoughtworks/selenium/Selenium getTitle()Ljava/lang/String;selenium$Lcom/thoughtworks/selenium/Selenium;argsLjava/util/Map;LocalVariableTypeTable$Ljava/util/Map;G(Lcom/thoughtworks/selenium/Selenium;Ljava/util/Map;)Ljava/lang/Object; "  SourceFile GetTitle.javadLjava/lang/Object;Lorg/openqa/selenium/internal/selenesedriver/SeleneseFunction;! /*    W+   A  '*+,!  #$%PK %^D>...7org/openqa/selenium/internal/selenesedriver/Close.class1:1org/openqa/selenium/internal/selenesedriver/Closejava/lang/Object()VCode  LineNumberTableLocalVariableTablethis3Lorg/openqa/selenium/internal/selenesedriver/Close;applyE(Lcom/thoughtworks/selenium/Selenium;Ljava/util/Map;)Ljava/lang/Void; SignatureZ(Lcom/thoughtworks/selenium/Selenium;Ljava/util/Map;)Ljava/lang/Void; "com/thoughtworks/selenium/Selenium close  getAllWindowIds()[Ljava/lang/String;-selenium.browserbot.getCurrentWindow().closed  !"getEval&(Ljava/lang/String;)Ljava/lang/String; $ %stop'+com/thoughtworks/selenium/SeleniumExceptionselenium$Lcom/thoughtworks/selenium/Selenium;argsLjava/util/Map; allWindowIds[Ljava/lang/String;openZe-Lcom/thoughtworks/selenium/SeleniumException;LocalVariableTypeTable$Ljava/util/Map;G(Lcom/thoughtworks/selenium/Selenium;Ljava/util/Map;)Ljava/lang/Object; 6  SourceFile Close.javabLjava/lang/Object;Lorg/openqa/selenium/internal/selenesedriver/SeleneseFunction;! /*    4++N-"6+W:6 +#"& *  !$"%$&'),*2. >44()4*+ ',-./$012 4*3A4 '*+,5  789PK %^D>mA   :org/openqa/selenium/internal/selenesedriver/SendKeys.class14org/openqa/selenium/internal/selenesedriver/SendKeys;org/openqa/selenium/internal/selenesedriver/ElementFunction()VCode  LineNumberTableLocalVariableTablethis6Lorg/openqa/selenium/internal/selenesedriver/SendKeys;applyE(Lcom/thoughtworks/selenium/Selenium;Ljava/util/Map;)Ljava/lang/Void; SignatureZ(Lcom/thoughtworks/selenium/Selenium;Ljava/util/Map;)Ljava/lang/Void;   getLocator#(Ljava/util/Map;)Ljava/lang/String;value  java/util/Map get&(Ljava/lang/Object;)Ljava/lang/Object;[Ljava/lang/CharSequence;!java/lang/StringBuilder $ %&append3(Ljava/lang/CharSequence;)Ljava/lang/StringBuilder; ( )* isFileInput9(Lcom/thoughtworks/selenium/Selenium;Ljava/lang/String;)Z , -.toString()Ljava/lang/String; 0 12 isLocalFile(Ljava/lang/String;)Z 4 56convertToFileUrl&(Ljava/lang/String;)Ljava/lang/String; 8:9"com/thoughtworks/selenium/Selenium ;< attachFile'(Ljava/lang/String;Ljava/lang/String;)V 8> ?<typeKeysselenium$Lcom/thoughtworks/selenium/Selenium;argsLjava/util/Map;locatorLjava/lang/String;allKeysbuilderLjava/lang/StringBuilder;seqLjava/lang/CharSequence;toTypeLocalVariableTypeTable$Ljava/util/Map;O java/io/File NQ R(Ljava/lang/String;)V NT UVtoURL()Ljava/net/URL; X,Y java/net/URL[+com/thoughtworks/selenium/SeleniumException]!Cannot convert file to file url: Q ` %a-(Ljava/lang/String;)Ljava/lang/StringBuilder; ZQdjava/net/MalformedURLExceptione Ljava/net/MalformedURLException; hjijava/lang/String klvalueOf&(Ljava/lang/Object;)Ljava/lang/String;n@type 8p q6 getAttributesfile hu v. toLowerCase hx yzequals(Ljava/lang/Object;)Ztype-Lcom/thoughtworks/selenium/SeleniumException; N~ exists()Z N canReadnameLjava/io/File;G(Lcom/thoughtworks/selenium/Selenium;Ljava/util/Map;)Ljava/lang/Object;   SourceFile SendKeys.javaOLorg/openqa/selenium/internal/selenesedriver/ElementFunction;!/*   0 ~*,N,: Y":Y: 66 2:#W*+-''+:*/ *3:+-7+-+= 6 !"1#9"C&L'S(\)d,p.|1 R~ ~@A~BCxDEkFbGH1IJSKEL ~BM56v(NY+PSWMZY Y\^+_+bc 678 ( (KEef)*'+ Y,g^m_+oNr-twN#$Z >?$@%C 4' '@A'DE {E%e|12]NY+PM,} , H I  E sA'*+,  PK %^D>h$NNCorg/openqa/selenium/internal/selenesedriver/IsElementSelected.class1?=org/openqa/selenium/internal/selenesedriver/IsElementSelected;org/openqa/selenium/internal/selenesedriver/ElementFunction selectedJsLjava/lang/String; ConstantValue (function isSelected() { var e = selenium.browserbot.findElement('LOCATOR'); if ('OPTION' == e.tagName) return e.selected ? 'true' : 'false'; if (e.type == 'checkbox' || e.type == 'radio') return !!e.checked ? 'true' : 'false'; return 'false'})()()VCode   LineNumberTableLocalVariableTablethis?Lorg/openqa/selenium/internal/selenesedriver/IsElementSelected;applyH(Lcom/thoughtworks/selenium/Selenium;Ljava/util/Map;)Ljava/lang/Boolean; Signature](Lcom/thoughtworks/selenium/Selenium;Ljava/util/Map;)Ljava/lang/Boolean;   getLocator#(Ljava/util/Map;)Ljava/lang/String;LOCATOR "!java/lang/String #$replaceD(Ljava/lang/CharSequence;Ljava/lang/CharSequence;)Ljava/lang/String; &('"com/thoughtworks/selenium/Selenium )*getEval&(Ljava/lang/String;)Ljava/lang/String; ,.-java/lang/Boolean /0valueOf'(Ljava/lang/String;)Ljava/lang/Boolean;selenium$Lcom/thoughtworks/selenium/Selenium;argsLjava/util/Map;locatorvalueLocalVariableTypeTable$Ljava/util/Map;G(Lcom/thoughtworks/selenium/Selenium;Ljava/util/Map;)Ljava/lang/Object; ;  SourceFileIsElementSelected.javaRLorg/openqa/selenium/internal/selenesedriver/ElementFunction;!  A * *#$    *,N+-%:+ 41234567 38A9 '*+,:<=>PK %^D>Sj?org/openqa/selenium/internal/selenesedriver/ToggleElement.class1[9org/openqa/selenium/internal/selenesedriver/ToggleElement;org/openqa/selenium/internal/selenesedriver/ElementFunction()VCode  LineNumberTableLocalVariableTablethis;Lorg/openqa/selenium/internal/selenesedriver/ToggleElement;applyH(Lcom/thoughtworks/selenium/Selenium;Ljava/util/Map;)Ljava/lang/Boolean; Signature](Lcom/thoughtworks/selenium/Selenium;Ljava/util/Map;)Ljava/lang/Boolean;   getLocator#(Ljava/util/Map;)Ljava/lang/String;java/lang/StringBuilder java/lang/String valueOf&(Ljava/lang/Object;)Ljava/lang/String;   (Ljava/lang/String;)V"@type $ %&append-(Ljava/lang/String;)Ljava/lang/StringBuilder; ( )*toString()Ljava/lang/String; ,.-"com/thoughtworks/selenium/Selenium /0 getAttribute&(Ljava/lang/String;)Ljava/lang/String;2radio 4 56equalsIgnoreCase(Ljava/lang/String;)Z8'java/lang/UnsupportedOperationException:!You may not toggle a radio button 7 ,= >6 isChecked ,@ A uncheck ,C D check FHGjava/lang/Boolean I(Z)Ljava/lang/Boolean;selenium$Lcom/thoughtworks/selenium/Selenium;argsLjava/util/Map;locatorLjava/lang/String;type wasCheckedZLocalVariableTypeTable$Ljava/util/Map;G(Lcom/thoughtworks/selenium/Selenium;Ljava/util/Map;)Ljava/lang/Object; W  SourceFileToggleElement.javaRLorg/openqa/selenium/internal/selenesedriver/ElementFunction;!/*   _*,N+Y-!#'+:13 7Y9;+-<6 +-? +-B+-<E & !+5!>"C#M%T( >_ _JK_LMYNO!>PO>!QRS _LTAU'*+,V  XYZPK %^D>8org/openqa/selenium/internal/selenesedriver/GetUrl.class1:2org/openqa/selenium/internal/selenesedriver/GetUrljava/lang/Object()VCode  LineNumberTableLocalVariableTablethis4Lorg/openqa/selenium/internal/selenesedriver/GetUrl;applyE(Lcom/thoughtworks/selenium/Selenium;Ljava/util/Map;)Ljava/lang/Void; SignatureZ(Lcom/thoughtworks/selenium/Selenium;Ljava/util/Map;)Ljava/lang/Void;url  java/util/Map get&(Ljava/lang/Object;)Ljava/lang/Object;java/lang/Stringtrue !#""com/thoughtworks/selenium/Selenium $%open'(Ljava/lang/String;Ljava/lang/String;)V'30 !) *+waitForPageToLoad(Ljava/lang/String;)V-+com/thoughtworks/selenium/SeleniumExceptionselenium$Lcom/thoughtworks/selenium/Selenium;argsLjava/util/Map;LocalVariableTypeTable$Ljava/util/Map;G(Lcom/thoughtworks/selenium/Selenium;Ljava/util/Map;)Ljava/lang/Object; 6  SourceFile GetUrl.javabLjava/lang/Object;Lorg/openqa/selenium/internal/selenesedriver/SeleneseFunction;! /*    !+, +&(N,  # !!./!012 !03A4 '*+,5  789PK %^D>gX@@Borg/openqa/selenium/internal/selenesedriver/IsElementEnabled.class10()VCode  LineNumberTableLocalVariableTablethis>Lorg/openqa/selenium/internal/selenesedriver/IsElementEnabled;applyH(Lcom/thoughtworks/selenium/Selenium;Ljava/util/Map;)Ljava/lang/Boolean; Signature](Lcom/thoughtworks/selenium/Selenium;Ljava/util/Map;)Ljava/lang/Boolean;   getLocator#(Ljava/util/Map;)Ljava/lang/String; "com/thoughtworks/selenium/Selenium  isEditable(Ljava/lang/String;)Z java/lang/Boolean !valueOf(Z)Ljava/lang/Boolean;selenium$Lcom/thoughtworks/selenium/Selenium;argsLjava/util/Map;locatorLjava/lang/String;LocalVariableTypeTable$Ljava/util/Map;G(Lcom/thoughtworks/selenium/Selenium;Ljava/util/Map;)Ljava/lang/Object; ,  SourceFileIsElementEnabled.javaRLorg/openqa/selenium/internal/selenesedriver/ElementFunction;!/*   o*,N+-  * "#$% &'( $)A*'*+,+  -./PK %^D> %m m >org/openqa/selenium/internal/selenesedriver/FindElements.class1k8org/openqa/selenium/internal/selenesedriver/FindElementsAorg/openqa/selenium/internal/selenesedriver/AbstractElementFinderSCRIPTLjava/lang/String; ConstantValue >selenium.browserbot.findElementsLikeWebDriver('%s', '%s', %s);()VCode  LineNumberTableLocalVariableTablethis:Lorg/openqa/selenium/internal/selenesedriver/FindElements; executeFindl(Lcom/thoughtworks/selenium/Selenium;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)Ljava/util/List; Signature(Lcom/thoughtworks/selenium/Selenium;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)Ljava/util/List;>;java/lang/Object java/lang/String format9(Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/String; "!"com/thoughtworks/selenium/Selenium #$getEval&(Ljava/lang/String;)Ljava/lang/String;&, (*)com/google/common/base/Splitter +,on5(Ljava/lang/String;)Lcom/google/common/base/Splitter; (. /0split.(Ljava/lang/CharSequence;)Ljava/lang/Iterable; 243com/google/common/collect/Lists 56 newArrayList()Ljava/util/ArrayList; 8:9java/lang/Iterable ;<iterator()Ljava/util/Iterator; >@?java/util/Iterator ABnext()Ljava/lang/Object; D EF newElement#(Ljava/lang/String;)Ljava/util/Map; HJIjava/util/List KLadd(Ljava/lang/Object;)Z >N OPhasNext()Zselenium$Lcom/thoughtworks/selenium/Selenium;howusing parentLocatorresultallKeysLjava/lang/Iterable;toReturnLjava/util/List;keyLocalVariableTypeTable(Ljava/lang/Iterable;GLjava/util/List;>; onFailure6(Ljava/lang/String;Ljava/lang/String;)Ljava/util/List;m(Ljava/lang/String;Ljava/lang/String;)Ljava/util/List;>;n(Lcom/thoughtworks/selenium/Selenium;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)Ljava/lang/Object; d 8(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/Object; g _` SourceFileFindElements.javaLorg/openqa/selenium/internal/selenesedriver/AbstractElementFinder;>;>;!  /*    b+Y,SY-SYS:%'-:1:7:  =:*CGW M"#"%*&/(G)U(_,\ bbQRbSbTbUDV*8WX/3YZG[\*8W]/3Y^_`a B11 STDb * *+,-cD_e '*+,fhijPK %^D>[lXXForg/openqa/selenium/internal/selenesedriver/ExecuteAsyncScript$1.class1;@org/openqa/selenium/internal/selenesedriver/ExecuteAsyncScript$1java/lang/ObjectC(Lorg/openqa/selenium/internal/selenesedriver/ExecuteAsyncScript;)VCode    ()VLineNumberTableLocalVariableTablethisBLorg/openqa/selenium/internal/selenesedriver/ExecuteAsyncScript$1;applyG(Lcom/thoughtworks/selenium/Selenium;Ljava/util/Map;)Ljava/lang/Object; Signature\(Lcom/thoughtworks/selenium/Selenium;Ljava/util/Map;)Ljava/lang/Object;ms  java/util/Map  get&(Ljava/lang/Object;)Ljava/lang/Object;"java/lang/Number !$ %& longValue()J (*)>org/openqa/selenium/internal/selenesedriver/ExecuteAsyncScript +,access$0D(Lorg/openqa/selenium/internal/selenesedriver/ExecuteAsyncScript;J)Vselenium$Lcom/thoughtworks/selenium/Selenium;argsLjava/util/Map;LocalVariableTypeTable$Ljava/util/Map; SourceFileExecuteAsyncScript.javadLjava/lang/Object;Lorg/openqa/selenium/internal/selenesedriver/SeleneseFunction;EnclosingMethod 89setScriptTimeout@()Lorg/openqa/selenium/internal/selenesedriver/SeleneseFunction; InnerClasses   8 *+ * Z   k* ,!#' ]^ -./01 /23456(7: PK %^D>`eDorg/openqa/selenium/internal/selenesedriver/ExecuteAsyncScript.class1>org/openqa/selenium/internal/selenesedriver/ExecuteAsyncScriptjava/lang/Object()VCode   LineNumberTableLocalVariableTablethis@Lorg/openqa/selenium/internal/selenesedriver/ExecuteAsyncScript;applyG(Lcom/thoughtworks/selenium/Selenium;Ljava/util/Map;)Ljava/lang/Object; Signature\(Lcom/thoughtworks/selenium/Selenium;Ljava/util/Map;)Ljava/lang/Object;java/io/StringWriter  org/json/JSONWriter  (Ljava/io/Writer;)V ! "#object()Lorg/json/JSONWriter;%script ' ()key)(Ljava/lang/String;)Lorg/json/JSONWriter; +-, java/util/Map ./get&(Ljava/lang/Object;)Ljava/lang/Object; 1 23value)(Ljava/lang/Object;)Lorg/json/JSONWriter;5args7timeout 9 2:(J)Lorg/json/JSONWriter; < =# endObject?&org/openqa/selenium/WebDriverException >A B(Ljava/lang/Throwable;)VDjava/lang/StringBuilderFcore.script.execute( CH I(Ljava/lang/String;)V CK LMappend-(Ljava/lang/Object;)Ljava/lang/StringBuilder;O) CQ LR-(Ljava/lang/String;)Ljava/lang/StringBuilder; CT UVtoString()Ljava/lang/String; XZY"com/thoughtworks/selenium/Selenium [\getEval&(Ljava/lang/String;)Ljava/lang/String; ^`_+com/thoughtworks/selenium/SeleniumException aV getMessagecScriptTimeoutError egfjava/lang/String hi startsWith(Ljava/lang/String;)Zk$org/openqa/selenium/TimeoutException jm n*(Ljava/lang/String;Ljava/lang/Throwable;)V p qrpopulateReturnValue&(Ljava/lang/String;)Ljava/lang/Object;torg/json/JSONExceptionselenium$Lcom/thoughtworks/selenium/Selenium; parametersLjava/util/Map;swLjava/io/StringWriter;eLorg/json/JSONException;Ljava/lang/String;-Lcom/thoughtworks/selenium/SeleniumException;LocalVariableTypeTable$Ljava/util/Map;getArgumentValue&(Ljava/lang/Object;)Ljava/lang/String;'%s''\' e  replaceAll8(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String; e format9(Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/String; e valueOfargLjava/lang/Object; __undefined__ e equals(Ljava/lang/Object;)Z^\d+$ e imatches java/lang/Long  parseLong(Ljava/lang/String;)J (J)Ljava/lang/Long; ^\d+\.\d+$ java/lang/Double  parseDouble(Ljava/lang/String;)D (D)Ljava/lang/Double;truefalse java/lang/Boolean i parseBoolean (Z)Ljava/lang/Boolean;setScriptTimeout@()Lorg/openqa/selenium/internal/selenesedriver/SeleneseFunction;T()Lorg/openqa/selenium/internal/selenesedriver/SeleneseFunction;@org/openqa/selenium/internal/selenesedriver/ExecuteAsyncScript$1 C(Lorg/openqa/selenium/internal/selenesedriver/ExecuteAsyncScript;)Vaccess$0D(Lorg/openqa/selenium/internal/selenesedriver/ExecuteAsyncScript;J)V SourceFileExecuteAsyncScript.javadLjava/lang/Object;Lorg/openqa/selenium/internal/selenesedriver/SeleneseFunction; InnerClasses!  < * * "$ "   vYNY- $&,$*04&,4*06&*8;W:>Y@CYEG-JNPS:+W:$:]bdjY]l*oCFsisv^B')*+#,3-?.F/H0R3i6v7x89;=\ uvwxyzH {|i5%}s2}2}x{~ w n*++eY+eS+ABC D%F**qr I++ ++ ++ + ++& K L MNO%P-Q?RGUII2} 3 Y*ưZ   &*$ PK %^D>  ?org/openqa/selenium/internal/selenesedriver/ExecuteScript.class19org/openqa/selenium/internal/selenesedriver/ExecuteScriptjava/lang/Object()VCode  LineNumberTableLocalVariableTablethis;Lorg/openqa/selenium/internal/selenesedriver/ExecuteScript;applyG(Lcom/thoughtworks/selenium/Selenium;Ljava/util/Map;)Ljava/lang/Object; Signature\(Lcom/thoughtworks/selenium/Selenium;Ljava/util/Map;)Ljava/lang/Object;   prepareScript#(Ljava/util/Map;)Ljava/lang/String; "com/thoughtworks/selenium/Selenium getEval&(Ljava/lang/String;)Ljava/lang/String;  !populateReturnValue&(Ljava/lang/String;)Ljava/lang/Object;selenium$Lcom/thoughtworks/selenium/Selenium;argsLjava/util/Map;scriptLjava/lang/String;valueLocalVariableTypeTable$Ljava/util/Map;8(Ljava/util/Map;)Ljava/lang/String;& .0/ java/util/Map 12get&(Ljava/lang/Object;)Ljava/lang/Object;4java/lang/String6(function() { %s })(); 38 9:format9(Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/String;< \bwindow\.>'selenium.browserbot.getCurrentWindow(). 3@ AB replaceAll8(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;D \bdocument\.F"selenium.browserbot.getDocument().$Ijava/util/List HK LMisEmpty()ZOjava/lang/StringBuilderQarguments\[\s* NS T(Ljava/lang/String;)V NV WXappend(I)Ljava/lang/StringBuilder;Z\s*\] N\ W]-(Ljava/lang/String;)Ljava/lang/StringBuilder; N_ `atoString()Ljava/lang/String; Hc 1d(I)Ljava/lang/Object; f ghgetArgumentValue&(Ljava/lang/Object;)Ljava/lang/String; Hj klsize()I parametersLjava/util/List;iILjava/util/List<*>;s'%s'u'w\' 3y zhvalueOfargLjava/lang/Object;~ __undefined__ 3 equals(Ljava/lang/Object;)Z^\d+$ 3 matches(Ljava/lang/String;)Z java/lang/Long  parseLong(Ljava/lang/String;)J z(J)Ljava/lang/Long; ^\d+\.\d+$ java/lang/Double  parseDouble(Ljava/lang/String;)D z(D)Ljava/lang/Double;truefalse java/lang/Boolean  parseBoolean z(Z)Ljava/lang/Boolean; SourceFileExecuteScript.javadLjava/lang/Object;Lorg/openqa/selenium/internal/selenesedriver/SeleneseFunction;! /*    *,N+-:*  4"#$%&'(') $*+ z+,-3M5Y,S7;=?CE?M+G-HN-J>6-,NYPRUY[^*-be?M-i, 6 # $% &'$((4)=*C+Z,f+j*x0 4zzm% n&'4F$n@8op)zm*4F$qgh n*++3rY+3tv?S7+x 456 7%9 **{| ! I}++ ++ ++ + ++ & > ? @AB%C-D?EGH II('PK %^D>HZTorg/openqa/selenium/internal/selenesedriver/AbstractElementFinder$ImplicitWait.class18Norg/openqa/selenium/internal/selenesedriver/AbstractElementFinder$ImplicitWaitjava/lang/ObjectF(Lorg/openqa/selenium/internal/selenesedriver/AbstractElementFinder;)VCode    ()VLineNumberTableLocalVariableTablethisPLorg/openqa/selenium/internal/selenesedriver/AbstractElementFinder$ImplicitWait;applyG(Lcom/thoughtworks/selenium/Selenium;Ljava/util/Map;)Ljava/lang/Object; Signature\(Lcom/thoughtworks/selenium/Selenium;Ljava/util/Map;)Ljava/lang/Object;ms  java/util/Map  get&(Ljava/lang/Object;)Ljava/lang/Object;"java/lang/Number !$ %& longValue()J (*)Aorg/openqa/selenium/internal/selenesedriver/AbstractElementFinder +,access$0G(Lorg/openqa/selenium/internal/selenesedriver/AbstractElementFinder;J)Vselenium$Lcom/thoughtworks/selenium/Selenium;argsLjava/util/Map;LocalVariableTypeTable$Ljava/util/Map; SourceFileAbstractElementFinder.javadLjava/lang/Object;Lorg/openqa/selenium/internal/selenesedriver/SeleneseFunction; InnerClasses ImplicitWait!  4 *+ *\   k* ,!#' ^_ -./01 /23456 (7PK %^D>#CCGorg/openqa/selenium/internal/selenesedriver/AbstractElementFinder.class1Aorg/openqa/selenium/internal/selenesedriver/AbstractElementFinderjava/lang/Object;implicitlyWaitJ()VCode class name className css selectorcss link textlinkTextpartial link textpartialLinkText!tag name#tagName %'&&com/google/common/collect/ImmutableMap ()of(Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;)Lcom/google/common/collect/ImmutableMap; + LineNumberTableLocalVariableTable 0 . 2 thisCLorg/openqa/selenium/internal/selenesedriver/AbstractElementFinder;LocalVariableTypeTableHLorg/openqa/selenium/internal/selenesedriver/AbstractElementFinder; executeFindn(Lcom/thoughtworks/selenium/Selenium;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)Ljava/lang/Object;_(Lcom/thoughtworks/selenium/Selenium;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)TT; onFailure8(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/Object;)(Ljava/lang/String;Ljava/lang/String;)TT; newElement#(Ljava/lang/String;)Ljava/util/Map;I(Ljava/lang/String;)Ljava/util/Map;Ajava/lang/StringBuilderCstored= @E .F(Ljava/lang/String;)V HJIorg/openqa/selenium/net/Urls KL urlEncode&(Ljava/lang/String;)Ljava/lang/String; @N OPappend-(Ljava/lang/String;)Ljava/lang/StringBuilder; @R STtoString()Ljava/lang/String;VELEMENT %X (YN(Ljava/lang/Object;Ljava/lang/Object;)Lcom/google/common/collect/ImmutableMap;keyLjava/lang/String;locatorapplyG(Lcom/thoughtworks/selenium/Selenium;Ljava/util/Map;)Ljava/lang/Object;M(Lcom/thoughtworks/selenium/Selenium;Ljava/util/Map;)TT;ausing ced java/util/Map fgget&(Ljava/lang/Object;)Ljava/lang/Object;ijava/lang/String k lLconvertToStrategyNamenvaluepidr!selenium.browserbot.getDocument()t!selenium.browserbot.findElement('vUTF-8 xzyjava/net/URLDecoder {|decode8(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;~') $java/io/UnsupportedEncodingException printStackTrace'\\' h | replaceAll java/lang/System currentTimeMillis()J  78java/util/List size()I  :;+com/thoughtworks/selenium/SeleniumExceptionselenium$Lcom/thoughtworks/selenium/Selenium;argshow parentLocatore&Ljava/io/UnsupportedEncodingException; startTimeresultLjava/lang/Object;$Ljava/util/Map;TT;R()Lorg/openqa/selenium/internal/selenesedriver/AbstractElementFinder$ImplicitWait;W()Lorg/openqa/selenium/internal/selenesedriver/AbstractElementFinder.ImplicitWait;Norg/openqa/selenium/internal/selenesedriver/AbstractElementFinder$ImplicitWait .F(Lorg/openqa/selenium/internal/selenesedriver/AbstractElementFinder;)Vstrategyaccess$0G(Lorg/openqa/selenium/internal/selenesedriver/AbstractElementFinder;J)V SourceFileAbstractElementFinder.javakLjava/lang/Object;Lorg/openqa/selenium/internal/selenesedriver/SeleneseFunction; InnerClasses ImplicitWait!    W  "$*,"%&' ()$#"-.N */* 1,"+ "-  345  3678 9:; <=> ?o@YBD+GMQMU,W, 12- 34Z[\[5 36]^ _ *,`bhjN,mbh:,obh: q:*@YsDuwM}MQ: ::7*+-::e*1*-6SVm,F678*:/;6>V?X@]DhFmIyKLOPSU-\ 34[a[*[Xm? y5 36y  E Y*,Y-  345  36lLk*+bhM,,+, d e- 34a[ [5 36&*1,+-  PK %^D>`ԎBorg/openqa/selenium/internal/selenesedriver/SeleneseFunction.class1 ;)TT; SourceFileSeleneseFunction.java(Ljava/lang/Object;   PK %^D>|9?org/openqa/selenium/internal/selenesedriver/GetCurrentUrl.class1&9org/openqa/selenium/internal/selenesedriver/GetCurrentUrljava/lang/Object()VCode  LineNumberTableLocalVariableTablethis;Lorg/openqa/selenium/internal/selenesedriver/GetCurrentUrl;applyG(Lcom/thoughtworks/selenium/Selenium;Ljava/util/Map;)Ljava/lang/String; Signature\(Lcom/thoughtworks/selenium/Selenium;Ljava/util/Map;)Ljava/lang/String; "com/thoughtworks/selenium/Selenium  getLocation()Ljava/lang/String;selenium$Lcom/thoughtworks/selenium/Selenium;argsLjava/util/Map;LocalVariableTypeTable$Ljava/util/Map;G(Lcom/thoughtworks/selenium/Selenium;Ljava/util/Map;)Ljava/lang/Object; "  SourceFileGetCurrentUrl.javadLjava/lang/Object;Lorg/openqa/selenium/internal/selenesedriver/SeleneseFunction;! /*    W+   A  '*+,!  #$%PK %^D>DǘȆ>org/openqa/selenium/internal/selenesedriver/QuitSelenium.class1%8org/openqa/selenium/internal/selenesedriver/QuitSeleniumjava/lang/Object()VCode  LineNumberTableLocalVariableTablethis:Lorg/openqa/selenium/internal/selenesedriver/QuitSelenium;applyE(Lcom/thoughtworks/selenium/Selenium;Ljava/util/Map;)Ljava/lang/Void; SignatureZ(Lcom/thoughtworks/selenium/Selenium;Ljava/util/Map;)Ljava/lang/Void; "com/thoughtworks/selenium/Selenium stopselenium$Lcom/thoughtworks/selenium/Selenium;argsLjava/util/Map;LocalVariableTypeTable$Ljava/util/Map;G(Lcom/thoughtworks/selenium/Selenium;Ljava/util/Map;)Ljava/lang/Object; !  SourceFileQuitSelenium.javabLjava/lang/Object;Lorg/openqa/selenium/internal/selenesedriver/SeleneseFunction;! /*    \+   A '*+,   "#$PK %^D>@org/openqa/selenium/internal/selenesedriver/GetElementText.class1*:org/openqa/selenium/internal/selenesedriver/GetElementText;org/openqa/selenium/internal/selenesedriver/ElementFunction()VCode  LineNumberTableLocalVariableTablethis;)Ljava/lang/String;   getLocator#(Ljava/util/Map;)Ljava/lang/String; "com/thoughtworks/selenium/Selenium getText&(Ljava/lang/String;)Ljava/lang/String;selenium$Lcom/thoughtworks/selenium/Selenium;argsLjava/util/Map;locatorLjava/lang/String;LocalVariableTypeTable$Ljava/util/Map;G(Lcom/thoughtworks/selenium/Selenium;Ljava/util/Map;)Ljava/lang/Object; &  SourceFileGetElementText.javaQLorg/openqa/selenium/internal/selenesedriver/ElementFunction;!/*   l*,N+-  *  !" #A$'*+,%  '()PK %^D>e__Aorg/openqa/selenium/internal/selenesedriver/ElementFunction.class1C;org/openqa/selenium/internal/selenesedriver/ElementFunctionjava/lang/Object()VCode  LineNumberTableLocalVariableTablethis=Lorg/openqa/selenium/internal/selenesedriver/ElementFunction;LocalVariableTypeTableBLorg/openqa/selenium/internal/selenesedriver/ElementFunction; getLocator#(Ljava/util/Map;)Ljava/lang/String; Signature8(Ljava/util/Map;)Ljava/lang/String;id  java/util/Map get&(Ljava/lang/Object;)Ljava/lang/Object;java/lang/String!utf-8 #%$java/net/URLDecoder &'decode8(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;)&org/openqa/selenium/WebDriverException (+ ,(Ljava/lang/Throwable;)V.$java/io/UnsupportedEncodingException parametersLjava/util/Map;locatorLjava/lang/String;e&Ljava/io/UnsupportedEncodingException;$Ljava/util/Map;escape&(Ljava/lang/String;)Ljava/lang/String;9';\\' = >' replaceAlltoEscape SourceFileElementFunction.javakLjava/lang/Object;Lorg/openqa/selenium/internal/selenesedriver/SeleneseFunction;! A*     +M, "N(Y-* -   " */0 12 34/567 O +8:< '   ?2  @ABPK %^D>䧵>org/openqa/selenium/internal/selenesedriver/ClickElement.class1(8org/openqa/selenium/internal/selenesedriver/ClickElement;org/openqa/selenium/internal/selenesedriver/ElementFunction()VCode  LineNumberTableLocalVariableTablethis:Lorg/openqa/selenium/internal/selenesedriver/ClickElement;applyE(Lcom/thoughtworks/selenium/Selenium;Ljava/util/Map;)Ljava/lang/Void; SignatureZ(Lcom/thoughtworks/selenium/Selenium;Ljava/util/Map;)Ljava/lang/Void;   getLocator#(Ljava/util/Map;)Ljava/lang/String; "com/thoughtworks/selenium/Selenium click(Ljava/lang/String;)Vselenium$Lcom/thoughtworks/selenium/Selenium;argsLjava/util/Map;LocalVariableTypeTable$Ljava/util/Map;G(Lcom/thoughtworks/selenium/Selenium;Ljava/util/Map;)Ljava/lang/Object; $  SourceFileClickElement.javaOLorg/openqa/selenium/internal/selenesedriver/ElementFunction;!/*   a +*,       !A"'*+,#  %&'PK %^D>Aorg/openqa/selenium/internal/selenesedriver/GetElementValue.class1*;org/openqa/selenium/internal/selenesedriver/GetElementValue;org/openqa/selenium/internal/selenesedriver/ElementFunction()VCode  LineNumberTableLocalVariableTablethis=Lorg/openqa/selenium/internal/selenesedriver/GetElementValue;applyG(Lcom/thoughtworks/selenium/Selenium;Ljava/util/Map;)Ljava/lang/String; Signature\(Lcom/thoughtworks/selenium/Selenium;Ljava/util/Map;)Ljava/lang/String;   getLocator#(Ljava/util/Map;)Ljava/lang/String; "com/thoughtworks/selenium/Selenium getValue&(Ljava/lang/String;)Ljava/lang/String;selenium$Lcom/thoughtworks/selenium/Selenium;argsLjava/util/Map;locatorLjava/lang/String;LocalVariableTypeTable$Ljava/util/Map;G(Lcom/thoughtworks/selenium/Selenium;Ljava/util/Map;)Ljava/lang/Object; &  SourceFileGetElementValue.javaQLorg/openqa/selenium/internal/selenesedriver/ElementFunction;!/*   l*,N+-  *  !" #A$'*+,%  '()PK %^D>EU`ʏ<org/openqa/selenium/internal/selenesedriver/NewSession.class1c6org/openqa/selenium/internal/selenesedriver/NewSessionjava/lang/Object()VCode  LineNumberTableLocalVariableTablethis8Lorg/openqa/selenium/internal/selenesedriver/NewSession;applyD(Lcom/thoughtworks/selenium/Selenium;Ljava/util/Map;)Ljava/util/Map; Signature(Lcom/thoughtworks/selenium/Selenium;Ljava/util/Map;)Ljava/util/Map; "com/thoughtworks/selenium/Selenium startjavascript-xpath  useXpathLibrary(Ljava/lang/String;)V true " #allowNativeXpath%desiredCapabilities ')( java/util/Map *+get&(Ljava/lang/Object;)Ljava/lang/Object;- org/openqa/selenium/Capabilities/java/util/HashMap . 2 browserName ,4 56getBrowserName()Ljava/lang/String; '8 9:put8(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;<version ,> ?6 getVersionAplatform CEDorg/openqa/selenium/Platform FG getCurrent ()Lorg/openqa/selenium/Platform; CI J6toStringLjavascriptEnabled NPOjava/lang/Boolean QRvalueOf(Z)Ljava/lang/Boolean;selenium$Lcom/thoughtworks/selenium/Selenium;argsLjava/util/Map; capabilities"Lorg/openqa/selenium/Capabilities;seenCapabilitiesLocalVariableTypeTable$Ljava/util/Map;5Ljava/util/Map;G(Lcom/thoughtworks/selenium/Selenium;Ljava/util/Map;)Ljava/lang/Object; _  SourceFileNewSession.javaLjava/lang/Object;Lorg/openqa/selenium/internal/selenesedriver/SeleneseFunction;>;! /*    l+++!,$&,N.Y0:1-37W;-=7W@BH7WKM7W *  !#"$+%;&K'[(i) 4llSTlUV"JWX+AYVZlU[+AY\A] '*+,^  `abPK lC>{:i((<org/openqa/selenium/internal/selenesedriver/.svn/all-wcpropsK 25 svn:wc:ra_dav:version-url V 85 /svn/!svn/ver/11226/trunk/java/client/src/org/openqa/selenium/internal/selenesedriver END ElementFunction.java K 25 svn:wc:ra_dav:version-url V 106 /svn/!svn/ver/11226/trunk/java/client/src/org/openqa/selenium/internal/selenesedriver/ElementFunction.java END ClickElement.java K 25 svn:wc:ra_dav:version-url V 103 /svn/!svn/ver/11226/trunk/java/client/src/org/openqa/selenium/internal/selenesedriver/ClickElement.java END IsElementEnabled.java K 25 svn:wc:ra_dav:version-url V 107 /svn/!svn/ver/11226/trunk/java/client/src/org/openqa/selenium/internal/selenesedriver/IsElementEnabled.java END ClearElement.java K 25 svn:wc:ra_dav:version-url V 103 /svn/!svn/ver/11226/trunk/java/client/src/org/openqa/selenium/internal/selenesedriver/ClearElement.java END GetUrl.java K 25 svn:wc:ra_dav:version-url V 97 /svn/!svn/ver/11226/trunk/java/client/src/org/openqa/selenium/internal/selenesedriver/GetUrl.java END AbstractElementFinder.java K 25 svn:wc:ra_dav:version-url V 112 /svn/!svn/ver/11226/trunk/java/client/src/org/openqa/selenium/internal/selenesedriver/AbstractElementFinder.java END GetCurrentUrl.java K 25 svn:wc:ra_dav:version-url V 104 /svn/!svn/ver/11226/trunk/java/client/src/org/openqa/selenium/internal/selenesedriver/GetCurrentUrl.java END Close.java K 25 svn:wc:ra_dav:version-url V 96 /svn/!svn/ver/11226/trunk/java/client/src/org/openqa/selenium/internal/selenesedriver/Close.java END SeleneseFunction.java K 25 svn:wc:ra_dav:version-url V 107 /svn/!svn/ver/11226/trunk/java/client/src/org/openqa/selenium/internal/selenesedriver/SeleneseFunction.java END GetTagName.java K 25 svn:wc:ra_dav:version-url V 101 /svn/!svn/ver/11226/trunk/java/client/src/org/openqa/selenium/internal/selenesedriver/GetTagName.java END GetElementAttribute.java K 25 svn:wc:ra_dav:version-url V 110 /svn/!svn/ver/11226/trunk/java/client/src/org/openqa/selenium/internal/selenesedriver/GetElementAttribute.java END FindElements.java K 25 svn:wc:ra_dav:version-url V 103 /svn/!svn/ver/11226/trunk/java/client/src/org/openqa/selenium/internal/selenesedriver/FindElements.java END SubmitElement.java K 25 svn:wc:ra_dav:version-url V 104 /svn/!svn/ver/11226/trunk/java/client/src/org/openqa/selenium/internal/selenesedriver/SubmitElement.java END SetElementSelected.java K 25 svn:wc:ra_dav:version-url V 109 /svn/!svn/ver/11226/trunk/java/client/src/org/openqa/selenium/internal/selenesedriver/SetElementSelected.java END SwitchToFrame.java K 25 svn:wc:ra_dav:version-url V 104 /svn/!svn/ver/11226/trunk/java/client/src/org/openqa/selenium/internal/selenesedriver/SwitchToFrame.java END GetTitle.java K 25 svn:wc:ra_dav:version-url V 99 /svn/!svn/ver/11226/trunk/java/client/src/org/openqa/selenium/internal/selenesedriver/GetTitle.java END IsElementDisplayed.java K 25 svn:wc:ra_dav:version-url V 109 /svn/!svn/ver/11226/trunk/java/client/src/org/openqa/selenium/internal/selenesedriver/IsElementDisplayed.java END QuitSelenium.java K 25 svn:wc:ra_dav:version-url V 103 /svn/!svn/ver/11226/trunk/java/client/src/org/openqa/selenium/internal/selenesedriver/QuitSelenium.java END ExecuteAsyncScript.java K 25 svn:wc:ra_dav:version-url V 109 /svn/!svn/ver/11226/trunk/java/client/src/org/openqa/selenium/internal/selenesedriver/ExecuteAsyncScript.java END SendKeys.java K 25 svn:wc:ra_dav:version-url V 99 /svn/!svn/ver/11226/trunk/java/client/src/org/openqa/selenium/internal/selenesedriver/SendKeys.java END GetElementValue.java K 25 svn:wc:ra_dav:version-url V 106 /svn/!svn/ver/11226/trunk/java/client/src/org/openqa/selenium/internal/selenesedriver/GetElementValue.java END ExecuteScript.java K 25 svn:wc:ra_dav:version-url V 104 /svn/!svn/ver/11226/trunk/java/client/src/org/openqa/selenium/internal/selenesedriver/ExecuteScript.java END FindElement.java K 25 svn:wc:ra_dav:version-url V 102 /svn/!svn/ver/11226/trunk/java/client/src/org/openqa/selenium/internal/selenesedriver/FindElement.java END ToggleElement.java K 25 svn:wc:ra_dav:version-url V 104 /svn/!svn/ver/11226/trunk/java/client/src/org/openqa/selenium/internal/selenesedriver/ToggleElement.java END build.desc K 25 svn:wc:ra_dav:version-url V 96 /svn/!svn/ver/11226/trunk/java/client/src/org/openqa/selenium/internal/selenesedriver/build.desc END GetPageSource.java K 25 svn:wc:ra_dav:version-url V 104 /svn/!svn/ver/11226/trunk/java/client/src/org/openqa/selenium/internal/selenesedriver/GetPageSource.java END NewSession.java K 25 svn:wc:ra_dav:version-url V 101 /svn/!svn/ver/11226/trunk/java/client/src/org/openqa/selenium/internal/selenesedriver/NewSession.java END GetElementText.java K 25 svn:wc:ra_dav:version-url V 105 /svn/!svn/ver/11226/trunk/java/client/src/org/openqa/selenium/internal/selenesedriver/GetElementText.java END IsElementSelected.java K 25 svn:wc:ra_dav:version-url V 108 /svn/!svn/ver/11226/trunk/java/client/src/org/openqa/selenium/internal/selenesedriver/IsElementSelected.java END PK lC>8org/openqa/selenium/internal/selenesedriver/.svn/entries8 dir 11264 http://selenium.googlecode.com/svn/trunk/java/client/src/org/openqa/selenium/internal/selenesedriver http://selenium.googlecode.com/svn 2011-02-01T13:59:17.176547Z 11226 simon.m.stewart svn:special svn:externals svn:needs-lock 07704840-8298-11de-bf8c-fd130f914ac9 ElementFunction.java file 2011-02-03T12:01:16.000000Z e1f9b922a64afb9c3976c9c9c4430d79 2010-12-17T05:05:02.606282Z 10672 simon.m.stewart ClickElement.java file 2011-02-03T12:01:16.000000Z 2a3ac0baed7dd0d14eb74ff9919a3814 2010-03-13T21:05:51.939598Z 8500 simon.m.stewart IsElementEnabled.java file 2011-02-03T12:01:16.000000Z 2ad5b6ad01899a391db5fd12b09d2291 2010-03-13T21:05:51.939598Z 8500 simon.m.stewart ClearElement.java file 2011-02-03T12:01:16.000000Z ee7c1b9d2020143677c7ac7093f1f72c 2010-03-13T21:05:51.939598Z 8500 simon.m.stewart GetUrl.java file 2011-02-03T12:01:16.000000Z f6601ecc6a44c8170f84aa24a5f080bf 2010-12-10T19:38:54.265732Z 10618 simon.m.stewart AbstractElementFinder.java file 2011-02-03T12:01:16.000000Z a29a3fb08e94bc6dfbea6c253700e829 2011-01-28T13:35:16.578078Z 11170 simon.m.stewart GetCurrentUrl.java file 2011-02-03T12:01:16.000000Z bae458e5f6436e88345c463c519413a8 2010-03-13T21:05:51.939598Z 8500 simon.m.stewart Close.java file 2011-02-03T12:01:16.000000Z 3783fa1199c85659bc945c77dcec90c2 2011-01-31T17:32:21.487469Z 11209 simon.m.stewart SeleneseFunction.java file 2011-02-03T12:01:16.000000Z 7488d43871a9901d01bdb1e5291257e8 2010-03-13T21:05:51.939598Z 8500 simon.m.stewart GetTagName.java file 2011-02-03T12:01:16.000000Z bdb44a6e638ceab8ae735d13f91a2f9d 2010-03-13T21:05:51.939598Z 8500 simon.m.stewart GetElementAttribute.java file 2011-02-03T12:01:16.000000Z 20fcc3f0856eb8add08815217c047e59 2010-12-17T05:05:02.606282Z 10672 simon.m.stewart FindElements.java file 2011-02-03T12:01:16.000000Z c14a23f4c9e689be510cf6d113d22e8c 2011-01-28T13:35:16.578078Z 11170 simon.m.stewart SubmitElement.java file 2011-02-03T12:01:16.000000Z abd7a1d118a17d49149d4b948dcf851d 2010-11-12T20:22:26.905827Z 10307 simon.m.stewart SetElementSelected.java file 2011-02-03T12:01:16.000000Z bee3b7446addaa8fe005a98c9a4d3047 2010-03-13T21:05:51.939598Z 8500 simon.m.stewart SwitchToFrame.java file 2011-02-03T12:01:16.000000Z 602f690850715d4d051ecea613fec257 2010-12-08T10:35:42.087498Z 10557 jmleyba GetTitle.java file 2011-02-03T12:01:16.000000Z e762a90989d69f8c1770fb14ba6195b2 2010-03-13T21:05:51.939598Z 8500 simon.m.stewart IsElementDisplayed.java file 2011-02-03T12:01:16.000000Z d23e5507b62456d35085cbca1e9b9ce5 2010-03-13T21:05:51.939598Z 8500 simon.m.stewart QuitSelenium.java file 2011-02-03T12:01:16.000000Z 54ee8f29fae27c27d0a82e4545b34e8d 2010-03-13T21:05:51.939598Z 8500 simon.m.stewart ExecuteAsyncScript.java file 2011-02-03T12:01:16.000000Z 76ad94cd81ad258367ce83d628c7f122 2010-12-10T22:06:47.840312Z 10620 jmleyba SendKeys.java file 2011-02-03T12:01:16.000000Z 9b77862a37c03ff8ec38eb354a60c6af 2010-10-19T17:04:01.050820Z 10040 simon.m.stewart GetElementValue.java file 2011-02-03T12:01:16.000000Z 2d9c5e50783bd1309d14b8ee2526825b 2010-03-13T21:05:51.939598Z 8500 simon.m.stewart ExecuteScript.java file 2011-02-03T12:01:16.000000Z 209236ffd5b35769c369139a068531b3 2010-10-16T15:38:20.242544Z 9993 dawagner FindElement.java file 2011-02-03T12:01:16.000000Z f00db840c2928932a18e5b2d7868fa60 2011-01-28T13:35:16.578078Z 11170 simon.m.stewart ToggleElement.java file 2011-02-03T12:01:16.000000Z 93351af01c8a1b46c5150f368904f9f9 2010-03-13T21:05:51.939598Z 8500 simon.m.stewart build.desc file 2011-02-03T12:01:16.000000Z ee1c2a1691359a9f5b70e6ed17e56e2f 2011-02-01T13:59:17.176547Z 11226 simon.m.stewart GetPageSource.java file 2011-02-03T12:01:16.000000Z af4a139f2124c513bb6a1320e477a58c 2010-03-13T21:05:51.939598Z 8500 simon.m.stewart NewSession.java file 2011-02-03T12:01:16.000000Z 3faa0110aeb00db4915dba0ae86a6d53 2010-12-17T16:05:05.803832Z 10674 simon.m.stewart GetElementText.java file 2011-02-03T12:01:16.000000Z 83e9b3c86989921540ec56bb7e3341ec 2010-03-13T21:05:51.939598Z 8500 simon.m.stewart IsElementSelected.java file 2011-02-03T12:01:16.000000Z 371e2c06e2d68efce141497b0491e49c 2010-03-13T21:05:51.939598Z 8500 simon.m.stewart PK lC>G7org/openqa/selenium/internal/selenesedriver/.svn/format8 PK lC>   ^org/openqa/selenium/internal/selenesedriver/.svn/text-base/AbstractElementFinder.java.svn-base/* Copyright 2010 WebDriver committers Copyright 2010 Google Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package org.openqa.selenium.internal.selenesedriver; import static org.openqa.selenium.net.Urls.urlEncode; import com.google.common.collect.ImmutableMap; import com.thoughtworks.selenium.Selenium; import com.thoughtworks.selenium.SeleniumException; import java.io.UnsupportedEncodingException; import java.net.URLDecoder; import java.net.URLEncoder; import java.util.List; import java.util.Map; public abstract class AbstractElementFinder implements SeleneseFunction { private final static Map name2strategy = ImmutableMap.of( "class name", "className", "css selector", "css", "link text", "linkText", "partial link text", "partialLinkText", "tag name", "tagName"); private long implicitlyWait = 0; protected abstract T executeFind(Selenium selenium, String how, String using, String parentLocator); protected abstract T onFailure(String how, String using); protected Map newElement(String key) { String locator = "stored=" + urlEncode(key); return ImmutableMap.of("ELEMENT", locator); } public T apply(Selenium selenium, Map args) { String how = convertToStrategyName((String) args.get("using")); String using = (String) args.get("value"); String parentLocator = (String) args.get("id"); if (parentLocator == null) { parentLocator = "selenium.browserbot.getDocument()"; } else { try { parentLocator = "selenium.browserbot.findElement('" + URLDecoder.decode(parentLocator, "UTF-8") + "')"; } catch (UnsupportedEncodingException e) { e.printStackTrace(); //To change body of catch statement use File | Settings | File Templates. } } using = using.replaceAll("'", "\\\\'"); long startTime = System.currentTimeMillis(); do { try { T result = executeFind(selenium, how, using, parentLocator); if (result instanceof List && ((List) result).size() == 0) { continue; } return result; } catch (SeleniumException e) { // Ignore. The element couldn't be found } } while (System.currentTimeMillis() - startTime <= implicitlyWait); return onFailure(how, using); } public ImplicitWait implicitlyWait() { return new ImplicitWait(); } public class ImplicitWait implements SeleneseFunction { public Object apply(Selenium selenium, Map args) { AbstractElementFinder.this.implicitlyWait = ((Number) args.get("ms")).longValue(); return null; } } protected String convertToStrategyName(String using) { String strategy = name2strategy.get(using); return strategy != null ? strategy : using; } } PK lC>Uorg/openqa/selenium/internal/selenesedriver/.svn/text-base/ClearElement.java.svn-base/* Copyright 2007-2009 WebDriver committers Copyright 2007-2009 Google Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package org.openqa.selenium.internal.selenesedriver; import com.thoughtworks.selenium.Selenium; import java.util.Map; public class ClearElement extends ElementFunction { public Void apply(Selenium selenium, Map args) { selenium.type(getLocator(args), ""); return null; } } PK lC>2ǩUorg/openqa/selenium/internal/selenesedriver/.svn/text-base/ClickElement.java.svn-base/* Copyright 2007-2009 WebDriver committers Copyright 2007-2009 Google Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package org.openqa.selenium.internal.selenesedriver; import com.thoughtworks.selenium.Selenium; import java.util.Map; public class ClickElement extends ElementFunction { public Void apply(Selenium selenium, Map args) { selenium.click(getLocator(args)); return null; } } PK lC>0܎"Norg/openqa/selenium/internal/selenesedriver/.svn/text-base/Close.java.svn-base/* Copyright 2010 WebDriver committers Copyright 2010 Google Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package org.openqa.selenium.internal.selenesedriver; import java.util.Map; import com.thoughtworks.selenium.Selenium; import com.thoughtworks.selenium.SeleniumException; public class Close implements SeleneseFunction { public Void apply(Selenium selenium, Map args) { selenium.close(); // WebDriver quits the browser once all windows are closed. String[] allWindowIds = selenium.getAllWindowIds(); if (allWindowIds.length == 1) { boolean open = true; try { // Hilariously, this script will detonate if the window has been closed selenium.getEval("selenium.browserbot.getCurrentWindow().closed"); } catch (SeleniumException e) { open = false; } if (!open) { selenium.stop(); } } return null; } } PK lC>2Xorg/openqa/selenium/internal/selenesedriver/.svn/text-base/ElementFunction.java.svn-base/* Copyright 2007-2009 WebDriver committers Copyright 2007-2009 Google Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package org.openqa.selenium.internal.selenesedriver; import org.openqa.selenium.WebDriverException; import java.io.UnsupportedEncodingException; import java.net.URLDecoder; import java.util.Map; public abstract class ElementFunction implements SeleneseFunction { public String getLocator(Map parameters) { String locator = (String) parameters.get("id"); try { return URLDecoder.decode(locator, "utf-8"); } catch (UnsupportedEncodingException e) { // Should never happen throw new WebDriverException(e); } } protected String escape(String toEscape) { return toEscape.replaceAll("'", "\\\\'"); } } PK lC> [org/openqa/selenium/internal/selenesedriver/.svn/text-base/ExecuteAsyncScript.java.svn-base/* Copyright 2007-2010 WebDriver committers Copyright 2007-2010 Google Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package org.openqa.selenium.internal.selenesedriver; import org.openqa.selenium.TimeoutException; import org.openqa.selenium.WebDriverException; import com.google.common.base.Joiner; import com.thoughtworks.selenium.Selenium; import com.thoughtworks.selenium.SeleniumException; import org.json.JSONException; import org.json.JSONObject; import org.json.JSONWriter; import java.io.StringWriter; import java.util.List; import java.util.Map; public class ExecuteAsyncScript implements SeleneseFunction { private long timeoutMillis = 0; public Object apply(Selenium selenium, Map parameters) { StringWriter sw = new StringWriter(); try { new JSONWriter(sw) .object() .key("script").value(parameters.get("script")) .key("args").value(parameters.get("args")) .key("timeout").value(timeoutMillis) .endObject(); } catch (JSONException e) { throw new WebDriverException(e); } String script = "core.script.execute(" + sw + ")"; String value; try { value = selenium.getEval(script); } catch (SeleniumException e) { if (e.getMessage().startsWith("ScriptTimeoutError")) { throw new TimeoutException(e.getMessage(), e); } throw e; } return populateReturnValue(value); } private String getArgumentValue(Object arg) { if (arg == null) { return null; } else if (arg instanceof String) { return String.format("'%s'", ((String) arg).replaceAll("'", "\\'")); } else { return String.valueOf(arg); } } private Object populateReturnValue(String value) { if ("__undefined__".equals(value)) { return null; } else if (value.matches("^\\d+$")) { return Long.parseLong(value); } else if (value.matches("^\\d+\\.\\d+$")) { return Double.parseDouble(value); } else if ("true".equals(value) || "false".equals(value)) { return Boolean.parseBoolean(value); } else { // Falll back to a string return value; } } public SeleneseFunction setScriptTimeout() { return new SeleneseFunction() { public Object apply(Selenium selenium, Map args) { ExecuteAsyncScript.this.timeoutMillis = ((Number) args.get("ms")).longValue(); return null; } }; } } PK lC>kd. . Vorg/openqa/selenium/internal/selenesedriver/.svn/text-base/ExecuteScript.java.svn-base/* Copyright 2007-2009 WebDriver committers Copyright 2007-2009 Google Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package org.openqa.selenium.internal.selenesedriver; import com.thoughtworks.selenium.Selenium; import java.util.List; import java.util.Map; public class ExecuteScript implements SeleneseFunction { public Object apply(Selenium selenium, Map args) { String script = prepareScript(args); String value = selenium.getEval(script); return populateReturnValue(value); } private String prepareScript(Map parameters) { String script = (String) parameters.get("script"); script = String.format("(function() { %s })();", script) .replaceAll("\\bwindow\\.", "selenium.browserbot.getCurrentWindow().") .replaceAll("\\bdocument\\.", "selenium.browserbot.getDocument()."); List args = (List) parameters.get("args"); if (!args.isEmpty()) { for (int i = 0; i < args.size(); i++) { script = script.replaceAll("arguments\\[\\s*" + i + "\\s*\\]", getArgumentValue(args.get(i))); } } return script; } private String getArgumentValue(Object arg) { if (arg == null) { return null; } else if (arg instanceof String) { return String.format("'%s'", ((String) arg).replaceAll("'", "\\'")); } else { return String.valueOf(arg); } } private Object populateReturnValue(String value) { if ("__undefined__".equals(value)) { return null; } else if (value.matches("^\\d+$")) { return Long.parseLong(value); } else if (value.matches("^\\d+\\.\\d+$")) { return Double.parseDouble(value); } else if ("true".equals(value) || "false".equals(value)) { return Boolean.parseBoolean(value); } else { // Falll back to a string return value; } } } PK lC>v  Torg/openqa/selenium/internal/selenesedriver/.svn/text-base/FindElement.java.svn-base/* Copyright 2007-2009 WebDriver committers Copyright 2007-2009 Google Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package org.openqa.selenium.internal.selenesedriver; import com.thoughtworks.selenium.Selenium; import org.openqa.selenium.NoSuchElementException; import java.util.Map; public class FindElement extends AbstractElementFinder> { private final static String SCRIPT = "var by = {}; by['%s'] = '%s'; " + "var e = bot.locators.findElement(by, %s);" + "bot.inject.cache.addElement(e);"; @Override protected Map executeFind(Selenium selenium, String how, String using, String parentLocator) { String locator = String.format(SCRIPT, how, using, parentLocator); String key = selenium.getEval(locator); return newElement(key); } @Override protected Map onFailure(String how, String using) { throw new NoSuchElementException( String.format("No elements were found: %s=%s ", how, using)); } } PK lC>L&CCUorg/openqa/selenium/internal/selenesedriver/.svn/text-base/FindElements.java.svn-base/* Copyright 2010 WebDriver committers Copyright 2010 Google Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package org.openqa.selenium.internal.selenesedriver; import com.google.common.base.Splitter; import com.google.common.collect.Lists; import com.thoughtworks.selenium.Selenium; import java.util.List; import java.util.Map; public class FindElements extends AbstractElementFinder>> { private static final String SCRIPT = "selenium.browserbot.findElementsLikeWebDriver('%s', '%s', %s);"; @Override protected List> executeFind(Selenium selenium, String how, String using, String parentLocator) { String result = selenium.getEval(String.format(SCRIPT, how, using, parentLocator)); Iterable allKeys = Splitter.on(",").split(result); List> toReturn = Lists.newArrayList(); for (String key : allKeys) { toReturn.add(newElement(key)); } return toReturn; } @Override protected List> onFailure(String how, String using) { return Lists.newArrayList(); } } PK lC>UVorg/openqa/selenium/internal/selenesedriver/.svn/text-base/GetCurrentUrl.java.svn-base/* Copyright 2007-2009 WebDriver committers Copyright 2007-2009 Google Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package org.openqa.selenium.internal.selenesedriver; import com.thoughtworks.selenium.Selenium; import java.util.Map; public class GetCurrentUrl implements SeleneseFunction { public String apply(Selenium selenium, Map args) { return selenium.getLocation(); } } PK lC>t\org/openqa/selenium/internal/selenesedriver/.svn/text-base/GetElementAttribute.java.svn-base/* Copyright 2007-2009 WebDriver committers Copyright 2007-2009 Google Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package org.openqa.selenium.internal.selenesedriver; import com.thoughtworks.selenium.Selenium; import java.util.Map; public class GetElementAttribute extends ElementFunction { public String apply(Selenium selenium, Map args) { String locator = getLocator(args); String name = (String) args.get("name"); String script = String.format( "var e = selenium.browserbot.findElement('%s');" + "webdriver.element.getAttribute(e, '%s');", locator, escape(name)); String result = selenium.getEval(script); return "null".equals(result) ? null : result; } } PK lC>XWorg/openqa/selenium/internal/selenesedriver/.svn/text-base/GetElementText.java.svn-base/* Copyright 2007-2009 WebDriver committers Copyright 2007-2009 Google Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package org.openqa.selenium.internal.selenesedriver; import com.thoughtworks.selenium.Selenium; import java.util.Map; public class GetElementText extends ElementFunction { public String apply(Selenium selenium, Map args) { String locator = getLocator(args); return selenium.getText(locator); } } PK lC>UXorg/openqa/selenium/internal/selenesedriver/.svn/text-base/GetElementValue.java.svn-base/* Copyright 2007-2009 WebDriver committers Copyright 2007-2009 Google Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package org.openqa.selenium.internal.selenesedriver; import com.thoughtworks.selenium.Selenium; import java.util.Map; public class GetElementValue extends ElementFunction { public String apply(Selenium selenium, Map args) { String locator = getLocator(args); return selenium.getValue(locator); } } PK lC>yVVorg/openqa/selenium/internal/selenesedriver/.svn/text-base/GetPageSource.java.svn-base/* Copyright 2007-2009 WebDriver committers Copyright 2007-2009 Google Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package org.openqa.selenium.internal.selenesedriver; import com.thoughtworks.selenium.Selenium; import java.util.Map; public class GetPageSource implements SeleneseFunction { public String apply(Selenium selenium, Map args) { return selenium.getHtmlSource(); } } PK lC>Sorg/openqa/selenium/internal/selenesedriver/.svn/text-base/GetTagName.java.svn-base/* Copyright 2007-2009 WebDriver committers Copyright 2007-2009 Google Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package org.openqa.selenium.internal.selenesedriver; import com.thoughtworks.selenium.Selenium; import java.util.Map; public class GetTagName extends ElementFunction { public String apply(Selenium selenium, Map args) { String locator = getLocator(args); String value = selenium.getEval(getTagNameJs.replace("LOCATOR", locator)); return value == null ? null : value.toLowerCase(); } private static String getTagNameJs = "(function tagName() {" + " return selenium.browserbot.findElement('LOCATOR').tagName;" + "})();"; } PK lC>.F=,Qorg/openqa/selenium/internal/selenesedriver/.svn/text-base/GetTitle.java.svn-base/* Copyright 2007-2009 WebDriver committers Copyright 2007-2009 Google Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package org.openqa.selenium.internal.selenesedriver; import com.thoughtworks.selenium.Selenium; import java.util.Map; public class GetTitle implements SeleneseFunction { public String apply(Selenium selenium, Map args) { return selenium.getTitle(); } } PK lC>Oorg/openqa/selenium/internal/selenesedriver/.svn/text-base/GetUrl.java.svn-base/* Copyright 2007-2009 WebDriver committers Copyright 2007-2009 Google Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package org.openqa.selenium.internal.selenesedriver; import com.thoughtworks.selenium.Selenium; import com.thoughtworks.selenium.SeleniumException; import java.util.Map; public class GetUrl implements SeleneseFunction { public Void apply(Selenium selenium, Map args) { selenium.open((String) args.get("url"), "true"); // WebDriver blocks until the page is loaded. try { selenium.waitForPageToLoad("30"); } catch (SeleniumException e) { // Well, we say webdriver blocks, it doesn't always. } return null; } } PK lC>[org/openqa/selenium/internal/selenesedriver/.svn/text-base/IsElementDisplayed.java.svn-base/* Copyright 2007-2009 WebDriver committers Copyright 2007-2009 Google Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package org.openqa.selenium.internal.selenesedriver; import com.thoughtworks.selenium.Selenium; import java.util.Map; public class IsElementDisplayed extends ElementFunction { public Boolean apply(Selenium selenium, Map args) { String locator = getLocator(args); return selenium.isVisible(locator); } } PK lC>Yorg/openqa/selenium/internal/selenesedriver/.svn/text-base/IsElementEnabled.java.svn-base/* Copyright 2007-2009 WebDriver committers Copyright 2007-2009 Google Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package org.openqa.selenium.internal.selenesedriver; import com.thoughtworks.selenium.Selenium; import java.util.Map; public class IsElementEnabled extends ElementFunction { public Boolean apply(Selenium selenium, Map args) { String locator = getLocator(args); return selenium.isEditable(locator); } } PK lC>N1Zorg/openqa/selenium/internal/selenesedriver/.svn/text-base/IsElementSelected.java.svn-base/* Copyright 2007-2009 WebDriver committers Copyright 2007-2009 Google Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package org.openqa.selenium.internal.selenesedriver; import com.thoughtworks.selenium.Selenium; import java.util.Map; public class IsElementSelected extends ElementFunction { public Boolean apply(Selenium selenium, Map args) { String locator = getLocator(args); // What are we dealing with? String value = selenium.getEval(selectedJs.replace("LOCATOR", locator)); return Boolean.valueOf(value); } private final String selectedJs = "(function isSelected() { " + " var e = selenium.browserbot.findElement('LOCATOR'); " + " if ('OPTION' == e.tagName) return e.selected ? 'true' : 'false'; " + " if (e.type == 'checkbox' || e.type == 'radio') return !!e.checked ? 'true' : 'false'; " + " return 'false'" + "})()"; } PK lC>[[Sorg/openqa/selenium/internal/selenesedriver/.svn/text-base/NewSession.java.svn-base/* Copyright 2007-2009 WebDriver committers Copyright 2007-2009 Google Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package org.openqa.selenium.internal.selenesedriver; import com.thoughtworks.selenium.Selenium; import org.openqa.selenium.Capabilities; import org.openqa.selenium.Platform; import java.util.HashMap; import java.util.Map; public class NewSession implements SeleneseFunction> { public Map apply(Selenium selenium, Map args) { selenium.start(); // Emulate behaviour of webdriver selenium.useXpathLibrary("javascript-xpath"); selenium.allowNativeXpath("true"); Capabilities capabilities = (Capabilities) args.get("desiredCapabilities"); Map seenCapabilities = new HashMap(); seenCapabilities.put("browserName", capabilities.getBrowserName()); seenCapabilities.put("version", capabilities.getVersion()); seenCapabilities.put("platform", Platform.getCurrent().toString()); seenCapabilities.put("javascriptEnabled", true); return seenCapabilities; } } PK lC>Uorg/openqa/selenium/internal/selenesedriver/.svn/text-base/QuitSelenium.java.svn-base/* Copyright 2007-2009 WebDriver committers Copyright 2007-2009 Google Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package org.openqa.selenium.internal.selenesedriver; import com.thoughtworks.selenium.Selenium; import java.util.Map; public class QuitSelenium implements SeleneseFunction { public Void apply(Selenium selenium, Map args) { selenium.stop(); return null; } } PK lC>;(MMYorg/openqa/selenium/internal/selenesedriver/.svn/text-base/SeleneseFunction.java.svn-base/* Copyright 2007-2009 WebDriver committers Copyright 2007-2009 Google Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package org.openqa.selenium.internal.selenesedriver; import com.thoughtworks.selenium.Selenium; import java.util.Map; public interface SeleneseFunction { T apply(Selenium selenium, Map args); } PK lC>   Qorg/openqa/selenium/internal/selenesedriver/.svn/text-base/SendKeys.java.svn-base/* Copyright 2007-2009 WebDriver committers Copyright 2007-2009 Google Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package org.openqa.selenium.internal.selenesedriver; import com.thoughtworks.selenium.Selenium; import com.thoughtworks.selenium.SeleniumException; import java.io.File; import java.net.MalformedURLException; import java.util.Map; public class SendKeys extends ElementFunction { public Void apply(Selenium selenium, Map args) { String locator = getLocator(args); CharSequence[] allKeys = (CharSequence[]) args.get("value"); StringBuilder builder = new StringBuilder(); for (CharSequence seq : allKeys) { builder.append(seq); } if (isFileInput(selenium, locator)) { String toType = builder.toString(); if (isLocalFile(toType)) { toType = convertToFileUrl(toType); } selenium.attachFile(locator, toType); } else { selenium.typeKeys(locator, builder.toString()); } return null; } private String convertToFileUrl(String toType) { try { return new File(toType).toURL().toString(); } catch (MalformedURLException e) { throw new SeleniumException("Cannot convert file to file url: " + toType); } } private boolean isFileInput(Selenium selenium, String locator) { try { String type = selenium.getAttribute(locator + "@type"); return "file".equals(type.toLowerCase()); } catch (SeleniumException e) { // Thrown if the "type" attribute is omitted. By definition, this means // that the element is not a file input element return false; } } private boolean isLocalFile(String name) { File file = new File(name); return file.exists() && file.canRead(); } } PK lC>08m[org/openqa/selenium/internal/selenesedriver/.svn/text-base/SetElementSelected.java.svn-base/* Copyright 2007-2009 WebDriver committers Copyright 2007-2009 Google Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package org.openqa.selenium.internal.selenesedriver; import com.thoughtworks.selenium.Selenium; import org.openqa.selenium.WebDriverException; import java.util.Map; public class SetElementSelected extends ElementFunction { public Void apply(Selenium selenium, Map args) { String locator = getLocator(args); String tagName = new GetTagName().apply(selenium, args); if ("option".equals(tagName)) { throw new WebDriverException("Selecting options is currently unsupported"); } if ("input".equals(tagName)) { if (selenium.isEditable(locator)) { selenium.check(locator); } else { throw new UnsupportedOperationException("Element is not selectable: " + locator); } } else { throw new UnsupportedOperationException("Element is not selectable: " + locator); } return null; } } PK lC>ˑibbVorg/openqa/selenium/internal/selenesedriver/.svn/text-base/SubmitElement.java.svn-base/* Copyright 2007-2009 WebDriver committers Copyright 2007-2009 Google Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package org.openqa.selenium.internal.selenesedriver; import com.thoughtworks.selenium.Selenium; import org.openqa.selenium.WebDriverException; import java.util.Map; public class SubmitElement extends ElementFunction { public Void apply(Selenium selenium, Map args) { String locator = getLocator(args).replace("'", "\\'"); String eval = submitJs.replace("LOCATOR", locator); String result = selenium.getEval(eval); if (!"true".equals(result)) { throw new WebDriverException(result); } // Turns out that on Firefox, the load may not have started. Rest for a very // short time to let it being. sleep(100); return null; } private void sleep(long timeout) { try { Thread.sleep(timeout); } catch (InterruptedException e) { throw new WebDriverException(e); } } private final String submitJs = "(function submit() { " + "var curr = selenium.browserbot.findElement('LOCATOR'); " + "while (curr != null && curr.tagName != 'FORM') {" + " curr = curr.parentNode || curr.parentElement; " + "} " + "if (curr) { curr.submit(); return 'true'; } " + "return 'false'; " + "})()"; } PK lC>-Vorg/openqa/selenium/internal/selenesedriver/.svn/text-base/SwitchToFrame.java.svn-base/* Copyright 2007-2009 WebDriver committers Copyright 2007-2009 Google Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package org.openqa.selenium.internal.selenesedriver; import org.openqa.selenium.NoSuchFrameException; import org.openqa.selenium.WebDriverException; import com.thoughtworks.selenium.Selenium; import com.thoughtworks.selenium.SeleniumException; import java.io.UnsupportedEncodingException; import java.net.URLDecoder; import java.util.Map; public class SwitchToFrame implements SeleneseFunction { public Void apply(Selenium selenium, Map args) { Object id = args.get("id"); if (id == null) { selenium.selectFrame("relative=top"); return null; } try { if (id instanceof Number) { selenium.selectFrame("index=" + ((Number) id).longValue()); } else if (id instanceof String) { selenium.selectFrame((String) id); } else if (id instanceof Map) { @SuppressWarnings({"unchecked"}) String locator = getLocator((Map) id); selenium.selectFrame(locator); } else { throw new IllegalArgumentException("Illegal frame switch target: (" + id.getClass().getName() + ") " + id); } } catch (SeleniumException e) { throw new NoSuchFrameException(e.getMessage(), e); } return null; } private String getLocator(Map elementMap) { if (elementMap.containsKey("ELEMENT")) { try { return URLDecoder.decode((String) elementMap.get("ELEMENT"), "utf-8"); } catch (UnsupportedEncodingException e) { // Should never happen. throw new WebDriverException(e); } } // Should never happen throw new IllegalArgumentException("Map does not define a WebElement"); } } PK lC>{w77Vorg/openqa/selenium/internal/selenesedriver/.svn/text-base/ToggleElement.java.svn-base/* Copyright 2007-2009 WebDriver committers Copyright 2007-2009 Google Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package org.openqa.selenium.internal.selenesedriver; import com.thoughtworks.selenium.Selenium; import java.util.Map; public class ToggleElement extends ElementFunction { public Boolean apply(Selenium selenium, Map args) { String locator = getLocator(args); String type = selenium.getAttribute(locator + "@type"); if ("radio".equalsIgnoreCase(type)) { throw new UnsupportedOperationException("You may not toggle a radio button"); } boolean wasChecked = selenium.isChecked(locator); if (wasChecked) { selenium.uncheck(locator); } else { selenium.check(locator); } return selenium.isChecked(locator); } } PK lC>,  Norg/openqa/selenium/internal/selenesedriver/.svn/text-base/build.desc.svn-base java_library(name = "selenesedriver", srcs = [ "*.java", ], deps = [ "//java/client/src/com/thoughtworks/selenium", "//java/client/src/org/openqa/selenium:webdriver-api", "//third_party/java/guava-libraries", "//third_party/java/json", ]) PK (hC>,  6org/openqa/selenium/internal/selenesedriver/build.desc java_library(name = "selenesedriver", srcs = [ "*.java", ], deps = [ "//java/client/src/com/thoughtworks/selenium", "//java/client/src/org/openqa/selenium:webdriver-api", "//third_party/java/guava-libraries", "//third_party/java/json", ]) PK %^D>yp 9org/openqa/selenium/remote/SimplePropertyDescriptor.class13org/openqa/selenium/remote/SimplePropertyDescriptorjava/lang/ObjectnameLjava/lang/String; readMethodLjava/lang/reflect/Method; writeMethod()VCode  LineNumberTableLocalVariableTablethis5Lorg/openqa/selenium/remote/SimplePropertyDescriptor;I(Ljava/lang/String;Ljava/lang/reflect/Method;Ljava/lang/reflect/Method;)V      getName()Ljava/lang/String; getReadMethod()Ljava/lang/reflect/Method;getWriteMethodgetPropertyDescriptorsI(Ljava/lang/Class;)[Lorg/openqa/selenium/remote/SimplePropertyDescriptor; Signature^(Ljava/lang/Class<+Ljava/lang/Object;>;)[Lorg/openqa/selenium/remote/SimplePropertyDescriptor;$java/util/HashMap # ')(java/lang/Class *+ getMethods()[Ljava/lang/reflect/Method; -/.java/lang/reflect/Method  132java/lang/String 45length()I7is 19 :; startsWith(Ljava/lang/String;)Z 1= >? substring(I)Ljava/lang/String; A BC uncapitalize&(Ljava/lang/String;)Ljava/lang/String; #E FG containsKey(Ljava/lang/Object;)Z #I JKget&(Ljava/lang/Object;)Ljava/lang/Object; M  #O PQput8(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;JThasVset #X Y5size #[ \]values()Ljava/util/Collection; _a`java/util/Collection bctoArray(([Ljava/lang/Object;)[Ljava/lang/Object;e6[Lorg/openqa/selenium/remote/SimplePropertyDescriptor;clazzLjava/lang/Class; propertiesLjava/util/HashMap;m methodName propertyNamepdsArrayLocalVariableTypeTable&Ljava/lang/Class<+Ljava/lang/Object;>;\Ljava/util/HashMap;rjava/lang/StringBuilder 1t >u(II)Ljava/lang/String; 1w x toLowerCase 1z {|valueOf&(Ljava/lang/Object;)Ljava/lang/String; q~ (Ljava/lang/String;)V q append-(Ljava/lang/String;)Ljava/lang/StringBuilder; q toStrings SourceFileSimplePropertyDescriptor.java!   /*    l* *+*,*- !"*  /*%  /*)  /*-   !" #Y%L*&Y:6>2M,,:0C689<@:+D+H,+Y,LNW0<@:R8 S8.+D+H,+Y,LNWU8.+D+H,+Y,LNW+WM+Z,^d^2134"556@7I8Y:k<t=w?@ABDFGHJ3MNHfg hij"k@+ltlmenfo hp BC IqY*svy}*<R PK %^D>XX2org/openqa/selenium/remote/AugmenterProvider.class1 ,org/openqa/selenium/remote/AugmenterProviderjava/lang/ObjectgetDescribedInterface()Ljava/lang/Class; Signature()Ljava/lang/Class<*>;getImplementationH(Ljava/lang/Object;)Lorg/openqa/selenium/remote/InterfaceImplementation; SourceFileAugmenterProvider.java   PK %^D>l))4org/openqa/selenium/remote/JsonToBeanConverter.class1.org/openqa/selenium/remote/JsonToBeanConverterjava/lang/Object()VCode  LineNumberTableLocalVariableTablethis0Lorg/openqa/selenium/remote/JsonToBeanConverter;convert7(Ljava/lang/Class;Ljava/lang/Object;)Ljava/lang/Object; Exceptions(org/openqa/selenium/remote/JsonException SignatureC(Ljava/lang/Class;Ljava/lang/Object;)TT;  8(Ljava/lang/Class;Ljava/lang/Object;I)Ljava/lang/Object;  (Lorg/json/JSONException;)Vorg/json/JSONExceptionclazzLjava/lang/Class;textLjava/lang/Object;eLorg/json/JSONException;LocalVariableTypeTableLjava/lang/Class;D(Ljava/lang/Class;Ljava/lang/Object;I)TT;'java/lang/String ) *+equals(Ljava/lang/Object;)Z - ./ isPrimitive(Ljava/lang/Class;)Z1java/lang/Number3java/lang/Double5java/lang/Float &7 89valueOf&(Ljava/lang/Object;)Ljava/lang/String; 2; 8<&(Ljava/lang/String;)Ljava/lang/Double; >@?java/lang/Long 8A$(Ljava/lang/String;)Ljava/lang/Long; C DEgetClass()Ljava/lang/Class; G HIisEnum&(Ljava/lang/Class;Ljava/lang/Object;)Z K LM convertEnum5(Ljava/lang/Class;Ljava/lang/Object;)Ljava/lang/Enum;O &)R"org/openqa/selenium/remote/CommandTorg/json/JSONObject SV W(Ljava/lang/String;)VY sessionId S[ \]has(Ljava/lang/String;)Z_$org/openqa/selenium/remote/SessionId Sa bc getString&(Ljava/lang/String;)Ljava/lang/String;enameg parametersijava/util/HashMap Sk lm getJSONObject)(Ljava/lang/String;)Lorg/json/JSONObject;o java/util/Map Qq rJ(Lorg/openqa/selenium/remote/SessionId;Ljava/lang/String;Ljava/util/Map;)V Qt u;(Lorg/openqa/selenium/remote/SessionId;Ljava/lang/String;)Vwvalue ^Vz org/openqa/selenium/Capabilities|.org/openqa/selenium/remote/DesiredCapabilities { S keys()Ljava/util/Iterator; java/util/Iterator next()Ljava/lang/Object; S get&(Ljava/lang/String;)Ljava/lang/Object; {  setCapability'(Ljava/lang/String;Ljava/lang/Object;)V hasNext()Z5org/openqa/selenium/browserlaunchers/DoNotUseProxyPac  directUrls S  getJSONArray((Ljava/lang/String;)Lorg/json/JSONArray; org/json/JSONArray b(I)Ljava/lang/String; mapW(Ljava/lang/String;)Lorg/openqa/selenium/browserlaunchers/DoNotUseProxyPac$ProxyUrlVia; Aorg/openqa/selenium/browserlaunchers/DoNotUseProxyPac$ProxyUrlVia  toNoProxy9()Lorg/openqa/selenium/browserlaunchers/DoNotUseProxyPac; length()I directHosts mapHostX(Ljava/lang/String;)Lorg/openqa/selenium/browserlaunchers/DoNotUseProxyPac$ProxyHostVia; Borg/openqa/selenium/browserlaunchers/DoNotUseProxyPac$ProxyHostVia proxiedHosts toProxyK(Ljava/lang/String;)Lorg/openqa/selenium/browserlaunchers/DoNotUseProxyPac; proxiedUrls proxiedRegexUrls defaultProxy'DIRECT' defaultsF()Lorg/openqa/selenium/browserlaunchers/DoNotUseProxyPac$DefaultProxy; Borg/openqa/selenium/browserlaunchers/DoNotUseProxyPac$DefaultProxy  deriveFrom java/net/URI V G(Ljava/net/URI;)Lorg/openqa/selenium/browserlaunchers/DoNotUseProxyPac;&org/openqa/selenium/WebDriverException (Ljava/lang/Throwable;)Vjava/util/Date >  longValue()J (J)V{ & ] startsWith   convertList'(Lorg/json/JSONArray;I)Ljava/util/List; S NULL[ V java/lang/Class /isAssignableFrom   convertMap'(Lorg/json/JSONObject;I)Ljava/util/Map;   convertBean;(Ljava/lang/Class;Lorg/json/JSONObject;I)Ljava/lang/Object;java/net/URISyntaxExceptiondepthI rawCommandLorg/json/JSONObject;&Lorg/openqa/selenium/remote/SessionId;Ljava/lang/String;argsLjava/util/Map;objectcaps0Lorg/openqa/selenium/remote/DesiredCapabilities;allKeysLjava/util/Iterator;keypac7Lorg/openqa/selenium/browserlaunchers/DoNotUseProxyPac;allUrlsLorg/json/JSONArray;iallHostsproxiedhostLjava/net/URISyntaxException;o$Ljava/util/Map;  H  "!java/lang/Enum 8#5(Ljava/lang/Class;Ljava/lang/String;)Ljava/lang/Enum; % &' getClasses()[Ljava/lang/Class; allClasses[Ljava/lang/Class;current)(Ljava/lang/Class<*>;Ljava/lang/Object;)ZLjava/lang/Class<*>;G(Ljava/lang/Class;Lorg/json/JSONObject;I)TT; / 01 newInstance%(Ljava/lang/Class;)Ljava/lang/Object; 3543org/openqa/selenium/remote/SimplePropertyDescriptor 67getPropertyDescriptorsI(Ljava/lang/Class;)[Lorg/openqa/selenium/remote/SimplePropertyDescriptor; 39 :;getName()Ljava/lang/String; 3= >?getWriteMethod()Ljava/lang/reflect/Method; ACBjava/lang/reflect/Method D'getParameterTypes AF GHinvoke9(Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/Object; J KLpropertyWriteException(Lorg/openqa/selenium/remote/SimplePropertyDescriptor;Ljava/lang/Object;Ljava/lang/Class;Ljava/lang/Throwable;)Lorg/openqa/selenium/WebDriverException;N java/lang/IllegalAccessExceptionP+java/lang/reflect/InvocationTargetException toConvertt allProperties6[Lorg/openqa/selenium/remote/SimplePropertyDescriptor;property5Lorg/openqa/selenium/remote/SimplePropertyDescriptor;writeLjava/lang/reflect/Method;type"Ljava/lang/IllegalAccessException;-Ljava/lang/reflect/InvocationTargetException;TT;1(Ljava/lang/Class;)TT; _ 0a java/lang/InstantiationException"Ljava/lang/InstantiationException;(Lorg/openqa/selenium/remote/SimplePropertyDescriptor;Ljava/lang/Object;Ljava/lang/Class<*>;Ljava/lang/Throwable;)Lorg/openqa/selenium/WebDriverException;e#Property name: %s -> %s on class %s &g hiformat9(Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/String; k l*(Ljava/lang/String;Ljava/lang/Throwable;)VcauseLjava/lang/Throwable; h nq rsput8(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object; allEntriesvjava/util/ArrayList ux y(I)V { |(I)Ljava/lang/Object; u~ +addlistLjava/util/ArrayList;(Ljava/lang/Class<*>;)Z  .java/lang/Booleanjava/lang/Bytejava/lang/Characterjava/lang/Integerjava/lang/Shortjava/lang/Void SourceFileJsonToBeanConverter.java InnerClasses DefaultProxy ProxyHostVia ProxyUrlVia! /* &  |*+,NY- *+ , *   !"# $%4 ,&+(,*+,,,0!,2 ,4 ,6:,6=*,B,,*+,F *+,JN,6P,Q+(tSY,&U::XZ*^X``^:d`:fZ&*hfj`n:QYpQYs^+(#SY,&U:v`:^Yxy+(JSY,&U:{Y}:~:&:+(SY,&U:Y:Z/:6WZ/:6WZ>j:~:!&:`WZ>j:~:!&:`W¶Z>¶j:~:!&:`WĶZ.Ķ`PȶWĶ`WжZ&Yж`ԶW:Yڿ+(Y,6=߷,!,&,&+(,, *,,5,1,&*,&Y,&MSY,6UM,SC,S:n+ **B,+( **+,*,`,  n2367:;>"@0A8C@FKGMJVK]NiOkRtSUVWZ[\]\^adefgjk$l-m4n7oCpQn[r^ugvtw}yz{|{$.8AHKWis}&8QXZakrtx 8  daY9e     w $: -1 4*C t }# # 2+ A2H+W 2+  !:#$ LMG+ +,6+$N-Y:662: ,6 ")1;E 4G GG 2())*HI+b+ ,     # ,- *+.:+2:Y: 66z 2:,8Za,8: <:  G @2:  Y*  `SEW!: *   I: *   ITnqMTnO J ".1<CHK T qs z QR  ST"mUV<Sw CLWX T;Y s !Z ![ # $R\T;Y, 01]+^MY,ڿMY,ڿ`M  *  !b !Z# $KLc#YdY+8SY,SY-Sfj $%&$ 4# #UV#w #Y#mn# #Y,AhYoN+~:'&:-*+`pW- +-./05.?3 >A AQA9 3t 4uY+wN6-*+z`}W+- 8 9:&92< 44 4Q4 (#./ t++++2+4++>+++ VAB EFIJ!M+N-Q6R8UAVCYMZO]X^Zadbfepfri t t# t,PK %^D>%1org/openqa/selenium/remote/RemoteWebElement.class1+org/openqa/selenium/remote/RemoteWebElementjava/lang/Objectorg/openqa/selenium/WebElement,org/openqa/selenium/internal/FindsByLinkText &org/openqa/selenium/internal/FindsById (org/openqa/selenium/internal/FindsByName+org/openqa/selenium/internal/FindsByTagName-org/openqa/selenium/internal/FindsByClassName/org/openqa/selenium/internal/FindsByCssSelector)org/openqa/selenium/internal/FindsByXPath(org/openqa/selenium/internal/WrapsDriveridLjava/lang/String;parent,Lorg/openqa/selenium/remote/RemoteWebDriver;mouse8Lorg/openqa/selenium/remote/RemoteWebDriver$RemoteMouse;()VCode ! LineNumberTableLocalVariableTablethis-Lorg/openqa/selenium/remote/RemoteWebElement; setParent/(Lorg/openqa/selenium/remote/RemoteWebDriver;)V )  +-,*org/openqa/selenium/remote/RemoteWebDriver ./getMouse()Lorg/openqa/selenium/Mouse;16org/openqa/selenium/remote/RemoteWebDriver$RemoteMouse 3 getId()Ljava/lang/String; 7 setId(Ljava/lang/String;)Vclick< clickElement ?A@&com/google/common/collect/ImmutableMap BCofN(Ljava/lang/Object;Ljava/lang/Object;)Lcom/google/common/collect/ImmutableMap; E FGexecuteH(Ljava/lang/String;Ljava/util/Map;)Lorg/openqa/selenium/remote/Response;submitJ submitElementgetValueMgetElementValue OQP#org/openqa/selenium/remote/Response KR()Ljava/lang/Object;Tjava/lang/StringsendKeys([Ljava/lang/CharSequence;)VXsendKeysToElementZvalue ?\ B]r(Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;)Lcom/google/common/collect/ImmutableMap; keysToSend[Ljava/lang/CharSequence;clearb clearElement getTagNameegetElementTagName getAttribute&(Ljava/lang/String;)Ljava/lang/String;igetElementAttributekname Sm novalueOf&(Ljava/lang/Object;)Ljava/lang/String;Ljava/lang/Object;toggle()Zt toggleElementvjava/lang/Boolean ux yr booleanValue isSelected|isElementSelected setSelectedsetElementSelected isEnabledisElementEnabledgetTextgetElementTextresponse%Lorg/openqa/selenium/remote/Response; findElements*(Lorg/openqa/selenium/By;)Ljava/util/List; SignatureL(Lorg/openqa/selenium/By;)Ljava/util/List; org/openqa/selenium/By 5(Lorg/openqa/selenium/SearchContext;)Ljava/util/List;byLorg/openqa/selenium/By; findElement:(Lorg/openqa/selenium/By;)Lorg/openqa/selenium/WebElement; E(Lorg/openqa/selenium/SearchContext;)Lorg/openqa/selenium/WebElement;F(Ljava/lang/String;Ljava/lang/String;)Lorg/openqa/selenium/WebElement;findChildElementusing ? B(Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;)Lcom/google/common/collect/ImmutableMap;6(Ljava/lang/String;Ljava/lang/String;)Ljava/util/List;X(Ljava/lang/String;Ljava/lang/String;)Ljava/util/List;findChildElementsjava/util/ListfindElementById4(Ljava/lang/String;)Lorg/openqa/selenium/WebElement;  findElementsById$(Ljava/lang/String;)Ljava/util/List;F(Ljava/lang/String;)Ljava/util/List;  findElementByLinkText link textfindElementsByLinkTextfindElementByNamefindElementsByNamefindElementByClassName class namefindElementsByClassNamefindElementByCssSelector css selectorfindElementsByCssSelectorfindElementByXPathxpathfindElementsByXPathfindElementByPartialLinkTextpartial link textfindElementsByPartialLinkTextfindElementByTagNametag namefindElementsByTagName](Ljava/lang/String;Ljava/util/Map;)Lorg/openqa/selenium/remote/Response; +Ecommand parametersLjava/util/Map;LocalVariableTypeTable$Ljava/util/Map;equals(Ljava/lang/Object;)Z)org/openqa/selenium/internal/WrapsElement getWrappedElement"()Lorg/openqa/selenium/WebElement; elementEqualsotherobj Lorg/openqa/selenium/WebElement;hashCode()I S getWrappedDriver!()Lorg/openqa/selenium/WebDriver; SourceFileRemoteWebElement.java InnerClasses RemoteMouse!  (/* "%# $%&'M*+(*+*02"-./#$%45/*6"2# $%89>*+6" 67#$%:?*;=*6>DW" :;# $%H?*I=*6>DW" >?# $%K5@*L=*6>DNS"B# $%UVL*W=*6Y+[DW" FG#$%^_`?*a=*6>DW" JK# $%c5@*d=*6>DNS"N# $%fgs!*h=*6j+[DNM,,l"RSRTUW# !$%!k ZpqrC*s=*6>DNuw"[# $%zrC*{=*6>DNuw"_# $%}?*~=*6>DW" cd# $%rC*=*6>DNuw"g# $%5P*=*6>DL+NS" kl#$%:+*"p#$%:+*"t#$%r*=*6+Y,DN-N"xyxz#*$%Zr*=*6+Y,DN-N"#*$%Z<*=+"#$%<*=+"#$%<*+"#$%<*+"#$%<*j+"#$%<*j+"#$%<*+"#$%<*+"#$%<*+"#$%<*+"#$%<*+"#$%<*+"#$%<*+"#$%<*+"#$%<*+"#$%<*+"#$%FGZ *(+,ʰ"#  $%    c++M,ҙ +ҹM,*=*6,6[DN-N:uuw"2  &(+=AG#4c$%cpUA"GZp2*6"# $%/*("# $% 0+PK %^D>bGG.org/openqa/selenium/remote/DriverCommand.class1(org/openqa/selenium/remote/DriverCommandjava/lang/Object NEW_SESSIONLjava/lang/String; ConstantValue  newSessionCLOSE closeQUITquitGETgetGO_BACKgoBack GO_FORWARD goForwardREFRESHrefresh ADD_COOKIE addCookie GET_COOKIE! getCookieGET_ALL_COOKIES$ getCookies DELETE_COOKIE' deleteCookieDELETE_ALL_COOKIES*deleteAllCookies FIND_ELEMENT- findElement FIND_ELEMENTS0 findElementsFIND_CHILD_ELEMENT3findChildElementFIND_CHILD_ELEMENTS6findChildElements CLEAR_ELEMENT9 clearElement CLICK_ELEMENT< clickElementHOVER_OVER_ELEMENT?hoverOverElementSEND_KEYS_TO_ELEMENTBsendKeysToElement#SEND_MODIFIER_KEY_TO_ACTIVE_ELEMENTEsendModifierKeyToActiveElementSUBMIT_ELEMENTH submitElementTOGGLE_ELEMENTK toggleElementGET_CURRENT_WINDOW_HANDLENgetCurrentWindowHandleGET_WINDOW_HANDLESQgetWindowHandlesSWITCH_TO_WINDOWTswitchToWindowSWITCH_TO_FRAMEW switchToFrameGET_ACTIVE_ELEMENTZgetActiveElementGET_CURRENT_URL] getCurrentUrlGET_PAGE_SOURCE` getPageSource GET_TITLEcgetTitleEXECUTE_SCRIPTf executeScriptEXECUTE_ASYNC_SCRIPTiexecuteAsyncScript GET_SPEEDlgetSpeed SET_SPEEDosetSpeedSET_BROWSER_VISIBLErsetBrowserVisibleIS_BROWSER_VISIBLEuisBrowserVisibleGET_ELEMENT_TEXTxgetElementTextGET_ELEMENT_VALUE{getElementValueGET_ELEMENT_TAG_NAME~getElementTagNameSET_ELEMENT_SELECTEDsetElementSelected DRAG_ELEMENT dragElementIS_ELEMENT_SELECTEDisElementSelectedIS_ELEMENT_ENABLEDisElementEnabledIS_ELEMENT_DISPLAYEDisElementDisplayedGET_ELEMENT_LOCATIONgetElementLocation,GET_ELEMENT_LOCATION_ONCE_SCROLLED_INTO_VIEW&getElementLocationOnceScrolledIntoViewGET_ELEMENT_SIZEgetElementSizeGET_ELEMENT_ATTRIBUTEgetElementAttribute!GET_ELEMENT_VALUE_OF_CSS_PROPERTYgetElementValueOfCssPropertyELEMENT_EQUALS elementEquals SCREENSHOT screenshot ACCEPT_ALERT acceptAlert DISMISS_ALERT dismissAlertGET_ALERT_TEXT getAlertTextSET_ALERT_VALUE setAlertValueIMPLICITLY_WAITimplicitlyWaitSET_SCRIPT_TIMEOUTsetScriptTimeout EXECUTE_SQL executeSQL GET_LOCATION getLocation SET_LOCATION setLocation GET_APP_CACHE getAppCacheGET_APP_CACHE_STATUS getStatusIS_BROWSER_ONLINEisBrowserOnlineSET_BROWSER_ONLINEsetBrowserOnlineGET_LOCAL_STORAGE_ITEMgetLocalStorageItemGET_LOCAL_STORAGE_KEYSgetLocalStorageKeysSET_LOCAL_STORAGE_ITEMsetLocalStorageItemREMOVE_LOCAL_STORAGE_ITEMremoveLocalStorageItemCLEAR_LOCAL_STORAGEclearLocalStorageGET_LOCAL_STORAGE_SIZEgetLocalStorageSizeGET_SESSION_STORAGE_ITEMgetSessionStorageItemGET_SESSION_STORAGE_KEYSgetSessionStorageKeySET_SESSION_STORAGE_ITEMsetSessionStorageItemREMOVE_SESSION_STORAGE_ITEMremoveSessionStorageItemCLEAR_SESSION_STORAGEclearSessionStorageGET_SESSION_STORAGE_SIZEgetSessionStorageSizeSET_SCREEN_ORIENTATIONsetScreenOrientationGET_SCREEN_ORIENTATIONgetScreenOrientationCLICK mouseClick DOUBLE_CLICKmouseDoubleClick MOUSE_DOWNmouseButtonDownMOUSE_UP mouseButtonUpMOVE_TO mouseMoveToSEND_KEYS_TO_SESSIONsendKeys SourceFileDriverCommand.javaU    "#%&()+,./124578:;=>@ACDFGIJLMOPRSUVXY[\^_abdeghjkmnpqstvwyz|}PK %^D>v HHAorg/openqa/selenium/remote/CapabilityType$ForSeleniumServer.class1;org/openqa/selenium/remote/CapabilityType$ForSeleniumServerjava/lang/ObjectAVOIDING_PROXYLjava/lang/String; ConstantValue  avoidProxyONLY_PROXYING_SELENIUM_TRAFFIC onlyProxySeleniumTrafficPROXYING_EVERYTHINGproxyEverything PROXY_PAC proxy_pacENSURING_CLEAN_SESSIONensureCleanSession SourceFileCapabilityType.java InnerClasses)org/openqa/selenium/remote/CapabilityTypeForSeleniumServer     PK %^D>/org/openqa/selenium/remote/CapabilityType.class14)org/openqa/selenium/remote/CapabilityTypejava/lang/Object BROWSER_NAMELjava/lang/String; ConstantValue  browserNamePLATFORM platformSUPPORTS_JAVASCRIPTjavascriptEnabledTAKES_SCREENSHOTtakesScreenshotVERSIONversionSUPPORTS_SQL_DATABASEdatabaseEnabledSUPPORTS_LOCATION_CONTEXTlocationContextEnabledSUPPORTS_APPLICATION_CACHEapplicationCacheEnabledSUPPORTS_BROWSER_CONNECTION!browserConnectionEnabledSUPPORTS_FINDING_BY_CSS$cssSelectorsEnabledPROXY'proxySUPPORTS_WEB_STORAGE*webStorageEnabled ROTATABLE- rotatable SourceFileCapabilityType.java InnerClasses2;org/openqa/selenium/remote/CapabilityType$ForSeleniumServerForSeleniumServer     "#%&()+,./0 13 PK %^D>4  /org/openqa/selenium/remote/AddRotatable$1.class1P)org/openqa/selenium/remote/AddRotatable$1java/lang/Object2org/openqa/selenium/remote/InterfaceImplementationthis$0)Lorg/openqa/selenium/remote/AddRotatable;,(Lorg/openqa/selenium/remote/AddRotatable;)VCode    ()VLineNumberTableLocalVariableTablethis+Lorg/openqa/selenium/remote/AddRotatable$1;invoke}(Lorg/openqa/selenium/remote/ExecuteMethod;Ljava/lang/Object;Ljava/lang/reflect/Method;[Ljava/lang/Object;)Ljava/lang/Object;rotate java/lang/reflect/Method getName()Ljava/lang/String; "!java/lang/String #$equals(Ljava/lang/Object;)Z&setScreenOrientation( orientation *,+&com/google/common/collect/ImmutableMap -.ofN(Ljava/lang/Object;Ljava/lang/Object;)Lcom/google/common/collect/ImmutableMap; 021(org/openqa/selenium/remote/ExecuteMethod 34execute5(Ljava/lang/String;Ljava/util/Map;)Ljava/lang/Object;6getOrientation8getScreenOrientation :<;%org/openqa/selenium/ScreenOrientation =>valueOf;(Ljava/lang/String;)Lorg/openqa/selenium/ScreenOrientation; executeMethod*Lorg/openqa/selenium/remote/ExecuteMethod;selfLjava/lang/Object;methodLjava/lang/reflect/Method;args[Ljava/lang/Object; SourceFileAddRotatable.javaEnclosingMethodK'org/openqa/selenium/remote/AddRotatable MNgetImplementationH(Ljava/lang/Object;)Lorg/openqa/selenium/remote/InterfaceImplementation; InnerClasses   8 *+ * !   8-+%'2)/5-+7/ 9# $%$&('6)488?@8AB8CD8EFGHIJLO PK %^D>sSS-org/openqa/selenium/remote/AddRotatable.class1 'org/openqa/selenium/remote/AddRotatablejava/lang/Object,org/openqa/selenium/remote/AugmenterProvider()VCode  LineNumberTableLocalVariableTablethis)Lorg/openqa/selenium/remote/AddRotatable;getDescribedInterface()Ljava/lang/Class; Signature()Ljava/lang/Class<*>;getImplementationH(Ljava/lang/Object;)Lorg/openqa/selenium/remote/InterfaceImplementation;)org/openqa/selenium/remote/AddRotatable$1  ,(Lorg/openqa/selenium/remote/AddRotatable;)VvalueLjava/lang/Object; SourceFileAddRotatable.java InnerClasses! /*    -   = Y* !    PK %^D>A ++8org/openqa/selenium/remote/InterfaceImplementation.class1 2org/openqa/selenium/remote/InterfaceImplementationjava/lang/Objectinvoke}(Lorg/openqa/selenium/remote/ExecuteMethod;Ljava/lang/Object;Ljava/lang/reflect/Method;[Ljava/lang/Object;)Ljava/lang/Object; SourceFileInterfaceImplementation.javaPK %^D>,9  *org/openqa/selenium/remote/SessionId.class1#$org/openqa/selenium/remote/SessionIdjava/lang/Object opaqueKeyLjava/lang/String;(Ljava/lang/String;)VCode   ()V  LineNumberTableLocalVariableTablethis&Lorg/openqa/selenium/remote/SessionId;toString()Ljava/lang/String;hashCode()I java/lang/String equals(Ljava/lang/Object;)Z  objLjava/lang/Object; SourceFileSessionId.java! F * *+     /*   2* !  T+* + %&( !"PK %^D> 04org/openqa/selenium/remote/ScreenshotException.class1.org/openqa/selenium/remote/ScreenshotException&org/openqa/selenium/WebDriverException screenshotLjava/lang/String;(Ljava/lang/String;)VCode Screen shot has been taken    LineNumberTableLocalVariableTablethis0Lorg/openqa/selenium/remote/ScreenshotException; screenGrab*(Ljava/lang/String;Ljava/lang/Throwable;)V  causeLjava/lang/Throwable;getBase64EncodedScreenshot()Ljava/lang/String; SourceFileScreenshotException.java! H * *+    S * ,*+ ! "     /*% PK %^D>?UU4org/openqa/selenium/remote/BeanToJsonConverter.class1B.org/openqa/selenium/remote/BeanToJsonConverterjava/lang/Object MAX_DEPTHI ConstantValue()VCode  LineNumberTableLocalVariableTablethis0Lorg/openqa/selenium/remote/BeanToJsonConverter;convert&(Ljava/lang/Object;)Ljava/lang/String;   convertObject'(Ljava/lang/Object;I)Ljava/lang/Object;org/json/JSONObjectorg/json/JSONArrayjava/lang/Stringjava/lang/Number ! "#toString()Ljava/lang/String; % &valueOf(&org/openqa/selenium/WebDriverException*java/lang/StringBuilder,Unable to convert: ). /(Ljava/lang/String;)V )1 23append-(Ljava/lang/Object;)Ljava/lang/StringBuilder; )! '6 7*(Ljava/lang/String;Ljava/lang/Throwable;)V9org/json/JSONExceptionobjectLjava/lang/Object; convertedeLorg/json/JSONException;convertUnknownObjectFromJson&(Ljava/lang/Object;)Ljava/lang/Object; B CDconvertJsonArray&(Lorg/json/JSONArray;)Ljava/util/List; F GHconvertJsonObject&(Lorg/json/JSONObject;)Ljava/util/Map;o SignatureL(Lorg/json/JSONObject;)Ljava/util/Map;Mjava/util/HashMap L P QRkeys()Ljava/util/Iterator; TVUjava/util/Iterator WXnext()Ljava/lang/Object; Z [\get&(Ljava/lang/String;)Ljava/lang/Object; ^ ?@ `ba java/util/Map cdput8(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;fjava/lang/IllegalStateExceptionhUnable to access key: )j 2k-(Ljava/lang/String;)Ljava/lang/StringBuilder; e6 Tn ophasNext()Z jsonObjectLorg/json/JSONObject;toReturnLjava/util/Map;allKeysLjava/util/Iterator;keyLjava/lang/String;LocalVariableTypeTable5Ljava/util/Map;Ljava/util/Iterator<*>;:(Lorg/json/JSONArray;)Ljava/util/List;~java/util/ArrayList }  [(I)Ljava/lang/Object; java/util/List add(Ljava/lang/Object;)Z Cannot convert object at index: ) 2(I)Ljava/lang/StringBuilder;  length()I jsonArrayLorg/json/JSONArray;Ljava/util/List;i$Ljava/util/List; Exceptionsjava/lang/Booleanjava/lang/CharSequence  getClass()Ljava/lang/Class; java/lang/Class pisEnumjava/lang/Enum  ` entrySet()Ljava/util/Set;  java/util/Set Riteratorjava/util/Map$Entry XgetKey XgetValue  c;(Ljava/lang/String;Ljava/lang/Object;)Lorg/json/JSONObject;java/util/Collection   c((Ljava/lang/Object;)Lorg/json/JSONArray; pisArray java/lang/reflect/Array  getLength(Ljava/lang/Object;)I [$org/openqa/selenium/remote/SessionIdvalue org/openqa/selenium/Capabilities asMap()Ljava/util/Map;5org/openqa/selenium/browserlaunchers/DoNotUseProxyPac java/util/Date java/util/concurrent/TimeUnit  MILLISECONDSLjava/util/concurrent/TimeUnit; getTime()J  toSeconds(J)J java/lang/Long &(J)Ljava/lang/Long;  getToJsonMethod.(Ljava/lang/Object;)Ljava/lang/reflect/Method; java/lang/reflect/Method invoke9(Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/Object; ' (Ljava/lang/Throwable;)V   mapObject"java/lang/IllegalArgumentException java/lang/IllegalAccessException+java/lang/reflect/InvocationTargetExceptionjava/lang/Exception toConvertmaxDepth objectEntryentryLjava/util/Map$Entry;arraytoJsonLjava/lang/reflect/Method;$Ljava/lang/IllegalArgumentException;"Ljava/lang/IllegalAccessException;-Ljava/lang/reflect/InvocationTargetException;Ljava/lang/Exception;;Ljava/util/Map$Entry;   getMethod@(Ljava/lang/String;[Ljava/lang/Class;)Ljava/lang/reflect/Method;java/lang/SecurityExceptionjava/lang/NoSuchMethodException ! 3org/openqa/selenium/remote/SimplePropertyDescriptor "#getPropertyDescriptorsI(Ljava/lang/Class;)[Lorg/openqa/selenium/remote/SimplePropertyDescriptor;%class ' (#getName * +equals ' . /0 getReadMethod()Ljava/lang/reflect/Method; 2 34getParameterTypes()[Ljava/lang/Class; 6 78 setAccessible(Z)Vmappedpd5Lorg/openqa/selenium/remote/SimplePropertyDescriptor; readMethodresult SourceFileBeanToJsonConverter.java InnerClassesEntry!  /* ,  M+*+M,,, ,, +$M'Y)Y+-+04,5-38.238. 9:= >?@"A)B.E3F4G*MM:; &<;4=>?@ f"+ *+A+ *+E+TUXY \""I;GHJK YLYNM+ONA-S:,*+Y]_W :eY)Yg-i4l-m,.18& `a bcf1g3hNbWk>YYqrQst Luv3wx3=>yQsz Lu{CDJ| I}YM>5,*+]W:eY)Y-4l+,  8op r s"t<pGw4IIAs ="=>y As8 +++ +++ ++ +`WYN+`:0S::-*dWm-+++<YN+:S:-*dWm-+Ù5YN+66-*+dW-+ΙYN-+ W-+ҙ*+ҹd+ؙ*+ضd+ۙ+۶*+N-1-+:'Y:'Y:'Y*+d:'Y4|} .3:B^e"-/6GN]du{; BL<r^$ ;e  1 I;*<$" <r{G = = = =y e  f+MM; : YN+Y:66m2:$&)-$+,WC-:41(5+: -&* dW-F(6EHOTW`ciuH; 9r(`:;O9<u=; >?@ `A PK %^D>1 :org/openqa/selenium/remote/Augmenter$CompoundHandler.class1z4org/openqa/selenium/remote/Augmenter$CompoundHandlerjava/lang/Object$net/sf/cglib/proxy/MethodInterceptorhandlersLjava/util/Map; Signature_Ljava/util/Map; interfacesLjava/util/Set;%Ljava/util/Set;>;driver,Lorg/openqa/selenium/remote/RemoteWebDriver;this$0&Lorg/openqa/selenium/remote/Augmenter;U(Lorg/openqa/selenium/remote/Augmenter;Lorg/openqa/selenium/remote/RemoteWebDriver;)VCode    ()Vjava/util/HashMap    java/util/HashSet  # % LineNumberTableLocalVariableTablethis6Lorg/openqa/selenium/remote/Augmenter$CompoundHandler;addCapabilityHanderH(Ljava/lang/Class;Lorg/openqa/selenium/remote/InterfaceImplementation;)VK(Ljava/lang/Class<*>;Lorg/openqa/selenium/remote/InterfaceImplementation;)V .0/ java/util/Set 12add(Ljava/lang/Object;)Z 465java/lang/Class 78getDeclaredMethods()[Ljava/lang/reflect/Method; :<; java/util/Map =>put8(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object; fromInterfaceLjava/lang/Class; handledBy4Lorg/openqa/selenium/remote/InterfaceImplementation;methodLjava/lang/reflect/Method;LocalVariableTypeTableLjava/lang/Class<*>; getInterfaces()Ljava/util/Set;'()Ljava/util/Set;>;isNeedingApplication()Z .M NOsize()I intercepts(Ljava/lang/Object;Ljava/lang/reflect/Method;[Ljava/lang/Object;Lnet/sf/cglib/proxy/MethodProxy;)Ljava/lang/Object; ExceptionsTjava/lang/Throwable :V WXget&(Ljava/lang/Object;)Ljava/lang/Object;Z2org/openqa/selenium/remote/InterfaceImplementation \^]net/sf/cglib/proxy/MethodProxy _` invokeSuper9(Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/Object;b(org/openqa/selenium/remote/ExecuteMethod ad e/(Lorg/openqa/selenium/remote/RemoteWebDriver;)V Yg hiinvoke}(Lorg/openqa/selenium/remote/ExecuteMethod;Ljava/lang/Object;Ljava/lang/reflect/Method;[Ljava/lang/Object;)Ljava/lang/Object;selfLjava/lang/Object;args[Ljava/lang/Object; methodProxy Lnet/sf/cglib/proxy/MethodProxy;handler(Lorg/openqa/selenium/remote/Augmenter;Lorg/openqa/selenium/remote/RemoteWebDriver;Lorg/openqa/selenium/remote/Augmenter$CompoundHandler;)V s  SourceFileAugmenter.java InnerClassesx$org/openqa/selenium/remote/AugmenterCompoundHandler      m%*+**Y*Y!"*,$& '%()%*+ ,8*"+-W+3Y:662N*-,9W& !-7'*8()8?@8AB! CDE 8?FGH I/*"&' ()JK:*"L&' ()PQRS2*,UY: +-[aY*$c+,-f&'>2()2jk2CD2lm2no#pBq'*+,r&'tuv wyPK %^D>*org/openqa/selenium/remote/Augmenter.class1$org/openqa/selenium/remote/Augmenterjava/lang/ObjectdriverAugmentorsLjava/util/Map; SignatureQLjava/util/Map;elementAugmentors()VCode  com/google/common/collect/Maps  newHashMap()Ljava/util/HashMap;    cssSelectorsEnabled(org/openqa/selenium/remote/AddFindsByCss   !addDriverAugmentationC(Ljava/lang/String;Lorg/openqa/selenium/remote/AugmenterProvider;)V#takesScreenshot%-org/openqa/selenium/remote/AddTakesScreenshot $(databaseEnabled*3org/openqa/selenium/remote/html5/AddDatabaseStorage )-locationContextEnabled/3org/openqa/selenium/remote/html5/AddLocationContext .2applicationCacheEnabled44org/openqa/selenium/remote/html5/AddApplicationCache 37browserConnectionEnabled95org/openqa/selenium/remote/html5/AddBrowserConnection 8<webStorageEnabled>.org/openqa/selenium/remote/html5/AddWebStorage =A rotatableC'org/openqa/selenium/remote/AddRotatable BF-org/openqa/selenium/remote/AddFindsChildByCss E I J!addElementAugmentationLineNumberTableLocalVariableTablethis&Lorg/openqa/selenium/remote/Augmenter; PRQ java/util/Map STput8(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;capabilityNameLjava/lang/String; handlerClass.Lorg/openqa/selenium/remote/AugmenterProvider;augment@(Lorg/openqa/selenium/WebDriver;)Lorg/openqa/selenium/WebDriver;\*org/openqa/selenium/remote/RemoteWebDriver ^ _`determineAugmentationf(Lorg/openqa/selenium/WebDriver;Ljava/util/Map;)Lorg/openqa/selenium/remote/Augmenter$CompoundHandler; b cdcreate\(Lorg/openqa/selenium/remote/Augmenter$CompoundHandler;Ljava/lang/Object;)Ljava/lang/Object; [f ghgetCommandExecutor.()Lorg/openqa/selenium/remote/CommandExecutor; [j klsetCommandExecutor/(Lorg/openqa/selenium/remote/CommandExecutor;)V [n opgetElementConverterA()Lorg/openqa/selenium/remote/internal/JsonToWebElementConverter; [r stsetElementConverterB(Lorg/openqa/selenium/remote/internal/JsonToWebElementConverter;)VdriverLorg/openqa/selenium/WebDriver; augmentorshandler6Lorg/openqa/selenium/remote/Augmenter$CompoundHandler;remote,Lorg/openqa/selenium/remote/RemoteWebDriver;LocalVariableTypeTableO(Lorg/openqa/selenium/remote/RemoteWebElement;)Lorg/openqa/selenium/WebElement; +org/openqa/selenium/remote/RemoteWebElement getWrappedDriver!()Lorg/openqa/selenium/WebDriver;  getId()Ljava/lang/String;  setId(Ljava/lang/String;)V   setParent/(Lorg/openqa/selenium/remote/RemoteWebDriver;)Velement-Lorg/openqa/selenium/remote/RemoteWebElement;parent(Lorg/openqa/selenium/WebDriver;Ljava/util/Map;)Lorg/openqa/selenium/remote/Augmenter$CompoundHandler; [ getCapabilities$()Lorg/openqa/selenium/Capabilities;  org/openqa/selenium/Capabilities asMap()Ljava/util/Map;4org/openqa/selenium/remote/Augmenter$CompoundHandler (Lorg/openqa/selenium/remote/Augmenter;Lorg/openqa/selenium/remote/RemoteWebDriver;Lorg/openqa/selenium/remote/Augmenter$CompoundHandler;)V P entrySet()Ljava/util/Set;  java/util/Set iterator()Ljava/util/Iterator; java/util/Iterator next()Ljava/lang/Object;java/util/Map$Entry getKey P get&(Ljava/lang/Object;)Ljava/lang/Object;,org/openqa/selenium/remote/AugmenterProvider getValuejava/lang/Boolean  booleanValue()Z getDescribedInterface()Ljava/lang/Class; getImplementationH(Ljava/lang/Object;)Lorg/openqa/selenium/remote/InterfaceImplementation; addCapabilityHanderH(Ljava/lang/Class;Lorg/openqa/selenium/remote/InterfaceImplementation;)V hasNext capabilities capablityNameLjava/util/Map$Entry; augmentervalueLjava/lang/Object;$Ljava/util/Map;*Ljava/util/Map$Entry;T(Lorg/openqa/selenium/remote/Augmenter$CompoundHandler;TX;)TX; isNeedingApplicationnet/sf/cglib/proxy/Enhancer   setCallback (Lnet/sf/cglib/proxy/Callback;)V  getClass  setSuperclass(Ljava/lang/Class;)V com/google/common/collect/Sets  newHashSet()Ljava/util/HashSet;  getInterfaces addAll(Ljava/util/Collection;)Z size()Ijava/lang/Class  toArray(([Ljava/lang/Object;)[Ljava/lang/Object;[Ljava/lang/Class;     setInterfaces([Ljava/lang/Class;)V  cfromenhancerLnet/sf/cglib/proxy/Enhancer; interfacesLjava/util/Set;TX;%Ljava/util/Set;>; SourceFileAugmenter.java InnerClassesEntryCompoundHandler!   * ***Y*"$Y&*')Y+*,.Y0*13Y5*68Y:*;=Y?*@BYD*EYGHK6 30 145,697F8S9`:m;z=>L MN ! O *+,OWK N OL  MN UV WXJ! O *+,OWK _ `L  MN UV WXYZ >+[+*M*+,]N*-+[a[:+[ei+[mqK"op suv#x/y;{L4>MN>uv0w)xy#z{| 0wY} 9+~[M,+*N*,-]:*+a:+,K&  '06L>9MN91{&wxy'z| &w_` ] +[NY*+[:-:]:,:7:ÚK: 8JOR[nqzLRMNuvw wxy8NJ<X[+| w 8Ncd L+ߙFYN-+-,:+W- - ,K& !-EJL4LMNLxyL;!)|L!)P PK %^D>$ˢCorg/openqa/selenium/remote/ErrorHandler$FrameInfoToStackFrame.class1N=org/openqa/selenium/remote/ErrorHandler$FrameInfoToStackFramejava/lang/Objectcom/google/common/base/Function()VCode  LineNumberTableLocalVariableTablethis?Lorg/openqa/selenium/remote/ErrorHandler$FrameInfoToStackFrame;apply.(Ljava/util/Map;)Ljava/lang/StackTraceElement; SignatureT(Ljava/util/Map;)Ljava/lang/StackTraceElement; lineNumber  java/util/Map get&(Ljava/lang/Object;)Ljava/lang/Object;java/lang/Number className ! "# containsKey(Ljava/lang/Object;)Z %'&java/lang/String ()valueOf&(Ljava/lang/Object;)Ljava/lang/String;+- methodName/1fileName35java/lang/StackTraceElement 7 89intValue()I 4; <:(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;I)V frameInfoLjava/util/Map;Ljava/lang/Number;Ljava/lang/String;LocalVariableTypeTable5Ljava/util/Map; D B(Lorg/openqa/selenium/remote/ErrorHandler$FrameInfoToStackFrame;)V   SourceFileErrorHandler.javaLjava/lang/Object;Lcom/google/common/base/Function;Ljava/lang/StackTraceElement;>; InnerClassesL'org/openqa/selenium/remote/ErrorHandlerFrameInfoToStackFrame  /*    -++M,+ +$*N+, +,$.:+0 +0$2:4Y-,6: F#34?OQ\lnw{ >=>m?4K@Q.-@n1@A =BA ) *+C  E %*F  GHIJ KM PK %^D>!Dorg/openqa/selenium/remote/ErrorHandler$UnknownServerException.class1>org/openqa/selenium/remote/ErrorHandler$UnknownServerException&org/openqa/selenium/WebDriverException(Ljava/lang/String;)VCode  LineNumberTableLocalVariableTablethis@Lorg/openqa/selenium/remote/ErrorHandler$UnknownServerException;sLjava/lang/String;U(Ljava/lang/String;Lorg/openqa/selenium/remote/ErrorHandler$UnknownServerException;)V   SourceFileErrorHandler.java InnerClasses'org/openqa/selenium/remote/ErrorHandlerUnknownServerException!>*+   &*+    PK %^D>.C)-org/openqa/selenium/remote/ErrorHandler.class1'org/openqa/selenium/remote/ErrorHandlerjava/lang/ObjectMESSAGELjava/lang/String; ConstantValue message SCREEN_SHOT screenCLASSclass STACK_TRACE stackTrace LINE_NUMBER lineNumber METHOD_NAME methodName CLASS_NAME className FILE_NAMEfileName UNKNOWN_CLASS!UNKNOWN_METHOD$ UNKNOWN_FILE' errorCodes'Lorg/openqa/selenium/remote/ErrorCodes;includeServerErrorsZ()VCode 0 ,1(Z)VLineNumberTableLocalVariableTablethis)Lorg/openqa/selenium/remote/ErrorHandler; 7 ,-9%org/openqa/selenium/remote/ErrorCodes 87 < () > *+isIncludeServerErrors()ZsetIncludeServerErrorsthrowIfResponseFailedL(Lorg/openqa/selenium/remote/Response;)Lorg/openqa/selenium/remote/Response; ExceptionsFjava/lang/RuntimeException HJI#org/openqa/selenium/remote/Response KL getStatus()I 8N OPgetExceptionType(I)Ljava/lang/Class; HR STgetValue()Ljava/lang/Object;V java/util/Map UX YZget&(Ljava/lang/Object;)Ljava/lang/Object;\java/lang/String [^ _`valueOf&(Ljava/lang/Object;)Ljava/lang/String; b cdrebuildServerError&(Ljava/util/Map;)Ljava/lang/Throwable;fjava/lang/StringBuilder eh ,i(Ljava/lang/String;)VkA (WARNING: The server did not provide any stacktrace information) em noappend-(Ljava/lang/String;)Ljava/lang/StringBuilder; eq rstoString()Ljava/lang/String;u= (WARNING: The client has suppressed server-side stacktraces)w.org/openqa/selenium/remote/ScreenshotException vy ,z*(Ljava/lang/String;Ljava/lang/Throwable;)V|java/lang/Class~java/lang/Throwable  createThrowableM(Ljava/lang/Class;[Ljava/lang/Class;[Ljava/lang/Object;)Ljava/lang/Throwable;&org/openqa/selenium/WebDriverException y ,(Ljava/lang/Throwable;)Vjava/lang/ClassCastExceptionresponse%Lorg/openqa/selenium/remote/Response;outerErrorTypeLjava/lang/Class;valueLjava/lang/Object;causeLjava/lang/Throwable; rawErrorDataLjava/util/Map;eLjava/lang/ClassCastException; serverErrortoThrowLocalVariableTypeTable0Ljava/lang/Class<+Ljava/lang/RuntimeException;>;5Ljava/util/Map; Signature\(Ljava/lang/Class;[Ljava/lang/Class<*>;[Ljava/lang/Object;)TT; { getConstructor3([Ljava/lang/Class;)Ljava/lang/reflect/Constructor; java/lang/reflect/Constructor  newInstance'([Ljava/lang/Object;)Ljava/lang/Object;java/lang/NoSuchMethodException+java/lang/reflect/InvocationTargetException java/lang/InstantiationException java/lang/IllegalAccessExceptionjava/lang/OutOfMemoryErrorclazzparameterTypes[Ljava/lang/Class; parameters[Ljava/lang/Object; constructorLjava/lang/reflect/Constructor;Ljava/lang/Class;$Ljava/lang/reflect/Constructor;L(Ljava/util/Map;)Ljava/lang/Throwable; U  containsKey(Ljava/lang/Object;)Z { forName%(Ljava/lang/String;)Ljava/lang/Class; { isAssignableFrom(Ljava/lang/Class;)Z>org/openqa/selenium/remote/ErrorHandler$UnknownServerException ,U(Ljava/lang/String;Lorg/openqa/selenium/remote/ErrorHandler$UnknownServerException;)Vjava/lang/StackTraceElementjava/util/List=org/openqa/selenium/remote/ErrorHandler$FrameInfoToStackFrame ,B(Lorg/openqa/selenium/remote/ErrorHandler$FrameInfoToStackFrame;)V #com/google/common/collect/Iterables  transformK(Ljava/lang/Iterable;Lcom/google/common/base/Function;)Ljava/lang/Iterable; !com/google/common/base/Predicates notNull$()Lcom/google/common/base/Predicate; filterL(Ljava/lang/Iterable;Lcom/google/common/base/Predicate;)Ljava/lang/Iterable; toArray:(Ljava/lang/Iterable;Ljava/lang/Class;)[Ljava/lang/Object;[Ljava/lang/StackTraceElement; }  setStackTrace!([Ljava/lang/StackTraceElement;)V java/lang/ClassNotFoundExceptiontoReturn throwableTypestackTraceInfoLjava/util/List; stackFramesLjava/lang/Iterable;)Ljava/lang/Class<+Ljava/lang/Throwable;>;GLjava/util/List;>;3Ljava/lang/Iterable; SourceFileErrorHandler.java InnerClassesFrameInfoToStackFrameUnknownServerException!     "#%&()*+,-.4*/2 '(3 45,1.U*6*8Y:;*=2."/0345*+?@./*=233 45A1.>*=2 78345*+BCDE.j2+G+*;+GMM+QN::-U-U:W[: :]:*a:#*=@eY]gjlp:'*=eY]gtlp:: W'vY W]x: - -]:*,{Y[SY}SYSYS:*,{Y[SYS:YE EY-;>2%<= A@CDE G'H-J>K@MGQOVTW[Yt[{]_bcefijkimnopn stw"x(z3f 2452  -@OoG-.)+,:-}::: :: %2" %'34)45))) ) cd.++M+W[N+B+W[::}ę$:*{Y[SY-SM:, Y-M:+5+W:YӸ:ܸ:͸:,,>kn2f&1>EOS_gnpt~3f 45& >2E)SE%*S%  PK %^D>~n ;org/openqa/selenium/remote/ReusingSocketSocketFactory.class15org/openqa/selenium/remote/ReusingSocketSocketFactoryjava/lang/Object)org/apache/http/conn/scheme/SocketFactoryDEFAULT_FACTORY7Lorg/openqa/selenium/remote/ReusingSocketSocketFactory; nameResolver.Lorg/apache/http/conn/scheme/HostNameResolver;()VCode     LineNumberTableLocalVariableTablegetSocketFactory9()Lorg/openqa/selenium/remote/ReusingSocketSocketFactory;1(Lorg/apache/http/conn/scheme/HostNameResolver;)V   this   createSocket()Ljava/net/Socket;!java/net/Socket  $ %&setReuseAddress(Z)V(java/lang/RuntimeException '* +(Ljava/lang/Throwable;)V-java/net/SocketExceptionsocketLjava/net/Socket;eLjava/net/SocketException; connectSocketq(Ljava/net/Socket;Ljava/lang/String;ILjava/net/InetAddress;ILorg/apache/http/params/HttpParams;)Ljava/net/Socket; Exceptions6java/io/IOException8"java/lang/IllegalArgumentException:Target host may not be null. 7< =(Ljava/lang/String;)V?Parameters may not be null. A Cjava/net/InetSocketAddress BE F(Ljava/net/InetAddress;I)V H IJbind(Ljava/net/SocketAddress;)V LNM+org/apache/http/params/HttpConnectionParams OPgetConnectionTimeout&(Lorg/apache/http/params/HttpParams;)I RTS,org/apache/http/conn/scheme/HostNameResolver UVresolve*(Ljava/lang/String;)Ljava/net/InetAddress; BX Y(Ljava/lang/String;I)V [ \]connect(Ljava/net/SocketAddress;I)V_,org/apache/http/conn/ConnectTimeoutExceptionajava/lang/StringBuilderc Connect to `< `f ghappend-(Ljava/lang/Object;)Ljava/lang/StringBuilder;j timed out `l gm-(Ljava/lang/String;)Ljava/lang/StringBuilder; `o pqtoString()Ljava/lang/String; ^<tjava/net/SocketTimeoutExceptionsockhostLjava/lang/String;portI localAddressLjava/net/InetAddress; localPortparams#Lorg/apache/http/params/HttpParams;isaLjava/net/InetSocketAddress;timeout remoteAddressex!Ljava/net/SocketTimeoutException;isSecure(Ljava/net/Socket;)ZSocket may not be null. isClosed()ZSocket is closed. SourceFileReusingSocketSocketFactory.java!   / Y 4 /  $? F **+BC D    4* HI  r Y"L+# M'Y,)+ ,LNOPR ./ 012345  , 7Y9; 7Y>;+*@L+#6BYD:+GK6*BY*,QD:BY,W:+Z#: ^Y`Ybdeiknr+sV[\^_b!c&e+f5i:j=mHlJnPqWt^uuwz{|~z u/vwxyz{|y}~JWVyr- 47 e!+ 7Y;+ 7Y;!!u/PK %^D>.org/openqa/selenium/remote/ExecuteMethod.class15(org/openqa/selenium/remote/ExecuteMethodjava/lang/Objectdriver,Lorg/openqa/selenium/remote/RemoteWebDriver;/(Lorg/openqa/selenium/remote/RemoteWebDriver;)VCode   ()V  LineNumberTableLocalVariableTablethis*Lorg/openqa/selenium/remote/ExecuteMethod;execute5(Ljava/lang/String;Ljava/util/Map;)Ljava/lang/Object; SignatureJ(Ljava/lang/String;Ljava/util/Map;)Ljava/lang/Object;  java/util/Map size()I  *org/openqa/selenium/remote/RemoteWebDriver !9(Ljava/lang/String;)Lorg/openqa/selenium/remote/Response; # $H(Ljava/lang/String;Ljava/util/Map;)Lorg/openqa/selenium/remote/Response; &('#org/openqa/selenium/remote/Response )*getValue()Ljava/lang/Object; commandNameLjava/lang/String; parametersLjava/util/Map;response%Lorg/openqa/selenium/remote/Response;LocalVariableTypeTable$Ljava/util/Map; SourceFileExecuteMethod.java! F * *+     (, ,* +N * +,"N-%, -/#24((+,(-./0#/01 (-234PK %^D>] +org/openqa/selenium/remote/ErrorCodes.class1W%org/openqa/selenium/remote/ErrorCodesjava/lang/ObjectSUCCESSI ConstantValueNO_SUCH_ELEMENT NO_SUCH_FRAMEUNKNOWN_COMMAND STALE_ELEMENT_REFERENCE ELEMENT_NOT_VISIBLE INVALID_ELEMENT_STATE UNHANDLED_ERROR ELEMENT_NOT_SELECTABLEXPATH_LOOKUP_ERRORNO_SUCH_WINDOWINVALID_COOKIE_DOMAINUNABLE_TO_SET_COOKIEASYNC_SCRIPT_TIMEOUTINVALID_ELEMENT_COORDINATESMETHOD_NOT_ALLOWED()VCode + '(LineNumberTableLocalVariableTablethis'Lorg/openqa/selenium/remote/ErrorCodes;getExceptionType(I)Ljava/lang/Class; Signature3(I)Ljava/lang/Class<+Ljava/lang/RuntimeException;>;50org/openqa/selenium/InvalidCookieDomainException7.org/openqa/selenium/UnableToSetCookieException9)org/openqa/selenium/NoSuchWindowException;*org/openqa/selenium/NoSuchElementException=(org/openqa/selenium/NoSuchFrameException?'java/lang/UnsupportedOperationExceptionA2org/openqa/selenium/StaleElementReferenceExceptionC.org/openqa/selenium/ElementNotVisibleExceptionE(org/openqa/selenium/XPathLookupExceptionG$org/openqa/selenium/TimeoutExceptionI@B>DFHJ,>68:<>@BEGIMOQSU-./LMN) w++4+6+8+:+<+@ +B +> +D+F+H ,f`ab cdef!g$h+i.j5k8l?mBnIoLpSqVr]s`tgujvqwty-w./wOPQR)V*+S=  , - ./OPLUVPK %^D>M^aa/org/openqa/selenium/remote/PropertyMunger.class1O)org/openqa/selenium/remote/PropertyMungerjava/lang/Object()VCode  LineNumberTableLocalVariableTablethis+Lorg/openqa/selenium/remote/PropertyMunger;get8(Ljava/lang/String;Ljava/lang/Object;)Ljava/lang/Object; Exceptionsjava/lang/Exception  getClass()Ljava/lang/Class; 3org/openqa/selenium/remote/SimplePropertyDescriptor getPropertyDescriptorsI(Ljava/lang/Class;)[Lorg/openqa/selenium/remote/SimplePropertyDescriptor;   getName()Ljava/lang/String; "$#java/lang/String %&equals(Ljava/lang/Object;)Z ( )* getReadMethod()Ljava/lang/reflect/Method; ,.-java/lang/reflect/Method /0invoke9(Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/Object; "2 34valueOf&(Ljava/lang/Object;)Ljava/lang/String;nameLjava/lang/String;onLjava/lang/Object; properties6[Lorg/openqa/selenium/remote/SimplePropertyDescriptor;property5Lorg/openqa/selenium/remote/SimplePropertyDescriptor;resultset9(Ljava/lang/String;Ljava/lang/Object;Ljava/lang/Object;)V A B*getWriteMethod ,D EFgetParameterTypes()[Ljava/lang/Class; $value writeMethodLjava/lang/reflect/Method;types[Ljava/lang/Class; SourceFilePropertyMunger.java!/*   F+M,Y:66+2N-*!-'++:1 "&4:D" 4F56F78>9:;<4=8 >? j+N-Y:66P2:*!:@:C:  " 2G+Y,S+W :'&()(*/+4,5/<0C1D4P5_(i9 Hj56j78jH8b9:C;</0IJ<#KL MNPK %^D>"H<org/openqa/selenium/remote/RemoteWebDriver$RemoteAlert.class1H6org/openqa/selenium/remote/RemoteWebDriver$RemoteAlertjava/lang/Objectorg/openqa/selenium/Alertthis$0,Lorg/openqa/selenium/remote/RemoteWebDriver;/(Lorg/openqa/selenium/remote/RemoteWebDriver;)VCode    ()VLineNumberTableLocalVariableTablethis8Lorg/openqa/selenium/remote/RemoteWebDriver$RemoteAlert;dismiss dismissAlert *org/openqa/selenium/remote/RemoteWebDriver execute9(Ljava/lang/String;)Lorg/openqa/selenium/remote/Response;accept  acceptAlertgetText()Ljava/lang/String;$ getAlertText &('#org/openqa/selenium/remote/Response )*getValue()Ljava/lang/Object; , -"toStringresponse%Lorg/openqa/selenium/remote/Response;sendKeys(Ljava/lang/String;)V3 setAlertValue5text 798&com/google/common/collect/ImmutableMap :;ofN(Ljava/lang/Object;Ljava/lang/Object;)Lcom/google/common/collect/ImmutableMap; = >H(Ljava/lang/String;Ljava/util/Map;)Lorg/openqa/selenium/remote/Response; keysToSendLjava/lang/String;g(Lorg/openqa/selenium/remote/RemoteWebDriver;Lorg/openqa/selenium/remote/RemoteWebDriver$RemoteAlert;)V C  SourceFileRemoteWebDriver.java InnerClasses RemoteAlert   4 *+ *S   9 * W U V   9 * W Y Z  !" J* #L+%+ ] ^ ./01 I* 24+6VT?org/openqa/selenium/remote/RemoteWebDriver$RemoteKeyboard.class1O9org/openqa/selenium/remote/RemoteWebDriver$RemoteKeyboardjava/lang/Objectorg/openqa/selenium/Keyboardthis$0,Lorg/openqa/selenium/remote/RemoteWebDriver;/(Lorg/openqa/selenium/remote/RemoteWebDriver;)VCode    ()VLineNumberTableLocalVariableTablethis;Lorg/openqa/selenium/remote/RemoteWebDriver$RemoteKeyboard;sendKeys([Ljava/lang/CharSequence;)V *org/openqa/selenium/remote/RemoteWebDriver switchTo/()Lorg/openqa/selenium/WebDriver$TargetLocator;  +org/openqa/selenium/WebDriver$TargetLocator !" activeElement"()Lorg/openqa/selenium/WebElement; $&%org/openqa/selenium/WebElement  keysToSend[Ljava/lang/CharSequence;pressKey(Lorg/openqa/selenium/Keys;)V,sendModifierKeyToActiveElement.value0isdown 243java/lang/Boolean 56valueOf(Z)Ljava/lang/Boolean; 8:9&com/google/common/collect/ImmutableMap ;<ofr(Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;)Lcom/google/common/collect/ImmutableMap; > ?@executeH(Ljava/lang/String;Ljava/util/Map;)Lorg/openqa/selenium/remote/Response; keyToPressLorg/openqa/selenium/Keys; releaseKey keyToReleasej(Lorg/openqa/selenium/remote/RemoteWebDriver;Lorg/openqa/selenium/remote/RemoteWebDriver$RemoteKeyboard;)V G  SourceFileRemoteWebDriver.java InnerClassesLorg/openqa/selenium/WebDriver TargetLocatorRemoteKeyboard   4 *+ *f   K* +# hi'()* W* +-+/17=WlmlnABC* W* +-+/17=WqrqtDB E &*+FfHIJKM NPK %^D>u u <org/openqa/selenium/remote/RemoteWebDriver$RemoteMouse.class1x6org/openqa/selenium/remote/RemoteWebDriver$RemoteMousejava/lang/Objectorg/openqa/selenium/Mousethis$0,Lorg/openqa/selenium/remote/RemoteWebDriver;/(Lorg/openqa/selenium/remote/RemoteWebDriver;)VCode    ()VLineNumberTableLocalVariableTablethis8Lorg/openqa/selenium/remote/RemoteWebDriver$RemoteMouse;paramsFromCoordinatesH(Lorg/openqa/selenium/interactions/internal/Coordinates;)Ljava/util/Map; Signaturen(Lorg/openqa/selenium/interactions/internal/Coordinates;)Ljava/util/Map; com/google/common/collect/Maps  newHashMap()Ljava/util/HashMap; "!5org/openqa/selenium/interactions/internal/Coordinates #$ getAuxiliry()Ljava/lang/Object;&java/lang/String(element *,+ java/util/Map -.put8(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;where7Lorg/openqa/selenium/interactions/internal/Coordinates;paramsLjava/util/Map;idLjava/lang/String;LocalVariableTypeTable5Ljava/util/Map; moveIfNeeded:(Lorg/openqa/selenium/interactions/internal/Coordinates;)V : ;8 mouseMoveclick > 78@ mouseClickBbutton DFEjava/lang/Integer GHvalueOf(I)Ljava/lang/Integer; JLK&com/google/common/collect/ImmutableMap MNofN(Ljava/lang/Object;Ljava/lang/Object;)Lcom/google/common/collect/ImmutableMap; PRQ*org/openqa/selenium/remote/RemoteWebDriver STexecuteH(Ljava/lang/String;Ljava/util/Map;)Lorg/openqa/selenium/remote/Response; contextClick doubleClickXmouseDoubleClick PZ S[9(Ljava/lang/String;)Lorg/openqa/selenium/remote/Response; mouseDown^mouseButtonDownmouseUpa mouseButtonUp c e mouseMoveTo moveParams<(Lorg/openqa/selenium/interactions/internal/Coordinates;JJ)Vixoffset kmljava/lang/Long Gn(J)Ljava/lang/Long;pyoffsetxOffsetJyOffset SourceFileRemoteWebDriver.java InnerClasses RemoteMouse!   4 *+ *w   M++%N,'-)W,y{|}*/012 345 1678 F +*+9   /0<8 U*+=* ?ACIOW/0U8 U*+=* ?ACIOW/0V8 L*+=* WYW/0\8 L*+=* ]YW/0_8 L*+=* `YW/0;8 j*+bM* d,OW /0 f25  f6;g 1*+b:h j)Woj)W* dOW$0411/01qr1sr*f25 *f6tuv PwPK %^D>Aorg/openqa/selenium/remote/RemoteWebDriver$RemoteNavigation.class1<;org/openqa/selenium/remote/RemoteWebDriver$RemoteNavigationjava/lang/Object(org/openqa/selenium/WebDriver$Navigationthis$0,Lorg/openqa/selenium/remote/RemoteWebDriver;/(Lorg/openqa/selenium/remote/RemoteWebDriver;)VCode    ()VLineNumberTableLocalVariableTablethis=Lorg/openqa/selenium/remote/RemoteWebDriver$RemoteNavigation;backgoBack *org/openqa/selenium/remote/RemoteWebDriver execute9(Ljava/lang/String;)Lorg/openqa/selenium/remote/Response;forward  goForwardto(Ljava/lang/String;)V $ %"geturlLjava/lang/String;(Ljava/net/URL;)V *,+java/lang/String -.valueOf&(Ljava/lang/Object;)Ljava/lang/String;Ljava/net/URL;refresh0l(Lorg/openqa/selenium/remote/RemoteWebDriver;Lorg/openqa/selenium/remote/RemoteWebDriver$RemoteNavigation;)V 4  SourceFileRemoteWebDriver.java InnerClasses9org/openqa/selenium/WebDriver NavigationRemoteNavigation   4 *+ *   9 * W     9 * W    !" A * +#    &'!( D * +)# # $  &/0 9 * 1W ' (   2 &*+35678: ;PK %^D> {  Dorg/openqa/selenium/remote/RemoteWebDriver$RemoteTargetLocator.class1v>org/openqa/selenium/remote/RemoteWebDriver$RemoteTargetLocatorjava/lang/Object+org/openqa/selenium/WebDriver$TargetLocatorthis$0,Lorg/openqa/selenium/remote/RemoteWebDriver;/(Lorg/openqa/selenium/remote/RemoteWebDriver;)VCode    ()VLineNumberTableLocalVariableTablethis@Lorg/openqa/selenium/remote/RemoteWebDriver$RemoteTargetLocator;frame"(I)Lorg/openqa/selenium/WebDriver; switchToFrameid java/lang/Integer  valueOf(I)Ljava/lang/Integer; "$#&com/google/common/collect/ImmutableMap %&ofN(Ljava/lang/Object;Ljava/lang/Object;)Lcom/google/common/collect/ImmutableMap; (*)*org/openqa/selenium/remote/RemoteWebDriver +,executeH(Ljava/lang/String;Ljava/util/Map;)Lorg/openqa/selenium/remote/Response; frameIndexI3(Ljava/lang/String;)Lorg/openqa/selenium/WebDriver; frameNameLjava/lang/String;A(Lorg/openqa/selenium/WebElement;)Lorg/openqa/selenium/WebDriver;4=org/openqa/selenium/remote/internal/WebElementToJsonConverter 3 37 89apply&(Ljava/lang/Object;)Ljava/lang/Object; frameElement Lorg/openqa/selenium/WebElement; elementAsJsonLjava/lang/Object;window@switchToWindowBname windowNamedefaultContent!()Lorg/openqa/selenium/WebDriver; GIHcom/google/common/collect/Maps JK newHashMap()Ljava/util/HashMap; MON java/util/Map PQput8(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;frameIdLjava/util/Map;LocalVariableTypeTable5Ljava/util/Map; activeElement"()Lorg/openqa/selenium/WebElement;YgetActiveElement ([ +\9(Ljava/lang/String;)Lorg/openqa/selenium/remote/Response; ^`_#org/openqa/selenium/remote/Response abgetValue()Ljava/lang/Object;dorg/openqa/selenium/WebElementresponse%Lorg/openqa/selenium/remote/Response;alert()Lorg/openqa/selenium/Alert;j6org/openqa/selenium/remote/RemoteWebDriver$RemoteAlert il mg(Lorg/openqa/selenium/remote/RemoteWebDriver;Lorg/openqa/selenium/remote/RemoteWebDriver$RemoteAlert;)V SourceFileRemoteWebDriver.java InnerClassesrorg/openqa/selenium/WebDriver TargetLocator RemoteAlertRemoteTargetLocator!  4 *+ *+   P* !'W*  ./-./ M* +!'W*  34012 g!3Y5+6M* ,!'W* 8 9: !!:; <=>/ M* ?A+!'W*  >?C1DE pFL+LW* +'W* CDEFRST RUVW J* XZL+]c J K efgh 7 iY* kO  nopqs i(t(uPK %^D>K/?org/openqa/selenium/remote/RemoteWebDriver$RemoteTimeouts.class1H9org/openqa/selenium/remote/RemoteWebDriver$RemoteTimeoutsjava/lang/Object&org/openqa/selenium/WebDriver$Timeoutsthis$0,Lorg/openqa/selenium/remote/RemoteWebDriver;/(Lorg/openqa/selenium/remote/RemoteWebDriver;)VCode    ()VLineNumberTableLocalVariableTablethis;Lorg/openqa/selenium/remote/RemoteWebDriver$RemoteTimeouts;implicitlyWaitJ(JLjava/util/concurrent/TimeUnit;)Lorg/openqa/selenium/WebDriver$Timeouts;ms java/util/concurrent/TimeUnit  MILLISECONDSLjava/util/concurrent/TimeUnit; !#"java/lang/Math $%max(JJ)J ' ()convert#(JLjava/util/concurrent/TimeUnit;)J +-,java/lang/Long ./valueOf(J)Ljava/lang/Long; 132&com/google/common/collect/ImmutableMap 45ofN(Ljava/lang/Object;Ljava/lang/Object;)Lcom/google/common/collect/ImmutableMap; 798*org/openqa/selenium/remote/RemoteWebDriver :;executeH(Ljava/lang/String;Ljava/util/Map;)Lorg/openqa/selenium/remote/Response;timeJunitsetScriptTimeout? SourceFileRemoteWebDriver.java InnerClassesEorg/openqa/selenium/WebDriverTimeoutsRemoteTimeouts!  4 *+ *   j *   -&*06W*     <= >? f* @-&*06W* <=>ABCDF 7GPK %^D>Gorg/openqa/selenium/remote/RemoteWebDriver$RemoteWebDriverOptions.class1Aorg/openqa/selenium/remote/RemoteWebDriver$RemoteWebDriverOptionsjava/lang/Object%org/openqa/selenium/WebDriver$Optionsthis$0,Lorg/openqa/selenium/remote/RemoteWebDriver;/(Lorg/openqa/selenium/remote/RemoteWebDriver;)VCode    ()VLineNumberTableLocalVariableTablethisCLorg/openqa/selenium/remote/RemoteWebDriver$RemoteWebDriverOptions; addCookie(Lorg/openqa/selenium/Cookie;)Vcookie &com/google/common/collect/ImmutableMap ofN(Ljava/lang/Object;Ljava/lang/Object;)Lcom/google/common/collect/ImmutableMap; !#"*org/openqa/selenium/remote/RemoteWebDriver $%executeH(Ljava/lang/String;Ljava/util/Map;)Lorg/openqa/selenium/remote/Response;Lorg/openqa/selenium/Cookie;deleteCookieNamed(Ljava/lang/String;)V* deleteCookie,nameLjava/lang/String; /10org/openqa/selenium/Cookie 23getName()Ljava/lang/String; 5 '(deleteAllCookies6 !9 $:9(Ljava/lang/String;)Lorg/openqa/selenium/remote/Response; getCookies()Ljava/util/Set; Signature/()Ljava/util/Set;; ACB#org/openqa/selenium/remote/Response DEgetValue()Ljava/lang/Object;G.org/openqa/selenium/remote/JsonToBeanConverter FJjava/util/List FL MNconvert7(Ljava/lang/Class;Ljava/lang/Object;)Ljava/lang/Object;Pjava/util/HashSet O IS TUiterator()Ljava/util/Iterator; WYXjava/util/Iterator ZEnext\ java/util/Map [^ _`get&(Ljava/lang/Object;)Ljava/lang/Object;bjava/lang/Stringdvaluefpathhdomainjsecureljava/lang/Booleannexpirypjava/lang/Numberrjava/util/Date tvujava/util/concurrent/TimeUnit wxSECONDSLjava/util/concurrent/TimeUnit; oz {| longValue()J t~ toMillis(J)J q (J)V"org/openqa/selenium/Cookie$Builder '(Ljava/lang/String;Ljava/lang/String;)V f8(Ljava/lang/String;)Lorg/openqa/selenium/Cookie$Builder; h k  booleanValue()Z isSecure'(Z)Lorg/openqa/selenium/Cookie$Builder;  expiresOn6(Ljava/util/Date;)Lorg/openqa/selenium/Cookie$Builder; build()Lorg/openqa/selenium/Cookie;  java/util/Set add(Ljava/lang/Object;)Z W hasNext&org/openqa/selenium/WebDriverException (Ljava/lang/Throwable;)Vjava/lang/ExceptionreturnedLjava/lang/Object;cookiesLjava/util/List;toReturnLjava/util/Set; rawCookieLjava/util/Map;Ljava/lang/Boolean; expiryNumLjava/lang/Number;Ljava/util/Date;eLjava/lang/Exception;LocalVariableTypeTableGLjava/util/List;>;-Ljava/util/Set;5Ljava/util/Map;getCookieNamed0(Ljava/lang/String;)Lorg/openqa/selenium/Cookie;  ;< S a equals allCookiesgetSpeed()Lorg/openqa/selenium/Speed; org/openqa/selenium/Speed valueOf/(Ljava/lang/String;)Lorg/openqa/selenium/Speed;response%Lorg/openqa/selenium/remote/Response;setSpeed(Lorg/openqa/selenium/Speed;)VspeedLorg/openqa/selenium/Speed;timeouts*()Lorg/openqa/selenium/WebDriver$Timeouts;9org/openqa/selenium/remote/RemoteWebDriver$RemoteTimeouts  SourceFileRemoteWebDriver.java InnerClassesBuilderorg/openqa/selenium/WebDriverOptions&org/openqa/selenium/WebDriver$TimeoutsTimeoutsRemoteTimeoutsRemoteWebDriverOptions!   4 *+ *   I* + W &'( I* )++ W ,-* A *+.4   &6 9 * 78W    ;<=>   * ?8@LFYHI+KIMOYQN,R:V[:+]a:c]a:e]a:g]a: i]k: m]o:  qYs y}: -Y   WP-MY, f &=KYgu  &=K,-Yd-gsf-ueh- Wj I ,n  &= 4*M,:V/N-.+ř-&(2*44,-/ & / M* ˶8L+@a̰    I* + W  6 Y* ް  */   !!PK %^D>]}==0org/openqa/selenium/remote/RemoteWebDriver.class1*org/openqa/selenium/remote/RemoteWebDriverjava/lang/Objectorg/openqa/selenium/WebDriver&org/openqa/selenium/JavascriptExecutor &org/openqa/selenium/internal/FindsById -org/openqa/selenium/internal/FindsByClassName,org/openqa/selenium/internal/FindsByLinkText(org/openqa/selenium/internal/FindsByName/org/openqa/selenium/internal/FindsByCssSelector+org/openqa/selenium/internal/FindsByTagName)org/openqa/selenium/internal/FindsByXPath#org/openqa/selenium/HasInputDevices errorHandler)Lorg/openqa/selenium/remote/ErrorHandler;executor,Lorg/openqa/selenium/remote/CommandExecutor; capabilities"Lorg/openqa/selenium/Capabilities; sessionId&Lorg/openqa/selenium/remote/SessionId; converter?Lorg/openqa/selenium/remote/internal/JsonToWebElementConverter;keyboard;Lorg/openqa/selenium/remote/RemoteWebDriver$RemoteKeyboard;mouse8Lorg/openqa/selenium/remote/RemoteWebDriver$RemoteMouse;()VCode + '(-'org/openqa/selenium/remote/ErrorHandler ,+ 0 29org/openqa/selenium/remote/RemoteWebDriver$RemoteKeyboard 14 '5j(Lorg/openqa/selenium/remote/RemoteWebDriver;Lorg/openqa/selenium/remote/RemoteWebDriver$RemoteKeyboard;)V 7 #$96org/openqa/selenium/remote/RemoteWebDriver$RemoteMouse 8; '</(Lorg/openqa/selenium/remote/RemoteWebDriver;)V > %&@=org/openqa/selenium/remote/internal/JsonToWebElementConverter ?; C !"LineNumberTableLocalVariableTablethis,Lorg/openqa/selenium/remote/RemoteWebDriver;Q(Lorg/openqa/selenium/remote/CommandExecutor;Lorg/openqa/selenium/Capabilities;)V J  L M( startClient O PQ startSession%(Lorg/openqa/selenium/Capabilities;)VdesiredCapabilities T 'U3(Ljava/net/URL;Lorg/openqa/selenium/Capabilities;)VW.org/openqa/selenium/remote/HttpCommandExecutor VY 'Z(Ljava/net/URL;)V \ 'H remoteAddressLjava/net/URL; getSessionId(()Lorg/openqa/selenium/remote/SessionId; b  d newSessionR gih&com/google/common/collect/ImmutableMap jkofN(Ljava/lang/Object;Ljava/lang/Object;)Lcom/google/common/collect/ImmutableMap; m noexecuteH(Ljava/lang/String;Ljava/util/Map;)Lorg/openqa/selenium/remote/Response; qsr#org/openqa/selenium/remote/Response tugetValue()Ljava/lang/Object;w java/util/Mapy.org/openqa/selenium/remote/DesiredCapabilities x+ v| }~entrySet()Ljava/util/Set;  java/util/Set iterator()Ljava/util/Iterator; java/util/Iterator unextjava/util/Map$Entryplatform ugetKey java/lang/String equals(Ljava/lang/Object;)Z s x  setCapability'(Ljava/lang/String;Ljava/lang/Object;)V hasNext()Z v get&(Ljava/lang/Object;)Ljava/lang/Object; org/openqa/selenium/Platform ANYLorg/openqa/selenium/Platform; valueOf2(Ljava/lang/String;)Lorg/openqa/selenium/Platform; extractFromSysProperty x  setPlatform!(Lorg/openqa/selenium/Platform;)V  $org/openqa/selenium/remote/SessionId q _()Ljava/lang/String; '(Ljava/lang/String;)V"java/lang/IllegalArgumentExceptionresponse%Lorg/openqa/selenium/remote/Response;rawCapabilitiesLjava/util/Map;returnedCapabilities0Lorg/openqa/selenium/remote/DesiredCapabilities;entryLjava/util/Map$Entry;platformStringLjava/lang/String;e$Ljava/lang/IllegalArgumentException;LocalVariableTypeTable5Ljava/util/Map;;Ljava/util/Map$Entry; stopClientgetErrorHandler+()Lorg/openqa/selenium/remote/ErrorHandler;getCommandExecutor.()Lorg/openqa/selenium/remote/CommandExecutor;setCommandExecutor/(Lorg/openqa/selenium/remote/CommandExecutor;)VgetCapabilities$()Lorg/openqa/selenium/Capabilities;urlgetTitle  n9(Ljava/lang/String;)Lorg/openqa/selenium/remote/Response;  toStringvalueLjava/lang/Object; getCurrentUrl findElements*(Lorg/openqa/selenium/By;)Ljava/util/List; SignatureL(Lorg/openqa/selenium/By;)Ljava/util/List; org/openqa/selenium/By 5(Lorg/openqa/selenium/SearchContext;)Ljava/util/List;byLorg/openqa/selenium/By; findElement:(Lorg/openqa/selenium/By;)Lorg/openqa/selenium/WebElement; E(Lorg/openqa/selenium/SearchContext;)Lorg/openqa/selenium/WebElement;F(Ljava/lang/String;Ljava/lang/String;)Lorg/openqa/selenium/WebElement;/Cannot find elements when the selector is null. using g jr(Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;)Lcom/google/common/collect/ImmutableMap;org/openqa/selenium/WebElement6(Ljava/lang/String;Ljava/lang/String;)Ljava/util/List;X(Ljava/lang/String;Ljava/lang/String;)Ljava/util/List; java/util/ListfindElementById4(Ljava/lang/String;)Lorg/openqa/selenium/WebElement;id  findElementsById$(Ljava/lang/String;)Ljava/util/List;F(Ljava/lang/String;)Ljava/util/List;  findElementByLinkText link textfindElementsByLinkTextfindElementByPartialLinkTextpartial link textfindElementsByPartialLinkTextfindElementByTagName!tag namefindElementsByTagNamefindElementByName%namefindElementsByNamefindElementByClassName) class namefindElementsByClassNamefindElementByCssSelector- css selectorfindElementsByCssSelectorfindElementByXPath1xpathfindElementsByXPath getPageSource3close5quit7 : (getWindowHandles%()Ljava/util/Set;;?java/util/LinkedHashSet >A 'B(Ljava/util/Collection;)VreturnedValuesLjava/util/List;$Ljava/util/List;getWindowHandleHgetCurrentWindowHandle J K&(Ljava/lang/Object;)Ljava/lang/String; executeScript9(Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/Object; OQP org/openqa/selenium/Capabilities RisJavascriptEnabledT'java/lang/UnsupportedOperationExceptionVXYou must be using an underlying instance of WebDriver that supports executing javascript SY"[\" ] ^_ replaceAll8(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String; acbcom/google/common/collect/Lists de newArrayList*([Ljava/lang/Object;)Ljava/util/ArrayList;g=org/openqa/selenium/remote/internal/WebElementToJsonConverter f+ jlk#com/google/common/collect/Iterables mn transformK(Ljava/lang/Iterable;Lcom/google/common/base/Function;)Ljava/lang/Iterable;pscriptrargs at du+(Ljava/lang/Iterable;)Ljava/util/ArrayList;L[Ljava/lang/Object; convertedArgsLjava/lang/Iterable;params(Ljava/lang/Iterable;$Ljava/util/Map;executeAsyncScript Q}switchTo/()Lorg/openqa/selenium/WebDriver$TargetLocator;>org/openqa/selenium/remote/RemoteWebDriver$RemoteTargetLocator ;navigate,()Lorg/openqa/selenium/WebDriver$Navigation;;org/openqa/selenium/remote/RemoteWebDriver$RemoteNavigation  'l(Lorg/openqa/selenium/remote/RemoteWebDriver;Lorg/openqa/selenium/remote/RemoteWebDriver$RemoteNavigation;)Vmanage)()Lorg/openqa/selenium/WebDriver$Options;Aorg/openqa/selenium/remote/RemoteWebDriver$RemoteWebDriverOptions ;newRemoteWebElement/()Lorg/openqa/selenium/remote/RemoteWebElement; DeprecatedRuntimeVisibleAnnotationsLjava/lang/Deprecated;3org/openqa/selenium/remote/RenderedRemoteWebElement ++org/openqa/selenium/remote/RemoteWebElement +  < setParenttoReturn-Lorg/openqa/selenium/remote/RemoteWebElement;setElementConverterB(Lorg/openqa/selenium/remote/internal/JsonToWebElementConverter;)VgetElementConverterA()Lorg/openqa/selenium/remote/internal/JsonToWebElementConverter;](Ljava/lang/String;Ljava/util/Map;)Lorg/openqa/selenium/remote/Response;"org/openqa/selenium/remote/Command  'J(Lorg/openqa/selenium/remote/SessionId;Ljava/lang/String;Ljava/util/Map;)V  getName  logM(Lorg/openqa/selenium/remote/SessionId;Ljava/lang/String;Ljava/lang/Object;)V *org/openqa/selenium/remote/CommandExecutor nK(Lorg/openqa/selenium/remote/Command;)Lorg/openqa/selenium/remote/Response; ? apply q setValue(Ljava/lang/Object;)V&org/openqa/selenium/WebDriverException  '(Ljava/lang/Throwable;)V , throwIfResponseFailedL(Lorg/openqa/selenium/remote/Response;)Lorg/openqa/selenium/remote/Response;java/lang/RuntimeExceptionjava/lang/Exception driverCommand parameterscommand$Lorg/openqa/selenium/remote/Command;Ljava/lang/RuntimeException;Ljava/lang/Exception; g j*()Lcom/google/common/collect/ImmutableMap; getKeyboard ()Lorg/openqa/selenium/Keyboard;getMouse()Lorg/openqa/selenium/Mouse; commandNametoLogactionsBuilder:()Lorg/openqa/selenium/interactions/ActionChainsGenerator;=org/openqa/selenium/interactions/DefaultActionChainsGenerator  '"(Lorg/openqa/selenium/WebDriver;)V SourceFileRemoteWebDriver.java InnerClassesEntry(org/openqa/selenium/WebDriver$Navigation Navigation%org/openqa/selenium/WebDriver$OptionsOptions+org/openqa/selenium/WebDriver$TargetLocator TargetLocator6org/openqa/selenium/remote/RemoteWebDriver$RemoteAlert RemoteAlertRemoteKeyboard RemoteMouseRemoteNavigationRemoteTargetLocator9org/openqa/selenium/remote/RemoteWebDriver$RemoteTimeoutsRemoteTimeoutsRemoteWebDriverOptions!   !"#$%&7'()s5***,Y./*1Y*36*8Y*:=*?Y*ABDNBJK(O4PE 5FG'H)C***,Y./*1Y*36*8Y*:=*+I*?Y*AB*K*,ND& RBJK(S-T9U=VBWE CFGCCR'Q)?*+SD Z[EFGR'U)P*VY+X,[D ^ _E FG]^R_`)/*aDbE FGPQ)*ce+flM,pvNxYz:-{:7:-:  :: ::**Y,ayDRgh g jkl:nIoLqbllsyvwy{~Ep FGR :(yG:(M()+DE FG()+DE FG)/*/DE FG)/*IDE FG)>*+ID EFG)/*DE FG)F*+flWD  EFG)`*߶L+pM,,D E FG )7 *pDE  FG):+*DEFG):+*DEFG)', Y*+,lN-pDE*'FG'')(, Y* +,lN-p D E*(FG((   )= *+DE FG )= *+DE FG  )= *+DE FG )= *+DE FG  )= *+DE FG )= *+DE FG  )= * +DE FG ")= * +DE FG # )= *$+DE FG &)= *$+DE FG ' )= *(+DE FG *)= *(+DE FG + )= *,+DE FG .)= *,+DE FG / )= *0+D E FG 2)= *0+D E FG 3)8*4pDE FG5()7 *6WD E  FG7()o!*8WL*a*9+*a*9 D"    !E !FG;~<)q*=L+p M>Y,@D%&(E FG CD  CEF)8*GpID,E FGLM)N*NSYUW+XZ\L,`fYhiNo+q-s:*vlpD& 0 15"8-71;5<<:A>E4NFGNpNrw1xyA z1x{A z|}M)I*~SYUW+XZ\L,`fYhiNo+q-s:*lpD"BCHK(J,N7M<PE4IFGIpIrw,xy< z,x{< z|R)4 *NDTE  FG)3 Y*DXE  FG)4 Y*D\E  FG)3 Y*D`E  FG)t&*NYL YL+*+Dm npr$sE &FG)>*+BD wxEFG!")/*BD{E FGno)Y*a+,N**a--*I-:**a-*Bp:**a-0:**a-:**a-Y*/ð:b<_b:u<_uDB',:<JQbdruwE\ FG'; Jdw |n)= *+ѶlDE FG )/*6DE FG)/*=DE FG)IDE*FG )3 Y*ްDE  FGZ v    18PK %^D>V @org/openqa/selenium/remote/HttpCommandExecutor$CommandInfo.class1:org/openqa/selenium/remote/HttpCommandExecutor$CommandInfojava/lang/ObjecturlLjava/lang/String;verb9Lorg/openqa/selenium/remote/HttpCommandExecutor$HttpVerb;N(Ljava/lang/String;Lorg/openqa/selenium/remote/HttpCommandExecutor$HttpVerb;)VCode  ()V    LineNumberTableLocalVariableTablethis?getJ(Ljava/lang/String;Lorg/openqa/selenium/remote/Command;)Ljava/lang/String; A B!toString DFE7org/openqa/selenium/remote/HttpCommandExecutor$HttpVerb GH createMethodC(Ljava/lang/String;)Lorg/apache/http/client/methods/HttpUriRequest;baseLjava/net/URL;command$Lorg/openqa/selenium/remote/Command; urlBuilderLjava/lang/StringBuilder;partvalueR sessionId )T UVequals(Ljava/lang/Object;)Z XZY"org/openqa/selenium/remote/Command [\ getSessionId(()Lorg/openqa/selenium/remote/SessionId;^&org/openqa/selenium/WebDriverException`Session ID may not be null ]b c(Ljava/lang/String;)V eAf$org/openqa/selenium/remote/SessionId Xh ij getParameters()Ljava/util/Map; lnm java/util/Map >o&(Ljava/lang/Object;)Ljava/lang/Object; )q rsvalueOf&(Ljava/lang/Object;)Ljava/lang/String; uwvorg/openqa/selenium/net/Urls xy urlEncode&(Ljava/lang/String;)Ljava/lang/String; propertyNameid&Lorg/openqa/selenium/remote/SessionId;Ljava/lang/Object;(Ljava/lang/String;Lorg/openqa/selenium/remote/HttpCommandExecutor$HttpVerb;Lorg/openqa/selenium/remote/HttpCommandExecutor$CommandInfo;)V   SourceFileHttpCommandExecutor.java InnerClasses.org/openqa/selenium/remote/HttpCommandExecutor CommandInfoHttpVerb   Y* *+*,    YN-+"W*&(Y:66U2:.@-&"W24(*8,<:-*8,<"W -"W*-@C6 -58?IV[nu>IJKLMN-HOVP>? :Q+S,WN- ]Y_a-d,g+kN- -pt&  !,084::z:KL{|,P} ~ '*+, DD PK %^D>;LT  Gorg/openqa/selenium/remote/HttpCommandExecutor$EntityWithEncoding.class1DAorg/openqa/selenium/remote/HttpCommandExecutor$EntityWithEncodingjava/lang/ObjectcharSetLjava/lang/String;content[Bthis$00Lorg/openqa/selenium/remote/HttpCommandExecutor;O(Lorg/openqa/selenium/remote/HttpCommandExecutor;Lorg/apache/http/HttpEntity;)V Exceptionsjava/io/IOExceptionCode   ()V  org/apache/http/util/EntityUtils  toByteArray (Lorg/apache/http/HttpEntity;)[B    !getContentCharSet0(Lorg/apache/http/HttpEntity;)Ljava/lang/String; #  %'&org/apache/http/HttpEntity (consumeContentLineNumberTableLocalVariableTablethisCLorg/openqa/selenium/remote/HttpCommandExecutor$EntityWithEncoding;entityLorg/apache/http/HttpEntity;getContentString()Ljava/lang/String;2$java/io/UnsupportedEncodingException4java/lang/String6utf-8 38 9([BLjava/lang/String;)V getContent()[BhasEntityContent()Z SourceFileHttpCommandExecutor.java InnerClassesB.org/openqa/selenium/remote/HttpCommandExecutorEntityWithEncoding    3*+*,*,*,",$**")"MB D EFG&I-J*3+,3-./0 1F3Y**" *"57)Q* +,:;/*)U* +,<=5 *)Y*  +,>?@ ACPK %^D>ֲ:1?org/openqa/selenium/remote/HttpCommandExecutor$HttpVerb$1.class19org/openqa/selenium/remote/HttpCommandExecutor$HttpVerb$17org/openqa/selenium/remote/HttpCommandExecutor$HttpVerb(Ljava/lang/String;I)VCode   O(Ljava/lang/String;ILorg/openqa/selenium/remote/HttpCommandExecutor$HttpVerb;)VLineNumberTableLocalVariableTablethis;Lorg/openqa/selenium/remote/HttpCommandExecutor$HttpVerb$1; createMethodC(Ljava/lang/String;)Lorg/apache/http/client/methods/HttpUriRequest;&org/apache/http/client/methods/HttpGet  (Ljava/lang/String;)VurlLjava/lang/String; SourceFileHttpCommandExecutor.javaEnclosingMethod InnerClasses.org/openqa/selenium/remote/HttpCommandExecutorHttpVerb@ 6*+ G  = Y+ I   D @PK %^D>c?org/openqa/selenium/remote/HttpCommandExecutor$HttpVerb$2.class19org/openqa/selenium/remote/HttpCommandExecutor$HttpVerb$27org/openqa/selenium/remote/HttpCommandExecutor$HttpVerb(Ljava/lang/String;I)VCode   O(Ljava/lang/String;ILorg/openqa/selenium/remote/HttpCommandExecutor$HttpVerb;)VLineNumberTableLocalVariableTablethis;Lorg/openqa/selenium/remote/HttpCommandExecutor$HttpVerb$2; createMethodC(Ljava/lang/String;)Lorg/apache/http/client/methods/HttpUriRequest;'org/apache/http/client/methods/HttpPost  (Ljava/lang/String;)VurlLjava/lang/String; SourceFileHttpCommandExecutor.javaEnclosingMethod InnerClasses.org/openqa/selenium/remote/HttpCommandExecutorHttpVerb@ 6*+ L  = Y+ N   D @PK %^D>Yi?org/openqa/selenium/remote/HttpCommandExecutor$HttpVerb$3.class19org/openqa/selenium/remote/HttpCommandExecutor$HttpVerb$37org/openqa/selenium/remote/HttpCommandExecutor$HttpVerb(Ljava/lang/String;I)VCode   O(Ljava/lang/String;ILorg/openqa/selenium/remote/HttpCommandExecutor$HttpVerb;)VLineNumberTableLocalVariableTablethis;Lorg/openqa/selenium/remote/HttpCommandExecutor$HttpVerb$3; createMethodC(Ljava/lang/String;)Lorg/apache/http/client/methods/HttpUriRequest;)org/apache/http/client/methods/HttpDelete  (Ljava/lang/String;)VurlLjava/lang/String; SourceFileHttpCommandExecutor.javaEnclosingMethod InnerClasses.org/openqa/selenium/remote/HttpCommandExecutorHttpVerb@ 6*+ Q  = Y+ S   D @PK %^D>}˅=org/openqa/selenium/remote/HttpCommandExecutor$HttpVerb.class1B7org/openqa/selenium/remote/HttpCommandExecutor$HttpVerbjava/lang/EnumGET9Lorg/openqa/selenium/remote/HttpCommandExecutor$HttpVerb;POSTDELETE ENUM$VALUES:[Lorg/openqa/selenium/remote/HttpCommandExecutor$HttpVerb;()VCode9org/openqa/selenium/remote/HttpCommandExecutor$HttpVerb$1  (Ljava/lang/String;I)V  9org/openqa/selenium/remote/HttpCommandExecutor$HttpVerb$2   9org/openqa/selenium/remote/HttpCommandExecutor$HttpVerb$3  "  $ LineNumberTableLocalVariableTable this createMethodC(Ljava/lang/String;)Lorg/apache/http/client/methods/HttpUriRequest;values<()[Lorg/openqa/selenium/remote/HttpCommandExecutor$HttpVerb; .0/java/lang/System 12 arraycopy*(Ljava/lang/Object;ILjava/lang/Object;II)VvalueOfM(Ljava/lang/String;)Lorg/openqa/selenium/remote/HttpCommandExecutor$HttpVerb; 6 375(Ljava/lang/Class;Ljava/lang/String;)Ljava/lang/Enum;O(Ljava/lang/String;ILorg/openqa/selenium/remote/HttpCommandExecutor$HttpVerb;)V  SourceFileHttpCommandExecutor.java SignatureKLjava/lang/Enum; InnerClasses@.org/openqa/selenium/remote/HttpCommandExecutorHttpVerbD @@@   mAYYY !YSYSY!S#%G LQ'F& 1*+'%F& ()* +, 6#YK*Y<YM-,%& 34 * *5%&8 '*+9%F&:;<=>"?AD @@@PK %^D>vwCC4org/openqa/selenium/remote/HttpCommandExecutor.class1).org/openqa/selenium/remote/HttpCommandExecutorjava/lang/Object*org/openqa/selenium/remote/CommandExecutor MAX_REDIRECTSI ConstantValue  targetHostLorg/apache/http/HttpHost; remoteServerLjava/net/URL; nameToUrlLjava/util/Map; Signature_Ljava/util/Map;client#Lorg/apache/http/client/HttpClient;getClientConnectionManagerS(Lorg/apache/http/params/HttpParams;)Lorg/apache/http/conn/ClientConnectionManager;Code*org/apache/http/conn/scheme/SchemeRegistry  ()V"org/apache/http/conn/scheme/Scheme!http #%$5org/openqa/selenium/remote/ReusingSocketSocketFactory &'getSocketFactory9()Lorg/openqa/selenium/remote/ReusingSocketSocketFactory; ) *A(Ljava/lang/String;Lorg/apache/http/conn/scheme/SocketFactory;I)V , -.registerJ(Lorg/apache/http/conn/scheme/Scheme;)Lorg/apache/http/conn/scheme/Scheme;0https 243)org/apache/http/conn/ssl/SSLSocketFactory &5-()Lorg/apache/http/conn/ssl/SSLSocketFactory;71org/apache/http/impl/conn/SingleClientConnManager 69 :R(Lorg/apache/http/params/HttpParams;Lorg/apache/http/conn/scheme/SchemeRegistry;)VLineNumberTableLocalVariableTable httpParams#Lorg/apache/http/params/HttpParams;registry,Lorg/apache/http/conn/scheme/SchemeRegistry;(Ljava/net/URL;)V D java/net/URLFwebdriver.remote.server HJIjava/lang/System KL getProperty&(Ljava/lang/String;)Ljava/lang/String; CN O(Ljava/lang/String;)V Q S&org/openqa/selenium/WebDriverException RU V(Ljava/lang/Throwable;)VX&org/apache/http/params/BasicHttpParams W[http.socket.linger ]_^java/lang/Integer `avalueOf(I)Ljava/lang/Integer; ced!org/apache/http/params/HttpParams fg setParameterI(Ljava/lang/String;Ljava/lang/Object;)Lorg/apache/http/params/HttpParams; ikj.org/apache/http/client/params/HttpClientParams lmsetRedirecting'(Lorg/apache/http/params/HttpParams;Z)Vo-org/apache/http/impl/client/DefaultHttpClient q  ns tT(Lorg/apache/http/conn/ClientConnectionManager;Lorg/apache/http/params/HttpParams;)V v  Cx yz getUserInfo()Ljava/lang/String;|0org/apache/http/auth/UsernamePasswordCredentials {N n getCredentialsProvider.()Lorg/apache/http/client/CredentialsProvider; org/apache/http/auth/AuthScope ANY Lorg/apache/http/auth/AuthScope; *org/apache/http/client/CredentialsProvider setCredentialsE(Lorg/apache/http/auth/AuthScope;Lorg/apache/http/auth/Credentials;)V C zgetHost .localdomain java/lang/String replaceD(Ljava/lang/CharSequence;Ljava/lang/CharSequence;)Ljava/lang/String;org/apache/http/HttpHost C getPort()I C z getProtocol ((Ljava/lang/String;ILjava/lang/String;)V  &com/google/common/collect/ImmutableMap builder2()Lcom/google/common/collect/ImmutableMap$Builder; newSession/session  postP(Ljava/lang/String;)Lorg/openqa/selenium/remote/HttpCommandExecutor$CommandInfo; .com/google/common/collect/ImmutableMap$Builder putV(Ljava/lang/Object;Ljava/lang/Object;)Lcom/google/common/collect/ImmutableMap$Builder;quit/session/:sessionId  deletegetCurrentWindowHandle!/session/:sessionId/window_handle  getgetWindowHandles"/session/:sessionId/window_handles/session/:sessionId/url dismissAlert!/session/:sessionId/dismiss_alert acceptAlert /session/:sessionId/accept_alert getAlertText/session/:sessionId/alert_text setAlertValue goForward/session/:sessionId/forwardgoBack/session/:sessionId/backrefresh/session/:sessionId/refresh executeScript/session/:sessionId/executeexecuteAsyncScript!/session/:sessionId/execute_async getCurrentUrlgetTitle/session/:sessionId/title getPageSource/session/:sessionId/source screenshot/session/:sessionId/screenshotsetBrowserVisible/session/:sessionId/visibleisBrowserVisible  findElement /session/:sessionId/element  findElements/session/:sessionId/elementsgetActiveElement"/session/:sessionId/element/activefindChildElement'/session/:sessionId/element/:id/elementfindChildElements(/session/:sessionId/element/:id/elements clickElement%/session/:sessionId/element/:id/click! clearElement#%/session/:sessionId/element/:id/clear% submitElement'&/session/:sessionId/element/:id/submit)getElementText+$/session/:sessionId/element/:id/text-sendKeysToElement/%/session/:sessionId/element/:id/value1getElementValue3getElementTagName5$/session/:sessionId/element/:id/name7isElementSelected9(/session/:sessionId/element/:id/selected;setElementSelected= toggleElement?&/session/:sessionId/element/:id/toggleAisElementEnabledC'/session/:sessionId/element/:id/enabledEisElementDisplayedG)/session/:sessionId/element/:id/displayedIhoverOverElementK%/session/:sessionId/element/:id/hoverMgetElementLocationO(/session/:sessionId/element/:id/locationQ&getElementLocationOnceScrolledIntoViewS0/session/:sessionId/element/:id/location_in_viewUgetElementSizeW$/session/:sessionId/element/:id/sizeYgetElementAttribute[//session/:sessionId/element/:id/attribute/:name] elementEquals_-/session/:sessionId/element/:id/equals/:othera getCookiesc/session/:sessionId/cookiee addCookiegdeleteAllCookiesi deleteCookiek /session/:sessionId/cookie/:namem switchToFrameo/session/:sessionId/frameqswitchToWindows/session/:sessionId/windowuclosew dragElementy$/session/:sessionId/element/:id/drag{getSpeed}/session/:sessionId/speedsetSpeedgetElementValueOfCssProperty1/session/:sessionId/element/:id/css/:propertyNameimplicitlyWait*/session/:sessionId/timeouts/implicit_waitsetScriptTimeout)/session/:sessionId/timeouts/async_script executeSQL/session/:sessionId/execute_sql getLocation/session/:sessionId/location setLocation getAppCache%/session/:sessionId/application_cache getStatus,/session/:sessionId/application_cache/statusisBrowserOnline&/session/:sessionId/browser_connectionsetBrowserOnlinegetLocalStorageItem&/session/:sessionId/local_storage/:keyremoveLocalStorageItemgetLocalStorageKeys!/session/:sessionId/local_storagesetLocalStorageItemclearLocalStoragegetLocalStorageSize&/session/:sessionId/local_storage/sizegetSessionStorageItem(/session/:sessionId/session_storage/:keyremoveSessionStorageItemgetSessionStorageKey#/session/:sessionId/session_storagesetSessionStorageItemclearSessionStoragegetSessionStorageSize(/session/:sessionId/session_storage/sizegetScreenOrientation/session/:sessionId/orientationsetScreenOrientation mouseClick/session/:sessionId/clickmouseDoubleClick/session/:sessionId/doubleclickmouseButtonDown/session/:sessionId/buttondown mouseButtonUp/session/:sessionId/buttonup mouseMoveTo/session/:sessionId/movetosendModifierKeyToActiveElement/session/:sessionId/modifier  build*()Lcom/google/common/collect/ImmutableMap;  java/net/MalformedURLExceptionthis0Lorg/openqa/selenium/remote/HttpCommandExecutor;addressOfRemoteServere Ljava/net/MalformedURLException;params credentials2Lorg/apache/http/auth/UsernamePasswordCredentials;hostLjava/lang/String;getAddressOfRemoteServer()Ljava/net/URL;executeK(Lorg/openqa/selenium/remote/Command;)Lorg/openqa/selenium/remote/Response; Exceptionsjava/io/IOException)org/apache/http/protocol/BasicHttpContext  "org/openqa/selenium/remote/Command zgetName    java/util/Map  &(Ljava/lang/Object;)Ljava/lang/Object; :org/openqa/selenium/remote/HttpCommandExecutor$CommandInfo    getMethodc(Ljava/net/URL;Lorg/openqa/selenium/remote/Command;)Lorg/apache/http/client/methods/HttpUriRequest;  setAcceptHeader2(Lorg/apache/http/client/methods/HttpUriRequest;)V'org/apache/http/client/methods/HttpPost.org/openqa/selenium/remote/BeanToJsonConverter    getParameters()Ljava/util/Map;  !"convert&(Ljava/lang/Object;)Ljava/lang/String;$#org/apache/http/entity/StringEntity&utf-8 #( )'(Ljava/lang/String;Ljava/lang/String;)V + ,- setEntity(Lorg/apache/http/HttpEntity;)V/ Content-Type1application/json; charset=utf-8 354-org/apache/http/client/methods/HttpUriRequest 6) addHeader 8:9!org/apache/http/client/HttpClient ;}(Lorg/apache/http/HttpHost;Lorg/apache/http/HttpRequest;Lorg/apache/http/protocol/HttpContext;)Lorg/apache/http/HttpResponse; = >?followRedirects(Lorg/apache/http/client/HttpClient;Lorg/apache/http/protocol/HttpContext;Lorg/apache/http/HttpResponse;I)Lorg/apache/http/HttpResponse;AAorg/openqa/selenium/remote/HttpCommandExecutor$EntityWithEncoding CEDorg/apache/http/HttpResponse FG getEntity()Lorg/apache/http/HttpEntity; @I JO(Lorg/openqa/selenium/remote/HttpCommandExecutor;Lorg/apache/http/HttpEntity;)V L MNcreateResponse(Lorg/apache/http/HttpResponse;Lorg/apache/http/protocol/HttpContext;Lorg/openqa/selenium/remote/HttpCommandExecutor$EntityWithEncoding;)Lorg/openqa/selenium/remote/Response; P QRequals(Ljava/lang/Object;)ZT#org/openqa/selenium/remote/Response SWjava/lang/NullPointerExceptioncommand$Lorg/openqa/selenium/remote/Command;context&Lorg/apache/http/protocol/HttpContext;info1?@An*B*+CYEGM+P MRY,TWYYM,Z\bW,h*nY,p,ru+w"{Y+w}N*un~-*PN*Y-*P*P*Ƹȶ͸ȶиԸظܸȶܸиȶȶȶȶȶ   "$&(*ȶ,.0.ȶ24ȶ68ȶ:8<>@BȶDFȶHJLNȶPRȶTVȶXZȶ\^ȶ`bȶdbfbhjlnprtrvxz|ȶ~|ȶȶȶȶȶȶȶȶȶȶƸȶʸȶʸиԸظܸ;oac decf g)j1l>mCoSpZsbrftpuy{}~} (2<FP[gs'3?KWZ`co{ #/;GS_kw+7CO[gjm<>nn 1=>f/*P;< |YM*+ N-*P+:*4Y+:#Y%'*.02:*u*,7:**u,<:@Y*BH:*,K:+O SYUV;F$*2BVcfx<\ XYZ[\]$}^_B!`f;ab cdeE +fh2;   <  ^_>? *-j- RYnp-qsw::*,|:-B: Y:*+*,7: *+, `<:RYT:RYT:RYT/xy/x/x;R  ,/8@EL W!]"l#y${%&'()< Z[ab,qr/n@9W"l b {   ~>Y,N-/+:YY,N-;/ 012<4<4>>Z[>r 5 lm8+=-./ 3+q;8 :(;7:< 88ab ,MN z+.s:_wĶƙO-:YSS:=:ORYYҷԿSYU:w׶ƙ-ٶݧ- -ɶ,::6.`66   +6  Ǥ  ,F    ,  X   &:=; b d e&h=i?jNoPqltuvwxy|}~#-=EOVaw<zzbzZ[zcd:a ua  o  &F ?-   t 7  Y*;<   7  Y*;<   7  Y*;<  "#$"%  & @'(D PK %^D>|0org/openqa/selenium/remote/CommandExecutor.class1 *org/openqa/selenium/remote/CommandExecutorjava/lang/ObjectexecuteK(Lorg/openqa/selenium/remote/Command;)Lorg/openqa/selenium/remote/Response; Exceptions java/io/IOException SourceFileCommandExecutor.java  PK %^D>C5org/openqa/selenium/remote/AddTakesScreenshot$1.class1I/org/openqa/selenium/remote/AddTakesScreenshot$1java/lang/Object2org/openqa/selenium/remote/InterfaceImplementationthis$0/Lorg/openqa/selenium/remote/AddTakesScreenshot;2(Lorg/openqa/selenium/remote/AddTakesScreenshot;)VCode    ()VLineNumberTableLocalVariableTablethis1Lorg/openqa/selenium/remote/AddTakesScreenshot$1;invoke}(Lorg/openqa/selenium/remote/ExecuteMethod;Ljava/lang/Object;Ljava/lang/reflect/Method;[Ljava/lang/Object;)Ljava/lang/Object; screenshot (org/openqa/selenium/remote/ExecuteMethod execute5(Ljava/lang/String;Ljava/util/Map;)Ljava/lang/Object; java/lang/String " #$getBytes()[B&[B(*org/openqa/selenium/internal/Base64Encoder ' '+ ,-encode([B)Ljava/lang/String;/org/openqa/selenium/OutputType .1 23convertFromBase64Png&(Ljava/lang/String;)Ljava/lang/Object; executeMethod*Lorg/openqa/selenium/remote/ExecuteMethod;selfLjava/lang/Object;methodLjava/lang/reflect/Method;args[Ljava/lang/Object;resultrawPngbase64Ljava/lang/String; SourceFileAddTakesScreenshot.javaEnclosingMethodD-org/openqa/selenium/remote/AddTakesScreenshot FGgetImplementationH(Ljava/lang/Object;)Lorg/openqa/selenium/remote/InterfaceImplementation; InnerClasses   8 *+ * #   I+: !:%'%:'Y)*:2.0"% '(+#,*-8.G1RII45I67I89I:; @<7*=&8>?@ABCEH PK %^D>n3org/openqa/selenium/remote/AddTakesScreenshot.class1"-org/openqa/selenium/remote/AddTakesScreenshotjava/lang/Object,org/openqa/selenium/remote/AugmenterProvider()VCode  LineNumberTableLocalVariableTablethis/Lorg/openqa/selenium/remote/AddTakesScreenshot;getDescribedInterface()Ljava/lang/Class; Signature()Ljava/lang/Class<*>;#org/openqa/selenium/TakesScreenshotgetImplementationH(Ljava/lang/Object;)Lorg/openqa/selenium/remote/InterfaceImplementation;/org/openqa/selenium/remote/AddTakesScreenshot$1  2(Lorg/openqa/selenium/remote/AddTakesScreenshot;)VignoredLjava/lang/Object; SourceFileAddTakesScreenshot.java InnerClasses  /*    -   = Y* #    ! PK %^D>>w"")org/openqa/selenium/remote/Response.class1B#org/openqa/selenium/remote/Responsejava/lang/ObjectvalueLjava/lang/Object; sessionIdLjava/lang/String;statusI()VCode  LineNumberTableLocalVariableTablethis%Lorg/openqa/selenium/remote/Response;)(Lorg/openqa/selenium/remote/SessionId;)V java/lang/String valueOf&(Ljava/lang/Object;)Ljava/lang/String;  &Lorg/openqa/selenium/remote/SessionId; getStatus()I !  setStatus(I)VsetValue(Ljava/lang/Object;)V ' getValue()Ljava/lang/Object; setSessionId(Ljava/lang/String;)V getSessionId()Ljava/lang/String;toString0 (%s %s: %s) 2 ,- 4  687java/lang/Integer 9(I)Ljava/lang/Integer; ; () = >?format9(Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/String; SourceFile Response.java!BBB   3*    I **+    /* " "# >*  &' $% >*+& *+() /*&. *+ >*+ 23,- /*6 .- L"/Y*1SY*35SY*:S<: "@APK %^D>b4org/openqa/selenium/remote/DesiredCapabilities.class1.org/openqa/selenium/remote/DesiredCapabilitiesjava/lang/Objectjava/io/Serializable org/openqa/selenium/Capabilities capabilitiesLjava/util/Map; Signature5Ljava/util/Map;E(Ljava/lang/String;Ljava/lang/String;Lorg/openqa/selenium/Platform;)VCode  ()Vjava/util/HashMap    browserName   setCapability'(Ljava/lang/String;Ljava/lang/String;)Vversion!platform # $3(Ljava/lang/String;Lorg/openqa/selenium/Platform;)VLineNumberTableLocalVariableTablethis0Lorg/openqa/selenium/remote/DesiredCapabilities;browserLjava/lang/String;Lorg/openqa/selenium/Platform;(Ljava/util/Map;)V'(Ljava/util/Map;)V /10 java/util/Map 2,putAll /4 56get&(Ljava/lang/Object;)Ljava/lang/Object;8java/lang/String :<;org/openqa/selenium/Platform =>valueOf2(Ljava/lang/String;)Lorg/openqa/selenium/Platform; /@ ABput8(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;rawMapvalueLjava/lang/Object;LocalVariableTypeTable$Ljava/util/Map;%(Lorg/openqa/selenium/Capabilities;)V J KLasMap()Ljava/util/Map;other"Lorg/openqa/selenium/Capabilities;getBrowserName()Ljava/lang/String;setBrowserName(Ljava/lang/String;)V getVersion setVersion getPlatform ()Lorg/openqa/selenium/Platform; /X YZ containsKey(Ljava/lang/Object;)Zraw setPlatform!(Lorg/openqa/selenium/Platform;)VisJavascriptEnabled()ZajavascriptEnabled cedjava/lang/Boolean fg parseBoolean(Ljava/lang/String;)Z ci j_ booleanValuesetJavascriptEnabled(Z)V n o(Ljava/lang/String;Z)VZ getCapability&(Ljava/lang/String;)Ljava/lang/Object;capabilityNameis v qr 7x =y&(Ljava/lang/Object;)Ljava/lang/String;capmergeextraCapabilities c~ =(Z)Ljava/lang/Boolean;&()Ljava/util/Map; java/util/Collections unmodifiableMap (Ljava/util/Map;)Ljava/util/Map;'(Ljava/lang/String;Ljava/lang/Object;)Vkeyfirefox2()Lorg/openqa/selenium/remote/DesiredCapabilities; : +ANY  internetExplorerinternet explorer : +WINDOWSensureCleanSessionhtmlUnithtmlunithtmlUnitWithJavascript  klhtmlUnitWithJSiphone : +MACchromeandroid : +ANDROIDtoStringCapabilities [%s] 7 format9(Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/String;equals / ZothathashCode()I /  SourceFileDesiredCapabilities.java!    %**Y*+*,* -"%$"%&'$(&*%'(%)*%*%!+ B**Y%*",& '( , -@**Y*+.* 3M,7* ,79?W%."/0%1,2?4& @'(@C %DEF @CG Hg#**Y+*+I.%7"89";&#'(#MNOP9*37%>& '(QR@*+% BC&'(*SP9*37%F& '(TR@*+% JK&'(*UV7* W** 3L+7 +79+:+:%NOP!Q)R0S5V&7'(\]@* +"% Z[&'(!+^_:*`W-*`3L+7 +7b+c +ch%^_`!a)b0c8f&:'([Ekl@*`m% jk&'(apqr? *+3%n& '( s*tgo%*+uM,,c ,ch ,wb%rs t v& %'(%s*zE{HH*+I.% &'(|NoR*+}?W% & '(s*DpO *+,?W%  &  '( s* D*$O *+,?W%  &  '( s* D+KL 2*%& '(O *+,?W%  &  '( * DE /Y%& RYK*m*% &  ( /Y%& LYK**%& ( /Y%& /Y%& /Y%&P;Y*S%& '(Zu#*+++M*,%& #'(#E(4 *%&  '(PK %^D>(org/openqa/selenium/remote/Command.class1K"org/openqa/selenium/remote/Commandjava/lang/Object sessionId&Lorg/openqa/selenium/remote/SessionId;nameLjava/lang/String; parametersLjava/util/Map; Signature$Ljava/util/Map;;(Lorg/openqa/selenium/remote/SessionId;Ljava/lang/String;)VCodejava/util/HashMap  ()V  J(Lorg/openqa/selenium/remote/SessionId;Ljava/lang/String;Ljava/util/Map;)VLineNumberTableLocalVariableTablethis$Lorg/openqa/selenium/remote/Command;_(Lorg/openqa/selenium/remote/SessionId;Ljava/lang/String;Ljava/util/Map;)V    ! # LocalVariableTypeTable getSessionId(()Lorg/openqa/selenium/remote/SessionId;getName()Ljava/lang/String; getParameters()Ljava/util/Map;&()Ljava/util/Map;toString.java/lang/StringBuilder0[ -2 3(Ljava/lang/String;)V -5 67append-(Ljava/lang/Object;)Ljava/lang/StringBuilder;9, -; 6<-(Ljava/lang/String;)Ljava/lang/StringBuilder;>]: @ Borg/json/JSONObject AD E(Ljava/util/Map;)V AG ,( -G SourceFile Command.java!    P*+,Y " #   ~**+*- *,"%& '()* $  %&/*, '(/*"0 )* +@* Y* 4 ,(e;-Y/1*48:=:*":?:AY* CF:H9 ;IJPK %^D>5org/openqa/selenium/remote/AddFindsChildByCss$1.class1j/org/openqa/selenium/remote/AddFindsChildByCss$1java/lang/Object2org/openqa/selenium/remote/InterfaceImplementationthis$0/Lorg/openqa/selenium/remote/AddFindsChildByCss;2(Lorg/openqa/selenium/remote/AddFindsChildByCss;)VCode    ()VLineNumberTableLocalVariableTablethis1Lorg/openqa/selenium/remote/AddFindsChildByCss$1;invoke}(Lorg/openqa/selenium/remote/ExecuteMethod;Ljava/lang/Object;Ljava/lang/reflect/Method;[Ljava/lang/Object;)Ljava/lang/Object;+org/openqa/selenium/remote/RemoteWebElement  getId()Ljava/lang/String;id using" css selector$value &('&com/google/common/collect/ImmutableMap )*of(Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;)Lcom/google/common/collect/ImmutableMap;,findElementByCssSelector .0/java/lang/reflect/Method 1getName 354java/lang/String 67equals(Ljava/lang/Object;)Z9 findElement ;=<(org/openqa/selenium/remote/ExecuteMethod >?execute5(Ljava/lang/String;Ljava/util/Map;)Ljava/lang/Object;AfindElementsByCssSelectorC findElementsE&org/openqa/selenium/WebDriverExceptionGjava/lang/StringBuilderIUnmapped method: FK L(Ljava/lang/String;)V FN OPappend-(Ljava/lang/String;)Ljava/lang/StringBuilder; FR StoString DK executeMethod*Lorg/openqa/selenium/remote/ExecuteMethod;selfLjava/lang/Object;methodLjava/lang/reflect/Method;args[Ljava/lang/Object; commandArgsLjava/util/Map;LocalVariableTypeTable$Ljava/util/Map; SourceFileAddFindsChildByCss.javaEnclosingMethode-org/openqa/selenium/remote/AddFindsChildByCss ghgetImplementationH(Ljava/lang/Object;)Lorg/openqa/selenium/remote/InterfaceImplementation; InnerClasses   8 *+ * "   a,:!#2%:+--2 +8:@--2 +B:DYFYHJ--MQT$ %'((1)=*F-HaaUVaWXaYZa[\ XXE]^_ E]`abcdfi PK %^D>wv3org/openqa/selenium/remote/AddFindsChildByCss.class1"-org/openqa/selenium/remote/AddFindsChildByCssjava/lang/Object,org/openqa/selenium/remote/AugmenterProvider()VCode  LineNumberTableLocalVariableTablethis/Lorg/openqa/selenium/remote/AddFindsChildByCss;getDescribedInterface()Ljava/lang/Class; Signature()Ljava/lang/Class<*>;/org/openqa/selenium/internal/FindsByCssSelectorgetImplementationH(Ljava/lang/Object;)Lorg/openqa/selenium/remote/InterfaceImplementation;/org/openqa/selenium/remote/AddFindsChildByCss$1  2(Lorg/openqa/selenium/remote/AddFindsChildByCss;)VvalueLjava/lang/Object; SourceFileAddFindsChildByCss.java InnerClasses! /*    -   = Y* "    ! PK %^D>" FNN0org/openqa/selenium/remote/AddFindsByCss$1.class1c*org/openqa/selenium/remote/AddFindsByCss$1java/lang/Object2org/openqa/selenium/remote/InterfaceImplementationthis$0*Lorg/openqa/selenium/remote/AddFindsByCss;-(Lorg/openqa/selenium/remote/AddFindsByCss;)VCode    ()VLineNumberTableLocalVariableTablethis,Lorg/openqa/selenium/remote/AddFindsByCss$1;invoke}(Lorg/openqa/selenium/remote/ExecuteMethod;Ljava/lang/Object;Ljava/lang/reflect/Method;[Ljava/lang/Object;)Ljava/lang/Object;using css selectorvalue  &com/google/common/collect/ImmutableMap !"ofr(Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;)Lcom/google/common/collect/ImmutableMap;$findElementByCssSelector &('java/lang/reflect/Method )*getName()Ljava/lang/String; ,.-java/lang/String /0equals(Ljava/lang/Object;)Z2 findElement 465(org/openqa/selenium/remote/ExecuteMethod 78execute5(Ljava/lang/String;Ljava/util/Map;)Ljava/lang/Object;:findElementsByCssSelector< findElements>&org/openqa/selenium/WebDriverException@java/lang/StringBuilderBUnmapped method: ?D E(Ljava/lang/String;)V ?G HIappend-(Ljava/lang/String;)Ljava/lang/StringBuilder; ?K L*toString =D executeMethod*Lorg/openqa/selenium/remote/ExecuteMethod;selfLjava/lang/Object;methodLjava/lang/reflect/Method;args[Ljava/lang/Object; commandArgsLjava/util/Map;LocalVariableTypeTable$Ljava/util/Map; SourceFileAddFindsByCss.javaEnclosingMethod^(org/openqa/selenium/remote/AddFindsByCss `agetImplementationH(Ljava/lang/Object;)Lorg/openqa/selenium/remote/InterfaceImplementation; InnerClasses   8 *+ * "   T2:#-%+ +139-%+ +;3=Y?YAC-%FJM%'($)0*9->TTNOTPQTRSTTUEVWX EVYZ[\]_b PK %^D>=kp|.org/openqa/selenium/remote/AddFindsByCss.class1"(org/openqa/selenium/remote/AddFindsByCssjava/lang/Object,org/openqa/selenium/remote/AugmenterProvider()VCode  LineNumberTableLocalVariableTablethis*Lorg/openqa/selenium/remote/AddFindsByCss;getDescribedInterface()Ljava/lang/Class; Signature()Ljava/lang/Class<*>;/org/openqa/selenium/internal/FindsByCssSelectorgetImplementationH(Ljava/lang/Object;)Lorg/openqa/selenium/remote/InterfaceImplementation;*org/openqa/selenium/remote/AddFindsByCss$1  -(Lorg/openqa/selenium/remote/AddFindsByCss;)VvalueLjava/lang/Object; SourceFileAddFindsByCss.java InnerClasses! /*    -   = Y* "    ! PK %^D>F.org/openqa/selenium/remote/JsonException.class1(org/openqa/selenium/remote/JsonException&org/openqa/selenium/WebDriverException(Lorg/json/JSONException;)VCode   (Ljava/lang/Throwable;)VLineNumberTableLocalVariableTablethis*Lorg/openqa/selenium/remote/JsonException;eLorg/json/JSONException; SourceFileJsonException.java!>*+   PK %^D>pQKK;org/openqa/selenium/remote/RenderedRemoteWebElement$1.class125org/openqa/selenium/remote/RenderedRemoteWebElement$1java/lang/Object5org/openqa/selenium/interactions/internal/Coordinatesthis$05Lorg/openqa/selenium/remote/RenderedRemoteWebElement;8(Lorg/openqa/selenium/remote/RenderedRemoteWebElement;)VCode    ()VLineNumberTableLocalVariableTablethis7Lorg/openqa/selenium/remote/RenderedRemoteWebElement$1;getLocationOnScreen()Lorg/openqa/selenium/Point; 3org/openqa/selenium/remote/RenderedRemoteWebElement 'getLocationOnScreenOnceScrolledIntoViewgetLocationInViewPort'java/lang/UnsupportedOperationException Not supported yet. " #(Ljava/lang/String;)VgetLocationInDOM getAuxiliry()Ljava/lang/Object; ( )*getId()Ljava/lang/String; SourceFileRenderedRemoteWebElement.javaEnclosingMethod /0getCoordinates9()Lorg/openqa/selenium/interactions/internal/Coordinates; InnerClasses   8 *+ * Y   2* \  4 Y!`  $ 4 Y!d  %& 2* 'h +,-.1 PK %^D>_-9org/openqa/selenium/remote/RenderedRemoteWebElement.class13org/openqa/selenium/remote/RenderedRemoteWebElement+org/openqa/selenium/remote/RemoteWebElement&org/openqa/selenium/RenderedWebElement&org/openqa/selenium/internal/Locatable()VCode  LineNumberTableLocalVariableTablethis5Lorg/openqa/selenium/remote/RenderedRemoteWebElement; isDisplayed()Z  parent,Lorg/openqa/selenium/remote/RemoteWebDriver;isElementDisplayedid  Ljava/lang/String; "!&com/google/common/collect/ImmutableMap #$ofN(Ljava/lang/Object;Ljava/lang/Object;)Lcom/google/common/collect/ImmutableMap; &('*org/openqa/selenium/remote/RemoteWebDriver )*executeH(Ljava/lang/String;Ljava/util/Map;)Lorg/openqa/selenium/remote/Response; ,.-#org/openqa/selenium/remote/Response /0getValue()Ljava/lang/Object;2java/lang/Boolean 14 5 booleanValueresponse%Lorg/openqa/selenium/remote/Response; getLocation()Lorg/openqa/selenium/Point;;getElementLocation= java/util/Map?x <A BCget&(Ljava/lang/Object;)Ljava/lang/Object;Ejava/lang/Long DG HIintValue()IKyMorg/openqa/selenium/Point LO P(II)VrawPointLjava/util/Map;ILocalVariableTypeTable5Ljava/util/Map;getSize!()Lorg/openqa/selenium/Dimension;YgetElementSize[width]height_org/openqa/selenium/Dimension ^OrawSizehoverdhoverOverElement dragAndDropByg dragElement ikjjava/lang/Integer lmvalueOf(I)Ljava/lang/Integer; o #p(Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;)Lcom/google/common/collect/ImmutableMap; moveRightBy moveDownBy dragAndDropOn+(Lorg/openqa/selenium/RenderedWebElement;)V v 89 v Ly ?S L{ KS } ePelement(Lorg/openqa/selenium/RenderedWebElement;currentLocationLorg/openqa/selenium/Point; destinationgetValueOfCssProperty&(Ljava/lang/String;)Ljava/lang/String;getElementValueOfCssProperty propertyName #r(Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;)Lcom/google/common/collect/ImmutableMap;java/lang/String'getLocationOnScreenOnceScrolledIntoView&getElementLocationOnceScrolledIntoView  getId()Ljava/lang/String; (java/lang/Number Gmapped5Ljava/util/Map;getCoordinates9()Lorg/openqa/selenium/interactions/internal/Coordinates;5org/openqa/selenium/remote/RenderedRemoteWebElement$1 8(Lorg/openqa/selenium/remote/RenderedRemoteWebElement;)V SourceFileRenderedRemoteWebElement.java InnerClasses!   /*    V**%L++13 #$ 6789 E*:*%L++@DF>,J@DF6LYN)*+*,:-4E267*QR*?S: KST *QUVW E*X*%L++,\@DF6^Y`234*5:64E267*aR*: ]ST *aUb  B*c*%W :; eP j *f*>hJhn%W>?>@   qS rSst w#*uM+wN*-x,xd-z,zd|CD E"F*##~  h**+%M,+IJIK 679 <**L++@,J@NOP OSU <,67$RT $ 3 Y*Y   PK lC><+org/openqa/selenium/remote/.svn/all-wcpropsK 25 svn:wc:ra_dav:version-url V 68 /svn/!svn/ver/11240/trunk/java/client/src/org/openqa/selenium/remote END SessionId.java K 25 svn:wc:ra_dav:version-url V 83 /svn/!svn/ver/11222/trunk/java/client/src/org/openqa/selenium/remote/SessionId.java END AugmenterProvider.java K 25 svn:wc:ra_dav:version-url V 91 /svn/!svn/ver/11222/trunk/java/client/src/org/openqa/selenium/remote/AugmenterProvider.java END PropertyMunger.java K 25 svn:wc:ra_dav:version-url V 88 /svn/!svn/ver/11222/trunk/java/client/src/org/openqa/selenium/remote/PropertyMunger.java END ExecuteMethod.java K 25 svn:wc:ra_dav:version-url V 87 /svn/!svn/ver/11222/trunk/java/client/src/org/openqa/selenium/remote/ExecuteMethod.java END RemoteWebElement.java K 25 svn:wc:ra_dav:version-url V 90 /svn/!svn/ver/11222/trunk/java/client/src/org/openqa/selenium/remote/RemoteWebElement.java END RemoteWebDriver.java K 25 svn:wc:ra_dav:version-url V 89 /svn/!svn/ver/11240/trunk/java/client/src/org/openqa/selenium/remote/RemoteWebDriver.java END InterfaceImplementation.java K 25 svn:wc:ra_dav:version-url V 97 /svn/!svn/ver/11222/trunk/java/client/src/org/openqa/selenium/remote/InterfaceImplementation.java END ErrorCodes.java K 25 svn:wc:ra_dav:version-url V 84 /svn/!svn/ver/11240/trunk/java/client/src/org/openqa/selenium/remote/ErrorCodes.java END RenderedRemoteWebElement.java K 25 svn:wc:ra_dav:version-url V 98 /svn/!svn/ver/11222/trunk/java/client/src/org/openqa/selenium/remote/RenderedRemoteWebElement.java END AddTakesScreenshot.java K 25 svn:wc:ra_dav:version-url V 92 /svn/!svn/ver/11222/trunk/java/client/src/org/openqa/selenium/remote/AddTakesScreenshot.java END Command.java K 25 svn:wc:ra_dav:version-url V 81 /svn/!svn/ver/11222/trunk/java/client/src/org/openqa/selenium/remote/Command.java END AddFindsByCss.java K 25 svn:wc:ra_dav:version-url V 87 /svn/!svn/ver/11222/trunk/java/client/src/org/openqa/selenium/remote/AddFindsByCss.java END CapabilityType.java K 25 svn:wc:ra_dav:version-url V 88 /svn/!svn/ver/11222/trunk/java/client/src/org/openqa/selenium/remote/CapabilityType.java END AddFindsChildByCss.java K 25 svn:wc:ra_dav:version-url V 92 /svn/!svn/ver/11222/trunk/java/client/src/org/openqa/selenium/remote/AddFindsChildByCss.java END ReusingSocketSocketFactory.java K 25 svn:wc:ra_dav:version-url V 100 /svn/!svn/ver/11222/trunk/java/client/src/org/openqa/selenium/remote/ReusingSocketSocketFactory.java END AddRotatable.java K 25 svn:wc:ra_dav:version-url V 86 /svn/!svn/ver/11222/trunk/java/client/src/org/openqa/selenium/remote/AddRotatable.java END Augmenter.java K 25 svn:wc:ra_dav:version-url V 83 /svn/!svn/ver/11222/trunk/java/client/src/org/openqa/selenium/remote/Augmenter.java END ErrorHandler.java K 25 svn:wc:ra_dav:version-url V 86 /svn/!svn/ver/11222/trunk/java/client/src/org/openqa/selenium/remote/ErrorHandler.java END JsonException.java K 25 svn:wc:ra_dav:version-url V 87 /svn/!svn/ver/11222/trunk/java/client/src/org/openqa/selenium/remote/JsonException.java END DesiredCapabilities.java K 25 svn:wc:ra_dav:version-url V 93 /svn/!svn/ver/11239/trunk/java/client/src/org/openqa/selenium/remote/DesiredCapabilities.java END DriverCommand.java K 25 svn:wc:ra_dav:version-url V 87 /svn/!svn/ver/11222/trunk/java/client/src/org/openqa/selenium/remote/DriverCommand.java END JsonToBeanConverter.java K 25 svn:wc:ra_dav:version-url V 93 /svn/!svn/ver/11222/trunk/java/client/src/org/openqa/selenium/remote/JsonToBeanConverter.java END BeanToJsonConverter.java K 25 svn:wc:ra_dav:version-url V 93 /svn/!svn/ver/11222/trunk/java/client/src/org/openqa/selenium/remote/BeanToJsonConverter.java END ScreenshotException.java K 25 svn:wc:ra_dav:version-url V 93 /svn/!svn/ver/11222/trunk/java/client/src/org/openqa/selenium/remote/ScreenshotException.java END build.desc K 25 svn:wc:ra_dav:version-url V 79 /svn/!svn/ver/11236/trunk/java/client/src/org/openqa/selenium/remote/build.desc END CommandExecutor.java K 25 svn:wc:ra_dav:version-url V 89 /svn/!svn/ver/11222/trunk/java/client/src/org/openqa/selenium/remote/CommandExecutor.java END SimplePropertyDescriptor.java K 25 svn:wc:ra_dav:version-url V 98 /svn/!svn/ver/11222/trunk/java/client/src/org/openqa/selenium/remote/SimplePropertyDescriptor.java END HttpCommandExecutor.java K 25 svn:wc:ra_dav:version-url V 93 /svn/!svn/ver/11222/trunk/java/client/src/org/openqa/selenium/remote/HttpCommandExecutor.java END Response.java K 25 svn:wc:ra_dav:version-url V 82 /svn/!svn/ver/11222/trunk/java/client/src/org/openqa/selenium/remote/Response.java END PK lC>4='org/openqa/selenium/remote/.svn/entries8 dir 11264 http://selenium.googlecode.com/svn/trunk/java/client/src/org/openqa/selenium/remote http://selenium.googlecode.com/svn 2011-02-01T18:15:27.349016Z 11240 eran.mes@gmail.com svn:special svn:externals svn:needs-lock 07704840-8298-11de-bf8c-fd130f914ac9 SessionId.java file 2011-02-03T12:01:17.000000Z b9f80ff4c5b5aec0c64086676939a955 2011-02-01T12:22:07.764961Z 11222 simon.m.stewart PropertyMunger.java file 2011-02-03T12:01:17.000000Z cebe0e6572c56027df52e7189870b5db 2011-02-01T12:22:07.764961Z 11222 simon.m.stewart RemoteWebElement.java file 2011-02-03T12:01:17.000000Z 1ad6c5c2a03b975e90c625c5817f7a59 2011-02-01T12:22:07.764961Z 11222 simon.m.stewart RemoteWebDriver.java file 2011-02-03T12:01:17.000000Z c25ac191b5b8dcc5571c335a7ebf3816 2011-02-01T18:15:27.349016Z 11240 eran.mes@gmail.com InterfaceImplementation.java file 2011-02-03T12:01:17.000000Z f3d40bfb90ee557bdda9e00d2c230721 2011-02-01T12:22:07.764961Z 11222 simon.m.stewart RenderedRemoteWebElement.java file 2011-02-03T12:01:17.000000Z a163d9587197906fde3775045981f8cd 2011-02-01T12:22:07.764961Z 11222 simon.m.stewart CapabilityType.java file 2011-02-03T12:01:17.000000Z 1ce2020d3602ad596b3192f2cf698d00 2011-02-01T12:22:07.764961Z 11222 simon.m.stewart AddRotatable.java file 2011-02-03T12:01:17.000000Z 53b4629f1a83076e78660a9889105705 2011-02-01T12:22:07.764961Z 11222 simon.m.stewart Augmenter.java file 2011-02-03T12:01:17.000000Z 8ef90c3e3ed1746dd9beaa45a825252d 2011-02-01T12:22:07.764961Z 11222 simon.m.stewart JsonException.java file 2011-02-03T12:01:17.000000Z 388b19e9c1c3f5c8eeed8f8bc9c3a34a 2011-02-01T12:22:07.764961Z 11222 simon.m.stewart BeanToJsonConverter.java file 2011-02-03T12:01:17.000000Z 3dc1a028199957140bcc385f6e183594 2011-02-01T12:22:07.764961Z 11222 simon.m.stewart JsonToBeanConverter.java file 2011-02-03T12:01:17.000000Z c1081677e5d64cc586972aedc4b5e65b 2011-02-01T12:22:07.764961Z 11222 simon.m.stewart DriverCommand.java file 2011-02-03T12:01:17.000000Z 4dfcc65c2fa665fbeed0846c75a71e26 2011-02-01T12:22:07.764961Z 11222 simon.m.stewart build.desc file 2011-02-03T12:01:17.000000Z 8fa86f692bf4a17382612dd8660b0a02 2011-02-01T17:50:18.111161Z 11236 simon.m.stewart internal dir CommandExecutor.java file 2011-02-03T12:01:17.000000Z 2b94eaf46418eb14920109d3e46bcad6 2011-02-01T12:22:07.764961Z 11222 simon.m.stewart Response.java file 2011-02-03T12:01:17.000000Z 5d7995bc5a9bdf8cdb708a526645d6b9 2011-02-01T12:22:07.764961Z 11222 simon.m.stewart AugmenterProvider.java file 2011-02-03T12:01:17.000000Z d90e35fcf366854c51d4d71d69892220 2011-02-01T12:22:07.764961Z 11222 simon.m.stewart ExecuteMethod.java file 2011-02-03T12:01:17.000000Z b89a7fc9bd3ff1a54fd8a88cf0919381 2011-02-01T12:22:07.764961Z 11222 simon.m.stewart ErrorCodes.java file 2011-02-03T12:01:17.000000Z fa75729b89e3f8ee0ccee87a0f0a503d 2011-02-01T18:15:27.349016Z 11240 eran.mes@gmail.com html5 dir Command.java file 2011-02-03T12:01:17.000000Z 2cc1f800dd4d4d36dc7c7f22cbe0c50f 2011-02-01T12:22:07.764961Z 11222 simon.m.stewart AddTakesScreenshot.java file 2011-02-03T12:01:17.000000Z aa3d732c4af55a211d908ebab02386e4 2011-02-01T12:22:07.764961Z 11222 simon.m.stewart AddFindsByCss.java file 2011-02-03T12:01:17.000000Z 0980abb445f71915c93e1675472b7f0a 2011-02-01T12:22:07.764961Z 11222 simon.m.stewart AddFindsChildByCss.java file 2011-02-03T12:01:17.000000Z 59d229dded9b8791fa68b8ec1ba9513d 2011-02-01T12:22:07.764961Z 11222 simon.m.stewart ReusingSocketSocketFactory.java file 2011-02-03T12:01:17.000000Z deaa9d3a914795ac32d4637599352886 2011-02-01T12:22:07.764961Z 11222 simon.m.stewart has-props ErrorHandler.java file 2011-02-03T12:01:17.000000Z 6657295c0ecaef1ef4852c967d0180d6 2011-02-01T12:22:07.764961Z 11222 simon.m.stewart DesiredCapabilities.java file 2011-02-03T12:01:17.000000Z d058f6a3375440979e96e5d8495d9337 2011-02-01T18:09:37.578546Z 11239 eran.mes@gmail.com ScreenshotException.java file 2011-02-03T12:01:17.000000Z 202e6a3f9be9198399297a4e0e418ac9 2011-02-01T12:22:07.764961Z 11222 simon.m.stewart HttpCommandExecutor.java file 2011-02-03T12:01:17.000000Z e496e32f624f5b07de1671ac8b003949 2011-02-01T12:22:07.764961Z 11222 simon.m.stewart SimplePropertyDescriptor.java file 2011-02-03T12:01:17.000000Z a2739fd570cd3b686af365e5a8a4b1d1 2011-02-01T12:22:07.764961Z 11222 simon.m.stewart PK lC>G&org/openqa/selenium/remote/.svn/format8 PK lC>h ""Rorg/openqa/selenium/remote/.svn/prop-base/ReusingSocketSocketFactory.java.svn-baseK 13 svn:eol-style V 6 native END PK lC>̯Eorg/openqa/selenium/remote/.svn/text-base/AddFindsByCss.java.svn-base/* Copyright 2010 WebDriver committers Copyright 2010 Google Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package org.openqa.selenium.remote; import com.google.common.collect.ImmutableMap; import org.openqa.selenium.WebDriverException; import org.openqa.selenium.internal.FindsByCssSelector; import java.lang.reflect.Method; import java.util.Map; public class AddFindsByCss implements AugmenterProvider { public Class getDescribedInterface() { return FindsByCssSelector.class; } public InterfaceImplementation getImplementation(Object value) { return new InterfaceImplementation() { public Object invoke(ExecuteMethod executeMethod, Object self, Method method, Object... args) { Map commandArgs = ImmutableMap.of("using", "css selector", "value", args[0]); if ("findElementByCssSelector".equals(method.getName())) { return executeMethod.execute(DriverCommand.FIND_ELEMENT, commandArgs); } else if ("findElementsByCssSelector".equals(method.getName())) { return executeMethod.execute(DriverCommand.FIND_ELEMENTS, commandArgs); } throw new WebDriverException("Unmapped method: " + method.getName()); } }; } } PK lC>BJorg/openqa/selenium/remote/.svn/text-base/AddFindsChildByCss.java.svn-base/* Copyright 2010 WebDriver committers Copyright 2010 Google Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package org.openqa.selenium.remote; import com.google.common.collect.ImmutableMap; import org.openqa.selenium.WebDriverException; import org.openqa.selenium.internal.FindsByCssSelector; import java.lang.reflect.Method; import java.util.Map; public class AddFindsChildByCss implements AugmenterProvider { public Class getDescribedInterface() { return FindsByCssSelector.class; } public InterfaceImplementation getImplementation(Object value) { return new InterfaceImplementation() { public Object invoke(ExecuteMethod executeMethod, Object self, Method method, Object... args) { Object id = ((RemoteWebElement) self).getId(); Map commandArgs = ImmutableMap.of("id", id, "using", "css selector", "value", args[0]); if ("findElementByCssSelector".equals(method.getName())) { return executeMethod.execute(DriverCommand.FIND_ELEMENT, commandArgs); } else if ("findElementsByCssSelector".equals(method.getName())) { return executeMethod.execute(DriverCommand.FIND_ELEMENTS, commandArgs); } throw new WebDriverException("Unmapped method: " + method.getName()); } }; } } PK lC>~UDorg/openqa/selenium/remote/.svn/text-base/AddRotatable.java.svn-base/* Copyright 2010 WebDriver committers Copyright 2010 Google Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package org.openqa.selenium.remote; import org.openqa.selenium.ScreenOrientation; import com.google.common.collect.ImmutableMap; import java.lang.reflect.Method; public class AddRotatable implements AugmenterProvider { public Class getDescribedInterface() { return AddRotatable.class; } public InterfaceImplementation getImplementation(Object value) { return new InterfaceImplementation() { public Object invoke(ExecuteMethod executeMethod, Object self, Method method, Object... args) { if ("rotate".equals(method.getName())) { return executeMethod.execute(DriverCommand.SET_SCREEN_ORIENTATION, ImmutableMap.of("orientation", args[0])); } else if ("getOrientation".equals(method.getName())) { return ScreenOrientation.valueOf((String) executeMethod.execute(DriverCommand.GET_SCREEN_ORIENTATION, null)); } return null; } }; } } PK lC>œUJorg/openqa/selenium/remote/.svn/text-base/AddTakesScreenshot.java.svn-base/* Copyright 2007-2010 WebDriver committers Copyright 2007-2010 Google Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package org.openqa.selenium.remote; import java.lang.reflect.Method; import org.openqa.selenium.OutputType; import org.openqa.selenium.TakesScreenshot; import org.openqa.selenium.internal.Base64Encoder; // Deliberately package level visibility class AddTakesScreenshot implements AugmenterProvider { public Class getDescribedInterface() { return TakesScreenshot.class; } public InterfaceImplementation getImplementation(Object ignored) { // The only method on TakesScreenshot is the one to take a screenshot return new InterfaceImplementation() { public Object invoke(ExecuteMethod executeMethod, Object self, Method method, Object... args) { Object result = executeMethod.execute(DriverCommand.SCREENSHOT, null); if (result instanceof String) { result = ((String) result).getBytes(); } if (result instanceof byte[]) { byte[] rawPng = (byte[]) result; String base64 = new Base64Encoder().encode(rawPng); return ((OutputType) args[0]).convertFromBase64Png(base64); } return null; } }; } } PK lC>; ""Aorg/openqa/selenium/remote/.svn/text-base/Augmenter.java.svn-base/* Copyright 2007-2010 WebDriver committers Copyright 2007-2010 Google Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package org.openqa.selenium.remote; import com.google.common.collect.Maps; import com.google.common.collect.Sets; import net.sf.cglib.proxy.Enhancer; import net.sf.cglib.proxy.MethodInterceptor; import net.sf.cglib.proxy.MethodProxy; import org.openqa.selenium.WebDriver; import org.openqa.selenium.WebElement; import org.openqa.selenium.browserlaunchers.CapabilityType; import org.openqa.selenium.remote.html5.AddApplicationCache; import org.openqa.selenium.remote.html5.AddBrowserConnection; import org.openqa.selenium.remote.html5.AddDatabaseStorage; import org.openqa.selenium.remote.html5.AddLocationContext; import org.openqa.selenium.remote.html5.AddWebStorage; import java.lang.reflect.Method; import java.util.HashMap; import java.util.HashSet; import java.util.Map; import java.util.Set; /** * Enhance the interfaces implemented by an instance of the * {@link org.openqa.selenium.remote.RemoteWebDriver} based on the returned * {@link org.openqa.selenium.Capabilities} of the driver. * * Note: this class is still experimental. Use at your own risk. */ public class Augmenter { private final Map driverAugmentors = Maps.newHashMap(); private final Map elementAugmentors = Maps.newHashMap(); public Augmenter() { addDriverAugmentation(CapabilityType.SUPPORTS_FINDING_BY_CSS, new AddFindsByCss()); addDriverAugmentation(CapabilityType.TAKES_SCREENSHOT, new AddTakesScreenshot()); addDriverAugmentation(CapabilityType.SUPPORTS_SQL_DATABASE, new AddDatabaseStorage()); addDriverAugmentation(CapabilityType.SUPPORTS_LOCATION_CONTEXT, new AddLocationContext()); addDriverAugmentation(CapabilityType.SUPPORTS_APPLICATION_CACHE, new AddApplicationCache()); addDriverAugmentation(CapabilityType.SUPPORTS_BROWSER_CONNECTION, new AddBrowserConnection()); addDriverAugmentation(CapabilityType.SUPPORTS_WEB_STORAGE, new AddWebStorage()); addDriverAugmentation(CapabilityType.ROTATABLE, new AddRotatable()); addElementAugmentation(CapabilityType.SUPPORTS_FINDING_BY_CSS, new AddFindsChildByCss()); } /** * Add a mapping between a capability name and the implementation of the * interface that name represents for instances of * {@link org.openqa.selenium.WebDriver}. For example * (@link CapabilityType#TAKES_SCREENSHOT} is represents the interface * {@link org.openqa.selenium.TakesScreenshot}, which is implemented via the * {@link org.openqa.selenium.remote.AddTakesScreenshot} provider. * * Note: This method is still experimental. Use at your own risk. * * @param capabilityName The name of the capability to model * @param handlerClass The provider of the interface and implementation */ public void addDriverAugmentation(String capabilityName, AugmenterProvider handlerClass) { driverAugmentors.put(capabilityName, handlerClass); } /** * Add a mapping between a capability name and the implementation of the * interface that name represents for instances of * {@link org.openqa.selenium.WebElement}. For example * (@link CapabilityType#TAKES_SCREENSHOT} is represents the interface * {@link org.openqa.selenium.internal.FindsByCssSelector}, which is * implemented via the {@link AddFindsByCss} provider. * * Note: This method is still experimental. Use at your own risk. * * @param capabilityName The name of the capability to model * @param handlerClass The provider of the interface and implementation */ public void addElementAugmentation(String capabilityName, AugmenterProvider handlerClass) { elementAugmentors.put(capabilityName, handlerClass); } /** * Enhance the interfaces implemented by this instance of WebDriver iff that * instance is a {@link org.openqa.selenium.remote.RemoteWebDriver}. * * The WebDriver that is returned may well be a dynamic proxy. You cannot * rely on the concrete implementing class to remain constant. * * @param driver The driver to enhance * @return A class implementing the described interfaces. */ public WebDriver augment(WebDriver driver) { // TODO(simon): We should really add a "SelfDescribing" interface for this if (!(driver instanceof RemoteWebDriver)) { return driver; } Map augmentors = driverAugmentors; CompoundHandler handler = determineAugmentation(driver, augmentors); RemoteWebDriver remote = create(handler, (RemoteWebDriver) driver); remote.setCommandExecutor(((RemoteWebDriver) driver).getCommandExecutor()); remote.setElementConverter(((RemoteWebDriver) driver).getElementConverter()); return remote; } /** * Enhance the interfaces implemented by this instance of WebElement iff that * instance is a {@link org.openqa.selenium.remote.RemoteWebElement}. * * The WebElement that is returned may well be a dynamic proxy. You cannot * rely on the concrete implementing class to remain constant. * * @param element The driver to enhance. * @return A class implementing the described interfaces. */ public WebElement augment(RemoteWebElement element) { // TODO(simon): We should really add a "SelfDescribing" interface for this RemoteWebDriver parent = (RemoteWebDriver) element.getWrappedDriver(); if (parent == null) { return element; } Map augmentors = elementAugmentors; CompoundHandler handler = determineAugmentation(parent, augmentors); RemoteWebElement remote = create(handler, element); remote.setId(element.getId()); remote.setParent(parent); return remote; } private CompoundHandler determineAugmentation(WebDriver driver, Map augmentors) { Map capabilities = ((RemoteWebDriver) driver).getCapabilities().asMap(); CompoundHandler handler = new CompoundHandler((RemoteWebDriver) driver); for (Map.Entry capablityName : capabilities.entrySet()) { AugmenterProvider augmenter = augmentors.get(capablityName.getKey()); if (augmenter == null) { continue; } Object value = capablityName.getValue(); if (value instanceof Boolean && !((Boolean) value).booleanValue()) { continue; } handler.addCapabilityHander(augmenter.getDescribedInterface(), augmenter.getImplementation(value)); } return handler; } protected X create(CompoundHandler handler, X from) { if (handler.isNeedingApplication()) { Enhancer enhancer = new Enhancer(); enhancer.setCallback(handler); enhancer.setSuperclass(from.getClass()); Set> interfaces = Sets.newHashSet(); interfaces.addAll(handler.getInterfaces()); enhancer.setInterfaces(interfaces.toArray(new Class[interfaces.size()])); return (X) enhancer.create(); } return from; } private class CompoundHandler implements MethodInterceptor { private Map handlers = new HashMap(); private Set> interfaces = new HashSet>(); private final RemoteWebDriver driver; private CompoundHandler(RemoteWebDriver driver) { this.driver = driver; } public void addCapabilityHander(Class fromInterface, InterfaceImplementation handledBy) { interfaces.add(fromInterface); for (Method method : fromInterface.getDeclaredMethods()) { handlers.put(method, handledBy); } } public Set> getInterfaces() { return interfaces; } public boolean isNeedingApplication() { return interfaces.size() > 0; } public Object intercept(Object self, Method method, Object[] args, MethodProxy methodProxy) throws Throwable { InterfaceImplementation handler = handlers.get(method); if (handler == null) { return methodProxy.invokeSuper(self, args); } return handler.invoke(new ExecuteMethod(driver), self, method, args); } } } PK lC>uIorg/openqa/selenium/remote/.svn/text-base/AugmenterProvider.java.svn-base/* Copyright 2007-2010 WebDriver committers Copyright 2007-2010 Google Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package org.openqa.selenium.remote; /** * Describes and provides an implementation for a particular interface for use * with the {@link org.openqa.selenium.remote.Augmenter}. Think of this as a * simulacrum of mixins. */ public interface AugmenterProvider { /** * @return The interface that this augmentor describes. */ Class getDescribedInterface(); /** * For the interface that this provider describes, return an implementation. * * @param value The value from the capability map * @return An interface implementation */ InterfaceImplementation getImplementation(Object value); } PK lC>sJ__Korg/openqa/selenium/remote/.svn/text-base/BeanToJsonConverter.java.svn-base/* Copyright 2007-2009 WebDriver committers Copyright 2007-2009 Google Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ // Copyright 2008 Google Inc. All Rights Reserved. package org.openqa.selenium.remote; import org.json.JSONArray; import org.json.JSONException; import org.json.JSONObject; import org.openqa.selenium.Capabilities; import org.openqa.selenium.WebDriverException; import org.openqa.selenium.browserlaunchers.DoNotUseProxyPac; import java.lang.reflect.Array; import java.lang.reflect.InvocationTargetException; import java.lang.reflect.Method; import java.util.ArrayList; import java.util.Collection; import java.util.Date; import java.util.HashMap; import java.util.Iterator; import java.util.List; import java.util.Map; import java.util.concurrent.TimeUnit; /** * Utility class for converting between JSON and Java Objects. */ public class BeanToJsonConverter { private static final int MAX_DEPTH = 5; /** * Convert an object that may or may not be a JSONArray or JSONObject into * its JSON string representation, handling the case where it is neither in a * graceful way. * * @param object which needs conversion * @return the JSON string representation of object */ public String convert(Object object) { if (object == null) return null; try { Object converted = convertObject(object, MAX_DEPTH); if (converted instanceof JSONObject || converted instanceof JSONArray || converted instanceof String || converted instanceof Number) { return converted.toString(); } return String.valueOf(object); } catch (JSONException e) { throw new WebDriverException("Unable to convert: " + object, e); } } /** * Convert a JSON[Array|Object] into the equivalent Java Collection type * (that is, List|Map) returning other objects untouched. This method is used * for preparing values for use by the HttpCommandExecutor * * @param o Object to convert * @return a Map, List or the unconverted Object. */ private Object convertUnknownObjectFromJson(Object o) { if (o instanceof JSONArray) { return convertJsonArray((JSONArray) o); } if (o instanceof JSONObject) { return convertJsonObject((JSONObject) o); } return o; } private Map convertJsonObject(JSONObject jsonObject) { Map toReturn = new HashMap(); Iterator allKeys = jsonObject.keys(); while (allKeys.hasNext()) { String key = (String) allKeys.next(); try { toReturn.put(key, convertUnknownObjectFromJson(jsonObject.get(key))); } catch (JSONException e) { throw new IllegalStateException("Unable to access key: " + key, e); } } return toReturn; } private List convertJsonArray(JSONArray jsonArray) { List toReturn = new ArrayList(); for (int i = 0; i < jsonArray.length(); i++) { try { toReturn.add(convertUnknownObjectFromJson(jsonArray.get(i))); } catch (JSONException e) { throw new IllegalStateException("Cannot convert object at index: " + i, e); } } return toReturn; } @SuppressWarnings({"unchecked"}) private Object convertObject(Object toConvert, int maxDepth) throws JSONException { if (toConvert == null) return null; if (toConvert instanceof Boolean || toConvert instanceof CharSequence || toConvert instanceof Number) { return toConvert; } if (toConvert.getClass().isEnum() || toConvert instanceof Enum) { return toConvert.toString(); } if (toConvert instanceof Map) { JSONObject converted = new JSONObject(); for (Object objectEntry : ((Map) toConvert).entrySet()) { Map.Entry entry = (Map.Entry) objectEntry; converted.put(entry.getKey(), convertObject(entry.getValue(), maxDepth - 1)); } return converted; } if (toConvert instanceof JSONObject) { return toConvert; } if (toConvert instanceof Collection) { JSONArray array = new JSONArray(); for (Object o : (Collection) toConvert) { array.put(convertObject(o, maxDepth - 1)); } return array; } if (toConvert.getClass().isArray()) { JSONArray converted = new JSONArray(); int length = Array.getLength(toConvert); for (int i = 0; i < length; i++) { converted.put(convertObject(Array.get(toConvert, i), maxDepth - 1)); } return converted; } if (toConvert instanceof SessionId) { JSONObject converted = new JSONObject(); converted.put("value", toConvert.toString()); return converted; } if (toConvert instanceof Capabilities) { return convertObject(((Capabilities) toConvert).asMap(), maxDepth - 1); } if (toConvert instanceof DoNotUseProxyPac) { return convertObject(((DoNotUseProxyPac) toConvert).asMap(), maxDepth -1); } if (toConvert instanceof Date) { return TimeUnit.MILLISECONDS.toSeconds(((Date) toConvert).getTime()); } Method toJson = getToJsonMethod(toConvert); if (toJson != null) { try { return toJson.invoke(toConvert); } catch (IllegalArgumentException e) { throw new WebDriverException(e); } catch (IllegalAccessException e) { throw new WebDriverException(e); } catch (InvocationTargetException e) { throw new WebDriverException(e); } } try { return mapObject(toConvert, maxDepth - 1); } catch(Exception e) { throw new WebDriverException(e); } } private Method getToJsonMethod(Object toConvert) { try { return toConvert.getClass().getMethod("toJson"); } catch (SecurityException e) { // fall through } catch (NoSuchMethodException e) { // fall through } return null; } private Object mapObject(Object toConvert, int maxDepth) throws Exception { if (maxDepth == 0) return null; // Raw object via reflection? Nope, not needed JSONObject mapped = new JSONObject(); for (SimplePropertyDescriptor pd : SimplePropertyDescriptor.getPropertyDescriptors(toConvert.getClass())) { if ("class".equals(pd.getName())) { mapped.put("class", toConvert.getClass().getName()); continue; } Method readMethod = pd.getReadMethod(); if (readMethod == null) continue; if (readMethod.getParameterTypes().length > 0) { continue; } readMethod.setAccessible(true); Object result = readMethod.invoke(toConvert); mapped.put(pd.getName(), convertObject(result, maxDepth - 1)); } return mapped; } } PK lC>JForg/openqa/selenium/remote/.svn/text-base/CapabilityType.java.svn-base/* Copyright 2007-2010 WebDriver committers Copyright 2007-2010 Google Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package org.openqa.selenium.remote; /** * Commonly seen remote webdriver capabilities. */ public interface CapabilityType { String BROWSER_NAME = "browserName"; String PLATFORM = "platform"; String SUPPORTS_JAVASCRIPT = "javascriptEnabled"; String TAKES_SCREENSHOT = "takesScreenshot"; String VERSION = "version"; String SUPPORTS_SQL_DATABASE = "databaseEnabled"; String SUPPORTS_LOCATION_CONTEXT = "locationContextEnabled"; String SUPPORTS_APPLICATION_CACHE = "applicationCacheEnabled"; String SUPPORTS_BROWSER_CONNECTION = "browserConnectionEnabled"; String SUPPORTS_FINDING_BY_CSS = "cssSelectorsEnabled"; String PROXY = "proxy"; String SUPPORTS_WEB_STORAGE = "webStorageEnabled"; String ROTATABLE = "rotatable"; interface ForSeleniumServer { String AVOIDING_PROXY = "avoidProxy"; String ONLY_PROXYING_SELENIUM_TRAFFIC = "onlyProxySeleniumTraffic"; String PROXYING_EVERYTHING = "proxyEverything"; String PROXY_PAC = "proxy_pac"; String ENSURING_CLEAN_SESSION = "ensureCleanSession"; } } PK lC>)a  ?org/openqa/selenium/remote/.svn/text-base/Command.java.svn-base/* Copyright 2007-2009 WebDriver committers Copyright 2007-2009 Google Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package org.openqa.selenium.remote; import com.google.common.collect.Maps; import org.json.JSONObject; import java.util.HashMap; import java.util.Map; public class Command { private SessionId sessionId; private String name; private Map parameters; public Command(SessionId sessionId, String name) { this(sessionId, name, new HashMap()); } public Command(SessionId sessionId, String name, Map parameters) { this.sessionId = sessionId; this.parameters = parameters; this.name = name; } public SessionId getSessionId() { return sessionId; } public String getName() { return name; } public Map getParameters() { return parameters == null ? new HashMap() : parameters; } @Override public String toString() { return "[" + sessionId + ", " + "]: " + name + " " + new JSONObject(parameters).toString(); } } PK lC>|Gorg/openqa/selenium/remote/.svn/text-base/CommandExecutor.java.svn-base/* Copyright 2007-2009 WebDriver committers Copyright 2007-2009 Google Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package org.openqa.selenium.remote; import java.io.IOException; public interface CommandExecutor { Response execute(Command command) throws IOException; } PK lC>u`Korg/openqa/selenium/remote/.svn/text-base/DesiredCapabilities.java.svn-base/* Copyright 2007-2009 WebDriver committers Copyright 2007-2009 Google Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package org.openqa.selenium.remote; import java.io.Serializable; import java.util.Collections; import java.util.HashMap; import java.util.Map; import org.openqa.selenium.Capabilities; import org.openqa.selenium.Platform; import static org.openqa.selenium.remote.CapabilityType.BROWSER_NAME; import static org.openqa.selenium.remote.CapabilityType.PLATFORM; import static org.openqa.selenium.remote.CapabilityType.SUPPORTS_JAVASCRIPT; import static org.openqa.selenium.remote.CapabilityType.VERSION; public class DesiredCapabilities implements Serializable, Capabilities { private final Map capabilities = new HashMap(); public DesiredCapabilities(String browser, String version, Platform platform) { setCapability(BROWSER_NAME, browser); setCapability(VERSION, version); setCapability(PLATFORM, platform); } public DesiredCapabilities() { // no-arg constructor } public DesiredCapabilities(Map rawMap) { capabilities.putAll(rawMap); Object value = capabilities.get(PLATFORM); if (value instanceof String) { capabilities.put(PLATFORM, Platform.valueOf((String) value)); } } public DesiredCapabilities(org.openqa.selenium.Capabilities other) { super(); if (other != null) { capabilities.putAll(other.asMap()); } } public String getBrowserName() { return (String) capabilities.get(BROWSER_NAME); } public void setBrowserName(String browserName) { setCapability(BROWSER_NAME, browserName); } public String getVersion() { return (String) capabilities.get(VERSION); } public void setVersion(String version) { setCapability(VERSION, version); } public Platform getPlatform() { if (capabilities.containsKey(PLATFORM)) { Object raw = capabilities.get(PLATFORM); if (raw instanceof String) { return Platform.valueOf((String) raw); } else if (raw instanceof Platform) { return (Platform) raw; } } return null; } public void setPlatform(Platform platform) { setCapability(PLATFORM, platform); } public boolean isJavascriptEnabled() { if (capabilities.containsKey(SUPPORTS_JAVASCRIPT)) { Object raw = capabilities.get(SUPPORTS_JAVASCRIPT); if (raw instanceof String) { return Boolean.parseBoolean((String) raw); } else if (raw instanceof Boolean) { return ((Boolean) raw).booleanValue(); } } return true; } public void setJavascriptEnabled(boolean javascriptEnabled) { setCapability(SUPPORTS_JAVASCRIPT, javascriptEnabled); } public Object getCapability(String capabilityName) { return capabilities.get(capabilityName); } public boolean is(String capabilityName) { Object cap = getCapability(capabilityName); if (cap == null) { return false; } return cap instanceof Boolean ? (Boolean) cap : Boolean.parseBoolean(String.valueOf(cap)); } /** * Merges the extra capabilities provided into this DesiredCapabilities * instance. If capabilities with the same name exist in this instance, * they will be overridden by the values from the extraCapabilities * object. * * @param extraCapabilities Additional capabilities to be added. */ public void merge( org.openqa.selenium.Capabilities extraCapabilities) { capabilities.putAll(extraCapabilities.asMap()); } public void setCapability(String capabilityName, boolean value) { capabilities.put(capabilityName, value); } public void setCapability(String capabilityName, String value) { capabilities.put(capabilityName, value); } public void setCapability(String capabilityName, Platform value) { capabilities.put(capabilityName, value); } public Map asMap() { return Collections.unmodifiableMap(capabilities); } public void setCapability(String key, Object value) { capabilities.put(key, value); } public static DesiredCapabilities firefox() { return new DesiredCapabilities("firefox", "", Platform.ANY); } public static DesiredCapabilities internetExplorer() { DesiredCapabilities capabilities = new DesiredCapabilities( "internet explorer", "", Platform.WINDOWS); capabilities.setCapability(CapabilityType.ForSeleniumServer.ENSURING_CLEAN_SESSION, true); return capabilities; } public static DesiredCapabilities htmlUnit() { return new DesiredCapabilities("htmlunit", "", Platform.ANY); } public static DesiredCapabilities htmlUnitWithJavascript() { DesiredCapabilities htmlUnitWithJS = new DesiredCapabilities("htmlunit", "firefox", Platform.ANY); htmlUnitWithJS.setJavascriptEnabled(true); return htmlUnitWithJS; } public static DesiredCapabilities iphone() { return new DesiredCapabilities("iphone", "", Platform.MAC); } public static DesiredCapabilities chrome() { return new DesiredCapabilities("chrome", "", Platform.ANY); } public static DesiredCapabilities android() { return new DesiredCapabilities("android", "", Platform.ANDROID); } @Override public String toString() { return String.format("Capabilities [%s]", capabilities); } @Override public boolean equals(Object o) { if (this == o) { return true; } if (!(o instanceof DesiredCapabilities)) { return false; } DesiredCapabilities that = (DesiredCapabilities) o; return capabilities.equals(that.capabilities); } @Override public int hashCode() { return capabilities.hashCode(); } } PK lC>U)llEorg/openqa/selenium/remote/.svn/text-base/DriverCommand.java.svn-base/* Copyright 2007-2009 WebDriver committers Copyright 2007-2009 Google Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package org.openqa.selenium.remote; /** * An empty interface defining constants for the standard commands defined in * the WebDriver JSON wire protocol. * * @author jmleyba@gmail.com (Jason Leyba) */ public interface DriverCommand { String NEW_SESSION = "newSession"; String CLOSE = "close"; String QUIT = "quit"; String GET = "get"; String GO_BACK = "goBack"; String GO_FORWARD = "goForward"; String REFRESH = "refresh"; String ADD_COOKIE = "addCookie"; String GET_COOKIE = "getCookie"; String GET_ALL_COOKIES = "getCookies"; String DELETE_COOKIE = "deleteCookie"; String DELETE_ALL_COOKIES = "deleteAllCookies"; String FIND_ELEMENT = "findElement"; String FIND_ELEMENTS = "findElements"; String FIND_CHILD_ELEMENT = "findChildElement"; String FIND_CHILD_ELEMENTS = "findChildElements"; String CLEAR_ELEMENT = "clearElement"; String CLICK_ELEMENT = "clickElement"; String HOVER_OVER_ELEMENT = "hoverOverElement"; String SEND_KEYS_TO_ELEMENT = "sendKeysToElement"; String SEND_MODIFIER_KEY_TO_ACTIVE_ELEMENT = "sendModifierKeyToActiveElement"; String SUBMIT_ELEMENT = "submitElement"; String TOGGLE_ELEMENT = "toggleElement"; String GET_CURRENT_WINDOW_HANDLE = "getCurrentWindowHandle"; String GET_WINDOW_HANDLES = "getWindowHandles"; String SWITCH_TO_WINDOW = "switchToWindow"; String SWITCH_TO_FRAME = "switchToFrame"; String GET_ACTIVE_ELEMENT = "getActiveElement"; String GET_CURRENT_URL = "getCurrentUrl"; String GET_PAGE_SOURCE = "getPageSource"; String GET_TITLE = "getTitle"; String EXECUTE_SCRIPT = "executeScript"; String EXECUTE_ASYNC_SCRIPT = "executeAsyncScript"; String GET_SPEED = "getSpeed"; String SET_SPEED = "setSpeed"; String SET_BROWSER_VISIBLE = "setBrowserVisible"; String IS_BROWSER_VISIBLE = "isBrowserVisible"; String GET_ELEMENT_TEXT = "getElementText"; String GET_ELEMENT_VALUE = "getElementValue"; String GET_ELEMENT_TAG_NAME = "getElementTagName"; String SET_ELEMENT_SELECTED = "setElementSelected"; String DRAG_ELEMENT = "dragElement"; String IS_ELEMENT_SELECTED = "isElementSelected"; String IS_ELEMENT_ENABLED = "isElementEnabled"; String IS_ELEMENT_DISPLAYED = "isElementDisplayed"; String GET_ELEMENT_LOCATION = "getElementLocation"; String GET_ELEMENT_LOCATION_ONCE_SCROLLED_INTO_VIEW = "getElementLocationOnceScrolledIntoView"; String GET_ELEMENT_SIZE = "getElementSize"; String GET_ELEMENT_ATTRIBUTE = "getElementAttribute"; String GET_ELEMENT_VALUE_OF_CSS_PROPERTY = "getElementValueOfCssProperty"; String ELEMENT_EQUALS = "elementEquals"; String SCREENSHOT = "screenshot"; String ACCEPT_ALERT = "acceptAlert"; String DISMISS_ALERT = "dismissAlert"; String GET_ALERT_TEXT = "getAlertText"; String SET_ALERT_VALUE = "setAlertValue"; String IMPLICITLY_WAIT = "implicitlyWait"; String SET_SCRIPT_TIMEOUT = "setScriptTimeout"; String EXECUTE_SQL = "executeSQL"; String GET_LOCATION = "getLocation"; String SET_LOCATION = "setLocation"; String GET_APP_CACHE = "getAppCache"; String GET_APP_CACHE_STATUS = "getStatus"; String IS_BROWSER_ONLINE = "isBrowserOnline"; String SET_BROWSER_ONLINE = "setBrowserOnline"; String GET_LOCAL_STORAGE_ITEM = "getLocalStorageItem"; String GET_LOCAL_STORAGE_KEYS = "getLocalStorageKeys"; String SET_LOCAL_STORAGE_ITEM = "setLocalStorageItem"; String REMOVE_LOCAL_STORAGE_ITEM = "removeLocalStorageItem"; String CLEAR_LOCAL_STORAGE = "clearLocalStorage"; String GET_LOCAL_STORAGE_SIZE = "getLocalStorageSize"; String GET_SESSION_STORAGE_ITEM = "getSessionStorageItem"; String GET_SESSION_STORAGE_KEYS = "getSessionStorageKey"; String SET_SESSION_STORAGE_ITEM = "setSessionStorageItem"; String REMOVE_SESSION_STORAGE_ITEM = "removeSessionStorageItem"; String CLEAR_SESSION_STORAGE = "clearSessionStorage"; String GET_SESSION_STORAGE_SIZE = "getSessionStorageSize"; String SET_SCREEN_ORIENTATION = "setScreenOrientation"; String GET_SCREEN_ORIENTATION = "getScreenOrientation"; // These belong to the Advanced user interactions - an element is // optional for these commands. String CLICK = "mouseClick"; String DOUBLE_CLICK = "mouseDoubleClick"; String MOUSE_DOWN = "mouseButtonDown"; String MOUSE_UP = "mouseButtonUp"; String MOVE_TO = "mouseMoveTo"; String SEND_KEYS_TO_SESSION = "sendKeys"; } PK lC>aճ1Borg/openqa/selenium/remote/.svn/text-base/ErrorCodes.java.svn-basepackage org.openqa.selenium.remote; import org.openqa.selenium.ElementNotVisibleException; import org.openqa.selenium.InvalidCookieDomainException; import org.openqa.selenium.NoSuchElementException; import org.openqa.selenium.NoSuchFrameException; import org.openqa.selenium.NoSuchWindowException; import org.openqa.selenium.StaleElementReferenceException; import org.openqa.selenium.TimeoutException; import org.openqa.selenium.UnableToSetCookieException; import org.openqa.selenium.WebDriverException; import org.openqa.selenium.XPathLookupException; import org.openqa.selenium.interactions.InvalidCoordinatesException; /** * Defines common error codes for the wire protocol. * * @author jmleyba@gmail.com (Jason Leyba) */ public class ErrorCodes { // These codes were all pulled from ChromeCommandExecutor and seem all over the place. // TODO(jmleyba): Clean up error codes? public static final int SUCCESS = 0; public static final int NO_SUCH_ELEMENT = 7; public static final int NO_SUCH_FRAME = 8; public static final int UNKNOWN_COMMAND = 9; public static final int STALE_ELEMENT_REFERENCE = 10; public static final int ELEMENT_NOT_VISIBLE = 11; public static final int INVALID_ELEMENT_STATE = 12; public static final int UNHANDLED_ERROR = 13; public static final int ELEMENT_NOT_SELECTABLE = 15; public static final int XPATH_LOOKUP_ERROR = 19; public static final int NO_SUCH_WINDOW = 23; public static final int INVALID_COOKIE_DOMAIN = 24; public static final int UNABLE_TO_SET_COOKIE = 25; public static final int ASYNC_SCRIPT_TIMEOUT = 28; public static final int INVALID_ELEMENT_COORDINATES = 29; // The following error codes are derived straight from HTTP return codes. public static final int METHOD_NOT_ALLOWED = 405; /** * Returns the exception type that corresponds to the given * {@code statusCode}. All unrecognized status codes will be mapped to * {@link WebDriverException WebDriverException.class}. * * @param statusCode The status code to convert. * @return The exception type that corresponds to the provided status code or * {@code null} if {@code statusCode == 0}. */ public Class getExceptionType(int statusCode) { switch (statusCode) { case SUCCESS: return null; case INVALID_COOKIE_DOMAIN: return InvalidCookieDomainException.class; case UNABLE_TO_SET_COOKIE: return UnableToSetCookieException.class; case NO_SUCH_WINDOW: return NoSuchWindowException.class; case NO_SUCH_ELEMENT: return NoSuchElementException.class; case NO_SUCH_FRAME: return NoSuchFrameException.class; case UNKNOWN_COMMAND: case METHOD_NOT_ALLOWED: return UnsupportedOperationException.class; case STALE_ELEMENT_REFERENCE: return StaleElementReferenceException.class; case ELEMENT_NOT_VISIBLE: return ElementNotVisibleException.class; case ELEMENT_NOT_SELECTABLE: case INVALID_ELEMENT_STATE: // TODO: There should be a more specific exception here. return UnsupportedOperationException.class; case XPATH_LOOKUP_ERROR: return XPathLookupException.class; case ASYNC_SCRIPT_TIMEOUT: return TimeoutException.class; case INVALID_ELEMENT_COORDINATES: return InvalidCoordinatesException.class; default: return WebDriverException.class; } } /** * Converts a thrown error into the corresponding status code. * * @param thrown The thrown error. * @return The corresponding status code for the given thrown error. */ public int toStatusCode(Throwable thrown) { if (thrown == null) { return SUCCESS; } else if (thrown instanceof InvalidCookieDomainException) { return INVALID_COOKIE_DOMAIN; } else if (thrown instanceof UnableToSetCookieException) { return UNABLE_TO_SET_COOKIE; } else if (thrown instanceof NoSuchWindowException) { return NO_SUCH_WINDOW; } else if (thrown instanceof NoSuchElementException) { return NO_SUCH_ELEMENT; } else if (thrown instanceof NoSuchFrameException) { return NO_SUCH_FRAME; } else if (thrown instanceof StaleElementReferenceException) { return STALE_ELEMENT_REFERENCE; } else if (thrown instanceof ElementNotVisibleException) { return ELEMENT_NOT_VISIBLE; } else if (thrown instanceof UnsupportedOperationException) { return INVALID_ELEMENT_STATE; } else if (thrown instanceof XPathLookupException) { return XPATH_LOOKUP_ERROR; } else if (thrown instanceof TimeoutException) { return ASYNC_SCRIPT_TIMEOUT; } else if (thrown instanceof InvalidCoordinatesException) { return INVALID_ELEMENT_COORDINATES; } else { return UNHANDLED_ERROR; } } /** * Tests if the {@code thrown} error can be mapped to one of WebDriver's * well defined error codes. * * @param thrown The error to test. * @return Whether the error can be mapped to a status code. */ public boolean isMappableError(Throwable thrown) { int statusCode = toStatusCode(thrown); return statusCode != SUCCESS && statusCode != UNHANDLED_ERROR; } } PK lC>AśDorg/openqa/selenium/remote/.svn/text-base/ErrorHandler.java.svn-basepackage org.openqa.selenium.remote; import org.openqa.selenium.WebDriverException; import com.google.common.base.Function; import com.google.common.base.Predicates; import com.google.common.collect.Iterables; import static org.openqa.selenium.remote.ErrorCodes.SUCCESS; import java.lang.reflect.Constructor; import java.lang.reflect.InvocationTargetException; import java.util.List; import java.util.Map; /** * Maps exceptions to status codes for sending over the wire. * * @author jmleyba@gmail.com (Jason Leyba) */ public class ErrorHandler { private static final String MESSAGE = "message"; private static final String SCREEN_SHOT = "screen"; private static final String CLASS = "class"; private static final String STACK_TRACE = "stackTrace"; private static final String LINE_NUMBER = "lineNumber"; private static final String METHOD_NAME = "methodName"; private static final String CLASS_NAME = "className"; private static final String FILE_NAME = "fileName"; private static final String UNKNOWN_CLASS = ""; private static final String UNKNOWN_METHOD = ""; private static final String UNKNOWN_FILE = ""; private final ErrorCodes errorCodes = new ErrorCodes(); private boolean includeServerErrors; public ErrorHandler() { this(true); } /** * @param includeServerErrors Whether to include server-side details in thrown * exceptions if the information is available. */ public ErrorHandler(boolean includeServerErrors) { this.includeServerErrors = includeServerErrors; } public boolean isIncludeServerErrors() { return includeServerErrors; } public void setIncludeServerErrors(boolean includeServerErrors) { this.includeServerErrors = includeServerErrors; } @SuppressWarnings({"unchecked", "ThrowableInstanceNeverThrown"}) public Response throwIfResponseFailed(Response response) throws RuntimeException { if (response.getStatus() == SUCCESS) { return response; } Class outerErrorType = errorCodes.getExceptionType(response.getStatus()); Object value = response.getValue(); String message = null; Throwable cause = null; if (value instanceof Map) { Map rawErrorData = (Map) value; try { message = (String) rawErrorData.get(MESSAGE); } catch (ClassCastException e) { // Ok, try to recover gracefully. message = String.valueOf(e); } @SuppressWarnings({"ThrowableResultOfMethodCallIgnored"}) Throwable serverError = rebuildServerError(rawErrorData); // If serverError is null, then the server did not provide a className (only expected if // the server is a Java process) or a stack trace. The lack of a className is OK, but // not having a stacktrace really hurts our ability to debug problems. if (serverError == null) { if (includeServerErrors) { // TODO: this should probably link to a wiki article with more info. message += " (WARNING: The server did not provide any stacktrace information)"; } } else if (!includeServerErrors) { // TODO: wiki article with more info. message += " (WARNING: The client has suppressed server-side stacktraces)"; } else { cause = serverError; } if (rawErrorData.get(SCREEN_SHOT) != null) { cause = new ScreenshotException(String.valueOf(rawErrorData.get(SCREEN_SHOT)), cause); } } else if (value != null) { message = String.valueOf(value); } Throwable toThrow = createThrowable(outerErrorType, new Class[] { String.class, Throwable.class }, new Object[] { message, cause }); if (toThrow == null) { toThrow = createThrowable(outerErrorType, new Class[] { String.class }, new Object[] { message }); } if (toThrow == null) { throw new WebDriverException(message, cause); } if (toThrow instanceof RuntimeException) { throw (RuntimeException) toThrow; } else { throw new WebDriverException(toThrow); } } @SuppressWarnings({"ErrorNotRethrown"}) private T createThrowable( Class clazz, Class[] parameterTypes, Object[] parameters) { try { Constructor constructor = clazz.getConstructor(parameterTypes); return constructor.newInstance(parameters); } catch (NoSuchMethodException e) { // Do nothing - fall through. } catch (InvocationTargetException e) { // Do nothing - fall through. } catch (InstantiationException e) { // Do nothing - fall through. } catch (IllegalAccessException e) { // Do nothing - fall through. } catch (OutOfMemoryError error) { // It can happen... } return null; } private Throwable rebuildServerError(Map rawErrorData) { if (!rawErrorData.containsKey(CLASS) && !rawErrorData.containsKey(STACK_TRACE)) { // Not enough information for us to try to rebuild an error. return null; } Throwable toReturn = null; String message = (String) rawErrorData.get(MESSAGE); if (rawErrorData.containsKey(CLASS)) { String className = (String) rawErrorData.get(CLASS); try { Class clazz = Class.forName(className); if (Throwable.class.isAssignableFrom(clazz)) { @SuppressWarnings({"unchecked"}) Class throwableType = (Class) clazz; toReturn = createThrowable(throwableType, new Class[] { String.class }, new Object[] { message }); } } catch (ClassNotFoundException ignored) { // Ok, fall-through } } if (toReturn == null) { toReturn = new UnknownServerException(message); } // Note: if we have a class name above, we should always have a stack trace. // The inverse is not always true. StackTraceElement[] stackTrace = new StackTraceElement[0]; if (rawErrorData.containsKey(STACK_TRACE)) { @SuppressWarnings({"unchecked"}) List> stackTraceInfo = (List>) rawErrorData.get(STACK_TRACE); Iterable stackFrames = Iterables.transform(stackTraceInfo, new FrameInfoToStackFrame()); stackFrames = Iterables.filter(stackFrames, Predicates.notNull()); stackTrace = Iterables.toArray(stackFrames, StackTraceElement.class); } toReturn.setStackTrace(stackTrace); return toReturn; } /** * Exception used as a place holder if the server returns an error without a * stack trace. */ public static class UnknownServerException extends WebDriverException { private UnknownServerException(String s) { super(s); } } /** * Function that can rebuild a {@link StackTraceElement} from the frame info * included with a WebDriver JSON response. */ private static class FrameInfoToStackFrame implements Function, StackTraceElement> { public StackTraceElement apply(Map frameInfo) { if (frameInfo == null) { return null; } Number lineNumber = (Number) frameInfo.get(LINE_NUMBER); if (lineNumber == null) { return null; } // Gracefully handle remote servers that don't (or can't) send back // complete stack trace info. At least some of this information should // be included... String className = frameInfo.containsKey(CLASS_NAME) ? String.valueOf(frameInfo.get(CLASS_NAME)) : UNKNOWN_CLASS; String methodName = frameInfo.containsKey(METHOD_NAME) ? String.valueOf(frameInfo.get(METHOD_NAME)) : UNKNOWN_METHOD; String fileName = frameInfo.containsKey(FILE_NAME) ? String.valueOf(frameInfo.get(FILE_NAME)) : UNKNOWN_FILE; return new StackTraceElement(className, methodName, fileName, lineNumber.intValue()); } } } PK lC>U"y\\Eorg/openqa/selenium/remote/.svn/text-base/ExecuteMethod.java.svn-base/* Copyright 2007-2010 WebDriver committers Copyright 2007-2010 Google Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package org.openqa.selenium.remote; import java.util.Map; /** * An encapsulation of * {@link org.openqa.selenium.remote.RemoteWebDriver#executeScript(String, Object...)}. */ public class ExecuteMethod { private final RemoteWebDriver driver; public ExecuteMethod(RemoteWebDriver driver) { this.driver = driver; } /** * Execute the given command on the remote webdriver server. Any exceptions * will be thrown by the underlying execute method. * * @param commandName The remote command to execute * @param parameters The parameters to execute that command with * @return The result of {@link Response#getValue()}. */ public Object execute(String commandName, Map parameters) { Response response; if (parameters == null || parameters.size() == 0) { response = driver.execute(commandName); } else { response = driver.execute(commandName, parameters); } return response.getValue(); } } PK lC> jLjLKorg/openqa/selenium/remote/.svn/text-base/HttpCommandExecutor.java.svn-base/* Copyright 2007-2009 WebDriver committers Copyright 2007-2009 Google Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package org.openqa.selenium.remote; import com.google.common.collect.ImmutableMap; import org.apache.http.Header; import org.apache.http.HttpEntity; import org.apache.http.HttpHost; import org.apache.http.HttpResponse; import org.apache.http.auth.AuthScope; import org.apache.http.auth.UsernamePasswordCredentials; import org.apache.http.client.ClientProtocolException; import org.apache.http.client.HttpClient; import org.apache.http.client.methods.HttpDelete; import org.apache.http.client.methods.HttpGet; import org.apache.http.client.methods.HttpPost; import org.apache.http.client.methods.HttpUriRequest; import org.apache.http.client.params.HttpClientParams; import org.apache.http.conn.ClientConnectionManager; import org.apache.http.conn.scheme.Scheme; import org.apache.http.conn.scheme.SchemeRegistry; import org.apache.http.conn.ssl.SSLSocketFactory; import org.apache.http.entity.StringEntity; import org.apache.http.impl.client.DefaultHttpClient; import org.apache.http.impl.conn.SingleClientConnManager; import org.apache.http.params.BasicHttpParams; import org.apache.http.params.CoreConnectionPNames; import org.apache.http.params.HttpParams; import org.apache.http.protocol.BasicHttpContext; import org.apache.http.protocol.HttpContext; import org.apache.http.util.EntityUtils; import org.openqa.selenium.WebDriverException; import org.openqa.selenium.net.Urls; import java.io.IOException; import java.io.UnsupportedEncodingException; import java.net.MalformedURLException; import java.net.URI; import java.net.URISyntaxException; import java.net.URL; import java.util.Map; import static org.apache.http.protocol.ExecutionContext.HTTP_TARGET_HOST; import static org.openqa.selenium.remote.DriverCommand.*; public class HttpCommandExecutor implements CommandExecutor { private static final int MAX_REDIRECTS = 10; private final HttpHost targetHost; private final URL remoteServer; private final Map nameToUrl; private final HttpClient client; private enum HttpVerb { GET() { public HttpUriRequest createMethod(String url) { return new HttpGet(url); } }, POST() { public HttpUriRequest createMethod(String url) { return new HttpPost(url); } }, DELETE() { public HttpUriRequest createMethod(String url) { return new HttpDelete(url); } }; public abstract HttpUriRequest createMethod(String url); } private static ClientConnectionManager getClientConnectionManager(HttpParams httpParams){ SchemeRegistry registry = new SchemeRegistry(); registry.register(new Scheme("http", ReusingSocketSocketFactory.getSocketFactory(), 80)); registry.register(new Scheme("https", SSLSocketFactory.getSocketFactory(), 443)); return new SingleClientConnManager(httpParams, registry); } public HttpCommandExecutor(URL addressOfRemoteServer) { try { remoteServer = addressOfRemoteServer == null ? new URL(System.getProperty("webdriver.remote.server")) : addressOfRemoteServer; } catch (MalformedURLException e) { throw new WebDriverException(e); } HttpParams params = new BasicHttpParams(); // Use the JRE default for the socket linger timeout. params.setParameter(CoreConnectionPNames.SO_LINGER, -1); HttpClientParams.setRedirecting(params, false); client = new DefaultHttpClient(getClientConnectionManager(params ), params); if(addressOfRemoteServer.getUserInfo() != null){ // Use HTTP Basic auth UsernamePasswordCredentials credentials = new UsernamePasswordCredentials(addressOfRemoteServer.getUserInfo()); ((DefaultHttpClient)client).getCredentialsProvider(). setCredentials(AuthScope.ANY, credentials); } // Some machines claim "localhost.localdomain" is the same as "localhost". // This assumption is not always true. String host = remoteServer.getHost().replace(".localdomain", ""); targetHost = new HttpHost( host, remoteServer.getPort(), remoteServer.getProtocol()); nameToUrl = ImmutableMap.builder() .put(NEW_SESSION, post("/session")) .put(QUIT, delete("/session/:sessionId")) .put(GET_CURRENT_WINDOW_HANDLE, get("/session/:sessionId/window_handle")) .put(GET_WINDOW_HANDLES, get("/session/:sessionId/window_handles")) .put(GET, post("/session/:sessionId/url")) // This is used for the FirefoxDriver only to dismiss an alert. // The Alert API is still experimental and should not be used. .put(DISMISS_ALERT, post("/session/:sessionId/dismiss_alert")) .put(ACCEPT_ALERT, post("/session/:sessionId/accept_alert")) .put(GET_ALERT_TEXT, get("/session/:sessionId/alert_text")) .put(SET_ALERT_VALUE, post("/session/:sessionId/alert_text")) .put(GO_FORWARD, post("/session/:sessionId/forward")) .put(GO_BACK, post("/session/:sessionId/back")) .put(REFRESH, post("/session/:sessionId/refresh")) .put(EXECUTE_SCRIPT, post("/session/:sessionId/execute")) .put(EXECUTE_ASYNC_SCRIPT, post("/session/:sessionId/execute_async")) .put(GET_CURRENT_URL, get("/session/:sessionId/url")) .put(GET_TITLE, get("/session/:sessionId/title")) .put(GET_PAGE_SOURCE, get("/session/:sessionId/source")) .put(SCREENSHOT, get("/session/:sessionId/screenshot")) .put(SET_BROWSER_VISIBLE, post("/session/:sessionId/visible")) .put(IS_BROWSER_VISIBLE, get("/session/:sessionId/visible")) .put(FIND_ELEMENT, post("/session/:sessionId/element")) .put(FIND_ELEMENTS, post("/session/:sessionId/elements")) .put(GET_ACTIVE_ELEMENT, post("/session/:sessionId/element/active")) .put(FIND_CHILD_ELEMENT, post("/session/:sessionId/element/:id/element")) .put(FIND_CHILD_ELEMENTS, post("/session/:sessionId/element/:id/elements")) .put(CLICK_ELEMENT, post("/session/:sessionId/element/:id/click")) .put(CLEAR_ELEMENT, post("/session/:sessionId/element/:id/clear")) .put(SUBMIT_ELEMENT, post("/session/:sessionId/element/:id/submit")) .put(GET_ELEMENT_TEXT, get("/session/:sessionId/element/:id/text")) .put(SEND_KEYS_TO_ELEMENT, post("/session/:sessionId/element/:id/value")) .put(GET_ELEMENT_VALUE, get("/session/:sessionId/element/:id/value")) .put(GET_ELEMENT_TAG_NAME, get("/session/:sessionId/element/:id/name")) .put(IS_ELEMENT_SELECTED, get("/session/:sessionId/element/:id/selected")) .put(SET_ELEMENT_SELECTED, post("/session/:sessionId/element/:id/selected")) .put(TOGGLE_ELEMENT, post("/session/:sessionId/element/:id/toggle")) .put(IS_ELEMENT_ENABLED, get("/session/:sessionId/element/:id/enabled")) .put(IS_ELEMENT_DISPLAYED, get("/session/:sessionId/element/:id/displayed")) .put(HOVER_OVER_ELEMENT, post("/session/:sessionId/element/:id/hover")) .put(GET_ELEMENT_LOCATION, get("/session/:sessionId/element/:id/location")) .put(GET_ELEMENT_LOCATION_ONCE_SCROLLED_INTO_VIEW, get("/session/:sessionId/element/:id/location_in_view")) .put(GET_ELEMENT_SIZE, get("/session/:sessionId/element/:id/size")) .put(GET_ELEMENT_ATTRIBUTE, get("/session/:sessionId/element/:id/attribute/:name")) .put(ELEMENT_EQUALS, get("/session/:sessionId/element/:id/equals/:other")) .put(GET_ALL_COOKIES, get("/session/:sessionId/cookie")) .put(ADD_COOKIE, post("/session/:sessionId/cookie")) .put(DELETE_ALL_COOKIES, delete("/session/:sessionId/cookie")) .put(DELETE_COOKIE, delete("/session/:sessionId/cookie/:name")) .put(SWITCH_TO_FRAME, post("/session/:sessionId/frame")) .put(SWITCH_TO_WINDOW, post("/session/:sessionId/window")) .put(CLOSE, delete("/session/:sessionId/window")) .put(DRAG_ELEMENT, post("/session/:sessionId/element/:id/drag")) .put(GET_SPEED, get("/session/:sessionId/speed")) .put(SET_SPEED, post("/session/:sessionId/speed")) .put(GET_ELEMENT_VALUE_OF_CSS_PROPERTY, get("/session/:sessionId/element/:id/css/:propertyName")) .put(IMPLICITLY_WAIT, post("/session/:sessionId/timeouts/implicit_wait")) .put(SET_SCRIPT_TIMEOUT, post("/session/:sessionId/timeouts/async_script")) .put(EXECUTE_SQL, post("/session/:sessionId/execute_sql")) .put(GET_LOCATION, get("/session/:sessionId/location")) .put(SET_LOCATION, post("/session/:sessionId/location")) .put(GET_APP_CACHE, get("/session/:sessionId/application_cache")) .put(GET_APP_CACHE_STATUS, get("/session/:sessionId/application_cache/status")) .put(IS_BROWSER_ONLINE, get("/session/:sessionId/browser_connection")) .put(SET_BROWSER_ONLINE, post("/session/:sessionId/browser_connection")) .put(GET_LOCAL_STORAGE_ITEM, get("/session/:sessionId/local_storage/:key")) .put(REMOVE_LOCAL_STORAGE_ITEM, delete("/session/:sessionId/local_storage/:key")) .put(GET_LOCAL_STORAGE_KEYS, get("/session/:sessionId/local_storage")) .put(SET_LOCAL_STORAGE_ITEM, post("/session/:sessionId/local_storage")) .put(CLEAR_LOCAL_STORAGE, delete("/session/:sessionId/local_storage")) .put(GET_LOCAL_STORAGE_SIZE, get("/session/:sessionId/local_storage/size")) .put(GET_SESSION_STORAGE_ITEM, get("/session/:sessionId/session_storage/:key")) .put(REMOVE_SESSION_STORAGE_ITEM, delete("/session/:sessionId/session_storage/:key")) .put(GET_SESSION_STORAGE_KEYS, get("/session/:sessionId/session_storage")) .put(SET_SESSION_STORAGE_ITEM, post("/session/:sessionId/session_storage")) .put(CLEAR_SESSION_STORAGE, delete("/session/:sessionId/session_storage")) .put(GET_SESSION_STORAGE_SIZE, get("/session/:sessionId/session_storage/size")) .put(GET_SCREEN_ORIENTATION, get("/session/:sessionId/orientation")) .put(SET_SCREEN_ORIENTATION, post("/session/:sessionId/orientation")) // Interactions-related commands. .put(CLICK, post("/session/:sessionId/click")) .put(DOUBLE_CLICK, post("/session/:sessionId/doubleclick")) .put(MOUSE_DOWN, post("/session/:sessionId/buttondown")) .put(MOUSE_UP, post("/session/:sessionId/buttonup")) .put(MOVE_TO, post("/session/:sessionId/moveto")) .put(SEND_MODIFIER_KEY_TO_ACTIVE_ELEMENT, post("/session/:sessionId/modifier")) .build(); } public URL getAddressOfRemoteServer() { return remoteServer; } public Response execute(Command command) throws IOException { HttpContext context = new BasicHttpContext(); CommandInfo info = nameToUrl.get(command.getName()); try { HttpUriRequest httpMethod = info.getMethod(remoteServer, command); setAcceptHeader(httpMethod); if (httpMethod instanceof HttpPost) { String payload = new BeanToJsonConverter().convert(command.getParameters()); ((HttpPost) httpMethod).setEntity(new StringEntity(payload, "utf-8")); httpMethod.addHeader("Content-Type", "application/json; charset=utf-8"); } HttpResponse response = null; response = client.execute(targetHost, httpMethod, context); response = followRedirects(client, context, response, /* redirect count */0); final EntityWithEncoding entityWithEncoding = new EntityWithEncoding(response.getEntity()); return createResponse(response, context, entityWithEncoding); } catch (NullPointerException e) { // swallow an NPE on quit. It indicates that the sessionID is null // which is what we expect to be the case. if (QUIT.equals(command.getName())) { return new Response(); } else { throw e; } } } private void setAcceptHeader(HttpUriRequest httpMethod) { httpMethod.addHeader("Accept", "application/json, image/png"); } private HttpResponse followRedirects( HttpClient client, HttpContext context, HttpResponse response, int redirectCount) { if (!isRedirect(response)) { return response; } if (redirectCount > MAX_REDIRECTS) { throw new WebDriverException("Maximum number of redirects exceeded. Aborting"); } String location = response.getFirstHeader("location").getValue(); URI uri = null; try { uri = buildUri(context, location); // Make sure that the previous connection is freed. HttpEntity httpEntity = response.getEntity(); if (httpEntity != null){ httpEntity.consumeContent(); } HttpGet get = new HttpGet(uri); setAcceptHeader(get); HttpResponse newResponse = client.execute(targetHost, get, context); return followRedirects(client, context, newResponse, redirectCount + 1); } catch (URISyntaxException e) { throw new WebDriverException(e); } catch (ClientProtocolException e) { throw new WebDriverException(e); } catch (IOException e) { throw new WebDriverException(e); } } private URI buildUri(HttpContext context, String location) throws URISyntaxException { URI uri; uri = new URI(location); if (!uri.isAbsolute()) { HttpHost host = (HttpHost) context.getAttribute(HTTP_TARGET_HOST); uri = new URI(host.toURI() + location); } return uri; } private boolean isRedirect(HttpResponse response) { int code = response.getStatusLine().getStatusCode(); return (code == 301 || code == 302 || code == 303 || code == 307) && response.containsHeader("location"); } class EntityWithEncoding { private final String charSet; private final byte[] content; EntityWithEncoding(HttpEntity entity) throws IOException { if (entity != null) { content = EntityUtils.toByteArray(entity); charSet = EntityUtils.getContentCharSet(entity); entity.consumeContent(); } else { content = new byte[0]; charSet = null; } } public String getContentString() throws UnsupportedEncodingException { return new String(content, charSet != null ? charSet : "utf-8"); } public byte[] getContent() { return content; } public boolean hasEntityContent(){ return content != null; } } private Response createResponse(HttpResponse httpResponse, HttpContext context, EntityWithEncoding entityWithEncoding) throws IOException { final Response response; Header header = httpResponse.getFirstHeader("Content-Type"); if (header != null && header.getValue().startsWith("application/json")) { String responseAsText = entityWithEncoding.getContentString(); try { response = new JsonToBeanConverter().convert(Response.class, responseAsText); } catch (ClassCastException e) { if (responseAsText != null && "".equals(responseAsText)) { // The remote server has died, but has already set some headers. // Normally this occurs when the final window of the firefox driver // is closed on OS X. Return null, as the return value _should_ be // being ignored. This is not an elegant solution. return null; } throw new WebDriverException("Cannot convert text to response: " + responseAsText, e); } } else { response = new Response(); if (header != null && header.getValue().startsWith("image/png")) { response.setValue(entityWithEncoding.getContent()); } else if (entityWithEncoding.hasEntityContent()) { response.setValue(entityWithEncoding.getContentString()); } HttpHost finalHost = (HttpHost) context.getAttribute(HTTP_TARGET_HOST); String uri = finalHost.toURI(); int sessionIndex = uri.indexOf("/session/"); if (sessionIndex != -1) { sessionIndex += "/session/".length(); int nextSlash = uri.indexOf("/", sessionIndex); if (nextSlash != -1) { response.setSessionId(uri.substring(sessionIndex, nextSlash)); } } int statusCode = httpResponse.getStatusLine().getStatusCode(); if (!(statusCode > 199 && statusCode < 300)) { // 4xx represents an unknown command or a bad request. if (statusCode > 399 && statusCode < 500) { response.setStatus(ErrorCodes.UNKNOWN_COMMAND); } else if (statusCode > 499 && statusCode < 600) { // 5xx represents an internal server error. The response status should already be set, but // if not, set it to a general error code. if (response.getStatus() == ErrorCodes.SUCCESS) { response.setStatus(ErrorCodes.UNHANDLED_ERROR); } } else { response.setStatus(ErrorCodes.UNHANDLED_ERROR); } } if (response.getValue() instanceof String) { //We normalise to \n because Java will translate this to \r\n //if this is suitable on our platform, and if we have \r\n, java will //turn this into \r\r\n, which would be Bad! response.setValue(((String) response.getValue()).replace("\r\n", "\n")); } } return response; } private static CommandInfo get(String url) { return new CommandInfo(url, HttpVerb.GET); } private static CommandInfo post(String url) { return new CommandInfo(url, HttpVerb.POST); } private static CommandInfo delete(String url) { return new CommandInfo(url, HttpVerb.DELETE); } private static class CommandInfo { private final String url; private final HttpVerb verb; private CommandInfo(String url, HttpVerb verb) { this.url = url; this.verb = verb; } public HttpUriRequest getMethod(URL base, Command command) { StringBuilder urlBuilder = new StringBuilder(); urlBuilder.append(base.toExternalForm()); for (String part : url.split("/")) { if (part.length() == 0) { continue; } urlBuilder.append("/"); if (part.startsWith(":")) { String value = get(part.substring(1), command); if (value != null) { urlBuilder.append(get(part.substring(1), command)); } } else { urlBuilder.append(part); } } return verb.createMethod(urlBuilder.toString()); } private String get(String propertyName, Command command) { if ("sessionId".equals(propertyName)) { SessionId id = command.getSessionId(); if (id == null) { throw new WebDriverException("Session ID may not be null"); } return id.toString(); } // Attempt to extract the property name from the parameters Object value = command.getParameters().get(propertyName); if (value != null) { return Urls.urlEncode(String.valueOf(value)); } return null; } } } PK lC>'%FFOorg/openqa/selenium/remote/.svn/text-base/InterfaceImplementation.java.svn-base/* Copyright 2007-2010 WebDriver committers Copyright 2007-2010 Google Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package org.openqa.selenium.remote; import java.lang.reflect.Method; /** * An implementation of a particular interface, used by the * {@link org.openqa.selenium.remote.Augmenter}. */ public interface InterfaceImplementation { /** * Called when it has become apparent that this is the right interface to * implement a particular method. * * @param executeMethod Call this to actually call the remote instance * @param self *@param method The method invoked by the user * @param args The arguments to the method @return The return value, which will be passed to the user directly. */ Object invoke(ExecuteMethod executeMethod, Object self, Method method, Object... args); } PK lC>fDDEorg/openqa/selenium/remote/.svn/text-base/JsonException.java.svn-base/* Copyright 2010 WebDriver committers Copyright 2010 Google Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package org.openqa.selenium.remote; import org.json.JSONException; import org.openqa.selenium.WebDriverException; public class JsonException extends WebDriverException { public JsonException(JSONException e) { super(e); } } PK lC>ΤR''Korg/openqa/selenium/remote/.svn/text-base/JsonToBeanConverter.java.svn-base/* Copyright 2007-2009 WebDriver committers Copyright 2007-2009 Google Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package org.openqa.selenium.remote; import org.json.JSONArray; import org.json.JSONException; import org.json.JSONObject; import org.openqa.selenium.Capabilities; import org.openqa.selenium.WebDriverException; import org.openqa.selenium.browserlaunchers.DoNotUseProxyPac; import java.lang.reflect.InvocationTargetException; import java.lang.reflect.Method; import java.net.URI; import java.net.URISyntaxException; import java.util.ArrayList; import java.util.Date; import java.util.HashMap; import java.util.Iterator; import java.util.List; import java.util.Map; public class JsonToBeanConverter { public T convert(Class clazz, Object text) throws JsonException { try { return convert(clazz, text, 0); } catch (JSONException e) { throw new JsonException(e); } } @SuppressWarnings("unchecked") private T convert(Class clazz, Object text, int depth) throws JSONException { if (text == null) { return null; } if (String.class.equals(clazz)) { return (T) text; } if (isPrimitive(clazz)) { return (T) text; } if (text instanceof Number) { // Thank you type erasure. if (text instanceof Double || text instanceof Float) { return (T) Double.valueOf(String.valueOf(text)); } return (T) Long.valueOf(String.valueOf(text)); } if (isPrimitive(text.getClass())) { return (T) text; } if (isEnum(clazz, text)) { return (T) convertEnum(clazz, text); } if ("".equals(String.valueOf(text))) { return (T) text; } if (Command.class.equals(clazz)) { JSONObject rawCommand = new JSONObject((String) text); SessionId sessionId = null; if (rawCommand.has("sessionId")) { sessionId = convert(SessionId.class, rawCommand.getString("sessionId"), depth + 1); } String name = rawCommand.getString("name"); if (rawCommand.has("parameters")) { Map args = (Map) convert(HashMap.class, rawCommand.getJSONObject("parameters"), depth + 1); return (T) new Command(sessionId, name, args); } return (T) new Command(sessionId, name); } if (SessionId.class.equals(clazz)) { JSONObject object = new JSONObject((String) text); String value = object.getString("value"); return (T) new SessionId(value); } if (Capabilities.class.equals(clazz)) { JSONObject object = new JSONObject((String) text); DesiredCapabilities caps = new DesiredCapabilities(); Iterator allKeys = object.keys(); while (allKeys.hasNext()) { String key = (String) allKeys.next(); caps.setCapability(key, object.get(key)); } return (T) caps; } if (DoNotUseProxyPac.class.equals(clazz)) { JSONObject object = new JSONObject((String) text); DoNotUseProxyPac pac = new DoNotUseProxyPac(); if (object.has("directUrls")) { JSONArray allUrls = object.getJSONArray("directUrls"); for (int i = 0; i < allUrls.length(); i++) { pac.map(allUrls.getString(i)).toNoProxy(); } } if (object.has("directHosts")) { JSONArray allHosts = object.getJSONArray("directHosts"); for (int i = 0; i < allHosts.length(); i++) { pac.mapHost(allHosts.getString(i)).toNoProxy(); } } if (object.has("proxiedHosts")) { JSONObject proxied = object.getJSONObject("proxiedHosts"); Iterator allHosts = proxied.keys(); while (allHosts.hasNext()) { String host = (String) allHosts.next(); pac.mapHost(host).toProxy(proxied.getString(host)); } } if (object.has("proxiedUrls")) { JSONObject proxied = object.getJSONObject("proxiedUrls"); Iterator allUrls = proxied.keys(); while (allUrls.hasNext()) { String host = (String) allUrls.next(); pac.map(host).toProxy(proxied.getString(host)); } } if (object.has("proxiedRegexUrls")) { JSONObject proxied = object.getJSONObject("proxiedRegexUrls"); Iterator allUrls = proxied.keys(); while (allUrls.hasNext()) { String host = (String) allUrls.next(); pac.map(host).toProxy(proxied.getString(host)); } } if (object.has("defaultProxy")) { if ("'DIRECT'".equals(object.getString("defaultProxy"))) { pac.defaults().toNoProxy(); } else { pac.defaults().toProxy(object.getString("defaultProxy")); } } if (object.has("deriveFrom")) { try { pac.deriveFrom(new URI(object.getString("deriveFrom"))); } catch (URISyntaxException e) { throw new WebDriverException(e); } } return (T) pac; } if (Date.class.equals(clazz)) { return (T) new Date(Long.valueOf(String.valueOf(text))); } if (text != null && text instanceof String && !((String) text).startsWith("{") && Object.class .equals(clazz)) { return (T) text; } if (text instanceof JSONArray) { return (T) convertList((JSONArray) text, depth); } if (text == JSONObject.NULL) { return null; } if (depth == 0) { if (text != null && text instanceof String) { if (((String) text).startsWith("[")) { text = new JSONArray((String) text); } else { text = new JSONObject(String.valueOf(text)); } } } if (text instanceof JSONObject) { JSONObject o = (JSONObject) text; if (Map.class.isAssignableFrom(clazz)) { return (T) convertMap(o, depth); } if (isPrimitive(o.getClass())) { return (T) o; } if (Object.class.equals(clazz)) { return (T) convertMap(o, depth); } return convertBean(clazz, o, depth); } else if (text instanceof JSONArray) { return (T) convertList((JSONArray) text, depth + 1); } else { return (T) text; // Crap shoot here; probably a string. } } @SuppressWarnings("unchecked") private Enum convertEnum(Class clazz, Object text) { if (clazz.isEnum()) { return Enum.valueOf(clazz, String.valueOf(text)); } Class[] allClasses = clazz.getClasses(); for (Class current : allClasses) { if (current.isEnum()) { return Enum.valueOf(current, String.valueOf(text)); } } return null; } private boolean isEnum(Class clazz, Object text) { return clazz.isEnum() || text instanceof Enum; } public T convertBean(Class clazz, JSONObject toConvert, int depth) throws JSONException { T t = newInstance(clazz); SimplePropertyDescriptor[] allProperties = SimplePropertyDescriptor.getPropertyDescriptors(clazz); for (SimplePropertyDescriptor property : allProperties) { if (!toConvert.has(property.getName())) continue; Object value = toConvert.get(property.getName()); Method write = property.getWriteMethod(); if (write == null) { continue; } Class type = write.getParameterTypes()[0]; try { write.invoke(t, convert(type, value, depth + 1)); } catch (IllegalAccessException e) { throw propertyWriteException(property, value, type, e); } catch (InvocationTargetException e) { throw propertyWriteException(property, value, type, e); } } return t; } private T newInstance(Class clazz) { try { return clazz.newInstance(); } catch (InstantiationException e) { throw new WebDriverException(e); } catch (IllegalAccessException e) { throw new WebDriverException(e); } } private WebDriverException propertyWriteException( SimplePropertyDescriptor property, Object value, Class type, Throwable cause) { throw new WebDriverException( String.format("Property name: %s -> %s on class %s", property.getName(), value, type), cause); } @SuppressWarnings("unchecked") private Map convertMap(JSONObject toConvert, int depth) throws JSONException { Map map = new HashMap(); Iterator allEntries = toConvert.keys(); while (allEntries.hasNext()) { String key = (String) allEntries.next(); map.put(key, convert(Object.class, toConvert.get(key), depth + 1)); } return map; } @SuppressWarnings("unchecked") private List convertList(JSONArray toConvert, int depth) throws JSONException { ArrayList list = new ArrayList(toConvert.length()); for (int i = 0; i < toConvert.length(); i++) { list.add(convert(Object.class, toConvert.get(i), depth + 1)); } return list; } private boolean isPrimitive(Class clazz) { if (clazz.isPrimitive()) { return true; } if (Boolean.class.isAssignableFrom(clazz)) { return true; } if (Byte.class.isAssignableFrom(clazz)) { return true; } if (Character.class.isAssignableFrom(clazz)) { return true; } if (Double.class.isAssignableFrom(clazz)) { return true; } if (Float.class.isAssignableFrom(clazz)) { return true; } if (Integer.class.isAssignableFrom(clazz)) { return true; } if (Long.class.isAssignableFrom(clazz)) { return true; } if (Short.class.isAssignableFrom(clazz)) { return true; } if (Void.class.isAssignableFrom(clazz)) { return true; } return false; } } PK lC>*Forg/openqa/selenium/remote/.svn/text-base/PropertyMunger.java.svn-base/* Copyright 2007-2009 WebDriver committers Copyright 2007-2009 Google Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package org.openqa.selenium.remote; import java.lang.reflect.Method; public class PropertyMunger { public static Object get(String name, Object on) throws Exception { SimplePropertyDescriptor[] properties = SimplePropertyDescriptor.getPropertyDescriptors(on.getClass()); for (SimplePropertyDescriptor property : properties) { if (property.getName().equals(name)) { Object result = property.getReadMethod().invoke(on); return String.valueOf(result); } } return null; } public static void set(String name, Object on, Object value) throws Exception { SimplePropertyDescriptor[] properties = SimplePropertyDescriptor.getPropertyDescriptors(on.getClass()); for (SimplePropertyDescriptor property : properties) { if (property.getName().equals(name)) { Method writeMethod = property.getWriteMethod(); if (writeMethod == null) { return; } Class[] types = writeMethod.getParameterTypes(); if (types.length != 1) { return; } if (String.class.equals(types[0])) { writeMethod.invoke(on, value); } } } } } PK lC>(&P&PGorg/openqa/selenium/remote/.svn/text-base/RemoteWebDriver.java.svn-base/* Copyright 2007-2009 WebDriver committers Copyright 2007-2009 Google Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package org.openqa.selenium.remote; import com.google.common.collect.ImmutableMap; import com.google.common.collect.Iterables; import com.google.common.collect.Lists; import com.google.common.collect.Maps; import org.openqa.selenium.Alert; import org.openqa.selenium.By; import org.openqa.selenium.Capabilities; import org.openqa.selenium.Cookie; import org.openqa.selenium.HasInputDevices; import org.openqa.selenium.JavascriptExecutor; import org.openqa.selenium.Keyboard; import org.openqa.selenium.Keys; import org.openqa.selenium.Mouse; import org.openqa.selenium.Platform; import org.openqa.selenium.Speed; import org.openqa.selenium.WebDriver; import org.openqa.selenium.WebDriverException; import org.openqa.selenium.WebElement; import org.openqa.selenium.interactions.ActionChainsGenerator; import org.openqa.selenium.interactions.DefaultActionChainsGenerator; import org.openqa.selenium.interactions.internal.Coordinates; import org.openqa.selenium.internal.FindsByClassName; import org.openqa.selenium.internal.FindsByCssSelector; import org.openqa.selenium.internal.FindsById; import org.openqa.selenium.internal.FindsByLinkText; import org.openqa.selenium.internal.FindsByName; import org.openqa.selenium.internal.FindsByTagName; import org.openqa.selenium.internal.FindsByXPath; import org.openqa.selenium.remote.internal.JsonToWebElementConverter; import org.openqa.selenium.remote.internal.WebElementToJsonConverter; import java.net.URL; import java.util.Date; import java.util.HashSet; import java.util.LinkedHashSet; import java.util.List; import java.util.Map; import java.util.Set; import java.util.concurrent.TimeUnit; public class RemoteWebDriver implements WebDriver, JavascriptExecutor, FindsById, FindsByClassName, FindsByLinkText, FindsByName, FindsByCssSelector, FindsByTagName, FindsByXPath, HasInputDevices { private final ErrorHandler errorHandler = new ErrorHandler(); private CommandExecutor executor; private Capabilities capabilities; private SessionId sessionId; private JsonToWebElementConverter converter; private final RemoteKeyboard keyboard = new RemoteKeyboard(); private final RemoteMouse mouse = new RemoteMouse(); // For cglib protected RemoteWebDriver() { converter = new JsonToWebElementConverter(this); } public RemoteWebDriver(CommandExecutor executor, Capabilities desiredCapabilities) { this.executor = executor; converter = new JsonToWebElementConverter(this); startClient(); startSession(desiredCapabilities); } public RemoteWebDriver(Capabilities desiredCapabilities) { this((URL) null, desiredCapabilities); } public RemoteWebDriver(URL remoteAddress, Capabilities desiredCapabilities) { this(new HttpCommandExecutor(remoteAddress), desiredCapabilities); } public SessionId getSessionId() { return sessionId; } @SuppressWarnings({"unchecked"}) protected void startSession(Capabilities desiredCapabilities) { Response response = execute(DriverCommand.NEW_SESSION, ImmutableMap.of("desiredCapabilities", desiredCapabilities)); Map rawCapabilities = (Map) response.getValue(); DesiredCapabilities returnedCapabilities = new DesiredCapabilities(); for (Map.Entry entry : rawCapabilities.entrySet()) { // Handle the platform later if ("platform".equals(entry.getKey())) { continue; } returnedCapabilities.setCapability(entry.getKey(), entry.getValue()); } String platformString = (String) rawCapabilities.get("platform"); Platform platform; try { if (platformString == null || "".equals(platformString)) { platform = Platform.ANY; } else { platform = Platform.valueOf(platformString); } } catch (IllegalArgumentException e) { // The server probably responded with a name matching the os.name // system property. Try to recover and parse this. platform = Platform.extractFromSysProperty(platformString); } returnedCapabilities.setPlatform(platform); capabilities = returnedCapabilities; sessionId = new SessionId(response.getSessionId()); } /** * Method called before * {@link #startSession(Capabilities) starting a new session}. The default * implementation is a no-op, but subtypes should override this method to * define custom behavior. */ protected void startClient() { } /** * Method called after executing a {@link #quit()} command. Subtypes */ protected void stopClient() { } public ErrorHandler getErrorHandler() { return errorHandler; } public CommandExecutor getCommandExecutor() { return executor; } protected void setCommandExecutor(CommandExecutor executor) { this.executor = executor; } public Capabilities getCapabilities() { return capabilities; } public void get(String url) { execute(DriverCommand.GET, ImmutableMap.of("url", url)); } public String getTitle() { Response response = execute(DriverCommand.GET_TITLE); Object value = response.getValue(); return value == null ? "" : value.toString(); } public String getCurrentUrl() { return execute(DriverCommand.GET_CURRENT_URL).getValue().toString(); } public List findElements(By by) { return by.findElements(this); } public WebElement findElement(By by) { return by.findElement(this); } protected WebElement findElement(String by, String using) { if (using == null) { throw new IllegalArgumentException("Cannot find elements when the selector is null."); } Response response = execute(DriverCommand.FIND_ELEMENT, ImmutableMap.of("using", by, "value", using)); return (WebElement) response.getValue(); } @SuppressWarnings("unchecked") protected List findElements(String by, String using) { if (using == null) { throw new IllegalArgumentException("Cannot find elements when the selector is null."); } Response response = execute(DriverCommand.FIND_ELEMENTS, ImmutableMap.of("using", by, "value", using)); return (List) response.getValue(); } public WebElement findElementById(String using) { return findElement("id", using); } public List findElementsById(String using) { return findElements("id", using); } public WebElement findElementByLinkText(String using) { return findElement("link text", using); } public List findElementsByLinkText(String using) { return findElements("link text", using); } public WebElement findElementByPartialLinkText(String using) { return findElement("partial link text", using); } public List findElementsByPartialLinkText(String using) { return findElements("partial link text", using); } public WebElement findElementByTagName(String using) { return findElement("tag name", using); } public List findElementsByTagName(String using) { return findElements("tag name", using); } public WebElement findElementByName(String using) { return findElement("name", using); } public List findElementsByName(String using) { return findElements("name", using); } public WebElement findElementByClassName(String using) { return findElement("class name", using); } public List findElementsByClassName(String using) { return findElements("class name", using); } public WebElement findElementByCssSelector(String using) { return findElement("css selector", using); } public List findElementsByCssSelector(String using) { return findElements("css selector", using); } public WebElement findElementByXPath(String using) { return findElement("xpath", using); } public List findElementsByXPath(String using) { return findElements("xpath", using); } // Misc public String getPageSource() { return (String) execute(DriverCommand.GET_PAGE_SOURCE).getValue(); } public void close() { execute(DriverCommand.CLOSE); } public void quit() { try { execute(DriverCommand.QUIT); } finally { sessionId = null; stopClient(); } } @SuppressWarnings({"unchecked"}) public Set getWindowHandles() { Response response = execute(DriverCommand.GET_WINDOW_HANDLES); List returnedValues = (List) response.getValue(); return new LinkedHashSet(returnedValues); } public String getWindowHandle() { return String.valueOf(execute(DriverCommand.GET_CURRENT_WINDOW_HANDLE).getValue()); } public Object executeScript(String script, Object... args) { if (!capabilities.isJavascriptEnabled()) { throw new UnsupportedOperationException("You must be using an underlying instance of WebDriver that supports executing javascript"); } // Escape the quote marks script = script.replaceAll("\"", "\\\""); Iterable convertedArgs = Iterables.transform( Lists.newArrayList(args), new WebElementToJsonConverter()); Map params = ImmutableMap.of( "script", script, "args", Lists.newArrayList(convertedArgs)); return execute(DriverCommand.EXECUTE_SCRIPT, params).getValue(); } public Object executeAsyncScript(String script, Object... args) { if (!isJavascriptEnabled()) { throw new UnsupportedOperationException("You must be using an underlying instance of " + "WebDriver that supports executing javascript"); } // Escape the quote marks script = script.replaceAll("\"", "\\\""); Iterable convertedArgs = Iterables.transform( Lists.newArrayList(args), new WebElementToJsonConverter()); Map params = ImmutableMap.of( "script", script, "args", Lists.newArrayList(convertedArgs)); return execute(DriverCommand.EXECUTE_ASYNC_SCRIPT, params).getValue(); } public boolean isJavascriptEnabled() { return capabilities.isJavascriptEnabled(); } public TargetLocator switchTo() { return new RemoteTargetLocator(); } public Navigation navigate() { return new RemoteNavigation(); } public Options manage() { return new RemoteWebDriverOptions(); } /** * Creates a new {@link RemoteWebElement} that is a child of this instance. * Subtypes should override this method to customize the type of * RemoteWebElement returned. * * @return A new RemoteWebElement that is a child of this instance. */ @Deprecated protected RemoteWebElement newRemoteWebElement() { RemoteWebElement toReturn; if (capabilities.isJavascriptEnabled()) { toReturn = new RenderedRemoteWebElement(); } else { toReturn = new RemoteWebElement(); } toReturn.setParent(this); return toReturn; } protected void setElementConverter(JsonToWebElementConverter converter) { this.converter = converter; } protected JsonToWebElementConverter getElementConverter() { return converter; } protected Response execute(String driverCommand, Map parameters) { Command command = new Command(sessionId, driverCommand, parameters); Response response; try { log(sessionId, command.getName(), command); response = executor.execute(command); if (response == null) { log(sessionId, command.getName(), response); return null; } // Unwrap the response value by converting any JSON objects of the form // {"ELEMENT": id} to RemoteWebElements. Object value = converter.apply(response.getValue()); response.setValue(value); log(sessionId, command.getName(), response); } catch (RuntimeException e) { log(sessionId, command.getName(), e); throw e; } catch (Exception e) { log(sessionId, command.getName(), e); throw new WebDriverException(e); } return errorHandler.throwIfResponseFailed(response); } protected Response execute(String command) { return execute(command, ImmutableMap.of()); } public Keyboard getKeyboard() { return keyboard; } public Mouse getMouse() { return mouse; } /** * Override this to be notified at key points in the execution of a command. * * @param sessionId the session id. * @param commandName the command that is being executed. * @param toLog any data that might be interesting. */ protected void log(SessionId sessionId, String commandName, Object toLog) { // By default do nothing } public ActionChainsGenerator actionsBuilder() { //TODO(eranm): change this to use a different action chains generator. return new DefaultActionChainsGenerator(this); } protected class RemoteWebDriverOptions implements Options { public void addCookie(Cookie cookie) { execute(DriverCommand.ADD_COOKIE, ImmutableMap.of("cookie", cookie)); } public void deleteCookieNamed(String name) { execute(DriverCommand.DELETE_COOKIE, ImmutableMap.of("name", name)); } public void deleteCookie(Cookie cookie) { deleteCookieNamed(cookie.getName()); } public void deleteAllCookies() { execute(DriverCommand.DELETE_ALL_COOKIES); } @SuppressWarnings({"unchecked"}) public Set getCookies() { Object returned = execute(DriverCommand.GET_ALL_COOKIES).getValue(); try { List> cookies = new JsonToBeanConverter().convert(List.class, returned); Set toReturn = new HashSet(); for (Map rawCookie : cookies) { String name = (String) rawCookie.get("name"); String value = (String) rawCookie.get("value"); String path = (String) rawCookie.get("path"); String domain = (String) rawCookie.get("domain"); Boolean secure = (Boolean) rawCookie.get("secure"); Number expiryNum = (Number) rawCookie.get("expiry"); Date expiry = expiryNum == null ? null : new Date( TimeUnit.SECONDS.toMillis(expiryNum.longValue())); toReturn.add(new Cookie.Builder(name, value) .path(path) .domain(domain) .isSecure(secure) .expiresOn(expiry) .build()); } return toReturn; } catch (Exception e) { throw new WebDriverException(e); } } public Cookie getCookieNamed(String name) { Set allCookies = getCookies(); for (Cookie cookie : allCookies) { if (cookie.getName().equals(name)) { return cookie; } } return null; } public Speed getSpeed() { Response response = execute(DriverCommand.GET_SPEED); return Speed.valueOf((String) response.getValue()); } public void setSpeed(Speed speed) { execute(DriverCommand.SET_SPEED, ImmutableMap.of("speed", speed)); } public Timeouts timeouts() { return new RemoteTimeouts(); } } protected class RemoteTimeouts implements Timeouts { public Timeouts implicitlyWait(long time, TimeUnit unit) { execute(DriverCommand.IMPLICITLY_WAIT, ImmutableMap.of("ms", TimeUnit.MILLISECONDS.convert(Math.max(0, time), unit))); return this; } public Timeouts setScriptTimeout(long time, TimeUnit unit) { execute(DriverCommand.SET_SCRIPT_TIMEOUT, ImmutableMap.of("ms", TimeUnit.MILLISECONDS.convert(time, unit))); return this; } } private class RemoteNavigation implements Navigation { public void back() { execute(DriverCommand.GO_BACK); } public void forward() { execute(DriverCommand.GO_FORWARD); } public void to(String url) { get(url); } public void to(URL url) { get(String.valueOf(url)); } public void refresh() { execute(DriverCommand.REFRESH); } } protected class RemoteTargetLocator implements TargetLocator { public WebDriver frame(int frameIndex) { execute(DriverCommand.SWITCH_TO_FRAME, ImmutableMap.of("id", frameIndex)); return RemoteWebDriver.this; } public WebDriver frame(String frameName) { execute(DriverCommand.SWITCH_TO_FRAME, ImmutableMap.of("id", frameName)); return RemoteWebDriver.this; } public WebDriver frame(WebElement frameElement) { Object elementAsJson = new WebElementToJsonConverter().apply(frameElement); execute(DriverCommand.SWITCH_TO_FRAME, ImmutableMap.of("id", elementAsJson)); return RemoteWebDriver.this; } public WebDriver window(String windowName) { execute(DriverCommand.SWITCH_TO_WINDOW, ImmutableMap.of("name", windowName)); return RemoteWebDriver.this; } public WebDriver defaultContent() { Map frameId = Maps.newHashMap(); frameId.put("id", null); execute(DriverCommand.SWITCH_TO_FRAME, frameId); return RemoteWebDriver.this; } public WebElement activeElement() { Response response = execute(DriverCommand.GET_ACTIVE_ELEMENT); return (WebElement) response.getValue(); } public Alert alert() { return new RemoteAlert(); } } private class RemoteAlert implements Alert { public void dismiss() { execute(DriverCommand.DISMISS_ALERT); } public void accept() { execute(DriverCommand.ACCEPT_ALERT); } public String getText() { Response response = execute(DriverCommand.GET_ALERT_TEXT); return response.getValue().toString(); } public void sendKeys(String keysToSend) { execute(DriverCommand.SET_ALERT_VALUE, ImmutableMap.of("text", keysToSend)); } } private class RemoteKeyboard implements Keyboard { public void sendKeys(CharSequence... keysToSend) { switchTo().activeElement().sendKeys(keysToSend); } public void pressKey(Keys keyToPress) { execute(DriverCommand.SEND_MODIFIER_KEY_TO_ACTIVE_ELEMENT, ImmutableMap.of("value", keyToPress, "isdown", true)); } public void releaseKey(Keys keyToRelease) { execute(DriverCommand.SEND_MODIFIER_KEY_TO_ACTIVE_ELEMENT, ImmutableMap.of("value", keyToRelease, "isdown", false)); } } public class RemoteMouse implements Mouse { private Map paramsFromCoordinates(Coordinates where) { Map params = Maps.newHashMap(); if (where != null) { String id = (String) where.getAuxiliry(); params.put("element", id); } return params; } private void moveIfNeeded(Coordinates where) { if (where != null) { mouseMove(where); } } public void click(Coordinates where) { moveIfNeeded(where); execute(DriverCommand.CLICK, ImmutableMap.of("button", 0)); } public void contextClick(Coordinates where) { moveIfNeeded(where); execute(DriverCommand.CLICK, ImmutableMap.of("button", 2)); } public void doubleClick(Coordinates where) { moveIfNeeded(where); execute(DriverCommand.DOUBLE_CLICK); } public void mouseDown(Coordinates where) { moveIfNeeded(where); execute(DriverCommand.MOUSE_DOWN); } public void mouseUp(Coordinates where) { moveIfNeeded(where); execute(DriverCommand.MOUSE_UP); } public void mouseMove(Coordinates where) { Map moveParams = paramsFromCoordinates(where); execute(DriverCommand.MOVE_TO, moveParams); } public void mouseMove(Coordinates where, long xOffset, long yOffset) { Map moveParams = paramsFromCoordinates(where); moveParams.put("xoffset", xOffset); moveParams.put("yoffset", yOffset); execute(DriverCommand.MOVE_TO, moveParams); } } } PK lC>!"GkkHorg/openqa/selenium/remote/.svn/text-base/RemoteWebElement.java.svn-base/* Copyright 2007-2009 WebDriver committers Copyright 2007-2009 Google Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package org.openqa.selenium.remote; import com.google.common.collect.ImmutableMap; import org.openqa.selenium.By; import org.openqa.selenium.WebDriver; import org.openqa.selenium.WebElement; import org.openqa.selenium.internal.FindsByClassName; import org.openqa.selenium.internal.FindsByCssSelector; import org.openqa.selenium.internal.FindsById; import org.openqa.selenium.internal.FindsByLinkText; import org.openqa.selenium.internal.FindsByName; import org.openqa.selenium.internal.FindsByTagName; import org.openqa.selenium.internal.FindsByXPath; import org.openqa.selenium.internal.WrapsDriver; import org.openqa.selenium.internal.WrapsElement; import java.util.List; import java.util.Map; public class RemoteWebElement implements WebElement, FindsByLinkText, FindsById, FindsByName, FindsByTagName, FindsByClassName, FindsByCssSelector, FindsByXPath, WrapsDriver { protected String id; protected RemoteWebDriver parent; protected RemoteWebDriver.RemoteMouse mouse; public void setParent(RemoteWebDriver parent) { this.parent = parent; mouse = (RemoteWebDriver.RemoteMouse) parent.getMouse(); } public String getId() { return id; } public void setId(String id) { this.id = id; } public void click() { execute(DriverCommand.CLICK_ELEMENT, ImmutableMap.of("id", id)); } public void submit() { execute(DriverCommand.SUBMIT_ELEMENT, ImmutableMap.of("id", id)); } public String getValue() { return (String) execute(DriverCommand.GET_ELEMENT_VALUE, ImmutableMap.of("id", id)).getValue(); } public void sendKeys(CharSequence... keysToSend) { execute(DriverCommand.SEND_KEYS_TO_ELEMENT, ImmutableMap.of("id", id, "value", keysToSend)); } public void clear() { execute(DriverCommand.CLEAR_ELEMENT, ImmutableMap.of("id", id)); } public String getTagName() { return (String) execute(DriverCommand.GET_ELEMENT_TAG_NAME, ImmutableMap.of("id", id)).getValue(); } public String getAttribute(String name) { Object value = execute(DriverCommand.GET_ELEMENT_ATTRIBUTE, ImmutableMap.of("id", id, "name", name)) .getValue(); if (value == null) { return null; } return String.valueOf(value); } public boolean toggle() { return (Boolean) execute(DriverCommand.TOGGLE_ELEMENT, ImmutableMap.of("id", id)).getValue(); } public boolean isSelected() { return (Boolean) execute(DriverCommand.IS_ELEMENT_SELECTED, ImmutableMap.of("id", id)).getValue(); } public void setSelected() { execute(DriverCommand.SET_ELEMENT_SELECTED, ImmutableMap.of("id", id)); } public boolean isEnabled() { return (Boolean) execute(DriverCommand.IS_ELEMENT_ENABLED, ImmutableMap.of("id", id)).getValue(); } public String getText() { Response response = execute(DriverCommand.GET_ELEMENT_TEXT, ImmutableMap.of("id", id)); return (String) response.getValue(); } public List findElements(By by) { return by.findElements(this); } public WebElement findElement(By by) { return by.findElement(this); } protected WebElement findElement(String using, String value) { Response response = execute(DriverCommand.FIND_CHILD_ELEMENT, ImmutableMap.of("id", id, "using", using, "value", value)); return (WebElement) response.getValue(); } @SuppressWarnings("unchecked") protected List findElements(String using, String value) { Response response = execute(DriverCommand.FIND_CHILD_ELEMENTS, ImmutableMap.of("id", id, "using", using, "value", value)); return (List) response.getValue(); } public WebElement findElementById(String using) { return findElement("id", using); } public List findElementsById(String using) { return findElements("id", using); } public WebElement findElementByLinkText(String using) { return findElement("link text", using); } public List findElementsByLinkText(String using) { return findElements("link text", using); } public WebElement findElementByName(String using) { return findElement("name", using); } public List findElementsByName(String using) { return findElements("name", using); } public WebElement findElementByClassName(String using) { return findElement("class name", using); } public List findElementsByClassName(String using) { return findElements("class name", using); } public WebElement findElementByCssSelector(String using) { return findElement("css selector", using); } public List findElementsByCssSelector(String using) { return findElements("css selector", using); } public WebElement findElementByXPath(String using) { return findElement("xpath", using); } public List findElementsByXPath(String using) { return findElements("xpath", using); } public WebElement findElementByPartialLinkText(String using) { return findElement("partial link text", using); } public List findElementsByPartialLinkText(String using) { return findElements("partial link text", using); } public WebElement findElementByTagName(String using) { return findElement("tag name", using); } public List findElementsByTagName(String using) { return findElements("tag name", using); } protected Response execute(String command, Map parameters) { return parent.execute(command, parameters); } @Override public boolean equals(Object obj) { if (!(obj instanceof WebElement)) { return false; } WebElement other = (WebElement) obj; if (other instanceof WrapsElement) { other = ((WrapsElement) obj).getWrappedElement(); } if (!(other instanceof RemoteWebElement)) { return false; } Response response = execute(DriverCommand.ELEMENT_EQUALS, ImmutableMap.of("id", id, "other", ((RemoteWebElement) other).id)); Object value = response.getValue(); return value != null && value instanceof Boolean && (Boolean) value; } /** * @return This element's hash code, which is a hash of its internal opaque ID. */ @Override public int hashCode() { return id.hashCode(); } /* (non-Javadoc) * @see org.openqa.selenium.internal.WrapsDriver#getWrappedDriver() */ public WebDriver getWrappedDriver() { return parent; } } PK lC>_Porg/openqa/selenium/remote/.svn/text-base/RenderedRemoteWebElement.java.svn-base/* Copyright 2007-2009 WebDriver committers Copyright 2007-2009 Google Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ // Copyright 2008 Google Inc. All Rights Reserved. package org.openqa.selenium.remote; import com.google.common.collect.ImmutableMap; import org.openqa.selenium.Dimension; import org.openqa.selenium.Point; import org.openqa.selenium.RenderedWebElement; import org.openqa.selenium.internal.Locatable; import org.openqa.selenium.interactions.internal.Coordinates; import java.util.Map; public class RenderedRemoteWebElement extends RemoteWebElement implements RenderedWebElement, Locatable { public boolean isDisplayed() { Response response = parent.execute(DriverCommand.IS_ELEMENT_DISPLAYED, ImmutableMap.of("id", id)); return (Boolean) response.getValue(); } @SuppressWarnings({"unchecked"}) public Point getLocation() { Response response = parent.execute(DriverCommand.GET_ELEMENT_LOCATION, ImmutableMap.of("id", id)); Map rawPoint = (Map) response.getValue(); int x = ((Long) rawPoint.get("x")).intValue(); int y = ((Long) rawPoint.get("y")).intValue(); return new Point(x, y); } @SuppressWarnings({"unchecked"}) public Dimension getSize() { Response response = parent.execute(DriverCommand.GET_ELEMENT_SIZE, ImmutableMap.of("id", id)); Map rawSize = (Map) response.getValue(); int width = ((Long) rawSize.get("width")).intValue(); int height = ((Long) rawSize.get("height")).intValue(); return new Dimension(width, height); } public void hover() { parent.execute(DriverCommand.HOVER_OVER_ELEMENT, ImmutableMap.of("id", id)); } public void dragAndDropBy(int moveRightBy, int moveDownBy) { parent.execute(DriverCommand.DRAG_ELEMENT, ImmutableMap.of("id", id, "x", moveRightBy, "y", moveDownBy)); } public void dragAndDropOn(RenderedWebElement element) { Point currentLocation = getLocation(); Point destination = element.getLocation(); dragAndDropBy(destination.x - currentLocation.x, destination.y - currentLocation.y); } public String getValueOfCssProperty(String propertyName) { Response response = parent.execute(DriverCommand.GET_ELEMENT_VALUE_OF_CSS_PROPERTY, ImmutableMap.of("id", id, "propertyName", propertyName)); return (String) response.getValue(); } public Point getLocationOnScreenOnceScrolledIntoView() { Response response = execute(DriverCommand.GET_ELEMENT_LOCATION_ONCE_SCROLLED_INTO_VIEW, ImmutableMap.of("id", getId())); @SuppressWarnings("unchecked") Map mapped = (Map) response.getValue(); return new Point(mapped.get("x").intValue(), mapped.get("y").intValue()); } public Coordinates getCoordinates() { return new Coordinates() { public Point getLocationOnScreen() { return getLocationOnScreenOnceScrolledIntoView(); } public Point getLocationInViewPort() { throw new UnsupportedOperationException("Not supported yet."); } public Point getLocationInDOM() { throw new UnsupportedOperationException("Not supported yet."); } public Object getAuxiliry() { return getId(); } }; } } PK lC>@'m}pp@org/openqa/selenium/remote/.svn/text-base/Response.java.svn-base/* Copyright 2007-2009 WebDriver committers Copyright 2007-2009 Google Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package org.openqa.selenium.remote; public class Response { private volatile Object value; private volatile String sessionId; private volatile int status; public Response() { } public Response(SessionId sessionId) { this.sessionId = String.valueOf(sessionId); } public int getStatus() { return status; } public void setStatus(int status) { this.status = status; } public void setValue(Object value) { this.value = value; } public Object getValue() { return value; } public void setSessionId(String sessionId) { this.sessionId = sessionId; } public String getSessionId() { return sessionId; } public String toString() { return String.format("(%s %s: %s)", getSessionId(), getStatus(), getValue()); } } PK lC>¶CCRorg/openqa/selenium/remote/.svn/text-base/ReusingSocketSocketFactory.java.svn-base/* * ==================================================================== * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * ==================================================================== * * This software consists of voluntary contributions made by many * individuals on behalf of the Apache Software Foundation. For more * information on the Apache Software Foundation, please see * . * */ /* * Slightly modified org.apache.http.conn.scheme.PlainSocketFactor * by Kristian Rosenvold based on httpclient 4.x source. * While we wait for support for SO_REUSEADDR, which seems to be arriving in * httpcomopnents 4.1 */ package org.openqa.selenium.remote; import org.apache.http.conn.ConnectTimeoutException; import org.apache.http.conn.scheme.HostNameResolver; import org.apache.http.conn.scheme.SocketFactory; import org.apache.http.params.HttpConnectionParams; import org.apache.http.params.HttpParams; import java.io.IOException; import java.net.*; public class ReusingSocketSocketFactory implements SocketFactory { /** * The default factory. */ private static final ReusingSocketSocketFactory DEFAULT_FACTORY = new ReusingSocketSocketFactory(); private final HostNameResolver nameResolver; /** * Gets the default factory. Usually there should be no reason for creating * multiple instances of this class. * * @return the default factory */ public static ReusingSocketSocketFactory getSocketFactory() { return DEFAULT_FACTORY; } public ReusingSocketSocketFactory(final HostNameResolver nameResolver) { this.nameResolver = nameResolver; } public ReusingSocketSocketFactory() { this(null); } public Socket createSocket() { final Socket socket = new Socket(); try { socket.setReuseAddress(true); // This is added by kristian } catch (SocketException e) { throw new RuntimeException(e); } return socket; } public Socket connectSocket(Socket sock, String host, int port, InetAddress localAddress, int localPort, HttpParams params) throws IOException { if (host == null) { throw new IllegalArgumentException("Target host may not be null."); } if (params == null) { throw new IllegalArgumentException("Parameters may not be null."); } if (sock == null) sock = createSocket(); sock.setReuseAddress(true); // This is the 1 line added by kristian if ((localAddress != null) || (localPort > 0)) { // we need to bind explicitly if (localPort < 0) localPort = 0; // indicates "any" InetSocketAddress isa = new InetSocketAddress(localAddress, localPort); sock.bind(isa); } int timeout = HttpConnectionParams.getConnectionTimeout(params); InetSocketAddress remoteAddress; if (this.nameResolver != null) { remoteAddress = new InetSocketAddress(this.nameResolver.resolve(host), port); } else { remoteAddress = new InetSocketAddress(host, port); } try { sock.connect(remoteAddress, timeout); } catch (SocketTimeoutException ex) { throw new ConnectTimeoutException("Connect to " + remoteAddress + " timed out"); } return sock; } /** * Checks whether a socket connection is secure. * This factory creates plain socket connections * which are not considered secure. * * @param sock the connected socket * * @return false * * @throws IllegalArgumentException if the argument is invalid */ public final boolean isSecure(Socket sock) throws IllegalArgumentException { if (sock == null) { throw new IllegalArgumentException("Socket may not be null."); } // This check is performed last since it calls a method implemented // by the argument object. getClass() is final in java.lang.Object. if (sock.isClosed()) { throw new IllegalArgumentException("Socket is closed."); } return false; } } PK lC>8F~~Korg/openqa/selenium/remote/.svn/text-base/ScreenshotException.java.svn-base/* Copyright 2007-2009 WebDriver committers Copyright 2007-2009 Google Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package org.openqa.selenium.remote; import org.openqa.selenium.WebDriverException; public class ScreenshotException extends WebDriverException { private final String screenshot; public ScreenshotException(String screenGrab) { super("Screen shot has been taken"); this.screenshot = screenGrab; } public ScreenshotException(String screenGrab, Throwable cause) { super("Screen shot has been taken", cause); this.screenshot = screenGrab; } public String getBase64EncodedScreenshot() { return screenshot; } } PK lC>u""Aorg/openqa/selenium/remote/.svn/text-base/SessionId.java.svn-base/* Copyright 2007-2009 WebDriver committers Copyright 2007-2009 Google Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package org.openqa.selenium.remote; public class SessionId { private String opaqueKey; public SessionId(String opaqueKey) { this.opaqueKey = opaqueKey; } public String toString() { return opaqueKey; } public int hashCode() { return opaqueKey.hashCode(); } public boolean equals(Object obj) { if (obj instanceof SessionId) { return opaqueKey.equals(((SessionId) obj).opaqueKey); } return false; } } PK lC>m8~ ~ Porg/openqa/selenium/remote/.svn/text-base/SimplePropertyDescriptor.java.svn-base/* Copyright 2007-2010 WebDriver committers Copyright 2007-2010 Google Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package org.openqa.selenium.remote; import java.lang.reflect.Method; import java.util.HashMap; public class SimplePropertyDescriptor { private String name; private Method readMethod; private Method writeMethod; public SimplePropertyDescriptor() {} public SimplePropertyDescriptor(String name, Method readMethod, Method writeMethod) { this.name = name; this.readMethod = readMethod; this.writeMethod = writeMethod; } public String getName() { return name; } public Method getReadMethod() { return readMethod; } public Method getWriteMethod() { return writeMethod; } public static SimplePropertyDescriptor[] getPropertyDescriptors(Class clazz) { HashMap properties = new HashMap(); for (Method m : clazz.getMethods()) { String methodName = m.getName(); if (methodName.length() > 2 && methodName.startsWith("is")) { String propertyName = uncapitalize(methodName.substring(2)); if (properties.containsKey(propertyName)) properties.get(propertyName).readMethod = m; else properties.put(propertyName, new SimplePropertyDescriptor(propertyName, m, null)); } if (methodName.length() <= 3) { continue; } String propertyName = uncapitalize(methodName.substring(3)); if (methodName.startsWith("get") || methodName.startsWith("has")) { if (properties.containsKey(propertyName)) properties.get(propertyName).readMethod = m; else properties.put(propertyName, new SimplePropertyDescriptor(propertyName, m, null)); } if (methodName.startsWith("set")) { if (properties.containsKey(propertyName)) properties.get(propertyName).writeMethod = m; else properties.put(propertyName, new SimplePropertyDescriptor(propertyName, null, m)); } } SimplePropertyDescriptor[] pdsArray = new SimplePropertyDescriptor[properties.size()]; return properties.values().toArray(pdsArray); } private static String uncapitalize(String s) { return s.substring(0, 1).toLowerCase() + s.substring(1); } } PK lC>@=org/openqa/selenium/remote/.svn/text-base/build.desc.svn-base java_library(name = "base", srcs = [ "CapabilityType.java", "DesiredCapabilities.java", ], deps = [ "//java/client/src/org/openqa/selenium:webdriver-api", ]) java_library(name = "common", srcs = [ "BeanToJsonConverter.java", "Command.java", "DesiredCapabilities.java", "DriverCommand.java", "ErrorCodes.java", "JsonException.java", "JsonToBeanConverter.java", "PropertyMunger.java", "Response.java", "SessionId.java", "SimplePropertyDescriptor.java", ], deps = [ ":base", "//java/client/src/org/openqa/selenium/interactions", "//java/client/src/org/openqa/selenium/browserlaunchers", "//third_party/java/guava-libraries", "//third_party/java/json", ]) java_library(name = "remote", srcs = [ "AddFindsByCss.java", "AddFindsChildByCss.java", "AddRotatable.java", "AddTakesScreenshot.java", "Augmenter.java", "AugmenterProvider.java", "CommandExecutor.java", "ErrorHandler.java", "ExecuteMethod.java", "HttpCommandExecutor.java", "InterfaceImplementation.java", "RemoteWebDriver.java", "RemoteWebElement.java", "RenderedRemoteWebElement.java", "ReusingSocketSocketFactory.java", "ScreenshotException.java", "html5/AddApplicationCache.java", "html5/AddBrowserConnection.java", "html5/AddDatabaseStorage.java", "html5/AddLocationContext.java", "html5/AddWebStorage.java", "internal/CircularOutputStream.java", "internal/JsonToWebElementConverter.java", "internal/OutputWatcher.java", "internal/SubProcess.java", "internal/WebElementToJsonConverter.java", ], deps = [ ":common", "//java/client/src/org/openqa/selenium/os", "//third_party/java/apache-httpclient", "//third_party/java/cglib", ]) PK (hC>@%org/openqa/selenium/remote/build.desc java_library(name = "base", srcs = [ "CapabilityType.java", "DesiredCapabilities.java", ], deps = [ "//java/client/src/org/openqa/selenium:webdriver-api", ]) java_library(name = "common", srcs = [ "BeanToJsonConverter.java", "Command.java", "DesiredCapabilities.java", "DriverCommand.java", "ErrorCodes.java", "JsonException.java", "JsonToBeanConverter.java", "PropertyMunger.java", "Response.java", "SessionId.java", "SimplePropertyDescriptor.java", ], deps = [ ":base", "//java/client/src/org/openqa/selenium/interactions", "//java/client/src/org/openqa/selenium/browserlaunchers", "//third_party/java/guava-libraries", "//third_party/java/json", ]) java_library(name = "remote", srcs = [ "AddFindsByCss.java", "AddFindsChildByCss.java", "AddRotatable.java", "AddTakesScreenshot.java", "Augmenter.java", "AugmenterProvider.java", "CommandExecutor.java", "ErrorHandler.java", "ExecuteMethod.java", "HttpCommandExecutor.java", "InterfaceImplementation.java", "RemoteWebDriver.java", "RemoteWebElement.java", "RenderedRemoteWebElement.java", "ReusingSocketSocketFactory.java", "ScreenshotException.java", "html5/AddApplicationCache.java", "html5/AddBrowserConnection.java", "html5/AddDatabaseStorage.java", "html5/AddLocationContext.java", "html5/AddWebStorage.java", "internal/CircularOutputStream.java", "internal/JsonToWebElementConverter.java", "internal/OutputWatcher.java", "internal/SubProcess.java", "internal/WebElementToJsonConverter.java", ], deps = [ ":common", "//java/client/src/org/openqa/selenium/os", "//third_party/java/apache-httpclient", "//third_party/java/cglib", ]) PK %^D>2rr6org/openqa/selenium/net/NetworkInterfaceProvider.class1 0org/openqa/selenium/net/NetworkInterfaceProviderjava/lang/ObjectgetNetworkInterfaces()Ljava/lang/Iterable; SignatureB()Ljava/lang/Iterable;getLoInterface,()Lorg/openqa/selenium/net/NetworkInterface; SourceFileNetworkInterfaceProvider.java   PK %^D>*org/openqa/selenium/net/NetworkUtils.class1$org/openqa/selenium/net/NetworkUtilsjava/lang/ObjectnetworkInterfaceProvider2Lorg/openqa/selenium/net/NetworkInterfaceProvider;5(Lorg/openqa/selenium/net/NetworkInterfaceProvider;)VCode   ()V  LineNumberTableLocalVariableTablethis&Lorg/openqa/selenium/net/NetworkUtils;7org/openqa/selenium/net/DefaultNetworkInterfaceProvider   getPrivateLocalAddress()Ljava/lang/String;  getLocalInterfaceAddress()Ljava/util/List; ! java/util/List "#isEmpty()Z% 127.0.0.1 ' ()get(I)Ljava/lang/Object;+#org/openqa/selenium/net/INetAddress *- .getHostAddress addressesLjava/util/List;LocalVariableTypeTable7Ljava/util/List;"getNonLoopbackAddressOfThisMachine 5760org/openqa/selenium/net/NetworkInterfaceProvider 89getNetworkInterfaces()Ljava/lang/Iterable; ;=<java/lang/Iterable >?iterator()Ljava/util/Iterator; ACBjava/util/Iterator DEnext()Ljava/lang/Object;G(org/openqa/selenium/net/NetworkInterface FI JKgetIp4NonLoopBackOnly'()Lorg/openqa/selenium/net/INetAddress; *M N getHostName AP Q#hasNextS&org/openqa/selenium/WebDriverExceptionU:Could not find a non-loopback ip4 address for this machine RW X(Ljava/lang/String;)Viface*Lorg/openqa/selenium/net/NetworkInterface;ip4NonLoopback%Lorg/openqa/selenium/net/INetAddress;obtainLoopbackIp4Address _ `agetLoopBackAndIp4Only,()Lorg/openqa/selenium/net/NetworkInterface; Fc dKgetIp4LoopbackOnly f ggetIpOfLoopBackIp4 ikjorg/openqa/selenium/Platform lm getCurrent ()Lorg/openqa/selenium/Platform; io pqUNIXLorg/openqa/selenium/Platform; is tuis!(Lorg/openqa/selenium/Platform;)Z 5w xagetLoInterfacezjava/lang/StringBuilder|dUnable to resolve local loopback address, please file an issue with the full message of this error: yW  getNetWorkDiags y append-(Ljava/lang/String;)Ljava/lang/StringBuilder; ==== End of error message y toStringnetworkInterfaceipOfIp4LoopBackLjava/lang/String; linuxLoopback netAddressgrabFirstNetworkAddress F 9getInetAddresses-Unable to find loopback address for localhostfirstInterface firstAddress F #isIp4AddressBindingOnly F # isLoopBack Signature9()Ljava/util/List;java/util/ArrayList * #isLoopbackAddress * # isIPv6Address  add(Ljava/lang/Object;)Z  K java/util/Collections  singletonList$(Ljava/lang/Object;)Ljava/util/List;localAddressesaddr inetAddress y 7   dumpToConsoleF(Ljava/lang/StringBuilder;Lorg/openqa/selenium/net/NetworkInterface;)V wLoopback interface LO: resultLjava/lang/StringBuilder;defaultNetworkInterfaceProvider9Lorg/openqa/selenium/net/DefaultNetworkInterfaceProvider;byName F getName   dumpAddresses0(Ljava/lang/StringBuilder;Ljava/lang/Iterable;)VinNetworkInterfaceW(Ljava/lang/StringBuilder;Ljava/lang/Iterable;)V address.getHostName() =  address.getHostAddress() = ! address.isLoopbackAddress() = y (Z)Ljava/lang/StringBuilder; inetAddressesLjava/lang/Iterable;address;Ljava/lang/Iterable;main([Ljava/lang/String;)V Exceptionsjava/net/SocketException java/lang/System outLjava/io/PrintStream; java/io/PrintStream Xprintlnargs[Ljava/lang/String; SourceFileNetworkUtils.java!  F * *+  !    : *Y $ %   q*L+$+&*,()*-/01 /23 =* 4:M,@FL+HN--L,ORYTV89!:%;*83> =YZ! [\] f*^L+ +bL*eM,,hnr"* vN--b: ,RYyY{}~VFHI JMNOR(S2T6U<VAWG\K]T^_]b\4faZP2Z< \K ?* 4:@FLM++:@*M, RYV,"dcefg/j3k=n ?(Z&\g 5* 4:M,@FL+bN--,,Ors!t%u*r3x 5YZ! \`a {7* 4:M,@FL+ ++,O|}*~,|57YZ wɻYL* 4:NJ-@FM,::(@*: +WO-OhnrC* vM,5,::@*N- +-WO+ *+F$>NWajv>0$=YZ>\6Z\1 2  OyYKYL+:N-@FM*,-O+M,*W*,*2 ',5:>EJ*G?'Z:Z  f+*+ŶW*ȶW*+ʱZ  c+:NR-@*M*жW*,LW*ȶW*ҶW*,,W*ȶW*ԶW*,W*ȶW-O2 $+2;BIRYb ccE\1 c  8 ~    PK %^D> tq .org/openqa/selenium/net/NetworkInterface.class1(org/openqa/selenium/net/NetworkInterfacejava/lang/ObjectnameLjava/lang/String; inetAddressesLjava/lang/Iterable; Signature;Ljava/lang/Iterable;(Ljava/net/NetworkInterface;)VCode java/net/NetworkInterface getName()Ljava/lang/String;  getInetAddresses()Ljava/util/Enumeration;  asIterableAddr-(Ljava/util/Enumeration;)Ljava/lang/Iterable;  )(Ljava/lang/String;Ljava/lang/Iterable;)VLineNumberTableLocalVariableTablethis*Lorg/openqa/selenium/net/NetworkInterface;networkInterfaceLjava/net/NetworkInterface;P(Ljava/lang/String;Ljava/lang/Iterable;)V ' (()V *  , LocalVariableTypeTableisIp4AddressBindingOnly()Z 1 23 getIp6Address'()Lorg/openqa/selenium/net/INetAddress; isLoopBack 687java/lang/Iterable 9:iterator()Ljava/util/Iterator; <>=java/util/Iterator ?/hasNext <A BCnext()Ljava/lang/Object;E#org/openqa/selenium/net/INetAddress DG H/isLoopbackAddressLjava/util/Iterator;;Ljava/util/Iterator;getIp4LoopbackOnly DM N/ isIPv4Address inetAddress%Lorg/openqa/selenium/net/INetAddress;getIp4NonLoopBackOnly DS T/ isIPv6Address;(Ljava/lang/String;[Lorg/openqa/selenium/net/INetAddress;)V WYXjava/util/Arrays Z[asList%([Ljava/lang/Object;)Ljava/util/List;&[Lorg/openqa/selenium/net/INetAddress;()Ljava/lang/Iterable;=()Ljava/lang/Iterable;l(Ljava/util/Enumeration;)Ljava/lang/Iterable;ajava/util/ArrayList `' dfejava/util/Enumeration gC nextElementijava/net/InetAddress Dk l(Ljava/net/InetAddress;)V npojava/util/List qradd(Ljava/lang/Object;)Z dt u/hasMoreElements wyxjava/util/Collections z{unmodifiableList"(Ljava/util/List;)Ljava/util/List; tEnumerationLjava/util/Enumeration;resultLjava/util/List;/Ljava/util/Enumeration;7Ljava/util/List; SourceFileNetworkInterface.java!    H*++ !" !"#$  % k*&*+)*,+$% &' !"-  ./ 5 *0*  !"4/ p&*+5L+;+@DF / 0 &!" 9I-  9JK3 v2*+5M,@DL+F +L+,;56%7'50: 2!"OPQ3 v2*+5M,@DL+F +L+,;>?%@'>0C 2!"OP23 o+*+5M,@DL+R+,;GHI G)L +!" OP U L *+,V P Q  !"  \] ^ /*+T !" /*)X !" _ 0`YbL+DY*chjmW*s+v\] ^"]+` 0|}(~-0|(~PK %^D>$wu"org/openqa/selenium/net/Urls.class1norg/openqa/selenium/net/Urlsjava/lang/Objectlog$Lorg/openqa/selenium/internal/Trace;()VCode &org/openqa/selenium/internal/NullTrace   LineNumberTableLocalVariableTable  thisLorg/openqa/selenium/net/Urls;toProtocolHostAndPort&(Ljava/lang/String;)Ljava/lang/String; java/net/URL  (Ljava/lang/String;)V   getPath()Ljava/lang/String;" $&%java/lang/String '(equals(Ljava/lang/Object;)Z*/ $, -.endsWith(Ljava/lang/String;)Z0java/lang/StringBuilder2It looks like your baseUrl ( / /5 67append-(Ljava/lang/String;)Ljava/lang/StringBuilder;9) is pointing to a file, not a directory (it doesn't end with a /). We're going to have to strip off the last part of the pathname. /; < toString >@?"org/openqa/selenium/internal/Trace Awarn C D  getProtocol $F GHvalueOf&(Ljava/lang/Object;)Ljava/lang/String;J:// L M  getAuthorityOjava/lang/RuntimeException NQ R(Ljava/lang/Throwable;)VTjava/net/MalformedURLExceptionurlLjava/lang/String;uLjava/net/URL;pathe Ljava/net/MalformedURLException; urlEncode^UTF-8 `bajava/net/URLEncoder cdencode8(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;f&org/openqa/selenium/WebDriverException eQi$java/io/UnsupportedEncodingExceptionvalue&Ljava/io/UnsupportedEncodingException; SourceFile Urls.java!  / Y    /*    iY*L+M,2!,#),)+ /Y13*484:=/Y+BE3I4+K4:LNY+P^_S&  $4<A_` *iUV VWXQYV` Z[ \ U*]_LeY+gh-./jV ZklmPK %^D>axz =org/openqa/selenium/net/DefaultNetworkInterfaceProvider.class1q7org/openqa/selenium/net/DefaultNetworkInterfaceProviderjava/lang/Object0org/openqa/selenium/net/NetworkInterfaceProvidercachedInterfacesLjava/util/List; Signature;getNetworkInterfaces()Ljava/lang/Iterable;B()Ljava/lang/Iterable;Code  LineNumberTableLocalVariableTablethis9Lorg/openqa/selenium/net/DefaultNetworkInterfaceProvider;()V   java/net/NetworkInterface ()Ljava/util/Enumeration;&org/openqa/selenium/WebDriverException ! "(Ljava/lang/Throwable;)V$java/util/ArrayList # ')(java/util/Enumeration *+ nextElement()Ljava/lang/Object; - ./createInterfaceG(Ljava/net/NetworkInterface;)Lorg/openqa/selenium/net/NetworkInterface; 132java/util/List 45add(Ljava/lang/Object;)Z '7 89hasMoreElements()Z ;=<java/util/Collections >?unmodifiableList"(Ljava/util/List;)Ljava/util/List;Ajava/net/SocketException interfacesLjava/util/Enumeration;eLjava/net/SocketException;resultLocalVariableTypeTable4Ljava/util/Enumeration;getLocalInterfaceName()Ljava/lang/String; LNMorg/openqa/selenium/Platform OP getCurrent ()Lorg/openqa/selenium/Platform; LR STMACLorg/openqa/selenium/Platform; LV WXis!(Lorg/openqa/selenium/Platform;)ZZlo0\logetLoInterface,()Lorg/openqa/selenium/net/NetworkInterface; ` IJ b cd getByName/(Ljava/lang/String;)Ljava/net/NetworkInterface;localIFLjava/lang/String;byNameLjava/net/NetworkInterface;j(org/openqa/selenium/net/NetworkInterface il m(Ljava/net/NetworkInterface;)Vs SourceFile$DefaultNetworkInterfaceProvider.java!     /*' H*LL MY, #Y%M,*+&,0W+6*,: @. *+- ./23"463?6G7*HBBC DE)FGBBH)F IJDKQUY[: ;> ]^"*_L+aM, *,,MY, @BD EFG*"ef gh DE./= iY+kL  nhopPK %^D>*org/openqa/selenium/net/PortProber$1.class12$org/openqa/selenium/net/PortProber$1java/lang/Objectjava/util/concurrent/Callableval$portI(I)VCode    ()VLineNumberTableLocalVariableTablethis&Lorg/openqa/selenium/net/PortProber$1;call()Ljava/lang/Integer; Exceptionsjava/lang/Exception "org/openqa/selenium/net/PortProber access$0(I)I !#"java/lang/Integer $%valueOf(I)Ljava/lang/Integer;()Ljava/lang/Object; (  SourceFilePortProber.java SignatureFLjava/lang/Object;Ljava/util/concurrent/Callable;EnclosingMethod /0 freeLocalPort"(I)Ljava/util/concurrent/Callable; InnerClasses   8 * * 2   G*  * 5 68 A& %*')*+,-.1 PK %^D>̳%( ( (org/openqa/selenium/net/PortProber.class1"org/openqa/selenium/net/PortProberjava/lang/ObjectrandomLjava/util/Random;()VCode java/util/Random   LineNumberTableLocalVariableTable  this$Lorg/openqa/selenium/net/PortProber; findFreePort()I  createAcceptablePort  checkPortIsFree(I)I java/lang/RuntimeException"Unable to find a free port $ %(Ljava/lang/String;)ViIseedPort suggestedPort freeLocalPort"(I)Ljava/util/concurrent/Callable; Signature7(I)Ljava/util/concurrent/Callable;/$org/openqa/selenium/net/PortProber$1 .1 2(I)Vport 5 6nextInt 9;:java/lang/Math <absseed FIRST_PORT LAST_PORT randomIntCjava/net/ServerSocket B1 BF G getLocalPort BI JcloseLjava/io/IOExceptionsocketLjava/net/ServerSocket; localPorteLjava/io/IOException;pollPort(I)Z UWVjava/util/concurrent/TimeUnit XYSECONDSLjava/util/concurrent/TimeUnit; [ R\$(IILjava/util/concurrent/TimeUnit;)Z ^`_java/lang/System abcurrentTimeMillis()J Ud eftoMillis(J)Jhjava/net/Socketj localhost gl m(Ljava/lang/String;I)V gI p q(Ljava/lang/Throwable;)Vsjava/net/ConnectExceptionujava/net/UnknownHostExceptiontimeoutunitendJLjava/net/Socket;Ljava/net/UnknownHostException;access$0 SourceFilePortProber.java InnerClasses!  / Y  !  3* #$   }';<=Y!#'( )*+'. &' (')' *+,- 3 .Y02  3'  0YK²4<=7>486=p`<*ì*ÿ,--/-">? ABCD)E->* >'?'@'A'  LBYDL+E=+HMKJL MNOPQ*3'MNO'PQ RS 4 TZV  3' R\ H],caB3gYik:n::Yo:Yo]!!r&t2K2 Z []^_!`&b(c2d4e>[FiHH3'Hv'HwY =xyMz( P{4 PQ| %I}~ .PK %^D>@_FF)org/openqa/selenium/net/INetAddress.class1F#org/openqa/selenium/net/INetAddressjava/lang/ObjecthostNameLjava/lang/String; hostAddressloopbackAddressZ inetAddressLjava/net/InetAddress;(Ljava/net/InetAddress;)VCode  ()V  java/net/InetAddress  getHostName()Ljava/lang/String;    getHostAddress   " #$isLoopbackAddress()Z &  LineNumberTableLocalVariableTablethis%Lorg/openqa/selenium/net/INetAddress;((Ljava/lang/String;Ljava/lang/String;Z)V isIPv6Address.: 021java/lang/String 34indexOf(Ljava/lang/String;)I isIPv4Address 7 ,$createInetSocketAddress(I)Ljava/net/InetSocketAddress;;java/net/InetSocketAddress := >(Ljava/net/InetAddress;I)V :@ A(Ljava/lang/String;I)VportI SourceFileINetAddress.java!   j"**+*+*+*+!%'  !!(")*"  +u***+*,*%'$% &'()(*)* #$/*%',( )*,$;*-/'0( )*5$7 *6'4(  )*/*'8( )*/*'<( )*89]!*:Y*<:Y*?'@AC(!)*!BCDEPK lC>)(org/openqa/selenium/net/.svn/all-wcpropsK 25 svn:wc:ra_dav:version-url V 65 /svn/!svn/ver/11226/trunk/java/client/src/org/openqa/selenium/net END INetAddress.java K 25 svn:wc:ra_dav:version-url V 82 /svn/!svn/ver/11226/trunk/java/client/src/org/openqa/selenium/net/INetAddress.java END Urls.java K 25 svn:wc:ra_dav:version-url V 75 /svn/!svn/ver/11226/trunk/java/client/src/org/openqa/selenium/net/Urls.java END NetworkInterfaceProvider.java K 25 svn:wc:ra_dav:version-url V 95 /svn/!svn/ver/11226/trunk/java/client/src/org/openqa/selenium/net/NetworkInterfaceProvider.java END DefaultNetworkInterfaceProvider.java K 25 svn:wc:ra_dav:version-url V 102 /svn/!svn/ver/11226/trunk/java/client/src/org/openqa/selenium/net/DefaultNetworkInterfaceProvider.java END NetworkUtils.java K 25 svn:wc:ra_dav:version-url V 83 /svn/!svn/ver/11226/trunk/java/client/src/org/openqa/selenium/net/NetworkUtils.java END NetworkInterface.java K 25 svn:wc:ra_dav:version-url V 87 /svn/!svn/ver/11226/trunk/java/client/src/org/openqa/selenium/net/NetworkInterface.java END build.desc K 25 svn:wc:ra_dav:version-url V 76 /svn/!svn/ver/11226/trunk/java/client/src/org/openqa/selenium/net/build.desc END PortProber.java K 25 svn:wc:ra_dav:version-url V 81 /svn/!svn/ver/11226/trunk/java/client/src/org/openqa/selenium/net/PortProber.java END PK lC>9VAC$org/openqa/selenium/net/.svn/entries8 dir 11264 http://selenium.googlecode.com/svn/trunk/java/client/src/org/openqa/selenium/net http://selenium.googlecode.com/svn 2011-02-01T13:59:17.176547Z 11226 simon.m.stewart svn:special svn:externals svn:needs-lock 07704840-8298-11de-bf8c-fd130f914ac9 INetAddress.java file 2011-02-03T12:01:17.000000Z edacb571268428e07fab29f91dd43222 2011-01-17T20:59:07.760402Z 10980 simon.m.stewart has-props Urls.java file 2011-02-03T12:01:17.000000Z f4988e65c0509cfc0e978c8235ec373f 2011-01-18T15:20:11.271147Z 11001 simon.m.stewart NetworkInterfaceProvider.java file 2011-02-03T12:01:17.000000Z e7b374a80f9b125db09275c661674799 2011-01-17T20:59:07.760402Z 10980 simon.m.stewart has-props DefaultNetworkInterfaceProvider.java file 2011-02-03T12:01:17.000000Z 95f1dda4cbf0c071f6a5626429c260b9 2011-01-17T20:59:07.760402Z 10980 simon.m.stewart has-props NetworkUtils.java file 2011-02-03T12:01:17.000000Z f72949e46b7b08133455c07279035aa0 2011-01-17T20:59:07.760402Z 10980 simon.m.stewart has-props NetworkInterface.java file 2011-02-03T12:01:17.000000Z b6eeb2ed6dab7538bf46ad04918f3262 2011-01-17T20:59:07.760402Z 10980 simon.m.stewart has-props build.desc file 2011-02-03T12:01:17.000000Z d0a7b4a3cc261369c5705d6c8d288a97 2011-02-01T13:59:17.176547Z 11226 simon.m.stewart PortProber.java file 2011-02-03T12:01:17.000000Z e79990e66d2d325aea8e5f65e5740ae5 2011-01-17T21:26:37.565396Z 10985 simon.m.stewart has-props PK lC>G#org/openqa/selenium/net/.svn/format8 PK lC>h ""Torg/openqa/selenium/net/.svn/prop-base/DefaultNetworkInterfaceProvider.java.svn-baseK 13 svn:eol-style V 6 native END PK lC>h ""@org/openqa/selenium/net/.svn/prop-base/INetAddress.java.svn-baseK 13 svn:eol-style V 6 native END PK lC>h ""Eorg/openqa/selenium/net/.svn/prop-base/NetworkInterface.java.svn-baseK 13 svn:eol-style V 6 native END PK lC>h ""Morg/openqa/selenium/net/.svn/prop-base/NetworkInterfaceProvider.java.svn-baseK 13 svn:eol-style V 6 native END PK lC>h ""Aorg/openqa/selenium/net/.svn/prop-base/NetworkUtils.java.svn-baseK 13 svn:eol-style V 6 native END PK lC>ڢ???org/openqa/selenium/net/.svn/prop-base/PortProber.java.svn-baseK 13 svn:mergeinfo V 289 /selenium-core/trunk/common/test/java/org/openqa/selenium/internal/PortProber.java:7680-7758 /webdriver/branches/wire2/common/test/java/org/openqa/selenium/internal/PortProber.java:7892-8059 /webdriver/trunk/common/test/java/org/openqa/selenium/internal/PortProber.java:7685-7747,7749-7804 END PK lC>G Torg/openqa/selenium/net/.svn/text-base/DefaultNetworkInterfaceProvider.java.svn-base/* Copyright 2007-2010 WebDriver committers Copyright 2007-2010 Google Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package org.openqa.selenium.net; import org.openqa.selenium.Platform; import org.openqa.selenium.WebDriverException; import java.net.*; import java.util.ArrayList; import java.util.Collections; import java.util.Enumeration; import java.util.List; public class DefaultNetworkInterfaceProvider implements NetworkInterfaceProvider { // Cache the list of interfaces between instances. This is mostly used // to get the loopback interface, so it's ok even though interfaces may go // up and down during the test. // Caching the result of getNetworkInterfaces saves 2 seconds, which is // significant when running the tests. private final List cachedInterfaces; public Iterable getNetworkInterfaces() { return cachedInterfaces; } public DefaultNetworkInterfaceProvider() { Enumeration interfaces = null; try { interfaces = java.net.NetworkInterface.getNetworkInterfaces(); } catch (SocketException e) { throw new WebDriverException(e); } List result = new ArrayList(); while (interfaces.hasMoreElements()) { result.add(createInterface(interfaces.nextElement())); } this.cachedInterfaces = Collections.unmodifiableList( result); } private String getLocalInterfaceName() { if (Platform.getCurrent().is(Platform.MAC)) { return "lo0"; } return "lo"; } public NetworkInterface getLoInterface() { final String localIF = getLocalInterfaceName(); try { final java.net.NetworkInterface byName = java.net.NetworkInterface.getByName(localIF); return (byName != null) ? createInterface(byName) : null; } catch (SocketException e) { throw new WebDriverException(e); } } private NetworkInterface createInterface(java.net.NetworkInterface s) { return new NetworkInterface(s); } } PK lC>@org/openqa/selenium/net/.svn/text-base/INetAddress.java.svn-base/* Copyright 2007-2010 WebDriver committers Copyright 2007-2010 Google Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package org.openqa.selenium.net; import java.net.InetAddress; import java.net.InetSocketAddress; public class INetAddress { private final String hostName; private final String hostAddress; private final boolean loopbackAddress; private final InetAddress inetAddress; public INetAddress(InetAddress inetAddress) { this.inetAddress = inetAddress; this.hostName = inetAddress.getHostName(); hostAddress = inetAddress.getHostAddress(); this.loopbackAddress = inetAddress.isLoopbackAddress(); } @SuppressWarnings({"AssignmentToNull"}) INetAddress(String hostName, String hostAddress, boolean loopbackAddress) { this.inetAddress = null; this.hostName = hostName; this.hostAddress = hostAddress; this.loopbackAddress = loopbackAddress; } public boolean isLoopbackAddress() { return loopbackAddress; } public boolean isIPv6Address() { return hostAddress.indexOf(":") != -1; } public boolean isIPv4Address() { return !isIPv6Address(); } public String getHostAddress() { return hostAddress; } public String getHostName() { return hostName; } public InetSocketAddress createInetSocketAddress(int port) { if (inetAddress != null) { return new InetSocketAddress(inetAddress, port); } else { return new InetSocketAddress(hostName, port); } } } PK lC> %k  Eorg/openqa/selenium/net/.svn/text-base/NetworkInterface.java.svn-base/* Copyright 2007-2010 WebDriver committers Copyright 2007-2010 Google Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package org.openqa.selenium.net; import java.net.InetAddress; import java.util.ArrayList; import java.util.Arrays; import java.util.Collections; import java.util.Enumeration; import java.util.Iterator; import java.util.List; public class NetworkInterface { private final String name; private final Iterable inetAddresses; public NetworkInterface(java.net.NetworkInterface networkInterface) { this(networkInterface.getName(), asIterableAddr(networkInterface.getInetAddresses())); } NetworkInterface(String name, Iterable inetAddresses) { this.name = name; this.inetAddresses = inetAddresses; } public boolean isIp4AddressBindingOnly() { return getIp6Address() == null; } public boolean isLoopBack() { // Let's hope there's no such thing as network interfaces with mixed addresses ;) Iterator iterator = inetAddresses.iterator(); return iterator.hasNext() && iterator.next().isLoopbackAddress(); } public INetAddress getIp4LoopbackOnly() { for (INetAddress inetAddress : inetAddresses) { if (inetAddress.isLoopbackAddress() && inetAddress.isIPv4Address()) { return inetAddress; } } return null; } public INetAddress getIp4NonLoopBackOnly() { for (INetAddress inetAddress : inetAddresses) { if (!inetAddress.isLoopbackAddress() && inetAddress.isIPv4Address()) { return inetAddress; } } return null; } public INetAddress getIp6Address() { for (INetAddress inetAddress : inetAddresses) { if (inetAddress.isIPv6Address()) { return inetAddress; } } return null; } NetworkInterface(String name, INetAddress... inetAddresses) { this(name, Arrays.asList(inetAddresses)); } public Iterable getInetAddresses() { return inetAddresses; } public String getName() { return name; } static Iterable asIterableAddr(Enumeration tEnumeration) { List result = new ArrayList(); while (tEnumeration.hasMoreElements()) { result.add(new INetAddress(tEnumeration.nextElement())); } return Collections.unmodifiableList(result); } } PK lC>`/-kkMorg/openqa/selenium/net/.svn/text-base/NetworkInterfaceProvider.java.svn-base/* Copyright 2007-2010 WebDriver committers Copyright 2007-2010 Google Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package org.openqa.selenium.net; /** * Provides information about the local network interfaces. *

* Basically an abstraction created to allow stubbing of java.net.NetworkInterface, * also soothes some of the jdk1.2 idioms from this interface into jdk1.5 idioms. */ public interface NetworkInterfaceProvider { Iterable getNetworkInterfaces(); // TODO: Remove this whole method // This method should only return an iterface if it's named exactly "lo" NetworkInterface getLoInterface(); } PK lC>&ڳAorg/openqa/selenium/net/.svn/text-base/NetworkUtils.java.svn-base/* Copyright 2007-2010 WebDriver committers Copyright 2007-2010 Google Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package org.openqa.selenium.net; import java.net.SocketException; import java.util.ArrayList; import java.util.Collections; import java.util.List; import org.openqa.selenium.Platform; import org.openqa.selenium.WebDriverException; public class NetworkUtils { private final NetworkInterfaceProvider networkInterfaceProvider; NetworkUtils(NetworkInterfaceProvider networkInterfaceProvider) { this.networkInterfaceProvider = networkInterfaceProvider; } public NetworkUtils() { this(new DefaultNetworkInterfaceProvider()); } public String getPrivateLocalAddress() { List addresses = getLocalInterfaceAddress(); if (addresses.isEmpty()) { return "127.0.0.1"; } return addresses.get(0).getHostAddress(); } /** * Used by the mobile emulators that refuse to access localhost or 127.0.0.1 * The ip4/ip6 requirements of this method are as-of-yet unspecified, but we return * the string that is associated with the ip4 interface * * @return */ public String getNonLoopbackAddressOfThisMachine() { for (NetworkInterface iface : networkInterfaceProvider.getNetworkInterfaces()) { final INetAddress ip4NonLoopback = iface.getIp4NonLoopBackOnly(); if (ip4NonLoopback != null) { return ip4NonLoopback.getHostName(); } } throw new WebDriverException("Could not find a non-loopback ip4 address for this machine"); } /** * Returns a single address that is guaranteed to resolve to an ipv4 representation of localhost * This may either be a hostname or an ip address, dependending if we can guarantee what that the hostname will resolve to ip4. * * @return The address part og such an address */ public String obtainLoopbackIp4Address() { final NetworkInterface networkInterface = getLoopBackAndIp4Only(); if (networkInterface != null) { return networkInterface.getIp4LoopbackOnly().getHostName(); } final String ipOfIp4LoopBack = getIpOfLoopBackIp4(); if (ipOfIp4LoopBack != null) { return ipOfIp4LoopBack; } if (Platform.getCurrent().is(Platform.UNIX)) { NetworkInterface linuxLoopback = networkInterfaceProvider.getLoInterface(); if (linuxLoopback != null) { final INetAddress netAddress = linuxLoopback.getIp4LoopbackOnly(); if (netAddress != null) { return netAddress.getHostAddress(); } } } throw new WebDriverException( "Unable to resolve local loopback address, please file an issue with the full message of this error:\n" + getNetWorkDiags() + "\n==== End of error message"); } private INetAddress grabFirstNetworkAddress() { NetworkInterface firstInterface = networkInterfaceProvider.getNetworkInterfaces().iterator().next(); INetAddress firstAddress = null; if (firstInterface != null) { firstAddress = firstInterface.getInetAddresses().iterator().next(); } if (firstAddress == null) { throw new WebDriverException("Unable to find loopback address for localhost"); } return firstAddress; } public String getIpOfLoopBackIp4() { for (NetworkInterface iface : networkInterfaceProvider.getNetworkInterfaces()) { final INetAddress netAddress = iface.getIp4LoopbackOnly(); if (netAddress != null) { return netAddress.getHostAddress(); } } return null; } private NetworkInterface getLoopBackAndIp4Only() { for (NetworkInterface iface : networkInterfaceProvider.getNetworkInterfaces()) { if (iface.isIp4AddressBindingOnly() && iface.isLoopBack()) { return iface; } } return null; } private List getLocalInterfaceAddress() { List localAddresses = new ArrayList(); for (NetworkInterface iface : networkInterfaceProvider.getNetworkInterfaces()) { for (INetAddress addr : iface.getInetAddresses()) { // filter out Inet6 Addr Entries if (addr.isLoopbackAddress() && !addr.isIPv6Address()) { localAddresses.add(addr); } } } // On linux, loopback addresses are named "lo". See if we can find that. We do this // craziness because sometimes the loopback device is given an IP range that falls outside // of 127/24 if (Platform.getCurrent().is(Platform.UNIX)) { NetworkInterface linuxLoopback = networkInterfaceProvider.getLoInterface(); if (linuxLoopback != null) { for (INetAddress inetAddress : linuxLoopback.getInetAddresses()) { if (!inetAddress.isIPv6Address()) { localAddresses.add(inetAddress); } } } } if (localAddresses.isEmpty()) { return Collections.singletonList(grabFirstNetworkAddress()); } return localAddresses; } public static String getNetWorkDiags() { StringBuilder result = new StringBuilder(); DefaultNetworkInterfaceProvider defaultNetworkInterfaceProvider = new DefaultNetworkInterfaceProvider(); for (NetworkInterface networkInterface : defaultNetworkInterfaceProvider .getNetworkInterfaces()) { dumpToConsole(result, networkInterface); } NetworkInterface byName = defaultNetworkInterfaceProvider.getLoInterface(); if (byName != null) { result.append("Loopback interface LO:\n"); dumpToConsole(result, byName); } return result.toString(); } private static void dumpToConsole(StringBuilder result, NetworkInterface inNetworkInterface) { if (inNetworkInterface == null) { return; } result.append(inNetworkInterface.getName()); result.append("\n"); dumpAddresses(result, inNetworkInterface.getInetAddresses()); } private static void dumpAddresses(StringBuilder result, Iterable inetAddresses) { for (INetAddress address : inetAddresses) { result.append(" address.getHostName() = "); result.append(address.getHostName()); result.append("\n"); result.append(" address.getHostAddress() = "); result.append(address.getHostAddress()); result.append("\n"); result.append(" address.isLoopbackAddress() = "); result.append(address.isLoopbackAddress()); result.append("\n"); } } @SuppressWarnings({"UseOfSystemOutOrSystemErr"}) public static void main(String[] args) throws SocketException { System.out.println(getNetWorkDiags()); } } PK lC>R ?org/openqa/selenium/net/.svn/text-base/PortProber.java.svn-base/* Copyright 2010 WebDriver committers Copyright 2010 Google Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package org.openqa.selenium.net; import java.io.IOException; import java.net.ConnectException; import java.net.ServerSocket; import java.net.Socket; import java.net.UnknownHostException; import java.util.Random; import java.util.concurrent.Callable; import java.util.concurrent.TimeUnit; import static java.util.concurrent.TimeUnit.SECONDS; @SuppressWarnings({"UtilityClass"}) public class PortProber { private static final Random random = new Random(); private PortProber() { } public static int findFreePort() { for (int i = 0; i < 5; i++) { int seedPort = createAcceptablePort(); int suggestedPort = checkPortIsFree(seedPort); if (suggestedPort != -1) { return suggestedPort; } } throw new RuntimeException("Unable to find a free port"); } public static Callable freeLocalPort(final int port) { return new Callable() { public Integer call() throws Exception { if (checkPortIsFree(port) != -1) { return port; } return null; } }; } private static int createAcceptablePort() { synchronized (random) { int seed = random.nextInt(); // avoid protected ports final int FIRST_PORT = 1025; final int LAST_PORT = 65534; final int randomInt = Math.abs(random.nextInt()); seed = (randomInt % (LAST_PORT - FIRST_PORT + 1)) + FIRST_PORT; return seed; } } private static int checkPortIsFree(int port) { ServerSocket socket = null; try { socket = new ServerSocket(port); int localPort = socket.getLocalPort(); socket.close(); return localPort; } catch (IOException e) { return -1; } } public static boolean pollPort(int port) { return pollPort(port, 15, SECONDS); } public static boolean pollPort(int port, int timeout, TimeUnit unit) { long end = System.currentTimeMillis() + unit.toMillis(timeout); while (System.currentTimeMillis() < end) { try { Socket socket = new Socket("localhost", port); socket.close(); return true; } catch (ConnectException e) { // Ignore this } catch (UnknownHostException e) { throw new RuntimeException(e); } catch (IOException e) { throw new RuntimeException(e); } } return false; } } PK lC>9org/openqa/selenium/net/.svn/text-base/Urls.java.svn-base package org.openqa.selenium.net; import org.openqa.selenium.WebDriverException; import org.openqa.selenium.internal.NullTrace; import org.openqa.selenium.internal.Trace; import java.io.UnsupportedEncodingException; import java.net.MalformedURLException; import java.net.URL; import java.net.URLEncoder; public class Urls { private static Trace log = new NullTrace(); /** * Strips the specified URL so it only includes a protocal, hostname and * port * * @throws java.net.MalformedURLException */ public static String toProtocolHostAndPort(String url) { try { URL u = new URL(url); String path = u.getPath(); if (path != null && !"".equals(path) && !path.endsWith("/")) { log.warn("It looks like your baseUrl (" + url + ") is pointing to a file, not a directory (it doesn't end with a /). We're going to have to strip off the last part of the pathname."); } return u.getProtocol() + "://" + u.getAuthority(); } catch (MalformedURLException e) { throw new RuntimeException(e); } } /** * Encodes the text as an URL using UTF-8. * * @param value the text too encode * @return the encoded URI string * @see URLEncoder#encode(java.lang.String, java.lang.String) */ public static String urlEncode(String value) { try { return URLEncoder.encode(value, "UTF-8"); } catch (UnsupportedEncodingException e) { throw new WebDriverException(e); } } } PK lC>n:org/openqa/selenium/net/.svn/text-base/build.desc.svn-base java_library(name = "net", srcs = [ "*.java", ], deps = [ "//java/client/src/org/openqa/selenium:webdriver-api", "//java/client/src/org/openqa/selenium/internal:logging", ]) PK (hC>n"org/openqa/selenium/net/build.desc java_library(name = "net", srcs = [ "*.java", ], deps = [ "//java/client/src/org/openqa/selenium:webdriver-api", "//java/client/src/org/openqa/selenium/internal:logging", ]) PK %^D>ѱ@@/org/openqa/selenium/android/AndroidDriver.class1)org/openqa/selenium/android/AndroidDriver*org/openqa/selenium/remote/RemoteWebDriver#org/openqa/selenium/TakesScreenshotorg/openqa/selenium/Rotatable +org/openqa/selenium/html5/BrowserConnection()VCode   getDefaultUrl()Ljava/net/URL;  (Ljava/net/URL;)VLineNumberTableLocalVariableTablethis+Lorg/openqa/selenium/android/AndroidDriver;(Ljava/lang/String;)V Exceptionsjava/net/MalformedURLException java/net/URL   remoteAddressLjava/lang/String; $ %&getAndroidCapabilities2()Lorg/openqa/selenium/remote/DesiredCapabilities; ( )3(Ljava/net/URL;Lorg/openqa/selenium/Capabilities;)VLjava/net/URL;getScreenshotAs4(Lorg/openqa/selenium/OutputType;)Ljava/lang/Object;.&org/openqa/selenium/WebDriverException Signature@(Lorg/openqa/selenium/OutputType;)TX;2 screenshot 4 56execute9(Ljava/lang/String;)Lorg/openqa/selenium/remote/Response; 8:9#org/openqa/selenium/remote/Response ;<getValue()Ljava/lang/Object; >@?java/lang/Object ABtoString()Ljava/lang/String; DFEorg/openqa/selenium/OutputType GHconvertFromBase64Png&(Ljava/lang/String;)Ljava/lang/Object;target Lorg/openqa/selenium/OutputType; base64PngLocalVariableTypeTable%Lorg/openqa/selenium/OutputType;isOnline()ZQisBrowserOnlineSjava/lang/Boolean RU VO booleanValue setOnline(Z)VZsetBrowserOnline\state R^ _`valueOf(Z)Ljava/lang/Boolean; bdc&com/google/common/collect/ImmutableMap efofN(Ljava/lang/Object;Ljava/lang/Object;)Lcom/google/common/collect/ImmutableMap; h 5iH(Ljava/lang/String;Ljava/util/Map;)Lorg/openqa/selenium/remote/Response;onlineZ mon.org/openqa/selenium/remote/DesiredCapabilities p&androidrtakesScreenshot mt uv setCapability(Ljava/lang/String;Z)Vx rotatablezbrowserConnectionEnabledcaps0Lorg/openqa/selenium/remote/DesiredCapabilities;rotate*(Lorg/openqa/selenium/ScreenOrientation;)VsetScreenOrientation orientation'Lorg/openqa/selenium/ScreenOrientation;getOrientation)()Lorg/openqa/selenium/ScreenOrientation;getScreenOrientationjava/lang/String %org/openqa/selenium/ScreenOrientation _;(Ljava/lang/String;)Lorg/openqa/selenium/ScreenOrientation;http://localhost:8080/hubjava/lang/StringBuilderMalformed default remote URL:  B getMessage append-(Ljava/lang/String;)Ljava/lang/StringBuilder; @ - e Ljava/net/MalformedURLException; SourceFileAndroidDriver.java!   6* /0   E *Y+ 3 4  !"  A *+#' 78  !*+,-/0 i*137=M+,C ; < IJ K"L IMNO :*P37RT@ WX- I*Y[]agW DEjk %& UlK*qs*ws*ys*HI JKL {|}~ F*+agW P Q >*37 U T   `&YK-YY* Z [ \  PK lC>7aj,org/openqa/selenium/android/.svn/all-wcpropsK 25 svn:wc:ra_dav:version-url V 69 /svn/!svn/ver/11222/trunk/java/client/src/org/openqa/selenium/android END AndroidDriver.java K 25 svn:wc:ra_dav:version-url V 88 /svn/!svn/ver/11222/trunk/java/client/src/org/openqa/selenium/android/AndroidDriver.java END build.desc K 25 svn:wc:ra_dav:version-url V 80 /svn/!svn/ver/11222/trunk/java/client/src/org/openqa/selenium/android/build.desc END PK lC>LdG'org/openqa/selenium/android/.svn/format8 PK lC>u$ Forg/openqa/selenium/android/.svn/text-base/AndroidDriver.java.svn-base/* Copyright 2010 WebDriver committers Copyright 2010 Google Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package org.openqa.selenium.android; import org.openqa.selenium.OutputType; import org.openqa.selenium.Rotatable; import org.openqa.selenium.ScreenOrientation; import org.openqa.selenium.TakesScreenshot; import org.openqa.selenium.WebDriverException; import org.openqa.selenium.browserlaunchers.CapabilityType; import org.openqa.selenium.html5.BrowserConnection; import org.openqa.selenium.remote.DesiredCapabilities; import org.openqa.selenium.remote.DriverCommand; import org.openqa.selenium.remote.RemoteWebDriver; import com.google.common.collect.ImmutableMap; import java.net.MalformedURLException; import java.net.URL; /** * A driver for running tests on an Android device or emulator. */ public class AndroidDriver extends RemoteWebDriver implements TakesScreenshot, Rotatable, BrowserConnection { /** * The default constructor assumes the remote server is listening at * http://localhost:8080/hub */ public AndroidDriver() { this(getDefaultUrl()); } public AndroidDriver(String remoteAddress) throws MalformedURLException { this(new URL(remoteAddress)); } public AndroidDriver(URL remoteAddress) { super(remoteAddress, getAndroidCapabilities()); } public X getScreenshotAs(OutputType target) throws WebDriverException { String base64Png = execute(DriverCommand.SCREENSHOT).getValue().toString(); return target.convertFromBase64Png(base64Png); } public boolean isOnline() { return (Boolean) execute(DriverCommand.IS_BROWSER_ONLINE).getValue(); } public void setOnline(boolean online) throws WebDriverException { execute(DriverCommand.SET_BROWSER_ONLINE, ImmutableMap.of("state", online)); } private static DesiredCapabilities getAndroidCapabilities() { DesiredCapabilities caps = DesiredCapabilities.android(); caps.setCapability(CapabilityType.TAKES_SCREENSHOT, true); caps.setCapability(CapabilityType.ROTATABLE, true); caps.setCapability(CapabilityType.SUPPORTS_BROWSER_CONNECTION, true); return caps; } public void rotate(ScreenOrientation orientation) { execute(DriverCommand.SET_SCREEN_ORIENTATION, ImmutableMap.of("orientation", orientation)); } public ScreenOrientation getOrientation() { return ScreenOrientation.valueOf( (String) execute(DriverCommand.GET_SCREEN_ORIENTATION).getValue()); } private static URL getDefaultUrl() { try { return new URL("http://localhost:8080/hub"); } catch (MalformedURLException e) { throw new WebDriverException("Malformed default remote URL: " + e.getMessage()); } } } PK lC>p#>org/openqa/selenium/android/.svn/text-base/build.desc.svn-base java_library(name = "android", srcs = [ "AndroidDriver.java", ], deps = [ "//java/client/src/org/openqa/selenium/remote", ]) PK (hC>p#&org/openqa/selenium/android/build.desc java_library(name = "android", srcs = [ "AndroidDriver.java", ], deps = [ "//java/client/src/org/openqa/selenium/remote", ]) PK %^D>*org/openqa/selenium/lift/TestContext.class1$org/openqa/selenium/lift/TestContextjava/lang/ObjectgoTo(Ljava/lang/String;)VassertPresenceOf)(Lorg/openqa/selenium/lift/find/Finder;)V Signaturej(Lorg/openqa/selenium/lift/find/Finder;)V?(Lorg/hamcrest/Matcher;Lorg/openqa/selenium/lift/find/Finder;)V(Lorg/hamcrest/Matcher;Lorg/openqa/selenium/lift/find/Finder;)Vtype;(Ljava/lang/String;Lorg/openqa/selenium/lift/find/Finder;)V|(Ljava/lang/String;Lorg/openqa/selenium/lift/find/Finder;)VclickOnwaitFor*(Lorg/openqa/selenium/lift/find/Finder;J)Vk(Lorg/openqa/selenium/lift/find/Finder;J)Vquit()V SourceFileTestContext.java          PK %^D>YUC C (org/openqa/selenium/lift/Finders$1.class1a"org/openqa/selenium/lift/Finders$1(org/openqa/selenium/lift/find/BaseFinder val$finder&Lorg/openqa/selenium/lift/find/Finder;)(Lorg/openqa/selenium/lift/find/Finder;)VCode    ()VLineNumberTableLocalVariableTablethis$Lorg/openqa/selenium/lift/Finders$1;findFrom7(Lorg/openqa/selenium/WebDriver;)Ljava/util/Collection; SignatureY(Lorg/openqa/selenium/WebDriver;)Ljava/util/Collection;  *(Ljava/lang/Object;)Ljava/util/Collection; java/util/Collection isEmpty()Z ! "#iterator()Ljava/util/Iterator; %'&java/util/Iterator (hasNext %* +,next()Ljava/lang/Object;.org/openqa/selenium/WebElement 021java/util/Collections 34 singletonList$(Ljava/lang/Object;)Ljava/util/List;contextLorg/openqa/selenium/WebDriver; collectionLjava/util/Collection;iterLjava/util/Iterator;LocalVariableTypeTable8Ljava/util/Collection;6Ljava/util/Iterator; extractFrom @A$org/openqa/selenium/lift/find/FinderdescribeTargetTo(Lorg/hamcrest/Description;)VEfirst GIHorg/hamcrest/Description JK appendText.(Ljava/lang/String;)Lorg/hamcrest/Description; @M NC describeTo descriptionLorg/hamcrest/Description;Rorg/openqa/selenium/WebDriver T  V > SourceFile Finders.javakLorg/openqa/selenium/lift/find/BaseFinder;EnclosingMethod\ org/openqa/selenium/lift/Finders ^_firstN(Lorg/openqa/selenium/lift/find/Finder;)Lorg/openqa/selenium/lift/find/Finder; InnerClasses  8 *+ *  {   ,*+M,, N-$W-)-/,**,,56&789:;&7<9=> ? * +?  56BC P+DFW* +L OPA ) *+QSD> ) *+QUWXYZ[]` PK %^D>oh &org/openqa/selenium/lift/Finders.class1l org/openqa/selenium/lift/Findersjava/lang/Object()VCode  LineNumberTableLocalVariableTablethis"Lorg/openqa/selenium/lift/Finders;div/()Lorg/openqa/selenium/lift/find/HtmlTagFinder; 'org/openqa/selenium/lift/find/DivFinder A(Ljava/lang/String;)Lorg/openqa/selenium/lift/find/HtmlTagFinder;  idLjava/lang/String;link (org/openqa/selenium/lift/find/LinkFinder    anchorTextlinks # !titles &('-org/openqa/selenium/lift/find/PageTitleFinder $title &+ ) &- )images 021)org/openqa/selenium/lift/find/ImageFinder .image 05 3table 8:9)org/openqa/selenium/lift/find/TableFinder 6tables 8= ;cell @BA-org/openqa/selenium/lift/find/TableCellFinder >cells @E C imageButton HJI)org/openqa/selenium/lift/find/InputFinder F HL Flabel radioButton HP N HR Ntextbox HU Sbutton HX Y submitButton H[ YfirstN(Lorg/openqa/selenium/lift/find/Finder;)Lorg/openqa/selenium/lift/find/Finder; Signature(Lorg/openqa/selenium/lift/find/Finder;)Lorg/openqa/selenium/lift/find/Finder;a"org/openqa/selenium/lift/Finders$1 `c d)(Lorg/openqa/selenium/lift/find/Finder;)Vfinder&Lorg/openqa/selenium/lift/find/Finder;LocalVariableTypeTablegLorg/openqa/selenium/lift/find/Finder; SourceFile Finders.java InnerClasses!/*   $ #  /* '  $ +  /* /   !$" 3  $$% 7  )$* ;  )/*, ? ) .$/ C  3$4 G  6$7 K  ;$< O  >$? S  C$D W  F$G [  F/*K _ M N$O c  N/*Q g  S$T k  V$W o  V/*Z s M \]^_E `Y*b {  efg  ehijk `PK %^D>!5org/openqa/selenium/lift/WebDriverTestContext$1.class1V/org/openqa/selenium/lift/WebDriverTestContext$1java/lang/Object0org/openqa/selenium/support/ui/ExpectedConditionthis$0/Lorg/openqa/selenium/lift/WebDriverTestContext; val$finder&Lorg/openqa/selenium/lift/find/Finder;X(Lorg/openqa/selenium/lift/WebDriverTestContext;Lorg/openqa/selenium/lift/find/Finder;)VCode     ()VLineNumberTableLocalVariableTablethis1Lorg/openqa/selenium/lift/WebDriverTestContext$1;apply4(Lorg/openqa/selenium/WebDriver;)Ljava/lang/Boolean; $org/openqa/selenium/lift/find/Finder  findFrom*(Ljava/lang/Object;)Ljava/util/Collection; "$#java/util/Collection %&iterator()Ljava/util/Iterator; (*)java/util/Iterator +,next()Ljava/lang/Object;.org/openqa/selenium/WebElement0&org/openqa/selenium/RenderedWebElement /2 34 isDisplayed()Z 687java/lang/Boolean 9:valueOf(Z)Ljava/lang/Boolean; (< =4hasNextdriverLorg/openqa/selenium/WebDriver;elementsLjava/util/Collection; webElement Lorg/openqa/selenium/WebElement;LocalVariableTypeTable8Ljava/util/Collection;&(Ljava/lang/Object;)Ljava/lang/Object;Horg/openqa/selenium/WebDriver J  SourceFileWebDriverTestContext.java SignatureYLjava/lang/Object;Lorg/openqa/selenium/support/ui/ExpectedCondition;EnclosingMethodQ-org/openqa/selenium/lift/WebDriverTestContext STwaitFor*(Lorg/openqa/selenium/lift/find/Finder;J)V InnerClasses    =*+*,*    A*+M,!:'-N-/15;5 !-2<*AA>? 6@A!BCD  6@EAF ) *+GIKLMNOPRU PK %^D>Tqq5org/openqa/selenium/lift/WebDriverTestContext$2.class1D/org/openqa/selenium/lift/WebDriverTestContext$2,org/openqa/selenium/support/ui/WebDriverWaitthis$0/Lorg/openqa/selenium/lift/WebDriverTestContext;val$timeoutMillisJz(Lorg/openqa/selenium/lift/WebDriverTestContext;Lorg/openqa/selenium/support/ui/Clock;Lorg/openqa/selenium/WebDriver;JJJ)VCode      J(Lorg/openqa/selenium/support/ui/Clock;Lorg/openqa/selenium/WebDriver;JJ)VLineNumberTableLocalVariableTablethis1Lorg/openqa/selenium/lift/WebDriverTestContext$2; $anonymous0&Lorg/openqa/selenium/support/ui/Clock; $anonymous1Lorg/openqa/selenium/WebDriver; $anonymous2 $anonymous3throwTimeoutException*(Ljava/lang/String;Ljava/lang/Exception;)V java/lang/StringBuilder" Element was not rendered within $ %(Ljava/lang/String;)V ' ()append(J)Ljava/lang/StringBuilder;+ms - (.-(Ljava/lang/String;)Ljava/lang/StringBuilder; 0 12toString()Ljava/lang/String; 465-org/openqa/selenium/lift/WebDriverTestContext 78access$0D(Lorg/openqa/selenium/lift/WebDriverTestContext;Ljava/lang/String;)VmessageLjava/lang/String; lastExceptionLjava/lang/Exception; SourceFileWebDriverTestContext.javaEnclosingMethod ABwaitFor*(Lorg/openqa/selenium/lift/find/Finder;J)V InnerClasses   l *+ **,-  4 b * Y!#*&*,/3    9: ;<=>?4@C PK %^D>03org/openqa/selenium/lift/WebDriverTestContext.class1-org/openqa/selenium/lift/WebDriverTestContextjava/lang/Object$org/openqa/selenium/lift/TestContextdriverLorg/openqa/selenium/WebDriver;clock&Lorg/openqa/selenium/support/ui/Clock;"(Lorg/openqa/selenium/WebDriver;)VCode*org/openqa/selenium/support/ui/SystemClock  ()V  H(Lorg/openqa/selenium/WebDriver;Lorg/openqa/selenium/support/ui/Clock;)VLineNumberTableLocalVariableTablethis/Lorg/openqa/selenium/lift/WebDriverTestContext;     quit !#"org/openqa/selenium/WebDriver goTo(Ljava/lang/String;)V !' (%geturlLjava/lang/String;assertPresenceOf)(Lorg/openqa/selenium/lift/find/Finder;)V Signaturej(Lorg/openqa/selenium/lift/find/Finder;)V 0210org/openqa/selenium/lift/match/NumericalMatchers 34atLeast(I)Lorg/hamcrest/Matcher; 6 +7?(Lorg/hamcrest/Matcher;Lorg/openqa/selenium/lift/find/Finder;)Vfinder&Lorg/openqa/selenium/lift/find/Finder;LocalVariableTypeTablegLorg/openqa/selenium/lift/find/Finder;(Lorg/hamcrest/Matcher;Lorg/openqa/selenium/lift/find/Finder;)V >@?$org/openqa/selenium/lift/find/Finder ABfindFrom*(Ljava/lang/Object;)Ljava/util/Collection; DFEjava/util/Collection GHsize()I JLKjava/lang/Integer MNvalueOf(I)Ljava/lang/Integer; PRQorg/hamcrest/Matcher STmatches(Ljava/lang/Object;)ZVorg/hamcrest/StringDescription UY Expected: []\org/hamcrest/Description ^_ appendText.(Ljava/lang/String;)Lorg/hamcrest/Description; [a bcappendDescriptionOf9(Lorg/hamcrest/SelfDescribing;)Lorg/hamcrest/Description;e g got: [i jk appendValue.(Ljava/lang/Object;)Lorg/hamcrest/Description;m o pqtoString()Ljava/lang/String; s t%failWithcardinalityConstraintLorg/hamcrest/Matcher; foundElementsLjava/util/Collection; descriptionLorg/hamcrest/Description;+Lorg/hamcrest/Matcher;8Ljava/util/Collection;type;(Ljava/lang/String;Lorg/openqa/selenium/lift/find/Finder;)V|(Ljava/lang/String;Lorg/openqa/selenium/lift/find/Finder;)V type into  findOneElementToZ(Ljava/lang/String;Lorg/openqa/selenium/lift/find/Finder;)Lorg/openqa/selenium/WebElement;java/lang/CharSequence org/openqa/selenium/WebElement sendKeys([Ljava/lang/CharSequence;)Vinputelement Lorg/openqa/selenium/WebElement;clickOnclick on click clickOnFirst  findFirstElementTo(Ljava/lang/String;Lorg/openqa/selenium/lift/find/Finder;)Lorg/openqa/selenium/WebElement; D isEmpty()Zjava/lang/StringBuildercould not find element to % append-(Ljava/lang/String;)Ljava/lang/StringBuilder; o D iterator()Ljava/util/Iterator; java/util/Iterator next()Ljava/lang/Object;actiondid not know what to  - ambiguous Exceptionsjava/lang/AssertionError (Ljava/lang/Object;)VmessagewaitFor*(Lorg/openqa/selenium/lift/find/Finder;J)Vk(Lorg/openqa/selenium/lift/find/Finder;J)V/org/openqa/selenium/lift/WebDriverTestContext$1 X(Lorg/openqa/selenium/lift/WebDriverTestContext;Lorg/openqa/selenium/lift/find/Finder;)V/org/openqa/selenium/lift/WebDriverTestContext$2  millisToSeconds(J)J z(Lorg/openqa/selenium/lift/WebDriverTestContext;Lorg/openqa/selenium/support/ui/Clock;Lorg/openqa/selenium/WebDriver;JJJ)V #org/openqa/selenium/support/ui/Wait until5(Lcom/google/common/base/Function;)Ljava/lang/Object; timeoutMillisJelementsDisplayedPredicate2Lorg/openqa/selenium/support/ui/ExpectedCondition; sleepTimeoutwait%Lorg/openqa/selenium/support/ui/Wait;GLorg/openqa/selenium/support/ui/ExpectedCondition;FLorg/openqa/selenium/support/ui/Wait;@@  ceiling(D)JvalueDasLong additionalIaccess$0D(Lorg/openqa/selenium/lift/WebDriverTestContext;Ljava/lang/String;)V SourceFileWebDriverTestContext.java InnerClasses!   E *+Y 1 2    Y**+*,45 67   8 *  : ;  $% C *+& > ?  )*+,-. T */+5 B C  89:  8;+7-< "v,*=N+-CIO[UYW:XZ+`dZ,`fZ-CIhdZ,`lZW*nr:F GH&I/J5K<LBMINWO^PdQlSuU4vvuvv89 kwx&Oyz: vu{v8; kw|}~- y*,N-Y+SXYZ**89: 8;,-. g*+M,]^_ 89: 8;,-. g*+M,bcd 89: 8;- 7,*=N-*Y+r-g hi(l*77*789 ,wx:78; ,w|- ],*=N-*Y+r&-C*Y+r-p qr+s5tNw*]]*]89 Rwx:]8; Rw|t% = Y+{  *- DY*+: ɔ ɧ m7Y***  :W 9C>DD89D 9 $9 : D8; 99   4 o   _&A& g6 a  &*+rzPK %^D>zz8org/openqa/selenium/lift/HamcrestWebDriverTestCase.class12org/openqa/selenium/lift/HamcrestWebDriverTestCasejunit/framework/TestCaseDEFAULT_TIMEOUTJ ConstantValuedriverLorg/openqa/selenium/WebDriver;context&Lorg/openqa/selenium/lift/TestContext;()VCode     createDriver!()Lorg/openqa/selenium/WebDriver;  -org/openqa/selenium/lift/WebDriverTestContext  "(Lorg/openqa/selenium/WebDriver;)V  LineNumberTableLocalVariableTablethis4Lorg/openqa/selenium/lift/HamcrestWebDriverTestCase;tearDown Exceptions'java/lang/Exception )+*$org/openqa/selenium/lift/TestContext ,quit . $ getWebDriverclickOn)(Lorg/openqa/selenium/lift/find/Finder;)V Signaturej(Lorg/openqa/selenium/lift/find/Finder;)V )5 01finder&Lorg/openqa/selenium/lift/find/Finder;LocalVariableTypeTablegLorg/openqa/selenium/lift/find/Finder;assertPresenceOf )< :1?(Lorg/hamcrest/Matcher;Lorg/openqa/selenium/lift/find/Finder;)V(Lorg/hamcrest/Matcher;Lorg/openqa/selenium/lift/find/Finder;)V )@ :=cardinalityConstraintLorg/hamcrest/Matcher;+Lorg/hamcrest/Matcher;waitFor F DG*(Lorg/openqa/selenium/lift/find/Finder;J)Vk(Lorg/openqa/selenium/lift/find/Finder;J)V )FtimeoutgoTo(Ljava/lang/String;)V )N KLurlLjava/lang/String;type;(Ljava/lang/String;Lorg/openqa/selenium/lift/find/Finder;)V|(Ljava/lang/String;Lorg/openqa/selenium/lift/find/Finder;)V )U QRtext inputFinderintoN(Lorg/openqa/selenium/lift/find/Finder;)Lorg/openqa/selenium/lift/find/Finder;(Lorg/openqa/selenium/lift/find/Finder;)Lorg/openqa/selenium/lift/find/Finder;input setContext)(Lorg/openqa/selenium/lift/TestContext;)V getPageSource()Ljava/lang/String; a / cedorg/openqa/selenium/WebDriver ^_getTitle ch f_ getCurrentUrl ck i_assertSelected npo/org/openqa/selenium/lift/match/SelectionMatcher qr selection()Lorg/hamcrest/Matcher; tvu$org/openqa/selenium/lift/find/Finder wxwith>(Lorg/hamcrest/Matcher;)Lorg/openqa/selenium/lift/find/Finder; <assertNotSelected |~}0org/openqa/selenium/lift/match/NumericalMatchers exactly(I)Lorg/hamcrest/Matcher; @ SourceFileHamcrestWebDriverTestCase.java!  R****Y* #' (#! "#$%&@*(*- . / 0! "#//* 3! "#0123U *+4 7 8! "# 678  69:123U *+; ; <! "# 678  69:=2>j *+,? ? @!  "# AB 678 AC 69D123S *+E CD! "# 678  69DG2H` *+ I G H!  "# 67 J8  69KLC *+M O P! "# OPQR2S` *+,T X Y!  "# VP W78  W9XY2ZH+ a!"#[78 [9\]>*+ hi!"# ^_4 *`b o!  "#f_4 *`g v!  "#i_4 *`j }!  "#l123X*+msy  !"#678 69z123\*{+ms !"#678 69PK %^D>DՈϨ'org/openqa/selenium/lift/Matchers.class1A!org/openqa/selenium/lift/Matchersjava/lang/Object()VCode  LineNumberTableLocalVariableTablethis#Lorg/openqa/selenium/lift/Matchers; attribute@(Ljava/lang/String;Lorg/hamcrest/Matcher;)Lorg/hamcrest/Matcher; Signaturev(Ljava/lang/String;Lorg/hamcrest/Matcher;)Lorg/hamcrest/Matcher; /org/openqa/selenium/lift/match/AttributeMatcher  attributeNameLjava/lang/String; valueMatcherLorg/hamcrest/Matcher;LocalVariableTypeTable*Lorg/hamcrest/Matcher;atLeast(I)Lorg/hamcrest/Matcher;.(I)Lorg/hamcrest/Matcher; "!0org/openqa/selenium/lift/match/NumericalMatchers countIexactly ' %text.(Lorg/hamcrest/Matcher;)Lorg/hamcrest/Matcher;d(Lorg/hamcrest/Matcher;)Lorg/hamcrest/Matcher; ,.-*org/openqa/selenium/lift/match/TextMatcher () textMatcher selection()Lorg/hamcrest/Matcher;:()Lorg/hamcrest/Matcher; 465/org/openqa/selenium/lift/match/SelectionMatcher 01value*(Ljava/lang/Object;)Lorg/hamcrest/Matcher;L(Ljava/lang/Object;)Lorg/hamcrest/Matcher; ;=<+org/openqa/selenium/lift/match/ValueMatcher 78Ljava/lang/Object; SourceFile Matchers.java!/*   L*+    /  #$ %/& ! #$ ()*A*+ % / / 012$3 )  789/*: - 7>?@PK lC>)org/openqa/selenium/lift/.svn/all-wcpropsK 25 svn:wc:ra_dav:version-url V 66 /svn/!svn/ver/11224/trunk/java/client/src/org/openqa/selenium/lift END TestContext.java K 25 svn:wc:ra_dav:version-url V 83 /svn/!svn/ver/11224/trunk/java/client/src/org/openqa/selenium/lift/TestContext.java END Matchers.java K 25 svn:wc:ra_dav:version-url V 80 /svn/!svn/ver/11224/trunk/java/client/src/org/openqa/selenium/lift/Matchers.java END Finders.java K 25 svn:wc:ra_dav:version-url V 79 /svn/!svn/ver/11224/trunk/java/client/src/org/openqa/selenium/lift/Finders.java END HamcrestWebDriverTestCase.java K 25 svn:wc:ra_dav:version-url V 97 /svn/!svn/ver/11224/trunk/java/client/src/org/openqa/selenium/lift/HamcrestWebDriverTestCase.java END build.desc K 25 svn:wc:ra_dav:version-url V 77 /svn/!svn/ver/11224/trunk/java/client/src/org/openqa/selenium/lift/build.desc END WebDriverTestContext.java K 25 svn:wc:ra_dav:version-url V 92 /svn/!svn/ver/11224/trunk/java/client/src/org/openqa/selenium/lift/WebDriverTestContext.java END PK lC>rr%org/openqa/selenium/lift/.svn/entries8 dir 11264 http://selenium.googlecode.com/svn/trunk/java/client/src/org/openqa/selenium/lift http://selenium.googlecode.com/svn 2011-02-01T12:48:30.650182Z 11224 simon.m.stewart svn:special svn:externals svn:needs-lock 07704840-8298-11de-bf8c-fd130f914ac9 find dir TestContext.java file 2011-02-03T12:01:17.000000Z 79d219c873d3b92b5c914f5b0cbd9248 2009-03-24T17:04:27.143928Z 6446 rchatley@gmail.com Matchers.java file 2011-02-03T12:01:17.000000Z bf5f8255d1807a193c175ea01f471905 2009-03-24T17:04:27.143928Z 6446 rchatley@gmail.com Finders.java file 2011-02-03T12:01:17.000000Z 56303a96b03d0b66f4c92787809ff3e3 2009-04-09T14:50:10.565161Z 6507 simon.m.stewart match dir HamcrestWebDriverTestCase.java file 2011-02-03T12:01:17.000000Z 7830f1c9012501a5e7780b7aaf70dbf1 2009-04-09T15:07:43.960265Z 6508 simon.m.stewart build.desc file 2011-02-03T12:01:17.000000Z 8e1c103aaa4edc3c1a22985013ab2164 2011-02-01T12:48:30.650182Z 11224 simon.m.stewart WebDriverTestContext.java file 2011-02-03T12:01:17.000000Z 5aab5b7b3f0afa4d946e2cf70f15affc 2011-01-04T02:18:47.620796Z 10834 dawagner PK lC>G$org/openqa/selenium/lift/.svn/format8 PK lC>%W=org/openqa/selenium/lift/.svn/text-base/Finders.java.svn-base/* Copyright 2007-2009 WebDriver committers Copyright 2007-2009 Google Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ // Generated source. package org.openqa.selenium.lift; import org.openqa.selenium.WebElement; import org.openqa.selenium.WebDriver; import org.openqa.selenium.lift.find.Finder; import org.openqa.selenium.lift.find.BaseFinder; import org.hamcrest.Description; import java.util.Iterator; import java.util.Collections; import java.util.Collection; public class Finders { public static org.openqa.selenium.lift.find.HtmlTagFinder div() { return org.openqa.selenium.lift.find.DivFinder.div(); } public static org.openqa.selenium.lift.find.HtmlTagFinder div(String id) { return org.openqa.selenium.lift.find.DivFinder.div(id); } public static org.openqa.selenium.lift.find.HtmlTagFinder link() { return org.openqa.selenium.lift.find.LinkFinder.link(); } public static org.openqa.selenium.lift.find.HtmlTagFinder link(java.lang.String anchorText) { return org.openqa.selenium.lift.find.LinkFinder.link(anchorText); } public static org.openqa.selenium.lift.find.HtmlTagFinder links() { return org.openqa.selenium.lift.find.LinkFinder.links(); } public static org.openqa.selenium.lift.find.HtmlTagFinder titles() { return org.openqa.selenium.lift.find.PageTitleFinder.titles(); } public static org.openqa.selenium.lift.find.HtmlTagFinder title() { return org.openqa.selenium.lift.find.PageTitleFinder.title(); } public static org.openqa.selenium.lift.find.HtmlTagFinder title(String title) { return org.openqa.selenium.lift.find.PageTitleFinder.title(title); } public static org.openqa.selenium.lift.find.HtmlTagFinder images() { return org.openqa.selenium.lift.find.ImageFinder.images(); } public static org.openqa.selenium.lift.find.HtmlTagFinder image() { return org.openqa.selenium.lift.find.ImageFinder.image(); } public static org.openqa.selenium.lift.find.HtmlTagFinder table() { return org.openqa.selenium.lift.find.TableFinder.table(); } public static org.openqa.selenium.lift.find.HtmlTagFinder tables() { return org.openqa.selenium.lift.find.TableFinder.tables(); } public static org.openqa.selenium.lift.find.HtmlTagFinder cell() { return org.openqa.selenium.lift.find.TableCellFinder.cell(); } public static org.openqa.selenium.lift.find.HtmlTagFinder cells() { return org.openqa.selenium.lift.find.TableCellFinder.cells(); } public static org.openqa.selenium.lift.find.HtmlTagFinder imageButton() { return org.openqa.selenium.lift.find.InputFinder.imageButton(); } public static org.openqa.selenium.lift.find.HtmlTagFinder imageButton(String label) { return org.openqa.selenium.lift.find.InputFinder.imageButton(label); } public static org.openqa.selenium.lift.find.HtmlTagFinder radioButton() { return org.openqa.selenium.lift.find.InputFinder.radioButton(); } public static org.openqa.selenium.lift.find.HtmlTagFinder radioButton(String id) { return org.openqa.selenium.lift.find.InputFinder.radioButton(id); } public static org.openqa.selenium.lift.find.HtmlTagFinder textbox() { return org.openqa.selenium.lift.find.InputFinder.textbox(); } public static org.openqa.selenium.lift.find.HtmlTagFinder button() { return org.openqa.selenium.lift.find.InputFinder.submitButton(); } public static org.openqa.selenium.lift.find.HtmlTagFinder button(String label) { return org.openqa.selenium.lift.find.InputFinder.submitButton(label); } /** * A finder which returns the first element matched - such as if you have multiple elements which * match the finder (such as multiple links with the same text on a page etc) */ public static Finder first(final Finder finder) { return new BaseFinder() { @Override public Collection findFrom(WebDriver context) { Collection collection = super.findFrom(context); if (!collection.isEmpty()) { Iterator iter = collection.iterator(); iter.hasNext(); return Collections.singletonList(iter.next()); } else { return collection; } } protected Collection extractFrom(WebDriver context) { return finder.findFrom(context); } protected void describeTargetTo(Description description) { description.appendText("first "); finder.describeTo(description); } }; } } PK lC>[Oorg/openqa/selenium/lift/.svn/text-base/HamcrestWebDriverTestCase.java.svn-base/* Copyright 2007-2009 WebDriver committers Copyright 2007-2009 Google Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package org.openqa.selenium.lift; import junit.framework.TestCase; import static org.openqa.selenium.lift.match.NumericalMatchers.exactly; import static org.openqa.selenium.lift.match.SelectionMatcher.selection; import org.hamcrest.Matcher; import org.openqa.selenium.WebDriver; import org.openqa.selenium.WebElement; import org.openqa.selenium.lift.find.Finder; /** * Base class for tests using the LiFT style API to driver WebDriver. * @author rchatley (Robert Chatley) * */ public abstract class HamcrestWebDriverTestCase extends TestCase { private static final long DEFAULT_TIMEOUT = 5000; private WebDriver driver = createDriver(); private TestContext context = new WebDriverTestContext(driver); protected abstract WebDriver createDriver(); @Override protected void tearDown() throws Exception { context.quit(); super.tearDown(); } protected WebDriver getWebDriver() { return driver; } protected void clickOn(Finder finder) { context.clickOn(finder); } protected void assertPresenceOf(Finder finder) { context.assertPresenceOf(finder); } protected void assertPresenceOf(Matcher cardinalityConstraint, Finder finder) { context.assertPresenceOf(cardinalityConstraint, finder); } protected void waitFor(Finder finder) { waitFor(finder, DEFAULT_TIMEOUT); } protected void waitFor(Finder finder, long timeout) { context.waitFor(finder, timeout); } /** * Cause the browser to navigate to the given URL * @param url */ protected void goTo(String url) { context.goTo(url); } /** * Type characters into an element of the page, typically an input field * @param text - characters to type * @param inputFinder - specification for the page element */ protected void type(String text, Finder inputFinder) { context.type(text, inputFinder); } /** * Syntactic sugar to use with {@link HamcrestWebDriverTestCase#type(String, Finder)}, * e.g. type("cheese", into(textbox())); * The into() method simply returns its argument. */ protected Finder into(Finder input) { return input; } /** * replace the default {@link TestContext} */ void setContext(TestContext context) { this.context = context; } /** * Returns the current page source */ public String getPageSource() { return getWebDriver().getPageSource(); } /** * Returns the current page title */ public String getTitle() { return getWebDriver().getTitle(); } /** * Returns the current URL */ public String getCurrentUrl() { return getWebDriver().getCurrentUrl(); } protected void assertSelected(Finder finder) { assertPresenceOf(finder.with(selection())); } protected void assertNotSelected(Finder finder) { assertPresenceOf(exactly(0), finder.with(selection())); } } PK lC>St>org/openqa/selenium/lift/.svn/text-base/Matchers.java.svn-base/* Copyright 2007-2009 WebDriver committers Copyright 2007-2009 Google Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ // Generated source. package org.openqa.selenium.lift; public class Matchers { public static org.hamcrest.Matcher attribute(java.lang.String attributeName, org.hamcrest.Matcher valueMatcher) { return org.openqa.selenium.lift.match.AttributeMatcher.attribute(attributeName, valueMatcher); } public static org.hamcrest.Matcher atLeast(int count) { return org.openqa.selenium.lift.match.NumericalMatchers.atLeast(count); } public static org.hamcrest.Matcher exactly(int count) { return org.openqa.selenium.lift.match.NumericalMatchers.exactly(count); } public static org.hamcrest.Matcher text(org.hamcrest.Matcher textMatcher) { return org.openqa.selenium.lift.match.TextMatcher.text(textMatcher); } public static org.hamcrest.Matcher selection() { return org.openqa.selenium.lift.match.SelectionMatcher.selection(); } public static org.hamcrest.Matcher value(Object value) { return org.openqa.selenium.lift.match.ValueMatcher.value(value); } } PK lC>DAorg/openqa/selenium/lift/.svn/text-base/TestContext.java.svn-base/* Copyright 2007-2009 WebDriver committers Copyright 2007-2009 Google Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package org.openqa.selenium.lift; import org.hamcrest.Matcher; import org.openqa.selenium.WebDriver; import org.openqa.selenium.WebElement; import org.openqa.selenium.lift.find.Finder; /** * Interface for objects that provide a context (maintaining any state) for web tests. * @author rchatley (Robert Chatley) * */ public interface TestContext { public abstract void goTo(String url); public abstract void assertPresenceOf(Finder finder); public abstract void assertPresenceOf( Matcher cardinalityConstraint, Finder finder); public abstract void type(String input, Finder finder); public abstract void clickOn(Finder finder); public abstract void waitFor(Finder finder, long timeout); public abstract void quit(); }PK lC>0?qTTJorg/openqa/selenium/lift/.svn/text-base/WebDriverTestContext.java.svn-base/* Copyright 2007-2009 WebDriver committers Copyright 2007-2009 Google Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package org.openqa.selenium.lift; import org.hamcrest.Description; import org.hamcrest.Matcher; import org.hamcrest.StringDescription; import org.openqa.selenium.RenderedWebElement; import org.openqa.selenium.WebDriver; import org.openqa.selenium.WebElement; import org.openqa.selenium.lift.find.Finder; import org.openqa.selenium.support.ui.Clock; import org.openqa.selenium.support.ui.ExpectedCondition; import org.openqa.selenium.support.ui.SystemClock; import org.openqa.selenium.support.ui.Wait; import org.openqa.selenium.support.ui.WebDriverWait; import static org.openqa.selenium.lift.match.NumericalMatchers.atLeast; import java.util.Collection; /** * Gives the context for a test, holds page state, and interacts with the {@link WebDriver}. * * @author rchatley (Robert Chatley) * */ public class WebDriverTestContext implements TestContext { private WebDriver driver; private final Clock clock; public WebDriverTestContext(WebDriver driver) { this(driver, new SystemClock()); } WebDriverTestContext(WebDriver driver, Clock clock) { this.driver = driver; this.clock = clock; } public void quit() { driver.quit(); } public void goTo(String url) { driver.get(url); } public void assertPresenceOf(Finder finder) { assertPresenceOf(atLeast(1), finder); } public void assertPresenceOf(Matcher cardinalityConstraint, Finder finder) { Collection foundElements = finder.findFrom(driver); if (!cardinalityConstraint.matches(foundElements.size())) { Description description = new StringDescription(); description.appendText("\nExpected: ") .appendDescriptionOf(cardinalityConstraint) .appendText(" ") .appendDescriptionOf(finder) .appendText("\n got: ") .appendValue(foundElements.size()) .appendText(" ") .appendDescriptionOf(finder) .appendText("\n"); failWith(description.toString()); } } public void type(String input, Finder finder) { WebElement element = findOneElementTo("type into", finder); element.sendKeys(input); } public void clickOn(Finder finder) { WebElement element = findOneElementTo("click on", finder); element.click(); } public void clickOnFirst(Finder finder) { WebElement element = findFirstElementTo("click on", finder); element.click(); } private WebElement findFirstElementTo(String action, Finder finder) { Collection foundElements = finder.findFrom(driver); if (foundElements.isEmpty()) { failWith("could not find element to " + action); } return foundElements.iterator().next(); } private WebElement findOneElementTo(String action, Finder finder) { Collection foundElements = finder.findFrom(driver); if (foundElements.isEmpty()) { failWith("could not find element to " + action); } else if (foundElements.size() > 1) { failWith("did not know what to " + action + " - ambiguous"); } return foundElements.iterator().next(); } private void failWith(String message) throws AssertionError { throw new java.lang.AssertionError(message); } public void waitFor(final Finder finder, final long timeoutMillis) { final ExpectedCondition elementsDisplayedPredicate = new ExpectedCondition() { public Boolean apply(WebDriver driver) { final Collection elements = finder.findFrom(driver); for (WebElement webElement : elements) { if (((RenderedWebElement) webElement).isDisplayed()) { return true; } } return false; } }; final long sleepTimeout = (timeoutMillis > WebDriverWait.DEFAULT_SLEEP_TIMEOUT) ? WebDriverWait.DEFAULT_SLEEP_TIMEOUT : timeoutMillis / 2; Wait wait = new WebDriverWait(clock, driver, millisToSeconds(timeoutMillis), sleepTimeout) { @Override protected void throwTimeoutException(String message, Exception lastException) { failWith("Element was not rendered within " + timeoutMillis + "ms"); } }; wait.until(elementsDisplayedPredicate); } private static long millisToSeconds(final long timeoutMillis) { return ceiling(((double)timeoutMillis) / 1000); } private static long ceiling(final double value) { final long asLong = (long)value; final int additional = value - asLong > 0 ? 1 : 0; return asLong + additional; } } PK lC>GL}11;org/openqa/selenium/lift/.svn/text-base/build.desc.svn-base java_library(name = "lift", srcs = [ "*.java", "find/*.java", "match/*.java", ], deps = [ "//java/client/src/org/openqa/selenium/support/ui:wait", "//java/client/test/org/openqa/selenium/support/ui:clock", "//third_party/java/hamcrest", "//third_party/java/junit", ]) PK (hC>GL}11#org/openqa/selenium/lift/build.desc java_library(name = "lift", srcs = [ "*.java", "find/*.java", "match/*.java", ], deps = [ "//java/client/src/org/openqa/selenium/support/ui:wait", "//java/client/test/org/openqa/selenium/support/ui:clock", "//third_party/java/hamcrest", "//third_party/java/junit", ]) PK %^D>bɠH""2org/openqa/selenium/io/TemporaryFilesystem$1.class1,org/openqa/selenium/io/TemporaryFilesystem$1java/lang/Thread()VCode  LineNumberTableLocalVariableTablethis.Lorg/openqa/selenium/io/TemporaryFilesystem$1;run *org/openqa/selenium/io/TemporaryFilesystem deleteTemporaryFiles SourceFileTemporaryFilesystem.javaEnclosingMethod InnerClasses 3* #  2 %&   PK %^D>+ 0org/openqa/selenium/io/TemporaryFilesystem.class1*org/openqa/selenium/io/TemporaryFilesystemjava/lang/ObjecttemporaryFilesLjava/util/Set; SignatureLjava/util/Set;baseDirLjava/io/File; shutdownHookLjava/lang/Thread;()VCode(java/util/concurrent/CopyOnWriteArraySet     java/io/Filejava.io.tmpdir java/lang/System   getProperty&(Ljava/lang/String;)Ljava/lang/String; " #(Ljava/lang/String;)V % ',org/openqa/selenium/io/TemporaryFilesystem$1 & * ,.-java/lang/Runtime /0 getRuntime()Ljava/lang/Runtime; ,2 34addShutdownHook(Ljava/lang/Thread;)V 6 78exists()Z:&org/openqa/selenium/WebDriverException<java/lang/StringBuilder>Unable to find tmp dir: ;" A BCgetAbsolutePath()Ljava/lang/String; ;E FGappend-(Ljava/lang/String;)Ljava/lang/StringBuilder; ;I JCtoString 9" M N8canWritePUnable to write to tmp dir: LineNumberTableLocalVariableTable this,Lorg/openqa/selenium/io/TemporaryFilesystem; createTempDir4(Ljava/lang/String;Ljava/lang/String;)Ljava/io/File; Y Z[createTempFileB(Ljava/lang/String;Ljava/lang/String;Ljava/io/File;)Ljava/io/File; ] ^8delete ` a8mkdirsc#Cannot create profile directory at egf"org/openqa/selenium/io/FileHandler hi createDir(Ljava/io/File;)Z kml java/util/Set noadd(Ljava/lang/Object;)Zq#Unable to create temporary file at sjava/io/IOExceptionprefixLjava/lang/String;suffixfiledireLjava/io/IOException; deleteTempDir(Ljava/io/File;)V ~ 8 shouldReap k oremove e ^ideleteTemporaryFiles k iterator()Ljava/util/Iterator; java/util/Iterator next()Ljava/lang/Object; 8hasNextwebdriver.reap_profiletrue  8(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String; java/lang/Boolean valueOf'(Ljava/lang/String;)Ljava/lang/Boolean; 8 booleanValuereap SourceFileTemporaryFilesystem.java InnerClasses!   yYY!$&Y()+)1$5 9Y;Y=?$@DHK$L 9Y;YO?$@DHKQ& ! "##-,/50R2[3x R3*SQ 79R TU VWo*+$XM,\WY,@!N- -_9Y;Yb?-@DHK-dW-jW-M9Y;Yp?$@DHKPQrQ2 E FIJ%K@OEQORQSRTVUkTR4otuovu Hw 7x Ryz {|S}**WQ`aefhR w z0}L+K*WM+"%9Qnort%u&r/yR  w 8>K*Q R u &PK %^D> 9org/openqa/selenium/io/FileHandler$FileSuffixFilter.class103org/openqa/selenium/io/FileHandler$FileSuffixFilterjava/lang/Object)org/openqa/selenium/io/FileHandler$FiltersuffixLjava/lang/String;(Ljava/lang/String;)VCode  ()V  LineNumberTableLocalVariableTablethis5Lorg/openqa/selenium/io/FileHandler$FileSuffixFilter; isRequired(Ljava/io/File;)Z  java/io/File  isDirectory()Z   getAbsolutePath()Ljava/lang/String; "$#java/lang/String %&endsWith(Ljava/lang/String;)ZfileLjava/io/File; SourceFileFileHandler.java InnerClasses-"org/openqa/selenium/io/FileHandlerFileSuffixFilterFilter   F * *+    M++*!'()*+,. ,/ PK %^D>O/org/openqa/selenium/io/FileHandler$Filter.class1 )org/openqa/selenium/io/FileHandler$Filterjava/lang/Object isRequired(Ljava/io/File;)Z SourceFileFileHandler.java InnerClasses "org/openqa/selenium/io/FileHandlerFilter   PK %^D>F'ľ1org/openqa/selenium/io/FileHandler$NoFilter.class1+org/openqa/selenium/io/FileHandler$NoFilterjava/lang/Object)org/openqa/selenium/io/FileHandler$Filter()VCode  LineNumberTableLocalVariableTablethis-Lorg/openqa/selenium/io/FileHandler$NoFilter; isRequired(Ljava/io/File;)ZfileLjava/io/File;0(Lorg/openqa/selenium/io/FileHandler$NoFilter;)V   SourceFileFileHandler.java InnerClasses"org/openqa/selenium/io/FileHandlerFilterNoFilter  /*    6   %*    PK %^D>q(org/openqa/selenium/io/FileHandler.class1~"org/openqa/selenium/io/FileHandlerjava/lang/ObjectJDK6_SETWRITABLELjava/lang/reflect/Method;CHMOD_SETWRITABLELjava/io/File;()VCode  findJdk6SetWritableMethod()Ljava/lang/reflect/Method;    findChmodCommand()Ljava/io/File;  LineNumberTableLocalVariableTable   this$Lorg/openqa/selenium/io/FileHandler;unzip%(Ljava/io/InputStream;)Ljava/io/File; Exceptions#java/io/IOException&stream (*)*org/openqa/selenium/io/TemporaryFilesystem +, createTempDir4(Ljava/lang/String;Ljava/lang/String;)Ljava/io/File;.org/openqa/selenium/io/Zip - -1 2&(Ljava/io/InputStream;Ljava/io/File;)VresourceLjava/io/InputStream;output copyResource5(Ljava/io/File;Ljava/lang/Class;[Ljava/lang/String;)V Signature8(Ljava/io/File;Ljava/lang/Class<*>;[Ljava/lang/String;)V ; <=locateResource:(Ljava/lang/Class;Ljava/lang/String;)Ljava/io/InputStream; -? @A unzipFile8(Ljava/io/File;Ljava/io/InputStream;Ljava/lang/String;)V CEDorg/openqa/selenium/io/Cleanly FGclose(Ljava/io/InputStream;)V outputDirforClassLoaderLjava/lang/Class;names[Ljava/lang/String;zipLorg/openqa/selenium/io/Zip;nameLjava/lang/String;isLocalVariableTypeTableLjava/lang/Class<*>;=(Ljava/lang/Class<*>;Ljava/lang/String;)Ljava/io/InputStream;Vjava/lang/StringBuilderXos.arch Z\[java/lang/System ]^ getProperty&(Ljava/lang/String;)Ljava/lang/String; `bajava/lang/String cd toLowerCase()Ljava/lang/String; `f ghvalueOf&(Ljava/lang/Object;)Ljava/lang/String; Uj k(Ljava/lang/String;)Vm/ Uo pqappend-(Ljava/lang/String;)Ljava/lang/StringBuilder; Us tdtoString vxwjava/lang/Class yzgetResourceAsStream)(Ljava/lang/String;)Ljava/io/InputStream;|Unable to locate: "jarch alternatives possibility createDir(Ljava/io/File;)Z  java/io/File exists()Z mkdirs canWrite   makeWritable  getParentFile  dir java/lang/Boolean g(Z)Ljava/lang/Boolean; java/lang/reflect/Method invoke9(Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/Object;  booleanValue java/lang/Runtime  getRuntime()Ljava/lang/Runtime; dgetAbsolutePath+x exec(([Ljava/lang/String;)Ljava/lang/Process; java/lang/Process waitFor()I&org/openqa/selenium/WebDriverException (Ljava/lang/Throwable;)V java/lang/IllegalAccessException+java/lang/reflect/InvocationTargetExceptionjava/lang/InterruptedExceptionfileprocessLjava/lang/Process;e1 Ljava/lang/InterruptedException;isZipped(Ljava/lang/String;)Z.zip ` endsWith.xpifileNamedelete  isDirectory  listFiles()[Ljava/io/File;  toDeletedeletedZchildcopy(Ljava/io/File;Ljava/io/File;)V+org/openqa/selenium/io/FileHandler$NoFilter 0(Lorg/openqa/selenium/io/FileHandler$NoFilter;)V  J(Ljava/io/File;Ljava/io/File;Lorg/openqa/selenium/io/FileHandler$Filter;)Vfromto1(Ljava/io/File;Ljava/io/File;Ljava/lang/String;)V3org/openqa/selenium/io/FileHandler$FileSuffixFilter jsourcedestsuffix  copyDir  copyFileonlyCopy+Lorg/openqa/selenium/io/FileHandler$Filter; )org/openqa/selenium/io/FileHandler$Filter  isRequired  list()[Ljava/lang/String;  .parentlock `  equals(Ljava/lang/Object;)Z parent.lock  #(Ljava/io/File;Ljava/lang/String;)Vchildrenjava/io/FileInputStream  (Ljava/io/File;)V   getChannel!()Ljava/nio/channels/FileChannel;java/io/FileOutputStream   #%$java/nio/channels/FileChannel &'size()J #) *+ transferTo,(JJLjava/nio/channels/WritableByteChannel;)J-Could not transfer all bytes. C/ F0(Ljava/nio/channels/Channel;)VoutLjava/nio/channels/FileChannel;inlengthJcopied8 setWritable v: ;< getMethod@(Ljava/lang/String;[Ljava/lang/Class;)Ljava/lang/reflect/Method;>java/lang/NoSuchMethodExceptione!Ljava/lang/NoSuchMethodException;BPATH ZD E^getenv G HP pathSeparator `J KLsplit'(Ljava/lang/String;)[Ljava/lang/String;Nchmod P Q'(Ljava/lang/String;Ljava/lang/String;)VallPathspathspath readAsString"(Ljava/io/File;)Ljava/lang/String;Xjava/io/BufferedReaderZjava/io/FileReader Y W] ^(Ljava/io/Reader;)V U Za bc arraycopy*(Ljava/lang/Object;ILjava/lang/Object;II)V Ue pf([C)Ljava/lang/StringBuilder; hjijava/io/Reader klread([C)I Cn F^toReadreaderLjava/io/Reader;builderLjava/lang/StringBuilder;buffer[CItarget SourceFileFileHandler.java InnerClassesFileSuffixFilterFilterNoFilter!  5 () '  /*'   !" R$%'L-Y/*+0+-/134567!"89  J-Y/N,Y:6602:+::-*> : B Bϱ$00* 689$;0<2=7>:=?8I@>JHJIJJKLBMN#OP$Q4R JIS <=!"8T P UYWY_eilnrM`Y+SYUYli+nrSYUY,ei+nrSYUYli,n+nrSN-Y:66.2:u:*u:ѻ"YUY{i+nr}. CDcGwHIJLMNGR>IJOP~PcWLw!P&4R IS !" n0* * ** *W**WXZ[#\(a 0 !" l*$*YSLAL=7`YSYSY*SL+W*LY+'(',6_`>ef ik(l,n0q6s9tRsVu[v`waxj{ lV a   @*ͶϚ*ҶϚ P  R<*֙6*Y:6>!2M,,ݙ~<* *ߙ 3< RP !" F*+Y   !" _*+,Y Y,  P !" q**֙ *+, *+,  !" b,*+W*N-Y:66;2:  & Y*Y+,ı& )?Wa4bbbML).P !"  i,*N:Y*:Y+ !N"7 "-(7"Y,}: -.. -..QQF )0>FQSW\_chHiii \12Y320!45>65  O7vYS9K= ?@  CACK*FIL+Y:6>#2MY,MO:" -58A*<RP4SL TP- N UV!" \LWYYY*[\LUY_MN:-`,dW+-gY6,r:+m:+mLS>  # ) 3: FLPSUYH\oZpq9rs 3tu#kvBkv)wuxyz{ | } PK %^D>ry$org/openqa/selenium/io/Cleanly.class1/org/openqa/selenium/io/Cleanlyjava/lang/Object()VCode  LineNumberTableLocalVariableTablethis Lorg/openqa/selenium/io/Cleanly;close(Ljava/nio/channels/Channel;)V java/nio/channels/Channel java/io/IOExceptiontoCloseLjava/nio/channels/Channel;(Ljava/io/InputStream;)V java/io/InputStreamLjava/io/InputStream;(Ljava/io/OutputStream;)V  java/io/OutputStreamLjava/io/OutputStream;(Ljava/io/Reader;)V $%java/io/ReaderreaderLjava/io/Reader;(Ljava/io/Writer;)V *+java/io/WriterLjava/io/Writer; SourceFile Cleanly.java!/*   N**L   !$  L**L  '* + .  L**L  14 5 8 ! "L**#L  ;> ? B &' (L**)L  EH I L &,-.PK %^D>:$org/openqa/selenium/io/IOUtils.class1;org/openqa/selenium/io/IOUtilsjava/lang/ObjectBUFFERI ConstantValue()VCode  LineNumberTableLocalVariableTablethis Lorg/openqa/selenium/io/IOUtils; readFully)(Ljava/io/InputStream;)Ljava/lang/String; Exceptionsjava/io/IOExceptionjava/lang/StringBuilder  java/lang/StringUTF-8  ([BIILjava/lang/String;)V " #$append-(Ljava/lang/String;)Ljava/lang/StringBuilder; &('java/io/InputStream )*read([B)I &, - close / 01toString()Ljava/lang/String;inLjava/io/InputStream;sbLjava/lang/StringBuilder;buffer[Blength SourceFile IOUtils.java!  /*    6YLM+Y,!W*,%Y>*++.   " -14623.45(678) 89:PK %^D> org/openqa/selenium/io/Zip.class1org/openqa/selenium/io/Zipjava/lang/ObjectBUF_SIZEI ConstantValue@()VCode  LineNumberTableLocalVariableTablethisLorg/openqa/selenium/io/Zip;zip(Ljava/io/File;Ljava/io/File;)V Exceptionsjava/io/IOException  java/io/File exists()Zjava/lang/StringBuilder File already exists: " #(Ljava/lang/String;)V % &'append-(Ljava/lang/Object;)Ljava/lang/StringBuilder; ) *+toString()Ljava/lang/String; ".java/io/FileOutputStream -0 1(Ljava/io/File;)V 3 4'(Ljava/io/File;Ljava/io/OutputStream;)V 687org/openqa/selenium/io/Cleanly 9:close(Ljava/io/OutputStream;)VinputDirLjava/io/File;outputfosLjava/io/FileOutputStream;"(Ljava/io/File;)Ljava/lang/String;Bjava/io/ByteArrayOutputStream A E*org/openqa/selenium/internal/Base64Encoder D AH IJ toByteArray()[B DL MNencode([B)Ljava/lang/String;bosLjava/io/ByteArrayOutputStream;Rjava/util/zip/ZipOutputStream QT : V W+getAbsolutePath Y Z[addToZipB(Ljava/lang/String;Ljava/util/zip/ZipOutputStream;Ljava/io/File;)VwriteToLjava/io/OutputStream;zosLjava/util/zip/ZipOutputStream; a b isDirectory d ef listFiles()[Ljava/io/File;hjava/io/FileInputStream g0 kmljava/lang/String nolength()I kq rs substring(I)Ljava/lang/String;ujava/util/zip/ZipEntry t" Qx yz putNextEntry(Ljava/util/zip/ZipEntry;)V Q| }~write([BII)V g read([B)I g 9 Q  closeEntrybasePathLjava/lang/String;toAddfilefisLjava/io/FileInputStream;nameentryLjava/util/zip/ZipEntry;lenbuffer[Bunzip#(Ljava/lang/String;Ljava/io/File;)V D decode(Ljava/lang/String;)[Bjava/io/ByteArrayInputStream ([B)V  &(Ljava/io/InputStream;Ljava/io/File;)V 6 9(Ljava/io/InputStream;)Vsource outputDirbytesbisLjava/io/ByteArrayInputStream;java/util/zip/ZipInputStream t +getName  #(Ljava/io/File;Ljava/lang/String;)V ta "org/openqa/selenium/io/FileHandler  createDir(Ljava/io/File;)Z   unzipFile8(Ljava/io/File;Ljava/io/InputStream;Ljava/lang/String;)V  getNextEntry()Ljava/util/zip/ZipEntry;Ljava/io/InputStream;zisLjava/util/zip/ZipInputStream;   getParentFile()Ljava/io/File;#Cannot create parent director for:  &-(Ljava/lang/String;)Ljava/lang/StringBuilder;java/io/BufferedOutputStream (Ljava/io/OutputStream;I)V |java/io/OutputStream java/io/InputStream  zipStreamtoWriteout SourceFileZip.java!   /*   A,YY!,$(,N-Y,/N*+-2 :-5-5!33* !*3 5!9"<!@#*AA;<A=<! >?@ ,AYCM*+,2DYF,GK:,5N,5-%"&)*,"*%+&,*- ,,;<$OP4 &NQY,SN*+U-+X :-5-5"13 4567!6%8*&&;<&\]$^_Z[ N -`/-cY:662:*+,XWgY-i:-U+j`p:tYv:,w: ,{Y6,>;<=&<3@=ALCWD]GdHgIpH~LMOp ^_<<=JL;W0g z d# 3DYF+N:Y-:*, :##& R TVW#X%Y*Z-Y2[4333< '$ "NgY+iN*-, :--"^a bcded!f*""<"<  RY+N.Y,: W*,--Y:Χ :-- DD6 i m no#p)q,t7mDvFwJxMwQyHRRR< I +>< ) wY+-:ƸYYʷ!-̶(,Y-Y/@:@: ,Y6 :ڱCgg6 } .CJMWginqv\ ww=<ww l<C4]JM `PK lC>'org/openqa/selenium/io/.svn/all-wcpropsK 25 svn:wc:ra_dav:version-url V 64 /svn/!svn/ver/11226/trunk/java/client/src/org/openqa/selenium/io END Zip.java K 25 svn:wc:ra_dav:version-url V 73 /svn/!svn/ver/11226/trunk/java/client/src/org/openqa/selenium/io/Zip.java END Cleanly.java K 25 svn:wc:ra_dav:version-url V 77 /svn/!svn/ver/11226/trunk/java/client/src/org/openqa/selenium/io/Cleanly.java END TemporaryFilesystem.java K 25 svn:wc:ra_dav:version-url V 89 /svn/!svn/ver/11226/trunk/java/client/src/org/openqa/selenium/io/TemporaryFilesystem.java END IOUtils.java K 25 svn:wc:ra_dav:version-url V 77 /svn/!svn/ver/11226/trunk/java/client/src/org/openqa/selenium/io/IOUtils.java END build.desc K 25 svn:wc:ra_dav:version-url V 75 /svn/!svn/ver/11226/trunk/java/client/src/org/openqa/selenium/io/build.desc END FileHandler.java K 25 svn:wc:ra_dav:version-url V 81 /svn/!svn/ver/11226/trunk/java/client/src/org/openqa/selenium/io/FileHandler.java END PK lC>sdcPP#org/openqa/selenium/io/.svn/entries8 dir 11264 http://selenium.googlecode.com/svn/trunk/java/client/src/org/openqa/selenium/io http://selenium.googlecode.com/svn 2011-02-01T13:59:17.176547Z 11226 simon.m.stewart svn:special svn:externals svn:needs-lock 07704840-8298-11de-bf8c-fd130f914ac9 Zip.java file 2011-02-03T12:01:18.000000Z 721eaf6840cea90a4cd5d03c3a007254 2011-01-17T21:50:09.122540Z 10988 simon.m.stewart Cleanly.java file 2011-02-03T12:01:18.000000Z 3c049656144a29510db036103666454b 2011-01-17T21:34:15.974455Z 10986 simon.m.stewart TemporaryFilesystem.java file 2011-02-03T12:01:18.000000Z 3aa90230bdef1601fba79a7dcf8ef9c4 2011-01-17T21:50:09.122540Z 10988 simon.m.stewart IOUtils.java file 2011-02-03T12:01:18.000000Z c310e8ee74c3bf182b14d8ee623fab4f 2011-01-17T21:36:55.733251Z 10987 simon.m.stewart has-props build.desc file 2011-02-03T12:01:18.000000Z a8f76323bba9e65b3362803f116daea6 2011-02-01T13:59:17.176547Z 11226 simon.m.stewart FileHandler.java file 2011-02-03T12:01:18.000000Z c90f21c9496bb08571e8dfc94e9330c6 2011-01-17T21:50:09.122540Z 10988 simon.m.stewart PK lC>G"org/openqa/selenium/io/.svn/format8 PK lC>H33;org/openqa/selenium/io/.svn/prop-base/IOUtils.java.svn-baseK 13 svn:mergeinfo V 277 /selenium-core/trunk/common/src/java/org/openqa/selenium/internal/IOUtils.java:7680-7758 /webdriver/branches/wire2/common/src/java/org/openqa/selenium/internal/IOUtils.java:7892-8059 /webdriver/trunk/common/src/java/org/openqa/selenium/internal/IOUtils.java:7685-7747,7749-7804 END PK lC>u;org/openqa/selenium/io/.svn/text-base/Cleanly.java.svn-base/* Copyright 2007-2009 WebDriver committers Copyright 2007-2009 Google Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package org.openqa.selenium.io; import java.io.IOException; import java.io.InputStream; import java.io.OutputStream; import java.io.Reader; import java.io.Writer; import java.nio.channels.Channel; public class Cleanly { public static void close(Channel toClose) { if (toClose == null) return; try { toClose.close(); } catch (IOException e) { // nothing that cna done. Ignoring. } } public static void close(InputStream toClose) { if (toClose == null) return; try { toClose.close(); } catch (IOException e) { // nothing that can done. Ignoring. } } public static void close(OutputStream toClose) { if (toClose == null) return; try { toClose.close(); } catch (IOException e) { // nothing that can done. Ignoring. } } public static void close(Reader reader) { if (reader == null) return; try { reader.close(); } catch (IOException e) { // nothing that can done. Ignoring. } } public static void close(Writer reader) { if (reader == null) return; try { reader.close(); } catch (IOException e) { // nothing that can done. Ignoring. } } } PK lC>?7?org/openqa/selenium/io/.svn/text-base/FileHandler.java.svn-base/* Copyright 2007-2009 WebDriver committers Copyright 2007-2009 Google Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ // Copyright 2008 Google Inc. All Rights Reserved. package org.openqa.selenium.io; import java.io.BufferedReader; import java.io.File; import java.io.FileInputStream; import java.io.FileOutputStream; import java.io.FileReader; import java.io.IOException; import java.io.InputStream; import java.io.Reader; import java.lang.reflect.InvocationTargetException; import java.lang.reflect.Method; import java.nio.channels.FileChannel; import org.openqa.selenium.WebDriverException; /** * Utility methods for common filesystem activities */ public class FileHandler { private static final Method JDK6_SETWRITABLE = findJdk6SetWritableMethod(); private static final File CHMOD_SETWRITABLE = findChmodCommand(); // TODO(simon): Move to using Zip class public static File unzip(InputStream resource) throws IOException { File output = TemporaryFilesystem.createTempDir("unzip", "stream"); new Zip().unzip(resource, output); return output; } public static void copyResource(File outputDir, Class forClassLoader, String... names) throws IOException { Zip zip = new Zip(); for (String name : names) { InputStream is = locateResource(forClassLoader, name); try { zip.unzipFile(outputDir, is, name); } finally { Cleanly.close(is); } } } private static InputStream locateResource(Class forClassLoader, String name) throws IOException { String arch = System.getProperty("os.arch").toLowerCase() + "/"; String[] alternatives = {name, "/" + name, arch + name, "/" + arch + name}; // First look using our own classloader for (String possibility : alternatives) { InputStream stream = FileHandler.class.getResourceAsStream(possibility); if (stream != null) { return stream; } stream = forClassLoader.getResourceAsStream(possibility); if (stream != null) { return stream; } } throw new IOException("Unable to locate: " + name); } public static boolean createDir(File dir) throws IOException { if ((dir.exists() || dir.mkdirs()) && dir.canWrite()) return true; if (dir.exists()) { FileHandler.makeWritable(dir); return dir.canWrite(); } // Iterate through the parent directories until we find that exists, // then sink down. return createDir(dir.getParentFile()); } public static boolean makeWritable(File file) throws IOException { if (file.canWrite()) { return true; } if (JDK6_SETWRITABLE != null) { try { return (Boolean) JDK6_SETWRITABLE.invoke(file, true); } catch (IllegalAccessException e) { // Do nothing. We return false in the end } catch (InvocationTargetException e) { // Do nothing. We return false in the end } } else if (CHMOD_SETWRITABLE != null) { try { Process process = Runtime.getRuntime().exec( new String[]{CHMOD_SETWRITABLE.getAbsolutePath(), "+x", file.getAbsolutePath()}); process.waitFor(); return file.canWrite(); } catch (InterruptedException e1) { throw new WebDriverException(e1); } } return false; } public static boolean isZipped(String fileName) { return fileName.endsWith(".zip") || fileName.endsWith(".xpi"); } public static boolean delete(File toDelete) { boolean deleted = true; if (toDelete.isDirectory()) { for (File child : toDelete.listFiles()) { deleted &= child.canWrite() && delete(child); } } return deleted && toDelete.canWrite() && toDelete.delete(); } public static void copy(File from, File to) throws IOException { copy(from, to, new NoFilter()); } public static void copy(File source, File dest, String suffix) throws IOException { copy(source, dest, suffix == null ? new NoFilter() : new FileSuffixFilter(suffix)); } private static void copy(File source, File dest, Filter onlyCopy) throws IOException { if (!source.exists()) { return; } if (source.isDirectory()) { copyDir(source, dest, onlyCopy); } else { copyFile(source, dest, onlyCopy); } } private static void copyDir(File from, File to, Filter onlyCopy) throws IOException { if (!onlyCopy.isRequired(from)) { return; } // Create the target directory. createDir(to); // List children. String[] children = from.list(); for (String child : children) { if (!".parentlock".equals(child) && !"parent.lock".equals(child)) { copy(new File(from, child), new File(to, child), onlyCopy); } } } private static void copyFile(File from, File to, Filter onlyCopy) throws IOException{ if (!onlyCopy.isRequired(from)) { return; } FileChannel out = null; FileChannel in = null; try { in = new FileInputStream(from).getChannel(); out = new FileOutputStream(to).getChannel(); final long length = in.size(); final long copied = in.transferTo(0, in.size(), out); if (copied != length) { throw new IOException("Could not transfer all bytes."); } } finally { Cleanly.close(out); Cleanly.close(in); } } /** * File.setWritable appears in Java 6. If we find the method, * we can use it */ private static Method findJdk6SetWritableMethod() { try { return File.class.getMethod("setWritable", Boolean.class); } catch (NoSuchMethodException e) { return null; } } /** * In JDK5 and earlier, we have to use a chmod command from the path. */ private static File findChmodCommand() { // Search the path for chmod String allPaths = System.getenv("PATH"); String[] paths = allPaths.split(File.pathSeparator); for (String path : paths) { File chmod = new File(path, "chmod"); if (chmod.exists()) { return chmod; } } return null; } /** * Used by file operations to determine whether or not to make use of a file. */ public interface Filter { /** * @param file File to be considered. * @return Whether or not to make use of the file in this oprtation. */ boolean isRequired(File file); } private static class FileSuffixFilter implements Filter { private final String suffix; public FileSuffixFilter(String suffix) { this.suffix = suffix; } public boolean isRequired(File file) { return file.isDirectory() || file.getAbsolutePath().endsWith(suffix); } } private static class NoFilter implements Filter { public boolean isRequired(File file) { return true; } } public static String readAsString(File toRead) throws IOException { Reader reader = null; try { reader = new BufferedReader(new FileReader(toRead)); StringBuilder builder = new StringBuilder(); char[] buffer = new char[4096]; int read; while ((read = reader.read(buffer)) != -1) { char[] target = new char[read]; System.arraycopy(buffer, 0, target, 0, read); builder.append(target); } return builder.toString(); } finally { Cleanly.close(reader); } } } PK lC>R;org/openqa/selenium/io/.svn/text-base/IOUtils.java.svn-basepackage org.openqa.selenium.io; import java.io.IOException; import java.io.InputStream; public class IOUtils { private static final int BUFFER = 4096; public static String readFully(InputStream in) throws IOException { StringBuilder sb = new StringBuilder(); byte[] buffer = new byte[BUFFER]; int length; while ((length = in.read(buffer)) != -1) { sb.append(new String(buffer, 0, length, "UTF-8")); } in.close(); return sb.toString(); } } PK lC>rXE  Gorg/openqa/selenium/io/.svn/text-base/TemporaryFilesystem.java.svn-base/* Copyright 2007-2009 WebDriver committers Copyright 2007-2009 Google Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package org.openqa.selenium.io; import org.openqa.selenium.WebDriverException; import java.io.File; import java.io.IOException; import java.util.Set; import java.util.concurrent.CopyOnWriteArraySet; /** * A wrapper around temporary filesystem behaviour. * * @author gblock@google.com (Gregory Block) */ public class TemporaryFilesystem { private static final Set temporaryFiles = new CopyOnWriteArraySet(); private static final File baseDir = new File(System.getProperty("java.io.tmpdir")); private static final Thread shutdownHook = new Thread() { @Override public void run() { deleteTemporaryFiles(); } }; /** * Add the static initialization hook; verify java.io.tmpdir is writable. */ static { Runtime.getRuntime().addShutdownHook(shutdownHook); if (!baseDir.exists()) { throw new WebDriverException("Unable to find tmp dir: " + baseDir.getAbsolutePath()); } if (!baseDir.canWrite()) { throw new WebDriverException("Unable to write to tmp dir: " + baseDir.getAbsolutePath()); } } private TemporaryFilesystem() { // Static utility class, no public constructor. } /** * Create a temporary directory, and track it for deletion. * * @param prefix the prefix to use when creating the temporary directory * @param suffix the suffix to use when creating the temporary directory * @return the temporary directory to create */ public static File createTempDir(String prefix, String suffix) { try { // Create a tempfile, and delete it. File file = File.createTempFile(prefix, suffix, baseDir); file.delete(); // Create it as a directory. File dir = new File(file.getAbsolutePath()); if (dir == null || !dir.mkdirs()) { throw new WebDriverException("Cannot create profile directory at " + dir.getAbsolutePath()); } // Create the directory and mark it writable. FileHandler.createDir(dir); temporaryFiles.add(dir); return dir; } catch (IOException e) { throw new WebDriverException( "Unable to create temporary file at " + baseDir.getAbsolutePath()); } } /** * Delete a temporary directory that we were responsible for creating. * * @param file the file to delete * @throws WebDriverException if interrupted */ public static void deleteTempDir(File file) { if (!shouldReap()) { return; } // If the tempfile can be removed, delete it. If not, it wasn't created by us. if (temporaryFiles.remove(file)) { FileHandler.delete(file); } } /** * Perform the operation that a shutdown hook would have. */ public static void deleteTemporaryFiles() { if (!shouldReap()) { return; } for (File file : temporaryFiles) { try { FileHandler.delete(file); } catch (WebDriverException e) { // ignore; an interrupt will already have been logged. } } } /** * Returns true if we should be reaping profiles. Used to control tempfile deletion. * * @return true if reaping is enabled. */ static boolean shouldReap() { String reap = System.getProperty("webdriver.reap_profile", "true"); return Boolean.valueOf(reap); } } PK lC>XQU7org/openqa/selenium/io/.svn/text-base/Zip.java.svn-basepackage org.openqa.selenium.io; import org.openqa.selenium.internal.Base64Encoder; import org.openqa.selenium.io.Cleanly; import org.openqa.selenium.io.FileHandler; import java.io.BufferedOutputStream; import java.io.ByteArrayInputStream; import java.io.ByteArrayOutputStream; import java.io.File; import java.io.FileInputStream; import java.io.FileOutputStream; import java.io.IOException; import java.io.InputStream; import java.io.OutputStream; import java.util.zip.ZipEntry; import java.util.zip.ZipInputStream; import java.util.zip.ZipOutputStream; public class Zip { private static final int BUF_SIZE = 16384; // "big" public void zip(File inputDir, File output) throws IOException { if (output.exists()) { throw new IOException("File already exists: " + output); } FileOutputStream fos = null; try { fos = new FileOutputStream(output); zip(inputDir, fos); } finally { Cleanly.close(fos); } } public String zip(File inputDir) throws IOException { ByteArrayOutputStream bos = new ByteArrayOutputStream(); try { zip(inputDir, bos); return new Base64Encoder().encode(bos.toByteArray()); } finally { Cleanly.close(bos); } } private void zip(File inputDir, OutputStream writeTo) throws IOException { ZipOutputStream zos = null; try { zos = new ZipOutputStream(writeTo); addToZip(inputDir.getAbsolutePath(), zos, inputDir); } finally { Cleanly.close(zos); } } private void addToZip(String basePath, ZipOutputStream zos, File toAdd) throws IOException { if (toAdd.isDirectory()) { for (File file : toAdd.listFiles()) { addToZip(basePath, zos, file); } } else { FileInputStream fis = new FileInputStream(toAdd); String name = toAdd.getAbsolutePath().substring(basePath.length() + 1); ZipEntry entry = new ZipEntry(name); zos.putNextEntry(entry); int len; byte[] buffer = new byte[4096]; while ((len = fis.read(buffer)) != -1) { zos.write(buffer, 0, len); } fis.close(); zos.closeEntry(); } } public void unzip(String source, File outputDir) throws IOException { byte[] bytes = new Base64Encoder().decode(source); ByteArrayInputStream bis = null; try { bis = new ByteArrayInputStream(bytes); unzip(bis, outputDir); } finally { Cleanly.close(bis); } } public void unzip(File source, File outputDir) throws IOException { FileInputStream fis = null; try { fis = new FileInputStream(source); unzip(fis, outputDir); } finally { Cleanly.close(fis); } } public void unzip(InputStream source, File outputDir) throws IOException { ZipInputStream zis = new ZipInputStream(source); try { ZipEntry entry; while ((entry = zis.getNextEntry()) != null) { File file = new File(outputDir, entry.getName()); if (entry.isDirectory()) { FileHandler.createDir(file); continue; } unzipFile(outputDir, zis, entry.getName()); } } finally { Cleanly.close(zis); } } public void unzipFile(File output, InputStream zipStream, String name) throws IOException { File toWrite = new File(output, name); if (!FileHandler.createDir(toWrite.getParentFile())) throw new IOException("Cannot create parent director for: " + name); OutputStream out = new BufferedOutputStream(new FileOutputStream(toWrite), BUF_SIZE); try { byte[] buffer = new byte[BUF_SIZE]; int read; while ((read = zipStream.read(buffer)) != -1) { out.write(buffer, 0, read); } } finally { out.close(); } } } PK lC>ɳ"9org/openqa/selenium/io/.svn/text-base/build.desc.svn-base java_library(name = "io", srcs = [ "*.java" ], deps = [ "//java/client/src/org/openqa/selenium:base", "//java/client/src/org/openqa/selenium/internal:codecs", ]) PK )hC>ɳ"!org/openqa/selenium/io/build.desc java_library(name = "io", srcs = [ "*.java" ], deps = [ "//java/client/src/org/openqa/selenium:base", "//java/client/src/org/openqa/selenium/internal:codecs", ]) PK %^D>gqB4org/openqa/selenium/ie/InternetExplorerElement.class1B.org/openqa/selenium/ie/InternetExplorerElement3org/openqa/selenium/remote/RenderedRemoteWebElement&org/openqa/selenium/RenderedWebElement2(Lorg/openqa/selenium/ie/InternetExplorerDriver;)VCode   ()V   setParent/(Lorg/openqa/selenium/remote/RemoteWebDriver;)VLineNumberTableLocalVariableTablethis0Lorg/openqa/selenium/ie/InternetExplorerElement;parent/Lorg/openqa/selenium/ie/InternetExplorerDriver; findElementF(Ljava/lang/String;Ljava/lang/String;)Lorg/openqa/selenium/WebElement;findChildElementid  Ljava/lang/String;!using#value %'&&com/google/common/collect/ImmutableMap ()of(Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;)Lcom/google/common/collect/ImmutableMap; + ,-executeH(Ljava/lang/String;Ljava/util/Map;)Lorg/openqa/selenium/remote/Response; /10#org/openqa/selenium/remote/Response 23getValue()Ljava/lang/Object;5org/openqa/selenium/WebElementresponse%Lorg/openqa/selenium/remote/Response; findElements6(Ljava/lang/String;Ljava/lang/String;)Ljava/util/List; SignatureX(Ljava/lang/String;Ljava/lang/String;)Ljava/util/List;=findChildElements?java/util/List SourceFileInternetExplorerElement.java! F * *+ #$ %   r** +",$*N-.4()(**!#6789:; r*<* +",$*N-.>/0/1*!#67@APK %^D>cp5org/openqa/selenium/ie/InternetExplorerKeyboard.class1,/org/openqa/selenium/ie/InternetExplorerKeyboardjava/lang/Objectorg/openqa/selenium/Keyboarderrors)Lorg/openqa/selenium/remote/ErrorHandler;()VCode  'org/openqa/selenium/remote/ErrorHandler   LineNumberTableLocalVariableTablethis1Lorg/openqa/selenium/ie/InternetExplorerKeyboard; getActive2()Lorg/openqa/selenium/ie/InternetExplorerElement;sendKeys([Ljava/lang/CharSequence;)V keysToSend[Ljava/lang/CharSequence;pressKey(Lorg/openqa/selenium/Keys;)V keyToPressLorg/openqa/selenium/Keys; releaseKey keyToRelease*(Lcom/sun/jna/Pointer;Ljava/lang/String;)VelementLcom/sun/jna/Pointer; keysSequenceLjava/lang/String;2(Lcom/sun/jna/Pointer;Lorg/openqa/selenium/Keys;)V modifierKey SourceFileInternetExplorerKeyboard.java!  B* *Y  ,  5  5$ ! 5(" # ?0 $%&'( ?8 $%) !( ?@ $%) *+PK %^D>--5org/openqa/selenium/ie/InternetExplorerDriver$1.class1%/org/openqa/selenium/ie/InternetExplorerDriver$1=org/openqa/selenium/remote/internal/JsonToWebElementConverterthis$0/Lorg/openqa/selenium/ie/InternetExplorerDriver;^(Lorg/openqa/selenium/ie/InternetExplorerDriver;Lorg/openqa/selenium/remote/RemoteWebDriver;)VCode    /(Lorg/openqa/selenium/remote/RemoteWebDriver;)VLineNumberTableLocalVariableTablethis1Lorg/openqa/selenium/ie/InternetExplorerDriver$1; $anonymous0,Lorg/openqa/selenium/remote/RemoteWebDriver;newRemoteWebElement/()Lorg/openqa/selenium/remote/RemoteWebElement;.org/openqa/selenium/ie/InternetExplorerElement  2(Lorg/openqa/selenium/ie/InternetExplorerDriver;)V SourceFileInternetExplorerDriver.javaEnclosingMethod -org/openqa/selenium/ie/InternetExplorerDriver "#setup()V InnerClasses  C *+ *,  U   6 Y* X  !$ PK %^D>,L85org/openqa/selenium/ie/InternetExplorerDriver$2.class1'/org/openqa/selenium/ie/InternetExplorerDriver$2java/lang/Threadthis$0/Lorg/openqa/selenium/ie/InternetExplorerDriver;2(Lorg/openqa/selenium/ie/InternetExplorerDriver;)VCode    ()VLineNumberTableLocalVariableTablethis1Lorg/openqa/selenium/ie/InternetExplorerDriver$2;run -org/openqa/selenium/ie/InternetExplorerDriver access$0k(Lorg/openqa/selenium/ie/InternetExplorerDriver;)Lorg/openqa/selenium/browserlaunchers/WindowsProxyManager; 8org/openqa/selenium/browserlaunchers/WindowsProxyManager restoreRegistrySettings(Z)V SourceFileInternetExplorerDriver.javaEnclosingMethod $% prepareProxy%(Lorg/openqa/selenium/Capabilities;)V InnerClasses  8 *+ *     : *      !"#& PK %^D>Yb<org/openqa/selenium/ie/InternetExplorerDriver$IEServer.class16org/openqa/selenium/ie/InternetExplorerDriver$IEServerjava/lang/Object com/sun/jna/win32/StdCallLibrary StartServer(I)Lcom/sun/jna/Pointer; StopServer(Lcom/sun/jna/Pointer;)V SourceFileInternetExplorerDriver.java InnerClasses-org/openqa/selenium/ie/InternetExplorerDriverIEServer    PK %^D>>3org/openqa/selenium/ie/InternetExplorerDriver.class1-org/openqa/selenium/ie/InternetExplorerDriver*org/openqa/selenium/remote/RemoteWebDriver#org/openqa/selenium/TakesScreenshotserverLcom/sun/jna/Pointer;lib8Lorg/openqa/selenium/ie/InternetExplorerDriver$IEServer;portI proxyManager:Lorg/openqa/selenium/browserlaunchers/WindowsProxyManager;()VCode    setupLineNumberTableLocalVariableTablethis/Lorg/openqa/selenium/ie/InternetExplorerDriver;%(Lorg/openqa/selenium/Capabilities;)V  assertOnWindows 8org/openqa/selenium/browserlaunchers/WindowsProxyManager" webdriver-ie $ %(ZLjava/lang/String;II)V '  ) * prepareProxy capabilities"Lorg/openqa/selenium/Capabilities;(I)V / getScreenshotAs4(Lorg/openqa/selenium/OutputType;)Ljava/lang/Object; Signature@(Lorg/openqa/selenium/OutputType;)TX;5 screenshot 7 89execute9(Ljava/lang/String;)Lorg/openqa/selenium/remote/Response; ;=<#org/openqa/selenium/remote/Response >?getValue()Ljava/lang/Object; ACBjava/lang/Object DEtoString()Ljava/lang/String; GIHorg/openqa/selenium/OutputType JKconvertFromBase64Png&(Ljava/lang/String;)Ljava/lang/Object;target Lorg/openqa/selenium/OutputType;base64Ljava/lang/String;LocalVariableTypeTable%Lorg/openqa/selenium/OutputType; SUTorg/openqa/selenium/Platform VW getCurrent ()Lorg/openqa/selenium/Platform; SY Z[WINDOWSLorg/openqa/selenium/Platform; S] ^_is!(Lorg/openqa/selenium/Platform;)Za&org/openqa/selenium/WebDriverExceptionc@You appear to be running %s. The IE driver only runs on Windows. egfjava/lang/String hiformat9(Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/String; `k l(Ljava/lang/String;)Vcurrent oqp"org/openqa/selenium/net/PortProber rs findFreePort()I u v startClientx.org/openqa/selenium/remote/HttpCommandExecutor z {| getServerUrl(I)Ljava/net/URL; w~ (Ljava/net/URL;)V  setCommandExecutor/(Lorg/openqa/selenium/remote/CommandExecutor;)V/org/openqa/selenium/ie/InternetExplorerDriver$1 ^(Lorg/openqa/selenium/ie/InternetExplorerDriver;Lorg/openqa/selenium/remote/RemoteWebDriver;)V  setElementConverterB(Lorg/openqa/selenium/remote/internal/JsonToWebElementConverter;)V .org/openqa/selenium/remote/DesiredCapabilities internetExplorer2()Lorg/openqa/selenium/remote/DesiredCapabilities;   startSession   initializeLib  6org/openqa/selenium/ie/InternetExplorerDriver$IEServer  StartServer(I)Lcom/sun/jna/Pointer;   stopClient  StopServer(Lcom/sun/jna/Pointer;)V java/net/URLjava/lang/StringBuilderhttp://localhost: k append(I)Ljava/lang/StringBuilder; C k ` (Ljava/lang/Throwable;)Vjava/net/MalformedURLExceptione Ljava/net/MalformedURLException; webdriverlibs *org/openqa/selenium/io/TemporaryFilesystem  createTempDir4(Ljava/lang/String;Ljava/lang/String;)Ljava/io/File; A getClass()Ljava/lang/Class; IEDriver.dll "org/openqa/selenium/io/FileHandler  copyResource5(Ljava/io/File;Ljava/lang/Class;[Ljava/lang/String;)Vwebdriver.development java/lang/Boolean  getBoolean(Ljava/lang/String;)Zos.arch java/lang/System  getProperty8(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;64 e contains(Ljava/lang/CharSequence;)Zx64Win32java/util/ArrayList  build\cpp\ -(Ljava/lang/String;)Ljava/lang/StringBuilder;\Debug java/util/List add(Ljava/lang/Object;)Z ..\build\cpp\..\..\build\cpp\  iterator()Ljava/util/Iterator;  java/util/Iterator  ?next  java/io/File   '(Ljava/lang/String;Ljava/lang/String;)V   exists()Z   #(Ljava/io/File;Ljava/lang/String;)V  copy(Ljava/io/File;Ljava/io/File;)V  hasNextCouldn't find IEDriver.dll: !jna.library.path e# $%valueOf&(Ljava/lang/Object;)Ljava/lang/String;  ' (O pathSeparator * +-(Ljava/lang/Object;)Ljava/lang/StringBuilder; - . setProperty0IEDriver 243com/sun/jna/Native 56 loadLibrary7(Ljava/lang/String;Ljava/lang/Class;)Ljava/lang/Object; 8 9:outLjava/io/PrintStream;<"new File(".").getAbsolutePath() = >.  k  A BEgetAbsolutePath DFEjava/io/PrintStream GlprintlnIjava/io/IOExceptionKjava/lang/UnsatisfiedLinkError parentDirLjava/io/File;ioeLjava/io/IOException;arch sourcePathsLjava/util/List;copiedZpath sourceFileioe2 Ljava/lang/UnsatisfiedLinkError;$Ljava/util/List;[proxy ]_^ org/openqa/selenium/Capabilities `K getCapability b cbackupRegistrySettings e fchangeRegistrySettingsh/org/openqa/selenium/ie/InternetExplorerDriver$2 gj k2(Lorg/openqa/selenium/ie/InternetExplorerDriver;)V monjava/lang/Runtime pq getRuntime()Ljava/lang/Runtime; ms tuaddShutdownHook(Ljava/lang/Thread;)Vcaps cleanupThreadLjava/lang/Thread;access$0k(Lorg/openqa/selenium/ie/InternetExplorerDriver;)Lorg/openqa/selenium/browserlaunchers/WindowsProxyManager; SourceFileInternetExplorerDriver.java InnerClassesIEServer!    ; **/01  j"***Y!#&*+(*34678!9""+,-N**.*;< = > 0123i*46:@M+,F B D LM NOP LQl$RL+X\`YbAY+SdjHIJKJ#M$ m[{9*. *n.*t*wY*.y}*Y***PQST$U1[8\ 9vH****._`a G***deg  {|f"YYL`Y+klm"   *YL*+ñM,*eYŞ NҸԙܸ:Y:YWYWYW6:9e: Yʷ :    Y,ʷ6 2`YYj`Y-:`Y Y ܸ޸"&,),W*/10N7Y; Y=?@C`Y-+ç+ÿ'*H+&&HXgjJ .rs twxwz*{+}3~:I~KTr&(25GQTXjkxrf LM+NOKPOTQRkST*UOVM ( WOk,XP TQY*>++Z\*&a*&+d M`Y,gY*iMl,r #H& #$-6=*>>v,$ O6wxyz%*&-{|}g~ PK lC>]g'org/openqa/selenium/ie/.svn/all-wcpropsK 25 svn:wc:ra_dav:version-url V 64 /svn/!svn/ver/11261/trunk/java/client/src/org/openqa/selenium/ie END InternetExplorerElement.java K 25 svn:wc:ra_dav:version-url V 93 /svn/!svn/ver/11222/trunk/java/client/src/org/openqa/selenium/ie/InternetExplorerElement.java END InternetExplorerDriver.java K 25 svn:wc:ra_dav:version-url V 92 /svn/!svn/ver/11222/trunk/java/client/src/org/openqa/selenium/ie/InternetExplorerDriver.java END InternetExplorerKeyboard.java K 25 svn:wc:ra_dav:version-url V 94 /svn/!svn/ver/11222/trunk/java/client/src/org/openqa/selenium/ie/InternetExplorerKeyboard.java END build.desc K 25 svn:wc:ra_dav:version-url V 75 /svn/!svn/ver/11261/trunk/java/client/src/org/openqa/selenium/ie/build.desc END PK lC>)Ǘ5``#org/openqa/selenium/ie/.svn/entries8 dir 11264 http://selenium.googlecode.com/svn/trunk/java/client/src/org/openqa/selenium/ie http://selenium.googlecode.com/svn 2011-02-02T20:36:39.437809Z 11261 simon.m.stewart svn:special svn:externals svn:needs-lock 07704840-8298-11de-bf8c-fd130f914ac9 InternetExplorerElement.java file 2011-02-03T12:01:17.000000Z 26817edd21d7e6affdef011cbec7c83c 2011-01-18T16:04:46.488656Z 11008 eran.mes@gmail.com InternetExplorerDriver.java file 2011-02-03T12:01:17.000000Z fa3bb2f2db3c6de4a902079586a7825e 2011-01-28T15:50:11.505837Z 11176 simon.m.stewart InternetExplorerKeyboard.java file 2011-02-03T12:01:17.000000Z 55252ff5dd5ba852beef928dfa380838 2010-12-20T12:45:23.525077Z 10688 james.h.evans.jr build.desc file 2011-02-03T12:01:17.000000Z 593d68210cd075949764e068b1bb4f94 2011-02-02T20:36:39.437809Z 11261 simon.m.stewart PK lC>G"org/openqa/selenium/ie/.svn/format8 PK lC>Mh4Jorg/openqa/selenium/ie/.svn/text-base/InternetExplorerDriver.java.svn-base/* Copyright 2007-2010 WebDriver committers Copyright 2007-2010 Google Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package org.openqa.selenium.ie; import static org.openqa.selenium.browserlaunchers.CapabilityType.PROXY; import java.io.File; import java.io.IOException; import java.net.MalformedURLException; import java.net.URL; import java.util.ArrayList; import java.util.List; import org.openqa.selenium.*; import org.openqa.selenium.browserlaunchers.WindowsProxyManager; import org.openqa.selenium.io.FileHandler; import org.openqa.selenium.net.PortProber; import org.openqa.selenium.io.TemporaryFilesystem; import org.openqa.selenium.remote.*; import org.openqa.selenium.remote.internal.JsonToWebElementConverter; import com.sun.jna.Native; import com.sun.jna.Pointer; import com.sun.jna.win32.StdCallLibrary; public class InternetExplorerDriver extends RemoteWebDriver implements TakesScreenshot { private Pointer server; private IEServer lib; private int port; private WindowsProxyManager proxyManager; public InternetExplorerDriver() { setup(); } public InternetExplorerDriver(Capabilities capabilities) { assertOnWindows(); proxyManager = new WindowsProxyManager(true, "webdriver-ie", 0, 0); prepareProxy(capabilities); setup(); } public InternetExplorerDriver(int port) { this.port = port; setup(); } public X getScreenshotAs(OutputType target) { // Get the screenshot as base64. String base64 = execute(DriverCommand.SCREENSHOT).getValue().toString(); // ... and convert it. return target.convertFromBase64Png(base64); } protected void assertOnWindows() { Platform current = Platform.getCurrent(); if (!current.is(Platform.WINDOWS)) { throw new WebDriverException( String.format("You appear to be running %s. The IE driver only runs on Windows.", current)); } } private void setup() { if (port == 0) { port = PortProber.findFreePort(); } startClient(); setCommandExecutor(new HttpCommandExecutor(getServerUrl(port))); setElementConverter(new JsonToWebElementConverter(this) { @Override protected RemoteWebElement newRemoteWebElement() { return new InternetExplorerElement(InternetExplorerDriver.this); } }); startSession(DesiredCapabilities.internetExplorer()); } protected void startClient() { initializeLib(); server = lib.StartServer(port); } protected void stopClient() { if (server != null) { lib.StopServer(server); } } private static URL getServerUrl(int port) { try { return new URL("http://localhost:" + port); } catch (MalformedURLException e) { throw new WebDriverException(e); } } private void initializeLib() { synchronized (this) { if (lib != null) { return; } File parentDir = TemporaryFilesystem.createTempDir("webdriver", "libs"); try { FileHandler.copyResource(parentDir, getClass(), "IEDriver.dll"); } catch (IOException ioe) { try { if (Boolean.getBoolean("webdriver.development")) { String arch = System.getProperty("os.arch", "") .contains("64") ? "x64" : "Win32"; List sourcePaths = new ArrayList(); sourcePaths.add("build\\cpp\\" + arch + "\\Debug"); sourcePaths.add("..\\build\\cpp\\" + arch + "\\Debug"); sourcePaths.add("..\\..\\build\\cpp\\" + arch + "\\Debug"); boolean copied = false; for (String path : sourcePaths) { File sourceFile = new File(path, "IEDriver.dll"); if (sourceFile.exists()) { FileHandler.copy(sourceFile, new File( parentDir, "IEDriver.dll")); copied = true; break; } } if (!copied) { throw new WebDriverException( "Couldn't find IEDriver.dll: " + arch); } } else { throw new WebDriverException(ioe); } } catch (IOException ioe2) { throw new WebDriverException(ioe2); } } System.setProperty("jna.library.path", System.getProperty("jna.library.path", "") + File.pathSeparator + parentDir); try { lib = (IEServer) Native.loadLibrary("IEDriver", IEServer.class); } catch (UnsatisfiedLinkError e) { System.out.println("new File(\".\").getAbsolutePath() = " + new File(".").getAbsolutePath()); throw new WebDriverException(e); } } } private void prepareProxy(Capabilities caps) { if (caps == null || caps.getCapability(PROXY) == null) { return; } // Because of the way that the proxying is currently implemented, // we can only set a single host. try { proxyManager.backupRegistrySettings(); proxyManager.changeRegistrySettings(caps); } catch (IOException e) { throw new WebDriverException(e); } Thread cleanupThread = new Thread() { @Override public void run() { proxyManager.restoreRegistrySettings(true); } }; Runtime.getRuntime().addShutdownHook(cleanupThread); } private interface IEServer extends StdCallLibrary { Pointer StartServer(int port); void StopServer(Pointer server); } } PK lC>泀XddKorg/openqa/selenium/ie/.svn/text-base/InternetExplorerElement.java.svn-base/* Copyright 2007-2010 WebDriver committers Copyright 2007-2010 Google Inc. Portions copyright 2007 ThoughtWorks, Inc Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package org.openqa.selenium.ie; import java.util.List; import java.util.Map; import org.openqa.selenium.Point; import org.openqa.selenium.RenderedWebElement; import org.openqa.selenium.WebElement; import org.openqa.selenium.internal.Locatable; import org.openqa.selenium.remote.DriverCommand; import org.openqa.selenium.remote.RenderedRemoteWebElement; import org.openqa.selenium.remote.Response; import com.google.common.collect.ImmutableMap; public class InternetExplorerElement extends RenderedRemoteWebElement implements RenderedWebElement { public InternetExplorerElement(InternetExplorerDriver parent) { setParent(parent); } protected WebElement findElement(String using, String value) { Response response = execute(DriverCommand.FIND_CHILD_ELEMENT, ImmutableMap.of("id", id, "using", using, "value", value)); return (WebElement) response.getValue(); } @SuppressWarnings("unchecked") protected List findElements(String using, String value) { Response response = execute(DriverCommand.FIND_CHILD_ELEMENTS, ImmutableMap.of("id", id, "using", using, "value", value)); return (List) response.getValue(); } } PK lC>v~~Lorg/openqa/selenium/ie/.svn/text-base/InternetExplorerKeyboard.java.svn-base// Copyright 2010 Google Inc. All Rights Reserved. package org.openqa.selenium.ie; import com.sun.jna.Pointer; import com.sun.jna.WString; import org.openqa.selenium.Keyboard; import org.openqa.selenium.Keys; import org.openqa.selenium.remote.ErrorHandler; /** * Implements the Keyboard interface for IE by calling the underlying * IE lib. */ public class InternetExplorerKeyboard implements Keyboard { // private final InternetExplorerDriver parent; //private final ExportedWebDriverFunctions lib; private final ErrorHandler errors = new ErrorHandler(); // public InternetExplorerKeyboard(InternetExplorerDriver parent, ExportedWebDriverFunctions ieLib) { // this.parent = parent; // this.lib = ieLib; // } private InternetExplorerElement getActive() { // return (InternetExplorerElement) parent.switchTo().activeElement(); return null; } public void sendKeys(CharSequence... keysToSend) { // getActive().sendKeys(keysToSend); } public void pressKey(Keys keyToPress) { // getActive().sendKeyDownEvent(keyToPress); } public void releaseKey(Keys keyToRelease) { // getActive().sendKeyUpEvent(keyToRelease); } public void sendKeys(Pointer element, String keysSequence) { // int result = lib.wdeSendKeys(element, new WString(keysSequence)); // errors.verifyErrorCode(result, "send keys to"); // // parent.waitForLoadToComplete(); } public void pressKey(Pointer element, Keys modifierKey) { // int result = lib.wdeSendKeyPress(element, new WString(modifierKey.toString())); // // errors.verifyErrorCode(result, "send key press to"); // // parent.waitForLoadToComplete(); } public void releaseKey(Pointer element, Keys modifierKey) { // int result = lib.wdeSendKeyRelease(element, new WString(modifierKey.toString())); // // errors.verifyErrorCode(result, "send key release to"); // // parent.waitForLoadToComplete(); } } PK lC>\t  9org/openqa/selenium/ie/.svn/text-base/build.desc.svn-base java_library(name = "ie", srcs = [ "*.java" ], resources = [ {"//cpp:ie_win32_dll" : "x86/IEDriver.dll"}, {"//cpp:ie_x64_dll" : "amd64/IEDriver.dll"} ], deps = [ ":ie_result_type_java", "//cpp:sizzle", "//java/client/src/org/openqa/selenium/net", "//java/client/src/org/openqa/selenium/remote", "//third_party/java/jna", ]) rake_task(name = "ie_result_type_java", task_name = "ie_result_type_java", out = "javasrc/org/openqa/selenium/ie/IeReturnTypes.java") PK (hC>\t  !org/openqa/selenium/ie/build.desc java_library(name = "ie", srcs = [ "*.java" ], resources = [ {"//cpp:ie_win32_dll" : "x86/IEDriver.dll"}, {"//cpp:ie_x64_dll" : "amd64/IEDriver.dll"} ], deps = [ ":ie_result_type_java", "//cpp:sizzle", "//java/client/src/org/openqa/selenium/net", "//java/client/src/org/openqa/selenium/remote", "//third_party/java/jna", ]) rake_task(name = "ie_result_type_java", task_name = "ie_result_type_java", out = "javasrc/org/openqa/selenium/ie/IeReturnTypes.java") PK %^D>~Un65org/openqa/selenium/htmlunit/InputKeysContainer.class1_/org/openqa/selenium/htmlunit/InputKeysContainerjava/lang/ObjectbuilderLjava/lang/StringBuilder;submitKeyFoundZ capitalize([Ljava/lang/CharSequence;)VCode  (Z[Ljava/lang/CharSequence;)VLineNumberTableLocalVariableTablethis1Lorg/openqa/selenium/htmlunit/InputKeysContainer; sequences[Ljava/lang/CharSequence;  ()Vjava/lang/StringBuilder      ! "#append3(Ljava/lang/CharSequence;)Ljava/lang/StringBuilder; % &'indexOfSubmitKey()I )  + ,'length . /0delete(II)Ljava/lang/StringBuilder;trimPastEnterKeyseqLjava/lang/CharSequence;I6java/lang/CharSequence8 :<;org/openqa/selenium/Keys =>ENTERLorg/openqa/selenium/Keys; :@ A>RETURN CEDjava/lang/String FGvalueOf&(Ljava/lang/Object;)Ljava/lang/String; I JKindexOf(Ljava/lang/String;)I terminators terminatorneedleLjava/lang/String;indextoString()Ljava/lang/String; T QR CV WR toUpperCasetoReturnwasSubmitKeyFound()ZsetCapitalization(Z)V SourceFileInputKeysContainer.java!   ?*+    g**Y*,Y:662N*- W*$>*(***-W.   '0:?MVf 4gg1g' 23?(&4&' L5Y7SY9SY?SL+Y:6>%2M,B:*H6"#$'%-&8'>(A$J,4L6L'M3-NO8 P4QR V*SL*+U+2346XOYZ /*(: [\ >* >? ]^PK %^D>‚Horg/openqa/selenium/htmlunit/AsyncScriptExecutor$AsyncScriptResult.class1jBorg/openqa/selenium/htmlunit/AsyncScriptExecutor$AsyncScriptResultjava/lang/Objectlatch%Ljava/util/concurrent/CountDownLatch;valueLjava/lang/Object; isTimeoutZunloadDetected()VCode  #java/util/concurrent/CountDownLatch  (I)V       LineNumberTableLocalVariableTablethisDLorg/openqa/selenium/htmlunit/AsyncScriptExecutor$AsyncScriptResult; waitForResult()Ljava/lang/Object; Exceptions&java/lang/InterruptedException (*)java/lang/System +,nanoTime()J . / await 132java/util/concurrent/TimeUnit 45 NANOSECONDSLjava/util/concurrent/TimeUnit; 17 89toMillis(J)J;$org/openqa/selenium/TimeoutException=java/lang/StringBuilder?0Timed out waiting for async script result after <A B(Ljava/lang/String;)V <D EFappend(J)Ljava/lang/StringBuilder;Hms <J EK-(Ljava/lang/String;)Ljava/lang/StringBuilder; <M NOtoString()Ljava/lang/String; :AR&org/openqa/selenium/WebDriverExceptionTPDetected a page unload event; executeAsyncScript does not work across page loads QAstartTimeNanosJelapsedTimeNanoselapsedTimeMilliscallback(Ljava/lang/Object;)V ] ^,getCount ` a  countDowntimeoutunload SourceFileAsyncScriptExecutor.java InnerClassesh0org/openqa/selenium/htmlunit/AsyncScriptExecutorAsyncScriptResult!BB B  ^ **Y***  !"#$%U'@*-*0'eB0!67:Y@CGILP* QYSU*6  !%;?FJLP*U !QVW'XW!YWZ[Y*\ *+*_  !b O*\ **_   !c O*\ **_   !def gi PK %^D>~Pͦ6org/openqa/selenium/htmlunit/AsyncScriptExecutor.class1~0org/openqa/selenium/htmlunit/AsyncScriptExecutorjava/lang/Objectpage-Lcom/gargoylesoftware/htmlunit/html/HtmlPage; timeoutMillisJ1(Lcom/gargoylesoftware/htmlunit/html/HtmlPage;J)VCode  ()V    LineNumberTableLocalVariableTablethis2Lorg/openqa/selenium/htmlunit/AsyncScriptExecutor;execute9(Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/Object;Borg/openqa/selenium/htmlunit/AsyncScriptExecutor$AsyncScriptResult   createInjectedScriptFunction(Ljava/lang/String;Lorg/openqa/selenium/htmlunit/AsyncScriptExecutor$AsyncScriptResult;)Lnet/sourceforge/htmlunit/corejs/javascript/Function; !#"+com/gargoylesoftware/htmlunit/html/HtmlPage $%getDocumentElement2()Lcom/gargoylesoftware/htmlunit/html/HtmlElement; !' ()#executeJavaScriptFunctionIfPossible(Lnet/sourceforge/htmlunit/corejs/javascript/Function;Lnet/sourceforge/htmlunit/corejs/javascript/Scriptable;[Ljava/lang/Object;Lcom/gargoylesoftware/htmlunit/html/DomNode;)Lcom/gargoylesoftware/htmlunit/ScriptResult;+&org/openqa/selenium/WebDriverException *- .(Ljava/lang/Throwable;)V 0 12 waitForResult()Ljava/lang/Object;4-com/gargoylesoftware/htmlunit/ScriptException6java/lang/InterruptedException scriptBodyLjava/lang/String; parameters[Ljava/lang/Object; asyncResultDLorg/openqa/selenium/htmlunit/AsyncScriptExecutor$AsyncScriptResult;function5Lnet/sourceforge/htmlunit/corejs/javascript/Function;e/Lcom/gargoylesoftware/htmlunit/ScriptException; Ljava/lang/InterruptedException;Cjava/lang/StringBuilderEfunction() { var self = this, timeoutId; var cleanUp = function() { window.clearTimeout(timeoutId); if (window.detachEvent) { window.detachEvent('onunload', catchUnload); } else { window.removeEventListener('unload', catchUnload, false); } }; var self = this, timeoutId, catchUnload = function() { cleanUp(); self.host.unload(); }; arguments = Array.prototype.slice.call(arguments, 0); arguments.push(function(value) { cleanUp(); self.host.callback(typeof value == 'undefined' ? null : value); }); if (window.attachEvent) { window.attachEvent('onunload', catchUnload); } else { window.addEventListener('unload', catchUnload, false); } (function() { BG H(Ljava/lang/String;)V BJ KLappend-(Ljava/lang/String;)Ljava/lang/StringBuilder;N}).apply(null, arguments);P, timeoutId = window.setTimeout(function() {R self.host.timeout();T }, BV KW(J)Ljava/lang/StringBuilder;Y);[} B] ^_toString()Ljava/lang/String; !a bcexecuteJavaScript@(Ljava/lang/String;)Lcom/gargoylesoftware/htmlunit/ScriptResult; egf*com/gargoylesoftware/htmlunit/ScriptResult h2getJavaScriptResultj3net/sourceforge/htmlunit/corejs/javascript/Functionlhostn;net/sourceforge/htmlunit/corejs/javascript/NativeJavaObject mp q](Lnet/sourceforge/htmlunit/corejs/javascript/Scriptable;Ljava/lang/Object;Ljava/lang/Class;)V is tuput^(Ljava/lang/String;Lnet/sourceforge/htmlunit/corejs/javascript/Scriptable;Ljava/lang/Object;)V userScriptscriptresult,Lcom/gargoylesoftware/htmlunit/ScriptResult; SourceFileAsyncScriptExecutor.java InnerClassesAsyncScriptResult   Y* *+* 34 56  DYN*+-:*,* &W:*Y,-/:*Y,$'33785* ABEF E'G)H3L8M:NHDD78D9:<;<4=>) ?@: ?A cBYDF+IMIOIQISI*UXIZI\N*-`:di:kmY,or2 T ptuv-w2T5S6z@{J~`>ccv8c;<6-w8@#xyJ=>z{| } PK %^D>y9org/openqa/selenium/htmlunit/KeyboardModifiersState.class1=3org/openqa/selenium/htmlunit/KeyboardModifiersStatejava/lang/Object shiftPressedZ ctrlPressed altPressed()VCode       LineNumberTableLocalVariableTablethis5Lorg/openqa/selenium/htmlunit/KeyboardModifiersState;isShiftPressed()Z isCtrlPressed isAltPressed storeKeyDown(Lorg/openqa/selenium/Keys;)V  !storeIfEqualsShift(Lorg/openqa/selenium/Keys;Z)V # $!storeIfEqualsCtrl & '!storeIfEqualsAltkeyLorg/openqa/selenium/Keys; storeKeyUp ,.-org/openqa/selenium/Keys /)SHIFT ,1 23equals(Ljava/lang/Object;)ZkeyState ,6 7)CONTROL ,9 :)ALT SourceFileKeyboardModifiersState.java!   N* ***   /*   /*$  /*(  S*+*+"*+%,- ./()* S*+*+"*+%23 45() ! V++0*8 9: ()4$! V+50*= >? ()4'! V+80*B CD ()4;JFF0org/openqa/selenium/htmlunit/HtmlUnitMouse.class1*org/openqa/selenium/htmlunit/HtmlUnitMousejava/lang/Objectorg/openqa/selenium/Mouseparent-Lorg/openqa/selenium/htmlunit/HtmlUnitDriver;keyboard/Lorg/openqa/selenium/htmlunit/HtmlUnitKeyboard;currentActiveElement0Lcom/gargoylesoftware/htmlunit/html/HtmlElement;_(Lorg/openqa/selenium/htmlunit/HtmlUnitDriver;Lorg/openqa/selenium/htmlunit/HtmlUnitKeyboard;)VCode  ()V     LineNumberTableLocalVariableTablethis,Lorg/openqa/selenium/htmlunit/HtmlUnitMouse;getElementForOperationi(Lorg/openqa/selenium/interactions/internal/Coordinates;)Lcom/gargoylesoftware/htmlunit/html/HtmlElement; "!5org/openqa/selenium/interactions/internal/Coordinates #$ getAuxiliry()Ljava/lang/Object;&.com/gargoylesoftware/htmlunit/html/HtmlElement(,@,CW,GW,*J*O*RUW*,XN[Y-]N`-fl ILq IVgB@B EFG J%K*N2O@NDPLQMRVSWUaX4bbs/\t M uvW uw67\*+V*F**J*O*RxW**J*O*R{W*~+*+2 [\]^)]-`8aG`KcRfVg[j\\t Z7F +*+mn p  t 0R*+ st*/13*+2M*,4,*J*O*RW*,XN- *-q& wy }~!}%-.2*33s/-t .uv1+*+2M*,4,*J*O*RW*,X !%* ++s/%t 1,*+2M*,4,*J*O*RW*,X" !"&+ ,,s/&t 1,*+2M*,4,*J*O*RW*,X" !"&+ ,,s/&t I1h+W+%M*,4*,X s/ t I77+*J*O*RW+*J*O*RxW& #12677t IR Y*  /  PK %^D>>23org/openqa/selenium/htmlunit/HtmlUnitKeyboard.class1-org/openqa/selenium/htmlunit/HtmlUnitKeyboardjava/lang/Objectorg/openqa/selenium/KeyboardmodifiersState5Lorg/openqa/selenium/htmlunit/KeyboardModifiersState;parent-Lorg/openqa/selenium/htmlunit/HtmlUnitDriver;0(Lorg/openqa/selenium/htmlunit/HtmlUnitDriver;)VCode  ()V3org/openqa/selenium/htmlunit/KeyboardModifiersState     LineNumberTableLocalVariableTablethis/Lorg/openqa/selenium/htmlunit/HtmlUnitKeyboard;getElementToSendS(Lorg/openqa/selenium/WebElement;)Lorg/openqa/selenium/htmlunit/HtmlUnitWebElement; ! +org/openqa/selenium/htmlunit/HtmlUnitDriver "#switchTo/()Lorg/openqa/selenium/WebDriver$TargetLocator; %'&+org/openqa/selenium/WebDriver$TargetLocator () activeElement"()Lorg/openqa/selenium/WebElement;+/org/openqa/selenium/htmlunit/HtmlUnitWebElement toElement Lorg/openqa/selenium/WebElement; sendToElementsendKeys([Ljava/lang/CharSequence;)V 2  *4 /0 keysToSend[Ljava/lang/CharSequence;htmlElem1Lorg/openqa/selenium/htmlunit/HtmlUnitWebElement;v(Lcom/gargoylesoftware/htmlunit/html/HtmlElement;Ljava/lang/String;Lorg/openqa/selenium/htmlunit/InputKeysContainer;)V ; <=isShiftPressed()Z ?A@/org/openqa/selenium/htmlunit/InputKeysContainer BCsetCapitalization(Z)V E F=isJavascriptEnabledH0com/gargoylesoftware/htmlunit/html/HtmlFileInput ?J KLtoString()Ljava/lang/String; NPO.com/gargoylesoftware/htmlunit/html/HtmlElement QRtype(Ljava/lang/String;)VT&org/openqa/selenium/WebDriverException SV W(Ljava/lang/Throwable;)VY,com/gargoylesoftware/htmlunit/html/HtmlInput[java/lang/StringBuilder] _a`java/lang/String bcvalueOf&(Ljava/lang/Object;)Ljava/lang/String; Ze R Zg hiappend-(Ljava/lang/String;)Ljava/lang/StringBuilder; ZJ Xl mnsetValueAttribute8(Ljava/lang/String;)Lcom/gargoylesoftware/htmlunit/Page;p/com/gargoylesoftware/htmlunit/html/HtmlTextArea or sRsetTextu'java/lang/UnsupportedOperationExceptionw>You may only set the value of elements that are input elements tezjava/io/IOExceptionelement0Lcom/gargoylesoftware/htmlunit/html/HtmlElement; currentValueLjava/lang/String;1Lorg/openqa/selenium/htmlunit/InputKeysContainer;eLjava/io/IOException;input.Lcom/gargoylesoftware/htmlunit/html/HtmlInput;pressKey(Lorg/openqa/selenium/Keys;)V   storeKeyDown * sendKeyDownEvent keyToPressLorg/openqa/selenium/Keys; htmlElement releaseKey   storeKeyUp * sendKeyUpEvent keyToReleaseperformSingleKeyAction_(Lcom/gargoylesoftware/htmlunit/html/HtmlElement;Lorg/openqa/selenium/Keys;Ljava/lang/String;)V org/openqa/selenium/Keys SHIFT equals(Ljava/lang/Object;)Z CONTROL ALT;com/gargoylesoftware/htmlunit/javascript/host/KeyboardEvent E(Lcom/gargoylesoftware/htmlunit/html/DomNode;Ljava/lang/String;IZZZ)V N  fireEventc(Lcom/gargoylesoftware/htmlunit/javascript/host/Event;)Lcom/gargoylesoftware/htmlunit/ScriptResult; modifierKeyeventDescriptionshiftKeyZctrlKeyaltKeykeyEvent5Lcom/gargoylesoftware/htmlunit/javascript/host/Event; isCtrlPressed  = isAltPressed  = SourceFileHtmlUnitKeyboard.java InnerClassesorg/openqa/selenium/WebDriver TargetLocator!  U**Y*+)&*+  b+M,*$M,*./03 ,-.-/0 m*$M*,1N-+37 9:;*56 ,-78/9 A-*:>*D!+G+-IM|:SYU+X0+X:ZY,\,^d-IfjkW<+o++oZY,\,^d-Ifjq tYvx$'yB> @B'C)D3F:G@IgJnKrLKNONQ>{|}~5) @' y!*$M*,1N*+-+T VWX Y*!! ,-8 y!*$M*,1N*+-+\ ^_` a*!! ,-8 5,6,6,6Y+-:+Wd efh-i4kR55{|55~ ,#-<= 2*:n = 2*r = 2*v  % PK %^D> ILL7org/openqa/selenium/htmlunit/HtmlUnitWebElement$1.class111org/openqa/selenium/htmlunit/HtmlUnitWebElement$1java/lang/Objectjava/util/concurrent/Callablethis$01Lorg/openqa/selenium/htmlunit/HtmlUnitWebElement;4(Lorg/openqa/selenium/htmlunit/HtmlUnitWebElement;)VCode    ()VLineNumberTableLocalVariableTablethis3Lorg/openqa/selenium/htmlunit/HtmlUnitWebElement$1;call()Ljava/lang/Boolean; Exceptionsjava/lang/Exception /org/openqa/selenium/htmlunit/HtmlUnitWebElement  isDisplayed()Z !#"java/lang/Boolean $%valueOf(Z)Ljava/lang/Boolean;()Ljava/lang/Object; (  SourceFileHtmlUnitWebElement.java SignatureFLjava/lang/Object;Ljava/util/concurrent/Callable;EnclosingMethod /verifyCanInteractWithElement InnerClasses   8 *+ *    5 *    A& %*')*+,-.0 PK %^D>FF7org/openqa/selenium/htmlunit/HtmlUnitWebElement$2.class121org/openqa/selenium/htmlunit/HtmlUnitWebElement$2java/lang/Object5org/openqa/selenium/interactions/internal/Coordinatesthis$01Lorg/openqa/selenium/htmlunit/HtmlUnitWebElement;4(Lorg/openqa/selenium/htmlunit/HtmlUnitWebElement;)VCode    ()VLineNumberTableLocalVariableTablethis3Lorg/openqa/selenium/htmlunit/HtmlUnitWebElement$2;getLocationOnScreen()Lorg/openqa/selenium/Point;'java/lang/UnsupportedOperationException"Not displayed, no screen location.  (Ljava/lang/String;)VgetLocationInViewPort "!/org/openqa/selenium/htmlunit/HtmlUnitWebElement # getLocationgetLocationInDOM getAuxiliry()Ljava/lang/Object; ( )* getElement2()Lcom/gargoylesoftware/htmlunit/html/HtmlElement; SourceFileHtmlUnitWebElement.javaEnclosingMethod /0getCoordinates9()Lorg/openqa/selenium/interactions/internal/Coordinates; InnerClasses   8 *+ * W   4 YZ   2* ^ $ 2* b %& 2* 'f +,- .1 PK %^D>Ϫ6Mbb5org/openqa/selenium/htmlunit/HtmlUnitWebElement.class1/org/openqa/selenium/htmlunit/HtmlUnitWebElementjava/lang/Object&org/openqa/selenium/RenderedWebElement(org/openqa/selenium/internal/WrapsDriver &org/openqa/selenium/internal/FindsById ,org/openqa/selenium/internal/FindsByLinkText)org/openqa/selenium/internal/FindsByXPath+org/openqa/selenium/internal/FindsByTagName/org/openqa/selenium/internal/FindsByCssSelector&org/openqa/selenium/internal/Locatableparent-Lorg/openqa/selenium/htmlunit/HtmlUnitDriver;element0Lcom/gargoylesoftware/htmlunit/html/HtmlElement;nbspCharC ConstantValueblockLevelsTagNames[Ljava/lang/String;toStringLjava/lang/String;()VCode%java/lang/String'p)h1+h2-h3/h41h53h65dl7div9noscript; blockquote=form?hrAtableCfieldsetEaddressGulIolKpreMbr O LineNumberTableLocalVariableTable`(Lorg/openqa/selenium/htmlunit/HtmlUnitDriver;Lcom/gargoylesoftware/htmlunit/html/HtmlElement;)V U R" W  Y this1Lorg/openqa/selenium/htmlunit/HtmlUnitWebElement;click ^ _"verifyCanInteractWithElement acb+org/openqa/selenium/htmlunit/HtmlUnitDriver degetMouse()Lorg/openqa/selenium/Mouse;g*org/openqa/selenium/htmlunit/HtmlUnitMouse i jkgetCoordinates9()Lorg/openqa/selenium/interactions/internal/Coordinates; fm \n:(Lorg/openqa/selenium/interactions/internal/Coordinates;)Vmouse,Lorg/openqa/selenium/htmlunit/HtmlUnitMouse;submit s t"assertElementNotStalev+com/gargoylesoftware/htmlunit/html/HtmlForm x yz submitForm0(Lcom/gargoylesoftware/htmlunit/html/HtmlForm;)V|2com/gargoylesoftware/htmlunit/html/HtmlSubmitInput~1com/gargoylesoftware/htmlunit/html/HtmlImageInput .com/gargoylesoftware/htmlunit/html/HtmlElement \&()Lcom/gargoylesoftware/htmlunit/Page;,com/gargoylesoftware/htmlunit/html/HtmlInput getEnclosingForm/()Lcom/gargoylesoftware/htmlunit/html/HtmlForm;  findParentForm"()Lorg/openqa/selenium/WebElement;*org/openqa/selenium/NoSuchElementException"Unable to find the containing form R(Ljava/lang/String;)V org/openqa/selenium/WebElement q"&org/openqa/selenium/WebDriverException R(Ljava/lang/Throwable;)Vjava/io/IOException Lorg/openqa/selenium/WebElement;eLjava/io/IOException;java/util/ArrayList Uinput java/util/List add(Ljava/lang/Object;)Zbutton u getHtmlElementsByTagNames"(Ljava/util/List;)Ljava/util/List; iterator()Ljava/util/Iterator; java/util/Iterator next()Ljava/lang/Object;  isSubmitElement3(Lcom/gargoylesoftware/htmlunit/html/HtmlElement;)Z  isBefore hasNext()Z a isJavascriptEnabledq u  fireEvent@(Ljava/lang/String;)Lcom/gargoylesoftware/htmlunit/ScriptResult; *com/gargoylesoftware/htmlunit/ScriptResult isFalse/(Lcom/gargoylesoftware/htmlunit/ScriptResult;)Zarguments[0].submit() a  executeScript9(Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/Object;)Cannot locate element used to submit form -Lcom/gargoylesoftware/htmlunit/html/HtmlForm;namesLjava/util/List; allElements eventResult,Lcom/gargoylesoftware/htmlunit/ScriptResult;LocalVariableTypeTable$Ljava/util/List;CLjava/util/List<+Lcom/gargoylesoftware/htmlunit/html/HtmlElement;>; {  isDisabled }-com/gargoylesoftware/htmlunit/html/HtmlButton getTypeAttribute()Ljava/lang/String; $ equalsIgnoreCase(Ljava/lang/String;)Z  candidate/Lcom/gargoylesoftware/htmlunit/html/HtmlButton;getValue/com/gargoylesoftware/htmlunit/html/HtmlTextArea getTextvalue   getAttribute&(Ljava/lang/String;)Ljava/lang/String;clear    setValueAttribute8(Ljava/lang/String;)Lcom/gargoylesoftware/htmlunit/Page;  setText1org/openqa/selenium/htmlunit/HtmlUnitWebElement$1  R4(Lorg/openqa/selenium/htmlunit/HtmlUnitWebElement;)V a implicitlyWaitFor3(Ljava/util/concurrent/Callable;)Ljava/lang/Object;java/lang/Boolean   booleanValue.org/openqa/selenium/ElementNotVisibleException!)You may only sendKeys to visible elements  $ % isEnabled''java/lang/UnsupportedOperationException))You may only sendKeys to enabled elements & displayedLjava/lang/Boolean;switchFocusToThisIfNeeded a/ 01switchTo/()Lorg/openqa/selenium/WebDriver$TargetLocator; 354+org/openqa/selenium/WebDriver$TargetLocator 6 activeElement 8 9equals ; < getTagName $> ? toLowerCaseAbody $8 D E"blur G H"focusoldActiveElement jsEnabledZoldActiveEqualsCurrentisBodysendKeyDownEvent(Lorg/openqa/selenium/Keys;)VQkeydown S TUsendSingleKeyEvent/(Lorg/openqa/selenium/Keys;Ljava/lang/String;)V modifierKeyLorg/openqa/selenium/Keys;sendKeyUpEventZkeyup \ -" a^ _` getKeyboard ()Lorg/openqa/selenium/Keyboard;b-org/openqa/selenium/htmlunit/HtmlUnitKeyboard d ef getElement2()Lcom/gargoylesoftware/htmlunit/html/HtmlElement; ah ijperformSingleKeyAction_(Lcom/gargoylesoftware/htmlunit/html/HtmlElement;Lorg/openqa/selenium/Keys;Ljava/lang/String;)VeventDescriptionkeyboard/Lorg/openqa/selenium/htmlunit/HtmlUnitKeyboard;sendKeys([Ljava/lang/CharSequence;)Vq/org/openqa/selenium/htmlunit/InputKeysContainer s tisInputElement pv Rw(Z[Ljava/lang/CharSequence;)V y a{ n|v(Lcom/gargoylesoftware/htmlunit/html/HtmlElement;Ljava/lang/String;Lorg/openqa/selenium/htmlunit/InputKeysContainer;)V p~ wasSubmitKeyFound [Ljava/lang/CharSequence; keysContainer1Lorg/openqa/selenium/htmlunit/InputKeysContainer;   getNodeName selectedchecked   isCheckedtruedisabledfalseindex-com/gargoylesoftware/htmlunit/html/HtmlOption  getEnclosingSelect1()Lcom/gargoylesoftware/htmlunit/html/HtmlSelect; -com/gargoylesoftware/htmlunit/html/HtmlSelect  getOptions()Ljava/util/List;   getOption2(I)Lcom/gargoylesoftware/htmlunit/html/HtmlOption; 8 $ valueOf(I)Ljava/lang/String;  size()Ireadonly   isReadOnly $ (Z)Ljava/lang/String;  getReadOnlyAttribute   hasAttributename lowerNameselect/Lcom/gargoylesoftware/htmlunit/html/HtmlSelect; allOptionsiIoption/Lcom/gargoylesoftware/htmlunit/html/HtmlOption;ALjava/util/List;toggle   isDisplayed$You may only toggle visible elements4com/gargoylesoftware/htmlunit/html/HtmlCheckBoxInput   isSelected  isMultipleSelectEnabled    setSelected'(Z)Lcom/gargoylesoftware/htmlunit/Page;java/lang/StringBuilderXYou may only toggle checkboxes or options in a select which allows multiple selections:   append-(Ljava/lang/String;)Ljava/lang/StringBuilder;  Unexpected exception:  -(Ljava/lang/Object;)Ljava/lang/StringBuilder;9Unable to determine if element is selected. Tag name is: ;$You may only select visible elements $ length%You may not select a disabled element   setChecked'Unable to select element. Tag name is:  disabledValuehover-Hover is not supported by the htmlunit driver2com/gargoylesoftware/htmlunit/html/HtmlHiddenInput  getLocation()Lorg/openqa/selenium/Point;org/openqa/selenium/Pointleft     readAndRound(Ljava/lang/String;)I top  R(II)V Cannot determine size of element  R*(Ljava/lang/String;Ljava/lang/Throwable;)Vjava/lang/ExceptionLjava/lang/Exception;getSize!()Lorg/openqa/selenium/Dimension;widthheightorg/openqa/selenium/Dimension  " #getValueOfCssProperty%[^0-9\.] $' () replaceAll8(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String; +-,java/lang/Float ./ parseFloat(Ljava/lang/String;)F 132java/lang/Math 45round(F)IpropertycssValue dragAndDropBy8 moveRightBy moveDownBy dragAndDropOn+(Lorg/openqa/selenium/RenderedWebElement;)V<(Lorg/openqa/selenium/RenderedWebElement;Ajava/lang/StringBuffer @UD7com/gargoylesoftware/htmlunit/html/HtmlPreformattedText F GHgetTextFromNode`(Lcom/gargoylesoftware/htmlunit/html/DomNode;Ljava/lang/StringBuffer;Ljava/lang/StringBuffer;Z)V @ $K L&(Ljava/lang/Object;)Ljava/lang/String; N OPcollapseWhitespace,(Ljava/lang/StringBuffer;)Ljava/lang/String; $R StrimtoReturnLjava/lang/StringBuffer; textSoFartext getParent/()Lorg/openqa/selenium/htmlunit/HtmlUnitDriver;[-com/gargoylesoftware/htmlunit/html/HtmlScript ] ^_getPreformattedTextG(Lcom/gargoylesoftware/htmlunit/html/DomNode;Ljava/lang/StringBuffer;)V acb*com/gargoylesoftware/htmlunit/html/DomNode de getChildren()Ljava/lang/Iterable; ghjava/lang/Iterable a @k l,(Ljava/lang/String;)Ljava/lang/StringBuffer; @ @o pqdelete(II)Ljava/lang/StringBuffer;s*com/gargoylesoftware/htmlunit/html/DomText ru vgetData $x yzreplace(CC)Ljava/lang/String; | }~ isBlockLevel/(Lcom/gargoylesoftware/htmlunit/html/DomNode;)Z node,Lcom/gargoylesoftware/htmlunit/html/DomNode;isPreformattedchild textToAddtagNameblockLevelsTagName\p{javaWhitespace}+  a asXml ^ $xmlTextgetElementsByTagName$(Ljava/lang/String;)Ljava/util/List; SignatureF(Ljava/lang/String;)Ljava/util/List;.//   getByXPath  XY a newHtmlUnitWebElementR(Lcom/gargoylesoftware/htmlunit/html/HtmlElement;)Lorg/openqa/selenium/WebElement; allChildrenelementsoLjava/lang/Object;Ljava/util/List<*>;2Ljava/util/List; findElement:(Lorg/openqa/selenium/By;)Lorg/openqa/selenium/WebElement; a ](Lorg/openqa/selenium/By;Lorg/openqa/selenium/SearchContext;)Lorg/openqa/selenium/WebElement;byLorg/openqa/selenium/By; findElements*(Lorg/openqa/selenium/By;)Ljava/util/List;L(Lorg/openqa/selenium/By;)Ljava/util/List; a M(Lorg/openqa/selenium/By;Lorg/openqa/selenium/SearchContext;)Ljava/util/List;findElementById4(Ljava/lang/String;)Lorg/openqa/selenium/WebElement; .//*[@id = '']  findElementByXPathidfindElementsById  findElementsByXPathfindElementsByCssSelector a   findChildNodesusingfindElementByCssSelector%Cannot find child element using css:  get(I)Ljava/lang/Object;f(Ljava/util/List;)Ljava/util/List;java/util/LinkedList U  ~ isAncestorOfcurrent  getFirstByXPath&(Ljava/lang/String;)Ljava/lang/Object;"Unable to find element with xpath  xpathExprmatch webElements htmlElementsfindElementByLinkText  findElementsByLinkText%Unable to find element with linkText linkTexta  getHtmlElementsByTagName  getTextContenthreffindElementByPartialLinkText  findElementsByPartialLinkText $ contains(Ljava/lang/CharSequence;)ZfindElementByTagName  findElementsByTagName#Cannot find element with tag name:  R(I)VBLjava/util/List; a    getParentNode.()Lcom/gargoylesoftware/htmlunit/html/DomNode;   U  (C)Ljava/lang/StringBuilder;   getAttributes()Lorg/w3c/dom/NamedNodeMap; org/w3c/dom/NamedNodeMap  getLength  item(I)Lorg/w3c/dom/Node;!org/w3c/dom/Attr  # $getName&="  y)"+" $- y.D(Ljava/lang/CharSequence;Ljava/lang/CharSequence;)Ljava/lang/String; 0 1 hasChildNodes3 />sbLjava/lang/StringBuilder; attributesLorg/w3c/dom/NamedNodeMap;nLorg/w3c/dom/Attr; ; <=getPage*()Lcom/gargoylesoftware/htmlunit/SgmlPage; a? @lastPageB2org/openqa/selenium/StaleElementReferenceExceptionDElement appears to be stale. Did you navigate away from the page that contained it? And is the current window focussed the same as the one holding this element? AG+com/gargoylesoftware/htmlunit/html/HtmlHtmlIcThe element seems to be disconnected from the DOM. This means that a user cannot interact with it. elementPage(Lcom/gargoylesoftware/htmlunit/SgmlPage; currentPage$Lcom/gargoylesoftware/htmlunit/Page; parentElement P QRgetEffectiveStyleV(Lcom/gargoylesoftware/htmlunit/html/HtmlElement;Ljava/lang/String;)Ljava/lang/String; propertyNameUinheritWif (window.getComputedStyle) { return window.getComputedStyle(arguments[0], null).getPropertyValue(arguments[1]); } if (arguments[0].currentStyle) { return arguments[0].currentStyle[arguments[1]]; } if (window.document.defaultView && window.document.defaultView.getComputedStyle) { return window.document.defaultView.getComputedStyle(arguments[0], null)[arguments[1]]; } Y4net/sourceforge/htmlunit/corejs/javascript/Undefined  \rgb $^ _ startsWith a brgbToHex htmlElementresultf(rgb\((\d{1,3}),\s(\d{1,3}),\s(\d{1,3})\) hjijava/util/regex/Pattern klcompile-(Ljava/lang/String;)Ljava/util/regex/Pattern; hn opmatcher3(Ljava/lang/CharSequence;)Ljava/util/regex/Matcher; rtsjava/util/regex/Matcher ufindw# ry zgroup |~}java/lang/Integer  parseInt |  toHexString0patternLjava/util/regex/Pattern;Ljava/util/regex/Matcher;hexcolours)org/openqa/selenium/internal/WrapsElement  getWrappedElementobjotherhashCode  getWrappedDriver!()Lorg/openqa/selenium/WebDriver;'getLocationOnScreenOnceScrolledIntoView  1org/openqa/selenium/htmlunit/HtmlUnitWebElement$2  SourceFileHtmlUnitWebElement.java InnerClassesorg/openqa/selenium/WebDriver TargetLocator!  ?!"#{$Y&SY(SY*SY,SY.SY0SY2SY4SY6SY 8SY :SY SY @SYBSYDSYFSYHSYJSYLSNPW>XwVzOQRS#Y*T*+V*,XP[\ ]^Q Z[\"#X*]*V`fL+*hlPabcdQZ[ opq"#t*r*Xu**Xuw*X{ *X} *XW*X**Xw*L+ Y+ LY+i6i7LiMfiPFgjklm.n6o7pAqLrMuRvVw`yizj{s}Q tZ[R=j yz#*rYM,W,W+,N:-:(:**™::*Və&+̶:њ*VY+SWYݷ߿W:YP^ $'>GJSWafpxQRZ[= $'q>x  $#WM+{+{+M:+}+}+M$++N- -+M,P* ).5:MOQ*WZ[WU:#<+PQZ[q#q-*r*X*X*L+ +P!Q-Z[!  "#u7*r*X*X W*X*X P)6Q 7Z[_"#@*r*VY*L+ +Y "*#&Y(*P"-4?Q@Z[)+,-"#I*V.2L*V=+*7>+:=@B6+XC*XFP. -15:AHQ4IZ[9I[1JK+LK-MKNO#A *+PRP Q Z[ VWXO#A *+YRP Q Z[ VWTU#v*]*[*V]aN-*c+,gPQ*Z[VWk  lmno#@*]pY*r+uM*[*V]aN-*X*x,z*r,}*P" -;? Q*@Z[@/ lmt#2*XP Q Z[<#: *r*XP Q  Z[#WY*r+=M*X+N*X,,B ,B*X ,B*# ,B- ,B- ,BR*XH*X::6!:*X ,D*X*X*X *XB -B-*X+P  0E O!`#j$|&')*+,-./,3567:;:><AFBHESFWIQRYZ[Y  P G 92- 2#?*r*ɚY̷"*XΙ*XW*Ь*X-*XL+M,ә++֙W*Ь&YYݷ*:*LYY+߿,}-`}a}}PNMO PT U(V-Y7Z?[D\K]\^abecodvcyb}e~fQ*Z[?"D~#M*r*X*X*X*X֬&YY*X*P"kmno#p.s2tIsQ MZ["#*r*ɚY"*XL+&Y**X*XW;*X*XW"&YY*X*P:xz {~!(3=LVeiQZ[!d "#5 &Y*PQ  Z[%#E*r*XP Q Z[#^(*r*Vɚ*X*XPQ (Z[#o'*rY**  LY+PQ'Z[ #+*r*<*=Y LY+P Q*+Z[     #j *+!$&M,,*0PQ  Z[ 6 7 8#Q*r&Y9*P Q Z[:;<=#G*r&Y>*P QZ[?#D*r@YBL@YBM**X+,*XCEY+IJ*,MN-QP %?Q*DZ[ 8TU0VU?W XY#/*VPQ Z[ef#/*XPQ Z[GH#+Z *+,\+`f:xa:C+i,*-MjW--mnW*,-E<r+i,rt: w:-jW *,-E*+{,*-MjjW--mnWP^ -5=GQZ]emwQHZ[TUVUK-iw }~#?++=MNY:662N-,BP" )13=Q*?Z[?+ )  OP#[+IM,&&P Q Z[VU ^_#y%+i +N,-&&jWP!" #$%Q*%Z[%%TU  #g*r*XY+MYN,:.::-*W-P* (*+%,9-A.D1K2[,e4Q>gZ[g J%B9"KJ%B#F*r*V+*P 89QZ[#F*r*V+*P =>QZ[#X *r*Y+P BDQ Z[  #X *r*Y+ðP HJQ Z[  #c*V+M*,ɰP N PQ Z[    #<*V+M*,M,YYη+,PT VXY1\Q <Z[<  3  3#CYM+:'N*X-Xؙ ,-W,P`bc/d7bAhQ*CZ[C;TC;T#6*r*X+M,YY+*,Plnop"q)p-sQ 6Z[6 &#H*rYM*X+N-::,*W,Pwy z{)|<{F~Q4HZ[H  <3) <3#D*r*+M,YY+,,P (,Q DZ[D  :  :#a*r*XMYN,:6:+B-*W-P& .:EU_Q4aZ[a RJ.'RJ#D*r*+M,YY+,,P (,Q DZ[D  :  :#a*r*XMYN,:6:+-*W-P& .:EU_Q4aZ[a RJ.'RJ#7*r*+M,YY+,P ,Q 7Z[7  -  -#N*r*X+MY,N,::-*VW-P 2BLQ4NZ[N  A3T2 A3T#h$*XL+ L+ +u*+uP Q$Z[#8* YL+<*XW*XM,>6C, :+ "%'(*,(W*X/ +>W +2W*+ * P> (/5BXr{Q>Z[45(w67/p82IB09t"#K*X:L*V>M,+AYCE*XN- N- -F-AYHEP6 #(+0;?JQ*KZ[CJK;LM(#N##F*r**X+OP QZ[S QR#`+NT:2*VVY-SY,S:X J:-ZN-TB[] *`P:  "*19KV]!Q>`Z[`c`S ^Y "db#yegM,+mN-qfv:6K-x{6:Y:YJ:=:+P:&' ()*+*,1-:.N/d*m1t2w5QRyZ[y r lo^ Q*:13 9#;++M, +M,*X,XP:; >?@CQ ;Z[;-#2*XPHQ Z[#/*VPOQ Z[#/*PSQ Z[jk#3 Y*PWQ  Z[3 PK %^D>Ff3org/openqa/selenium/htmlunit/HtmlUnitDriver$1.class1?-org/openqa/selenium/htmlunit/HtmlUnitDriver$1java/lang/Object/com/gargoylesoftware/htmlunit/WebWindowListenerthis$0-Lorg/openqa/selenium/htmlunit/HtmlUnitDriver;0(Lorg/openqa/selenium/htmlunit/HtmlUnitDriver;)VCode    ()VLineNumberTableLocalVariableTablethis/Lorg/openqa/selenium/htmlunit/HtmlUnitDriver$1;webWindowOpened1(Lcom/gargoylesoftware/htmlunit/WebWindowEvent;)VwebWindowEvent.Lcom/gargoylesoftware/htmlunit/WebWindowEvent;webWindowContentChanged ,com/gargoylesoftware/htmlunit/WebWindowEvent  getWebWindow+()Lcom/gargoylesoftware/htmlunit/WebWindow; !#"+org/openqa/selenium/htmlunit/HtmlUnitDriver $%access$0X(Lorg/openqa/selenium/htmlunit/HtmlUnitDriver;)Lcom/gargoylesoftware/htmlunit/WebWindow; !' ()access$3Y(Lorg/openqa/selenium/htmlunit/HtmlUnitDriver;Lcom/gargoylesoftware/htmlunit/WebWindow;)VeventwebWindowClosed -/.'com/gargoylesoftware/htmlunit/WebWindow 0 getTopWindow !2 3)access$1 -5 6getParentWindowcurr)Lcom/gargoylesoftware/htmlunit/WebWindow; SourceFileHtmlUnitDriver.javaEnclosingMethod =1(Lcom/gargoylesoftware/htmlunit/BrowserVersion;)V InnerClasses   8 *+ * {   5~ ^+* * * &*+ <* M,+* * ,1,4M,* ,б#$+; <<*4789:;!<> PK %^D>v`]3org/openqa/selenium/htmlunit/HtmlUnitDriver$2.class17-org/openqa/selenium/htmlunit/HtmlUnitDriver$2java/lang/ObjectGorg/openqa/selenium/htmlunit/HtmlUnitDriver$JavaScriptResultsCollectionthis$0-Lorg/openqa/selenium/htmlunit/HtmlUnitDriver; val$array8Lnet/sourceforge/htmlunit/corejs/javascript/NativeArray;h(Lorg/openqa/selenium/htmlunit/HtmlUnitDriver;Lnet/sourceforge/htmlunit/corejs/javascript/NativeArray;)VCode     ()VLineNumberTableLocalVariableTablethis/Lorg/openqa/selenium/htmlunit/HtmlUnitDriver$2; getLength()I 6net/sourceforge/htmlunit/corejs/javascript/NativeArray ()Jitem(I)Ljava/lang/Object; #%$java/lang/Integer &'valueOf(I)Ljava/lang/Integer; ) *+get&(Ljava/lang/Object;)Ljava/lang/Object;indexI SourceFileHtmlUnitDriver.javaEnclosingMethod2+org/openqa/selenium/htmlunit/HtmlUnitDriver 4+parseNativeJavascriptResult InnerClassesJavaScriptResultsCollection    =*+*,*  *  3 *,   ! @ *"(0  ,-./013516 PK %^D>ۦ3org/openqa/selenium/htmlunit/HtmlUnitDriver$3.class16-org/openqa/selenium/htmlunit/HtmlUnitDriver$3java/lang/ObjectGorg/openqa/selenium/htmlunit/HtmlUnitDriver$JavaScriptResultsCollectionthis$0-Lorg/openqa/selenium/htmlunit/HtmlUnitDriver; val$arrayCLcom/gargoylesoftware/htmlunit/javascript/host/html/HTMLCollection;s(Lorg/openqa/selenium/htmlunit/HtmlUnitDriver;Lcom/gargoylesoftware/htmlunit/javascript/host/html/HTMLCollection;)VCode     ()VLineNumberTableLocalVariableTablethis/Lorg/openqa/selenium/htmlunit/HtmlUnitDriver$3; getLength()I Acom/gargoylesoftware/htmlunit/javascript/host/html/HTMLCollection item(I)Ljava/lang/Object; "$#java/lang/Integer %&valueOf(I)Ljava/lang/Integer; ( )*get&(Ljava/lang/Object;)Ljava/lang/Object;indexI SourceFileHtmlUnitDriver.javaEnclosingMethod1+org/openqa/selenium/htmlunit/HtmlUnitDriver 3*parseNativeJavascriptResult InnerClassesJavaScriptResultsCollection    =*+*,*  :  2*<   @ *!'@  +,-./02405 PK %^D>Q,wpp3org/openqa/selenium/htmlunit/HtmlUnitDriver$4.class15-org/openqa/selenium/htmlunit/HtmlUnitDriver$4java/lang/Objectjava/util/concurrent/Callablethis$0-Lorg/openqa/selenium/htmlunit/HtmlUnitDriver; val$locatorLorg/openqa/selenium/By; val$context#Lorg/openqa/selenium/SearchContext;k(Lorg/openqa/selenium/htmlunit/HtmlUnitDriver;Lorg/openqa/selenium/By;Lorg/openqa/selenium/SearchContext;)VCode      ()VLineNumberTableLocalVariableTablethis/Lorg/openqa/selenium/htmlunit/HtmlUnitDriver$4;call"()Lorg/openqa/selenium/WebElement; Exceptions!java/lang/Exception #%$org/openqa/selenium/By &' findElementE(Lorg/openqa/selenium/SearchContext;)Lorg/openqa/selenium/WebElement;()Ljava/lang/Object; *  SourceFileHtmlUnitDriver.java SignatureSLjava/lang/Object;Ljava/util/concurrent/Callable;EnclosingMethod1+org/openqa/selenium/htmlunit/HtmlUnitDriver &3](Lorg/openqa/selenium/By;Lorg/openqa/selenium/SearchContext;)Lorg/openqa/selenium/WebElement; InnerClasses    B*+*,*-*   6 **"  A( %*)+,-./024 PK %^D>ђX%%Dorg/openqa/selenium/htmlunit/HtmlUnitDriver$HtmlUnitNavigation.class1P>org/openqa/selenium/htmlunit/HtmlUnitDriver$HtmlUnitNavigationjava/lang/Object(org/openqa/selenium/WebDriver$Navigationthis$0-Lorg/openqa/selenium/htmlunit/HtmlUnitDriver;0(Lorg/openqa/selenium/htmlunit/HtmlUnitDriver;)VCode    ()VLineNumberTableLocalVariableTablethis@Lorg/openqa/selenium/htmlunit/HtmlUnitDriver$HtmlUnitNavigation;back +org/openqa/selenium/htmlunit/HtmlUnitDriver access$0X(Lorg/openqa/selenium/htmlunit/HtmlUnitDriver;)Lcom/gargoylesoftware/htmlunit/WebWindow; 'com/gargoylesoftware/htmlunit/WebWindow ! getHistory)()Lcom/gargoylesoftware/htmlunit/History; #%$%com/gargoylesoftware/htmlunit/History !'&org/openqa/selenium/WebDriverException &) *(Ljava/lang/Throwable;)V,java/io/IOExceptioneLjava/io/IOException;forward #1 /!to(Ljava/lang/String;)V 5 63geturlLjava/lang/String;(Ljava/net/URL;)V ; 69Ljava/net/URL;refresh ? @AlastPage&()Lcom/gargoylesoftware/htmlunit/Page;C+com/gargoylesoftware/htmlunit/html/HtmlPage BE =Ap(Lorg/openqa/selenium/htmlunit/HtmlUnitDriver;Lorg/openqa/selenium/htmlunit/HtmlUnitDriver$HtmlUnitNavigation;)V H  SourceFileHtmlUnitDriver.java InnerClassesMorg/openqa/selenium/WebDriver NavigationHtmlUnitNavigation   4 *+ *   f* "W L&Y+(+ -./ f* 0W L&Y+(+ -.23 A * +4   7829 A * +:   7<= u)* >B* >BDW L&Y+( + () -. F &*+GIJKLN OPK %^D>Aorg/openqa/selenium/htmlunit/HtmlUnitDriver$HtmlUnitOptions.class1;org/openqa/selenium/htmlunit/HtmlUnitDriver$HtmlUnitOptionsjava/lang/Object%org/openqa/selenium/WebDriver$Optionsthis$0-Lorg/openqa/selenium/htmlunit/HtmlUnitDriver;0(Lorg/openqa/selenium/htmlunit/HtmlUnitDriver;)VCode    ()VLineNumberTableLocalVariableTablethis=Lorg/openqa/selenium/htmlunit/HtmlUnitDriver$HtmlUnitOptions; addCookie(Lorg/openqa/selenium/Cookie;)V +org/openqa/selenium/htmlunit/HtmlUnitDriver lastPage&()Lcom/gargoylesoftware/htmlunit/Page;+com/gargoylesoftware/htmlunit/html/HtmlPage .org/openqa/selenium/UnableToSetCookieException"2You may not set cookies on a page that is not HTML $ %(Ljava/lang/String;)V ' ()getDomainForCookie()Ljava/lang/String; + ,- verifyDomain1(Lorg/openqa/selenium/Cookie;Ljava/lang/String;)V / 01access$2X(Lorg/openqa/selenium/htmlunit/HtmlUnitDriver;)Lcom/gargoylesoftware/htmlunit/WebClient; 354'com/gargoylesoftware/htmlunit/WebClient 67getCookieManager/()Lcom/gargoylesoftware/htmlunit/CookieManager;9)com/gargoylesoftware/htmlunit/util/Cookie ;=<org/openqa/selenium/Cookie >)getName ;@ A)getValue ;C D)getPath ;F GH getExpiry()Ljava/util/Date; ;J KLisSecure()Z 8N O\(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/util/Date;Z)V QSR+com/gargoylesoftware/htmlunit/CookieManager T.(Lcom/gargoylesoftware/htmlunit/util/Cookie;)VcookieLorg/openqa/selenium/Cookie;page$Lcom/gargoylesoftware/htmlunit/Page;domainLjava/lang/String; ;\ ]) getDomain_ acbjava/lang/String deequals(Ljava/lang/Object;)Zg0org/openqa/selenium/InvalidCookieDomainExceptioni?Domain must not be an empty string. Consider using null instead f$l .*[^:]:\d+$ an opmatches(Ljava/lang/String;)Zr:\d+$ at uv replaceFirst8(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;x. az {p startsWith}java/lang/StringBuilder |$ | append-(Ljava/lang/String;)Ljava/lang/StringBuilder; | )toString a pendsWithNYou may only add cookies that would be visible to the current domain: %s => %s a format9(Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/String;expectedDomaingetCookieNamed0(Ljava/lang/String;)Lorg/openqa/selenium/Cookie;   getCookies()Ljava/util/Set;  java/util/Set iterator()Ljava/util/Iterator; java/util/Iterator next()Ljava/lang/Object; LhasNextname allCookiesLjava/util/Set;LocalVariableTypeTable-Ljava/util/Set;deleteCookieNamed  access$4=(Lorg/openqa/selenium/htmlunit/HtmlUnitDriver;)Ljava/net/URL; Q (Ljava/net/URL;)Ljava/util/Set; 8= Q T removeCookie cookieManager-Lcom/gargoylesoftware/htmlunit/CookieManager;urlLjava/net/URL; rawCookies+Lcom/gargoylesoftware/htmlunit/util/Cookie;; deleteCookie  %deleteAllCookies Q  clearCookies Signature/()Ljava/util/Set;  java/net/URLhttpjava/util/HashSet  8C C a ) toLowerCase"org/openqa/selenium/Cookie$Builder 8@ '(Ljava/lang/String;Ljava/lang/String;)V 8\ Y8(Ljava/lang/String;)Lorg/openqa/selenium/Cookie$Builder; path 8 H getExpires  expiresOn6(Ljava/util/Date;)Lorg/openqa/selenium/Cookie$Builder; 8J K'(Z)Lorg/openqa/selenium/Cookie$Builder; build()Lorg/openqa/selenium/Cookie; eadd retCookiesc CgetSpeed()Lorg/openqa/selenium/Speed;  access$5J(Lorg/openqa/selenium/htmlunit/HtmlUnitDriver;)Lorg/openqa/selenium/Speed;setSpeed(Lorg/openqa/selenium/Speed;)V  access$6K(Lorg/openqa/selenium/htmlunit/HtmlUnitDriver;Lorg/openqa/selenium/Speed;)VspeedLorg/openqa/selenium/Speed;  )getHostcurrenttimeouts*()Lorg/openqa/selenium/WebDriver$Timeouts; XXZ ME#5;U #5 A *+: @A  UV <* .2 D E  Y* L+ɶy YͰ* .2+MYN,:d8:P*϶ζy>-YշٶζW-FHNOT*S+V3WJXdYvZ~[\]^YWa4+3xJU+3xD) 5 * e   2* i  A * + tu  () E * L+ xy  6  Y*  }     &*+*;    PK %^D>oGorg/openqa/selenium/htmlunit/HtmlUnitDriver$HtmlUnitTargetLocator.class1Aorg/openqa/selenium/htmlunit/HtmlUnitDriver$HtmlUnitTargetLocatorjava/lang/Object+org/openqa/selenium/WebDriver$TargetLocatorthis$0-Lorg/openqa/selenium/htmlunit/HtmlUnitDriver;0(Lorg/openqa/selenium/htmlunit/HtmlUnitDriver;)VCode    ()VLineNumberTableLocalVariableTablethisCLorg/openqa/selenium/htmlunit/HtmlUnitDriver$HtmlUnitTargetLocator;frame"(I)Lorg/openqa/selenium/WebDriver; +org/openqa/selenium/htmlunit/HtmlUnitDriver access$0X(Lorg/openqa/selenium/htmlunit/HtmlUnitDriver;)Lcom/gargoylesoftware/htmlunit/WebWindow;  'com/gargoylesoftware/htmlunit/WebWindow !"getEnclosedPage&()Lcom/gargoylesoftware/htmlunit/Page;$+com/gargoylesoftware/htmlunit/html/HtmlPage #& '( getFrames()Ljava/util/List; *,+java/util/List -.get(I)Ljava/lang/Object; 0 12access$1Y(Lorg/openqa/selenium/htmlunit/HtmlUnitDriver;Lcom/gargoylesoftware/htmlunit/WebWindow;)V4(org/openqa/selenium/NoSuchFrameException6java/lang/StringBuilder8Cannot find frame: 5: ;(Ljava/lang/String;)V 5= >?append(I)Ljava/lang/StringBuilder; 5A BCtoString()Ljava/lang/String; 3:F#java/lang/IndexOutOfBoundsExceptionindexI currentPage-Lcom/gargoylesoftware/htmlunit/html/HtmlPage;ignored%Ljava/lang/IndexOutOfBoundsException;3(Ljava/lang/String;)Lorg/openqa/selenium/WebDriver; *O PQiterator()Ljava/util/Iterator; SUTjava/util/Iterator VWnext()Ljava/lang/Object;Y.com/gargoylesoftware/htmlunit/html/FrameWindow X[ \CgetName ^`_java/lang/String abequals(Ljava/lang/Object;)Z Sd efhasNext()Z h ijfindElementById4(Ljava/lang/String;)Lorg/openqa/selenium/WebElement;l/org/openqa/selenium/htmlunit/HtmlUnitWebElement kn op getElement2()Lcom/gargoylesoftware/htmlunit/html/HtmlElement;r,com/gargoylesoftware/htmlunit/html/BaseFrame qt uvgetEnclosedWindow+()Lcom/gargoylesoftware/htmlunit/WebWindow;x(Unable to locate frame with name or ID: 5z >{-(Ljava/lang/String;)Ljava/lang/StringBuilder;}*org/openqa/selenium/NoSuchElementExceptionnameOrIdLjava/lang/String; startPage frameWindow0Lcom/gargoylesoftware/htmlunit/html/FrameWindow;element1Lorg/openqa/selenium/htmlunit/HtmlUnitWebElement; domElement0Lcom/gargoylesoftware/htmlunit/html/HtmlElement;A(Lorg/openqa/selenium/WebElement;)Lorg/openqa/selenium/WebDriver;)org/openqa/selenium/internal/WrapsElement getWrappedElement"()Lorg/openqa/selenium/WebElement; k assertElementNotStale k C getTagName ^ valueOf&(Ljava/lang/Object;)Ljava/lang/String; is not a frame element. frameElement Lorg/openqa/selenium/WebElement; webElementgetWindowByNumericFrameIdj(Ljava/lang/String;Lcom/gargoylesoftware/htmlunit/html/HtmlPage;)Lcom/gargoylesoftware/htmlunit/WebWindow; java/lang/Integer parseInt(Ljava/lang/String;)Ijava/lang/NumberFormatExceptioncurrentFrameIdpagewindow  access$2X(Lorg/openqa/selenium/htmlunit/HtmlUnitDriver;)Lcom/gargoylesoftware/htmlunit/WebClient; 'com/gargoylesoftware/htmlunit/WebClient getWebWindowByName=(Ljava/lang/String;)Lcom/gargoylesoftware/htmlunit/WebWindow;  finishSelectingJ(Lcom/gargoylesoftware/htmlunit/WebWindow;)Lorg/openqa/selenium/WebDriver; ( getWebWindows  v getTopWindow java/lang/System identityHashCode(Ljava/lang/Object;)I ^ (I)Ljava/lang/String;)org/openqa/selenium/NoSuchWindowExceptionCannot find window: :8com/gargoylesoftware/htmlunit/WebWindowNotFoundExceptionwindowId)Lcom/gargoylesoftware/htmlunit/WebWindow;e:Lcom/gargoylesoftware/htmlunit/WebWindowNotFoundException; allWindowsLjava/util/List;currenttopLocalVariableTypeTable;Ljava/util/List; setCurrentWindow,(Lcom/gargoylesoftware/htmlunit/WebWindow;)V   pickWindowdefaultContent!()Lorg/openqa/selenium/WebDriver;  2access$3 activeElement # pgetFocusedElement # pgetDocumentElementbody .com/gargoylesoftware/htmlunit/html/HtmlElement getHtmlElementsByTagName$(Ljava/lang/String;)Ljava/util/List; * size()I  newHtmlUnitWebElementR(Lcom/gargoylesoftware/htmlunit/html/HtmlElement;)Lorg/openqa/selenium/WebElement;/Unable to locate element with focus or body tag |:$Lcom/gargoylesoftware/htmlunit/Page; allBodiesCLjava/util/List<+Lcom/gargoylesoftware/htmlunit/html/HtmlElement;>;alert()Lorg/openqa/selenium/Alert;'java/lang/UnsupportedOperationExceptionalert() :s(Lorg/openqa/selenium/htmlunit/HtmlUnitDriver;Lorg/openqa/selenium/htmlunit/HtmlUnitDriver$HtmlUnitTargetLocator;)V   SourceFileHtmlUnitDriver.java InnerClassesorg/openqa/selenium/WebDriver TargetLocatorHtmlUnitTargetLocator    4 *+ *"   E* #M* ,%)/N3Y5Y79<@D* $'E%(')(*@,*EEGH5IJ(KLM ** #M,%N:&RXN-Z+]* -/* c* +gkN-m:q* qs/* N3Y5Yw9+y@DKxy|:12)344<5A2K?V>W@]AeBtCyEzH>~J)W"] Z +L++kM,,mN-q!3Y5Y,9y@D* -qs/* * LM LPQS"T)UGXUY*ZZA"8 +>,%)NNE^_adh*JGHM v* +M*,M* N-N:.R::+] *cλY5Yɷ9+y@˿* m noqr5s>tMuTr^xHvv cX5> X _* +* +/* * } ~ F* * *    [* L+#@+#M,++#N-* -)* ,|Y*   ,-6HQ*[ N5- - 5 Y    &*+ "    PK %^D>O$$Borg/openqa/selenium/htmlunit/HtmlUnitDriver$HtmlUnitTimeouts.class1;0(Lorg/openqa/selenium/htmlunit/HtmlUnitDriver;)VCode    ()VLineNumberTableLocalVariableTablethis>Lorg/openqa/selenium/htmlunit/HtmlUnitDriver$HtmlUnitTimeouts;implicitlyWaitJ(JLjava/util/concurrent/TimeUnit;)Lorg/openqa/selenium/WebDriver$Timeouts; java/util/concurrent/TimeUnit  MILLISECONDSLjava/util/concurrent/TimeUnit;  java/lang/Math !"max(JJ)J $ %&convert#(JLjava/util/concurrent/TimeUnit;)J (*)+org/openqa/selenium/htmlunit/HtmlUnitDriver +,access$71(Lorg/openqa/selenium/htmlunit/HtmlUnitDriver;J)VtimeJunitsetScriptTimeout (2 3,access$8 SourceFileHtmlUnitDriver.java InnerClasses8org/openqa/selenium/WebDriverTimeoutsHtmlUnitTimeouts   4 *+ *   _*  -#'* -./0 S* -#1*  -./45679 (:PK %^D>,UUMorg/openqa/selenium/htmlunit/HtmlUnitDriver$JavaScriptResultsCollection.class1Gorg/openqa/selenium/htmlunit/HtmlUnitDriver$JavaScriptResultsCollectionjava/lang/Object getLength()Iitem(I)Ljava/lang/Object; SourceFileHtmlUnitDriver.java InnerClasses +org/openqa/selenium/htmlunit/HtmlUnitDriverJavaScriptResultsCollection    PK %^D>c}fmm1org/openqa/selenium/htmlunit/HtmlUnitDriver.class1+org/openqa/selenium/htmlunit/HtmlUnitDriverjava/lang/Objectorg/openqa/selenium/WebDriver!org/openqa/selenium/SearchContext &org/openqa/selenium/JavascriptExecutor &org/openqa/selenium/internal/FindsById,org/openqa/selenium/internal/FindsByLinkText)org/openqa/selenium/internal/FindsByXPath(org/openqa/selenium/internal/FindsByName/org/openqa/selenium/internal/FindsByCssSelector+org/openqa/selenium/internal/FindsByTagName#org/openqa/selenium/HasInputDevices webClient)Lcom/gargoylesoftware/htmlunit/WebClient; currentWindow)Lcom/gargoylesoftware/htmlunit/WebWindow;enableJavascriptZ proxyConfig+Lcom/gargoylesoftware/htmlunit/ProxyConfig;version.Lcom/gargoylesoftware/htmlunit/BrowserVersion;speedLorg/openqa/selenium/Speed; implicitWaitJ scriptTimeoutkeyboard/Lorg/openqa/selenium/htmlunit/HtmlUnitKeyboard;mouse,Lorg/openqa/selenium/htmlunit/HtmlUnitMouse;gotPage1(Lcom/gargoylesoftware/htmlunit/BrowserVersion;)VCode 1 -2()V 465org/openqa/selenium/Speed 7$FAST 9 #$ ; %& = '& ? !" A BCcreateWebClientY(Lcom/gargoylesoftware/htmlunit/BrowserVersion;)Lcom/gargoylesoftware/htmlunit/WebClient; E  GIH'com/gargoylesoftware/htmlunit/WebClient JKgetCurrentWindow+()Lcom/gargoylesoftware/htmlunit/WebWindow; M O-org/openqa/selenium/htmlunit/HtmlUnitDriver$1 NQ -R0(Lorg/openqa/selenium/htmlunit/HtmlUnitDriver;)V GT UVaddWebWindowListener4(Lcom/gargoylesoftware/htmlunit/WebWindowListener;)V GX YZ getHomePage()Ljava/lang/String; \ ]^get(Ljava/lang/String;)V ` , b c2resetKeyboardAndMouseStateLineNumberTableLocalVariableTablethis-Lorg/openqa/selenium/htmlunit/HtmlUnitDriver; i -j(Z)V lnm,com/gargoylesoftware/htmlunit/BrowserVersion op getDefault0()Lcom/gargoylesoftware/htmlunit/BrowserVersion; r -. t ujsetJavascriptEnabled%(Lorg/openqa/selenium/Capabilities;)V x yzdetermineBrowserVersionR(Lorg/openqa/selenium/Capabilities;)Lcom/gargoylesoftware/htmlunit/BrowserVersion; |~} org/openqa/selenium/Capabilities isJavascriptEnabled()Zproxy |  getCapability&(Ljava/lang/String;)Ljava/lang/Object; ,org/openqa/selenium/browserlaunchers/Proxies  extractProxy?(Lorg/openqa/selenium/Capabilities;)Lorg/openqa/selenium/Proxy; org/openqa/selenium/Proxy Z getHttpProxy: java/lang/String indexOf(Ljava/lang/String;)I  substring(II)Ljava/lang/String; (I)Ljava/lang/String; java/lang/Integer parseInt  setProxy(Ljava/lang/String;I)V capabilities"Lorg/openqa/selenium/Capabilities;Lorg/openqa/selenium/Proxy; fullProxyLjava/lang/String;indexIhostport | Z getVersion- split'(Ljava/lang/String;)[Ljava/lang/String; | ZgetBrowserNamehtmlunit equals(Ljava/lang/Object;)Zfirefox l " FIREFOX_3internet explorer l "INTERNET_EXPLORER_6 l "INTERNET_EXPLORER_7 l "INTERNET_EXPLORER_8java/lang/NumberFormatException browserNamebrowserVersion splitVersion[Ljava/lang/String;e!Ljava/lang/NumberFormatException;  C newWebClient G URL_ABOUT_BLANKLjava/net/URL;  java/net/URL ZtoString G ^ setHomePage G j$setThrowExceptionOnFailingStatusCode G j"setPrintContentOnFailingStatusCode   G jsetJavaScriptEnabled G jsetRedirectEnabled3com/gargoylesoftware/htmlunit/WaitingRefreshHandler 1 G setRefreshHandler1(Lcom/gargoylesoftware/htmlunit/RefreshHandler;)V G jsetUseInsecureSSL&org/openqa/selenium/WebDriverException  - (Ljava/lang/Throwable;)V   G setProxyConfig.(Lcom/gargoylesoftware/htmlunit/ProxyConfig;)V  modifyWebClientT(Lcom/gargoylesoftware/htmlunit/WebClient;)Lcom/gargoylesoftware/htmlunit/WebClient;&java/security/GeneralSecurityExceptionclient(Ljava/security/GeneralSecurityException; Gr)com/gargoylesoftware/htmlunit/ProxyConfig  - setAutoProxy 1 ! "^setProxyAutoConfigUrl autoProxyUrl % ]&(Ljava/net/URL;)V ( -^*java/lang/ExceptionurlfullUrlLjava/lang/Exception; /10'com/gargoylesoftware/htmlunit/WebWindow 2K getTopWindow G4 56getPage4(Ljava/net/URL;)Lcom/gargoylesoftware/htmlunit/Page; 8 92 pickWindow;java/net/UnknownHostException=java/net/ConnectException?-org/openqa/selenium/htmlunit/HtmlUnitKeyboard >Q B ()D*org/openqa/selenium/htmlunit/HtmlUnitMouse CF -G_(Lorg/openqa/selenium/htmlunit/HtmlUnitDriver;Lorg/openqa/selenium/htmlunit/HtmlUnitKeyboard;)V I *+ getCurrentUrl L MN getRawUrl()Ljava/net/URL;getTitle Q RSlastPage&()Lcom/gargoylesoftware/htmlunit/Page;U+com/gargoylesoftware/htmlunit/html/HtmlPageW.com/gargoylesoftware/htmlunit/html/FrameWindow V1 /Z [SgetEnclosedPage T] ^Z getTitleTextpage$Lcom/gargoylesoftware/htmlunit/Page; findElement:(Lorg/openqa/selenium/By;)Lorg/openqa/selenium/WebElement; d ae](Lorg/openqa/selenium/By;Lorg/openqa/selenium/SearchContext;)Lorg/openqa/selenium/WebElement;byLorg/openqa/selenium/By; findElements*(Lorg/openqa/selenium/By;)Ljava/util/List; SignatureL(Lorg/openqa/selenium/By;)Ljava/util/List; m hnM(Lorg/openqa/selenium/By;Lorg/openqa/selenium/SearchContext;)Ljava/util/List; getPageSourceq&com/gargoylesoftware/htmlunit/SgmlPage ps tZasXml vxw"com/gargoylesoftware/htmlunit/Page yzgetWebResponse-()Lcom/gargoylesoftware/htmlunit/WebResponse; |~})com/gargoylesoftware/htmlunit/WebResponse ZgetContentAsStringresponse+Lcom/gargoylesoftware/htmlunit/WebResponse;close,com/gargoylesoftware/htmlunit/TopLevelWindow  2quit G 2closeAllWindowsgetWindowHandles()Ljava/util/Set;%()Ljava/util/Set;java/util/HashSet 1 G getTopLevelWindows()Ljava/util/List; java/util/List iterator()Ljava/util/Iterator; java/util/Iterator next()Ljava/lang/Object; java/lang/System identityHashCode(Ljava/lang/Object;)I  valueOf  java/util/Set add  hasNext allHandlesLjava/util/Set;windowLocalVariableTypeTable#Ljava/util/Set;getWindowHandle executeScript9(Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/Object;  getPageToInjectScriptInto/()Lcom/gargoylesoftware/htmlunit/html/HtmlPage;  $parseArgumentIntoJavsacriptParameter&(Ljava/lang/Object;)Ljava/lang/Object;java/lang/StringBuilder function() { (  append-(Ljava/lang/String;)Ljava/lang/StringBuilder;};  T executeJavaScript@(Ljava/lang/String;)Lcom/gargoylesoftware/htmlunit/ScriptResult; *com/gargoylesoftware/htmlunit/ScriptResult getJavaScriptResult3net/sourceforge/htmlunit/corejs/javascript/Function / getScriptObject;net/sourceforge/htmlunit/corejs/javascript/ScriptableObject T getDocumentElement2()Lcom/gargoylesoftware/htmlunit/html/HtmlElement; T #executeJavaScriptFunctionIfPossible(Lnet/sourceforge/htmlunit/corejs/javascript/Function;Lnet/sourceforge/htmlunit/corejs/javascript/Scriptable;[Ljava/lang/Object;Lcom/gargoylesoftware/htmlunit/html/DomNode;)Lcom/gargoylesoftware/htmlunit/ScriptResult;  parseNativeJavascriptResultscriptargs[Ljava/lang/Object;-Lcom/gargoylesoftware/htmlunit/html/HtmlPage; parametersiresult,Lcom/gargoylesoftware/htmlunit/ScriptResult;func5Lnet/sourceforge/htmlunit/corejs/javascript/Function;executeAsyncScript0org/openqa/selenium/htmlunit/AsyncScriptExecutor  -1(Lcom/gargoylesoftware/htmlunit/html/HtmlPage;J)V  executeLjava/lang/Object; ~'java/lang/UnsupportedOperationException:Javascript is not enabled for this HtmlUnitDriver instance (+Cannot execute JS against a plain text page7Can't execute JavaScript before a page has been loaded! ( /org/openqa/selenium/htmlunit/HtmlUnitWebElement .com/gargoylesoftware/htmlunit/html/HtmlElement java/lang/Numberjava/lang/Boolean  getClass()Ljava/lang/Class; java/lang/Class isArrayjava/util/Collection"java/lang/IllegalArgumentException:Argument must be a string, number, boolean or WebElement:  !-(Ljava/lang/Object;)Ljava/lang/StringBuilder;# (%) ( ( ) getElement  + ,?()Lnet/sourceforge/htmlunit/corejs/javascript/ScriptableObject;.java/util/ArrayList -1   3 45toArray()[Ljava/lang/Object;argelement0Lcom/gargoylesoftware/htmlunit/html/HtmlElement;listLjava/util/List;o$Ljava/util/List; getKeyboard ()Lorg/openqa/selenium/Keyboard;getMouse()Lorg/openqa/selenium/Mouse;actionsBuilder:()Lorg/openqa/selenium/interactions/ActionChainsGenerator;D=org/openqa/selenium/interactions/DefaultActionChainsGenerator CF -G"(Lorg/openqa/selenium/WebDriver;)VI>com/gargoylesoftware/htmlunit/javascript/host/html/HTMLElement HK LgetDomNodeOrDie N OPnewHtmlUnitWebElementR(Lcom/gargoylesoftware/htmlunit/html/HtmlElement;)Lorg/openqa/selenium/WebElement; S.U.0 W XYendsWith(Ljava/lang/String;)Z  [ \] longValue()J _a`java/lang/Long b(J)Ljava/lang/Long;  d ef doubleValue()D hjijava/lang/Double k(D)Ljava/lang/Double;m7net/sourceforge/htmlunit/corejs/javascript/NativeObjectojava/util/HashMap nq -r(Ljava/util/Map;)V tvu java/util/Map wentrySet zjava/util/Map$Entry y| }getValue y setValue6net/sourceforge/htmlunit/corejs/javascript/NativeArray-org/openqa/selenium/htmlunit/HtmlUnitDriver$2  -h(Lorg/openqa/selenium/htmlunit/HtmlUnitDriver;Lnet/sourceforge/htmlunit/corejs/javascript/NativeArray;)V  parseJavascriptResultsList[(Lorg/openqa/selenium/htmlunit/HtmlUnitDriver$JavaScriptResultsCollection;)Ljava/util/List;Acom/gargoylesoftware/htmlunit/javascript/host/html/HTMLCollection-org/openqa/selenium/htmlunit/HtmlUnitDriver$3  -s(Lorg/openqa/selenium/htmlunit/HtmlUnitDriver;Lcom/gargoylesoftware/htmlunit/javascript/host/html/HTMLCollection;)V4net/sourceforge/htmlunit/corejs/javascript/UndefinedvaluenLjava/lang/Number;smapLjava/util/Map;Ljava/util/Map$Entry;array8Lnet/sourceforge/htmlunit/corejs/javascript/NativeArray; collectionILorg/openqa/selenium/htmlunit/HtmlUnitDriver$JavaScriptResultsCollection;CLcom/gargoylesoftware/htmlunit/javascript/host/html/HTMLCollection;5Ljava/util/Map;;Ljava/util/Map$Entry;o(Lorg/openqa/selenium/htmlunit/HtmlUnitDriver$JavaScriptResultsCollection;)Ljava/util/List; Gorg/openqa/selenium/htmlunit/HtmlUnitDriver$JavaScriptResultsCollection  getLength()I - -(I)V  item(I)Ljava/lang/Object;switchTo/()Lorg/openqa/selenium/WebDriver$TargetLocator;Aorg/openqa/selenium/htmlunit/HtmlUnitDriver$HtmlUnitTargetLocator  -s(Lorg/openqa/selenium/htmlunit/HtmlUnitDriver;Lorg/openqa/selenium/htmlunit/HtmlUnitDriver$HtmlUnitTargetLocator;)VswitchToDefaultContentOfWindow,(Lcom/gargoylesoftware/htmlunit/WebWindow;)Vnavigate,()Lorg/openqa/selenium/WebDriver$Navigation;>org/openqa/selenium/htmlunit/HtmlUnitDriver$HtmlUnitNavigation  -p(Lorg/openqa/selenium/htmlunit/HtmlUnitDriver;Lorg/openqa/selenium/htmlunit/HtmlUnitDriver$HtmlUnitNavigation;)VfindElementByLinkText4(Ljava/lang/String;)Lorg/openqa/selenium/WebElement;java/lang/IllegalStateExceptionCannot find links for (  Ztrim T  getAnchors-com/gargoylesoftware/htmlunit/html/HtmlAnchor  ZasText*org/openqa/selenium/NoSuchElementExceptionNo link found with text: (selector expectedTextanchorsanchor/Lcom/gargoylesoftware/htmlunit/html/HtmlAnchor;ALjava/util/List;  -`(Lorg/openqa/selenium/htmlunit/HtmlUnitDriver;Lcom/gargoylesoftware/htmlunit/html/HtmlElement;)VfindElementsByLinkText$(Ljava/lang/String;)Ljava/util/List;F(Ljava/lang/String;)Ljava/util/List;elements2Ljava/util/List;findElementById#Unable to locate element by id for T getHtmlElementByIdD(Ljava/lang/String;)Lcom/gargoylesoftware/htmlunit/html/HtmlElement;"Unable to locate element with ID: 6com/gargoylesoftware/htmlunit/ElementNotFoundExceptionid8Lcom/gargoylesoftware/htmlunit/ElementNotFoundException;findElementsById //*[@id='']  findElementsByXPathfindElementByCssSelector$Unable to locate element using css: T  querySelector@(Ljava/lang/String;)Lcom/gargoylesoftware/htmlunit/html/DomNode;%Returned node was not an HTML elementusingnode,Lcom/gargoylesoftware/htmlunit/html/DomNode;findElementsByCssSelector T   querySelectorAllD(Ljava/lang/String;)Lcom/gargoylesoftware/htmlunit/html/DomNodeList;  .com/gargoylesoftware/htmlunit/html/DomNodeList*com/gargoylesoftware/htmlunit/html/DomNodeallNodes0Lcom/gargoylesoftware/htmlunit/html/DomNodeList;toReturn^Lcom/gargoylesoftware/htmlunit/html/DomNodeList;findElementByName%Unable to locate element by name for T getElementsByName  size  ]!$Unable to locate element with name: name allElementsBLjava/util/List;findElementsByName ' ()#convertRawHtmlElementsToWebElements"(Ljava/util/List;)Ljava/util/List;findElementByTagName T, - getElementsByTagName /0org/w3c/dom/NodeList /2 3(I)Lorg/w3c/dom/Node;Lorg/w3c/dom/NodeList;findElementsByTagNameLorg/w3c/dom/Node;findElementByXPath9&Unable to locate element by xpath for T; <getFirstByXPath>Unable to locate a node using @&Unable to locate element with xpath %s B CDformat9(Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/String; TF G getByXPathnodesLjava/util/List<*>;G(Ljava/util/List<*>;)Ljava/util/List; GL MisJavaScriptEnabledimplicitlyWaitFor3(Ljava/util/concurrent/Callable;)Ljava/lang/Object;?(Ljava/util/concurrent/Callable;)TX; R S]currentTimeMillis UWVjava/util/concurrent/Callable Xcall Z [ booleanValue _ `a sleepQuietly(J)Vcjava/lang/RuntimeException conditionLjava/util/concurrent/Callable;end lastException$Ljava/util/concurrent/Callable;TX; getWebClient+()Lcom/gargoylesoftware/htmlunit/WebClient; vm nNgetUrlmanage)()Lorg/openqa/selenium/WebDriver$Options;r;org/openqa/selenium/htmlunit/HtmlUnitDriver$HtmlUnitOptions qt -um(Lorg/openqa/selenium/htmlunit/HtmlUnitDriver;Lorg/openqa/selenium/htmlunit/HtmlUnitDriver$HtmlUnitOptions;)VfindElementByPartialLinkText x yzcontains(Ljava/lang/CharSequence;)ZfindElementsByPartialLinkText allAnchorsLjava/util/Iterator;ELjava/util/Iterator;-org/openqa/selenium/htmlunit/HtmlUnitDriver$4  -k(Lorg/openqa/selenium/htmlunit/HtmlUnitDriver;Lorg/openqa/selenium/By;Lorg/openqa/selenium/SearchContext;)V  NOorg/openqa/selenium/WebElementlocatorcontext#Lorg/openqa/selenium/SearchContext;o(Lorg/openqa/selenium/By;Lorg/openqa/selenium/SearchContext;)Ljava/util/List; org/openqa/selenium/By h5(Lorg/openqa/selenium/SearchContext;)Ljava/util/List;  isEmptyfound java/lang/Thread asleepjava/lang/InterruptedExceptionmsaccess$0X(Lorg/openqa/selenium/htmlunit/HtmlUnitDriver;)Lcom/gargoylesoftware/htmlunit/WebWindow;access$1Y(Lorg/openqa/selenium/htmlunit/HtmlUnitDriver;Lcom/gargoylesoftware/htmlunit/WebWindow;)Vaccess$2X(Lorg/openqa/selenium/htmlunit/HtmlUnitDriver;)Lcom/gargoylesoftware/htmlunit/WebClient;access$3  access$4=(Lorg/openqa/selenium/htmlunit/HtmlUnitDriver;)Ljava/net/URL;access$5J(Lorg/openqa/selenium/htmlunit/HtmlUnitDriver;)Lorg/openqa/selenium/Speed;access$6K(Lorg/openqa/selenium/htmlunit/HtmlUnitDriver;Lorg/openqa/selenium/Speed;)Vaccess$71(Lorg/openqa/selenium/htmlunit/HtmlUnitDriver;J)Vaccess$8 SourceFileHtmlUnitDriver.java InnerClassesEntry(org/openqa/selenium/WebDriver$Navigation Navigation%org/openqa/selenium/WebDriver$OptionsOptions+org/openqa/selenium/WebDriver$TargetLocator TargetLocatorHtmlUnitNavigationHtmlUnitOptionsHtmlUnitTargetLocator**+@D**DFL*DNY*PS**DW[*_*ad2 vo pqwx#y.{=HMQeRfgR!"-2/4*hd e fg-j/I *kq*sd e fg -v/a*+wq*+{s+F+M,N-8-6$-:-`6* *-d6 "'+39BOZ`eHafga">'93-BO yz/nLM*N--2M-2L *LM*Ú*L*M+Ùɰ+Ù<,6'#ΰѰ԰԰:԰k]d^!(+9@GPT]ce>c-!BC/Y*+M,,,,*,,Y, NY-* ,*  *,27:d6 "'2:;DKS e*YfgY!"S; C/= GY+de fg !"/6+defg/_*Y+ *D*  d# $%e fg^/_*Y * + *D*  d( )*+efg#]^/1+Ù *$Y+'M NY-*,$!)d"/ 016!7"8+;0<e41fg1+,+," -]&/9**L.L*D+3WMM MY,*_*7*a:<!)d* G HIK!M"N+Q0R4S8Te 9fg9," -c2/O*>Y*@A*CY**AEHdW XYe fg92/E*L**DFLd]^`e fgJZ/P*KL++dde f iefg +OZ/|4*PL+ +T*LV*LVXYL+T\dmnoqr,ue4fg/_`ab/;*+*cdyefgfghijk/;*+*ld}efgfgoZ/|&*PL++p +pr+uM,{d  !e &fg!_`!2/Y#*L*L.***>@Dd"e #fg2/S*D*D*D*Lde fgj/;YL*DN-/M+,W-+d"09e ;fg3" 3Z/:*L.de fg/s*N,:6*,2S,Yķ+˶ǶL-+::-*L-޶:*d> )AHRSUacgleRsfgssn_ gH+R!/*NY-*<+,:*de4fg_/@*Y*PL+TY*_Y+Td*  )0;e@fg)R`/+\+ U+ N+G+@+6+/YY+"+$Ƕͷ&++'M,*+ + *+>-Y/M+0:N,*-1W,2+db#-48BY\`got{e4fg6o7839: ; 39<=>//*Ade fg?@//*Hde fgAB/3 CY*Ede  fg/+ә+ӶM+M,H*,HJM, 5, N-Q:RTV -Z^-cg,lJnY,lpN-sx:"y:*{~W-,,NY*-:*,,NY*-:*,,dr '.39PX`g s!"!$'(*478:DGHKez fg3-9's;s;j/4-Y+M>,*+1W+,dOPQ%P2Se*4fg4&9:" &9</4 Y*dWe  fg/^+YM,T*+Ld[\]_e fg _`/4 Y*dbe  fgRS/4 *LYdfe  fg/ *PTYYŷ*Pͷǿ+M*PTN-:%:,жȶÙ *M׻YYշ,Ƕͷ׿d& j k&n+p6qMr\scqmve4fg+[6P:M 6POP/> Y*+ްdze fg 78j/e-Y/M*PT,+N*PT::+:-жȶÙ,*M1W,d* ~%=LYce>efge]:L%@:=]%@/R*PTYY*Pͷ׿*PT+M*,MMYY+Ƕͷ׿&78d &289e*RfgR2789j/P*Y+ǶͶdefg/M*PTYY*Pͷ׿*PT+M, *, MY׿d &29Be MfgM2j/*PTYY*Pͷ׿*PT+M-Y/N, :5: -* M1WY׿-d*  &2:QYlwe4fg2Q:I:Q&2Q:I/c*PTYY*Pͷǿ*PT+M,*, MYY +Ƕͷ׿d &2;Je cfgc"21#: 21#$%j/$*PT -Y/*PT+M*,&d e $fg$#: #$*/c*PTYY*Pͷǿ*PT++M,.*,1 MYY +Ƕͷ׿d &2;Je cfgc"21#45j/d*PT -Y/*PT++M-Y,.N6(,1: -* M1W,.-d*  ,2<DTbe>dfgdF#4,8:/3<6 ,87/u*PTYY8*Pͷǿ*PT+:M,YY=+Ƕͷ׿, *, MY?Y+SA׿d" &26OV_e ufgu2Cj/$*PT -Y/*PT+EM*,&d   e $fg$H: HI()jJ/=-Y/M+:!N- ,*- M1W,d"1;e*=fg=H:5:=HI5/2*DKde fguj/J**Dd  efgNOjP/+kQ*:aA::+T: ::Y\^Q b bY)dF   36;>DLQY_ie>kfgkde bf& _g-5-kdh5ijk//*Dde fgJK//*Lde fgMN/R*PL++ld  efg _`op/4 qY*sde  fgv/{*PTYYŷ*Pͷǿ*PTM,:N-+w *-MݻYYշ+Ƕͷ׿d" &1GRXbe*{fg{1J:G 1J{j/O*PTM,N-Y/:(-:+w*M1W-d&  )5CLe>OfgO D:=|}4:)  D=|~4ae/P*Y*+,de fgghnj/(Q*:aB+,:Q!d %e4(fg(fg( f&:  `a/C Mde  &/%*Ldje/&*+Ldje/%*Ddie/&*+dZe/%*Kde/%*8doe/&*+8doe/&*:dpe/&*<dqej yt    Nq PK lC>y?AA-org/openqa/selenium/htmlunit/.svn/all-wcpropsK 25 svn:wc:ra_dav:version-url V 70 /svn/!svn/ver/11234/trunk/java/client/src/org/openqa/selenium/htmlunit END HtmlUnitDriver.java K 25 svn:wc:ra_dav:version-url V 90 /svn/!svn/ver/11234/trunk/java/client/src/org/openqa/selenium/htmlunit/HtmlUnitDriver.java END AsyncScriptExecutor.java K 25 svn:wc:ra_dav:version-url V 95 /svn/!svn/ver/11221/trunk/java/client/src/org/openqa/selenium/htmlunit/AsyncScriptExecutor.java END KeyboardModifiersState.java K 25 svn:wc:ra_dav:version-url V 98 /svn/!svn/ver/11221/trunk/java/client/src/org/openqa/selenium/htmlunit/KeyboardModifiersState.java END HtmlUnitKeyboard.java K 25 svn:wc:ra_dav:version-url V 92 /svn/!svn/ver/11221/trunk/java/client/src/org/openqa/selenium/htmlunit/HtmlUnitKeyboard.java END HtmlUnitWebElement.java K 25 svn:wc:ra_dav:version-url V 94 /svn/!svn/ver/11221/trunk/java/client/src/org/openqa/selenium/htmlunit/HtmlUnitWebElement.java END build.desc K 25 svn:wc:ra_dav:version-url V 81 /svn/!svn/ver/11226/trunk/java/client/src/org/openqa/selenium/htmlunit/build.desc END HtmlUnitMouse.java K 25 svn:wc:ra_dav:version-url V 89 /svn/!svn/ver/11221/trunk/java/client/src/org/openqa/selenium/htmlunit/HtmlUnitMouse.java END InputKeysContainer.java K 25 svn:wc:ra_dav:version-url V 94 /svn/!svn/ver/11221/trunk/java/client/src/org/openqa/selenium/htmlunit/InputKeysContainer.java END PK lC>#l)org/openqa/selenium/htmlunit/.svn/entries8 dir 11264 http://selenium.googlecode.com/svn/trunk/java/client/src/org/openqa/selenium/htmlunit http://selenium.googlecode.com/svn 2011-02-01T16:42:16.522142Z 11234 eran.mes@gmail.com svn:special svn:externals svn:needs-lock 07704840-8298-11de-bf8c-fd130f914ac9 HtmlUnitDriver.java file 2011-02-03T12:01:16.000000Z 64f2c8d7a7519faf1f62d9c51bfad67d 2011-02-01T16:42:16.522142Z 11234 eran.mes@gmail.com AsyncScriptExecutor.java file 2011-02-03T12:01:16.000000Z 94fac94e209547d23e5e3147d648595e 2010-12-04T09:25:40.545281Z 10513 jmleyba KeyboardModifiersState.java file 2011-02-03T12:01:16.000000Z 599c99f2ce80c0bcb451bb503e6d58d4 2010-10-29T10:01:48.383793Z 10096 eran.mes@gmail.com HtmlUnitKeyboard.java file 2011-02-03T12:01:16.000000Z cbcd6b4760f7c1dd43757b68ba685fb8 2010-10-29T10:01:48.383793Z 10096 eran.mes@gmail.com HtmlUnitWebElement.java file 2011-02-03T12:01:16.000000Z 01ac703b91898d110621f6605a38b8c1 2011-01-18T16:04:46.488656Z 11008 eran.mes@gmail.com build.desc file 2011-02-03T12:01:16.000000Z 7d3937a3516ed06b7cde93c392912a88 2011-02-01T13:59:17.176547Z 11226 simon.m.stewart HtmlUnitMouse.java file 2011-02-03T12:01:16.000000Z f88f86bd1846e649bf169e8fb1e7f40b 2011-01-19T17:08:48.894275Z 11020 eran.mes@gmail.com InputKeysContainer.java file 2011-02-03T12:01:16.000000Z dc14f7e78293de922f962a38fb19497b 2010-10-29T10:01:48.383793Z 10096 eran.mes@gmail.com PK lC>G(org/openqa/selenium/htmlunit/.svn/format8 PK lC> *[22Morg/openqa/selenium/htmlunit/.svn/text-base/AsyncScriptExecutor.java.svn-base/* Copyright 2007-2010 WebDriver committers Copyright 2007-2010 Google Inc. Portions copyright 2007 ThoughtWorks, Inc Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package org.openqa.selenium.htmlunit; import org.openqa.selenium.TimeoutException; import org.openqa.selenium.WebDriverException; import com.gargoylesoftware.htmlunit.ScriptException; import com.gargoylesoftware.htmlunit.ScriptResult; import com.gargoylesoftware.htmlunit.html.HtmlPage; import net.sourceforge.htmlunit.corejs.javascript.Function; import net.sourceforge.htmlunit.corejs.javascript.NativeJavaObject; import java.util.concurrent.CountDownLatch; import java.util.concurrent.TimeUnit; /** * Injects an asynchronous script into the current page for execution. * The script should signla that it is finished by invoking the callback * function, which will always be the last argument passed to the injected * script. */ class AsyncScriptExecutor { private final HtmlPage page; private final long timeoutMillis; /** * Prepares a new asynchronous script for execution. * * @param page The page to inject the script into. * @param timeoutMillis How long to wait for the script to complete, in * milliseconds. */ AsyncScriptExecutor(HtmlPage page, long timeoutMillis) { this.page = page; this.timeoutMillis = timeoutMillis; } /** * Injects an asynchronous script for execution and waits for its result. * * @param scriptBody The script body. * @param parameters The script parameters, which can be referenced using the * {@code arguments} JavaScript object. * @return The script result. */ public Object execute(String scriptBody, Object[] parameters) { AsyncScriptResult asyncResult = new AsyncScriptResult(); Function function = createInjectedScriptFunction(scriptBody, asyncResult); try { page.executeJavaScriptFunctionIfPossible(function, function, parameters, page.getDocumentElement()); } catch (ScriptException e) { throw new WebDriverException(e); } try { return asyncResult.waitForResult(); } catch (InterruptedException e) { throw new WebDriverException(e); } } private Function createInjectedScriptFunction(String userScript, AsyncScriptResult asyncResult) { String script = "function() {" + " var self = this, timeoutId;" + " var cleanUp = function() {" + " window.clearTimeout(timeoutId);" + " if (window.detachEvent) {" + " window.detachEvent('onunload', catchUnload);" + " } else {" + " window.removeEventListener('unload', catchUnload, false);" + " }" + " };" + " var self = this, timeoutId, catchUnload = function() {" + " cleanUp();" + " self.host.unload();" + " };" + // Convert arguments into an actual array, then add the callback object. " arguments = Array.prototype.slice.call(arguments, 0);" + " arguments.push(function(value) {" + " cleanUp();" + " self.host.callback(typeof value == 'undefined' ? null : value);" + " });" + // Add an event listener to trap unload events; page loads are not supported with async // script execution. " if (window.attachEvent) {" + " window.attachEvent('onunload', catchUnload);" + " } else {" + " window.addEventListener('unload', catchUnload, false);" + " }" + // Execute the user's script " (function() {" + userScript + "}).apply(null, arguments);" + // Register our timeout for the script. If the script invokes the callback immediately // (e.g. it's not really async), then this will still fire. That's OK because the host // object should ignore the extra timeout. " timeoutId = window.setTimeout(function() {" + " self.host.timeout();" + " }, " + timeoutMillis + ");" + "}"; // Compile our script. ScriptResult result = page.executeJavaScript(script); Function function = (Function) result.getJavaScriptResult(); // Finally, update the script with the callback host object. function.put("host", function, new NativeJavaObject(function, asyncResult, null)); return function; } /** * Host object used to capture the result of an asynchronous script. * *

This class has public visibility so it can be correctly wrapped in a * {@link NativeJavaObject}. * * @see AsyncScriptExecutor */ public static class AsyncScriptResult { private final CountDownLatch latch = new CountDownLatch(1); private volatile Object value = null; private volatile boolean isTimeout = false; private volatile boolean unloadDetected = false; /** * Waits for the script to signal it is done by calling * {@link #callback(Object) callback}. * * @return The script result. * @throws InterruptedException If this thread is interrupted before a * result is ready. */ Object waitForResult() throws InterruptedException { long startTimeNanos = System.nanoTime(); latch.await(); if (isTimeout) { long elapsedTimeNanos = System.nanoTime() - startTimeNanos; long elapsedTimeMillis = TimeUnit.NANOSECONDS.toMillis(elapsedTimeNanos); throw new TimeoutException( "Timed out waiting for async script result after " + elapsedTimeMillis + "ms"); } if (unloadDetected) { throw new WebDriverException( "Detected a page unload event; executeAsyncScript does not work across page loads"); } return value; } /** * Callback function to be exposed in JavaScript. * *

This method has public visibility for Rhino and should never be * called by code outside of Rhino. * * @param value The asynchronous script result. */ public void callback(Object value) { if (latch.getCount() > 0) { this.value = value; latch.countDown(); } } /** * Function exposed in JavaScript to signal a timeout. Has no effect if * called after the {@link #callback(Object) callback} function. * *

This method has public visibility for Rhino and should never be * called by code outside of Rhino. */ public void timeout() { if (latch.getCount() > 0) { isTimeout = true; latch.countDown(); } } /** * Function exposed to JavaScript to signal that a page unload event was * fired. WebDriver's asynchronous script execution model does not permit * new page loads. * *

This method has public visibility for Rhino and should never be * called by code outside of Rhino. */ public void unload() { if (latch.getCount() > 0) { unloadDetected = true; latch.countDown(); } } } } PK lC>aHorg/openqa/selenium/htmlunit/.svn/text-base/HtmlUnitDriver.java.svn-base/* Copyright 2007-2009 WebDriver committers Copyright 2007-2009 Google Inc. Portions copyright 2007 ThoughtWorks, Inc Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package org.openqa.selenium.htmlunit; import org.openqa.selenium.interactions.ActionChainsGenerator; import org.openqa.selenium.Alert; import org.openqa.selenium.By; import org.openqa.selenium.Capabilities; import org.openqa.selenium.Cookie; import org.openqa.selenium.HasInputDevices; import org.openqa.selenium.InvalidCookieDomainException; import org.openqa.selenium.JavascriptExecutor; import org.openqa.selenium.Keyboard; import org.openqa.selenium.Mouse; import org.openqa.selenium.NoSuchElementException; import org.openqa.selenium.NoSuchFrameException; import org.openqa.selenium.NoSuchWindowException; import org.openqa.selenium.Proxy; import org.openqa.selenium.SearchContext; import org.openqa.selenium.Speed; import org.openqa.selenium.UnableToSetCookieException; import org.openqa.selenium.WebDriver; import org.openqa.selenium.WebDriverException; import org.openqa.selenium.WebElement; import org.openqa.selenium.browserlaunchers.CapabilityType; import org.openqa.selenium.browserlaunchers.Proxies; import org.openqa.selenium.interactions.DefaultActionChainsGenerator; import org.openqa.selenium.internal.FindsByCssSelector; import org.openqa.selenium.internal.FindsById; import org.openqa.selenium.internal.FindsByLinkText; import org.openqa.selenium.internal.FindsByName; import org.openqa.selenium.internal.FindsByTagName; import org.openqa.selenium.internal.FindsByXPath; import com.gargoylesoftware.htmlunit.BrowserVersion; import com.gargoylesoftware.htmlunit.CookieManager; import com.gargoylesoftware.htmlunit.ElementNotFoundException; import com.gargoylesoftware.htmlunit.Page; import com.gargoylesoftware.htmlunit.ProxyConfig; import com.gargoylesoftware.htmlunit.ScriptResult; import com.gargoylesoftware.htmlunit.SgmlPage; import com.gargoylesoftware.htmlunit.TopLevelWindow; import com.gargoylesoftware.htmlunit.WaitingRefreshHandler; import com.gargoylesoftware.htmlunit.WebClient; import com.gargoylesoftware.htmlunit.WebResponse; import com.gargoylesoftware.htmlunit.WebWindow; import com.gargoylesoftware.htmlunit.WebWindowEvent; import com.gargoylesoftware.htmlunit.WebWindowListener; import com.gargoylesoftware.htmlunit.WebWindowNotFoundException; import com.gargoylesoftware.htmlunit.html.BaseFrame; import com.gargoylesoftware.htmlunit.html.DomNode; import com.gargoylesoftware.htmlunit.html.DomNodeList; import com.gargoylesoftware.htmlunit.html.FrameWindow; import com.gargoylesoftware.htmlunit.html.HtmlAnchor; import com.gargoylesoftware.htmlunit.html.HtmlElement; import com.gargoylesoftware.htmlunit.html.HtmlPage; import com.gargoylesoftware.htmlunit.javascript.host.html.HTMLCollection; import com.gargoylesoftware.htmlunit.javascript.host.html.HTMLElement; import net.sourceforge.htmlunit.corejs.javascript.Function; import net.sourceforge.htmlunit.corejs.javascript.NativeArray; import net.sourceforge.htmlunit.corejs.javascript.NativeObject; import net.sourceforge.htmlunit.corejs.javascript.ScriptableObject; import net.sourceforge.htmlunit.corejs.javascript.Undefined; import org.openqa.selenium.internal.WrapsElement; import org.w3c.dom.Node; import org.w3c.dom.NodeList; import java.io.IOException; import java.net.ConnectException; import java.net.URL; import java.net.UnknownHostException; import java.security.GeneralSecurityException; import java.util.ArrayList; import java.util.Collection; import java.util.HashMap; import java.util.HashSet; import java.util.Iterator; import java.util.List; import java.util.Map; import java.util.Map.Entry; import java.util.Set; import java.util.concurrent.Callable; import java.util.concurrent.TimeUnit; public class HtmlUnitDriver implements WebDriver, SearchContext, JavascriptExecutor, FindsById, FindsByLinkText, FindsByXPath, FindsByName, FindsByCssSelector, FindsByTagName, HasInputDevices { private WebClient webClient; private WebWindow currentWindow; private boolean enableJavascript; private ProxyConfig proxyConfig; private final BrowserVersion version; private Speed speed = Speed.FAST; private long implicitWait = 0; private long scriptTimeout = 0; private HtmlUnitKeyboard keyboard; private HtmlUnitMouse mouse; private boolean gotPage; public HtmlUnitDriver(BrowserVersion version) { this.version = version; webClient = createWebClient(version); currentWindow = webClient.getCurrentWindow(); webClient.addWebWindowListener(new WebWindowListener() { public void webWindowOpened(WebWindowEvent webWindowEvent) { // Ignore } public void webWindowContentChanged(WebWindowEvent event) { if (event.getWebWindow() != currentWindow) { return; } // Do we need to pick some new default content? switchToDefaultContentOfWindow(currentWindow); } public void webWindowClosed(WebWindowEvent event) { // Check if the event window refers to us or one of our parent windows // setup the currentWindow appropriately if necessary WebWindow curr = currentWindow; do { // Instance equality is okay in this case if (curr == event.getWebWindow()) { currentWindow = currentWindow.getTopWindow(); return; } curr = curr.getParentWindow(); } while (curr != currentWindow.getTopWindow()); } }); // Now put us on the home page, like a real browser get(webClient.getHomePage()); gotPage = false; resetKeyboardAndMouseState(); } public HtmlUnitDriver() { this(false); } public HtmlUnitDriver(boolean enableJavascript) { this(BrowserVersion.getDefault()); setJavascriptEnabled(enableJavascript); } /** * Note: There are two configuration modes for the HtmlUnitDriver using this * constructor. The first is where the browserName is "firefox", * "internet explorer" and browserVersion denotes the desired version. * The second one is where the browserName is "htmlunit" and the * browserVersion denotes the required browser AND its version. In this * mode the browserVersion could either be "firefox" for Firefox or * "internet explorer-7" for IE 7. The Remote WebDriver uses the second mode * - the first mode is deprecated and should not be used. */ public HtmlUnitDriver(Capabilities capabilities) { this(determineBrowserVersion(capabilities)); setJavascriptEnabled(capabilities.isJavascriptEnabled()); if (capabilities.getCapability(CapabilityType.PROXY) != null) { Proxy proxy = Proxies.extractProxy(capabilities); String fullProxy = proxy.getHttpProxy(); if (fullProxy != null) { int index = fullProxy.indexOf(":"); if (index != -1) { String host = fullProxy.substring(0, index); int port = Integer.parseInt(fullProxy.substring(index + 1)); setProxy(host, port); } else { setProxy(fullProxy, 0); } } } } // Package visibility for testing static BrowserVersion determineBrowserVersion(Capabilities capabilities) { String browserName = null; String browserVersion = null; String[] splitVersion = capabilities.getVersion().split("-"); if (splitVersion.length > 1) { browserVersion = splitVersion[1]; browserName = splitVersion[0]; } else { browserName = capabilities.getVersion(); browserVersion = ""; } // This is for backwards compatibility - in case there are users who are trying to // configure the HtmlUnitDriver by using the c'tor with capabilities. if (! capabilities.getBrowserName().equals("htmlunit")) { browserName = capabilities.getBrowserName(); browserVersion = capabilities.getVersion(); } if ("firefox".equals(browserName)) { return BrowserVersion.FIREFOX_3; } if ("internet explorer".equals(browserName)) { // Try and convert the version try { int version = Integer.parseInt(browserVersion); switch (version) { case 6: return BrowserVersion.INTERNET_EXPLORER_6; case 7: return BrowserVersion.INTERNET_EXPLORER_7; case 8: return BrowserVersion.INTERNET_EXPLORER_8; default: return BrowserVersion.INTERNET_EXPLORER_8; } } catch (NumberFormatException e) { return BrowserVersion.INTERNET_EXPLORER_8; } } return BrowserVersion.getDefault(); } private WebClient createWebClient(BrowserVersion version) { WebClient client = newWebClient(version); client.setHomePage(WebClient.URL_ABOUT_BLANK.toString()); client.setThrowExceptionOnFailingStatusCode(false); client.setPrintContentOnFailingStatusCode(false); client.setJavaScriptEnabled(enableJavascript); client.setRedirectEnabled(true); client.setRefreshHandler(new WaitingRefreshHandler()); try { client.setUseInsecureSSL(true); } catch (GeneralSecurityException e) { throw new WebDriverException(e); } // Ensure that we've set the proxy if necessary if (proxyConfig != null) { client.setProxyConfig(proxyConfig); } return modifyWebClient(client); } /** * Create the underlying webclient, but don't set any fields on it. * * @param version Which browser to emulate * @return a new instance of WebClient. */ protected WebClient newWebClient(BrowserVersion version) { return new WebClient(version); } /** * Child classes can override this method to customise the webclient that the HtmlUnit driver * uses. * * @param client The client to modify * @return The modified client */ protected WebClient modifyWebClient(WebClient client) { // Does nothing here to be overridden. return client; } public void setProxy(String host, int port) { proxyConfig = new ProxyConfig(host, port); webClient.setProxyConfig(proxyConfig); } public void setAutoProxy(String autoProxyUrl) { proxyConfig = new ProxyConfig(); proxyConfig.setProxyAutoConfigUrl(autoProxyUrl); webClient.setProxyConfig(proxyConfig); } public void get(String url) { // Prevent the malformed url exception. if (WebClient.URL_ABOUT_BLANK.toString().equals(url)) { get(WebClient.URL_ABOUT_BLANK); return; } URL fullUrl; try { fullUrl = new URL(url); } catch (Exception e) { throw new WebDriverException(e); } get(fullUrl); } /** * Allows HtmlUnit's about:blank to be loaded in the constructor, and may be useful for other * tests? * * @param fullUrl The URL to visit */ protected void get(URL fullUrl) { try { // A "get" works over the entire page currentWindow = currentWindow.getTopWindow(); webClient.getPage(fullUrl); } catch (UnknownHostException e) { // This should be fine } catch (ConnectException e) { // This might be expected } catch (Exception e) { throw new WebDriverException(e); } gotPage = true; pickWindow(); resetKeyboardAndMouseState(); } private void resetKeyboardAndMouseState() { keyboard = new HtmlUnitKeyboard(this); mouse = new HtmlUnitMouse(this, keyboard); } protected void pickWindow() { // TODO(simon): HtmlUnit tries to track the current window as the frontmost. We don't if (currentWindow == null) { currentWindow = webClient.getCurrentWindow(); } } public String getCurrentUrl() { // TODO(simon): Blech. I can see this being baaad URL url = getRawUrl(); if (url == null) { return null; } return url.toString(); } public String getTitle() { Page page = lastPage(); if (page == null || !(page instanceof HtmlPage)) { return null; // no page so there is no title } if (currentWindow instanceof FrameWindow) { page = ((FrameWindow) currentWindow).getTopWindow().getEnclosedPage(); } return ((HtmlPage) page).getTitleText(); } public WebElement findElement(By by) { return findElement(by, this); } public List findElements(By by) { return findElements(by, this); } public String getPageSource() { Page page = lastPage(); if (page == null) { return null; } if (page instanceof SgmlPage) { return ((SgmlPage) page).asXml(); } WebResponse response = page.getWebResponse(); return response.getContentAsString(); } public void close() { if (currentWindow != null) { ((TopLevelWindow) currentWindow.getTopWindow()).close(); } webClient = createWebClient(version); } public void quit() { if (webClient != null) { webClient.closeAllWindows(); webClient = null; } currentWindow = null; } public Set getWindowHandles() { final Set allHandles = new HashSet(); for (final WebWindow window : webClient.getTopLevelWindows()) { allHandles.add(String.valueOf(System.identityHashCode(window))); } return allHandles; } public String getWindowHandle() { return String.valueOf(System.identityHashCode(currentWindow.getTopWindow())); } public Object executeScript(String script, Object... args) { HtmlPage page = getPageToInjectScriptInto(); Object[] parameters = new Object[args.length]; for (int i = 0; i < args.length; i++) { parameters[i] = parseArgumentIntoJavsacriptParameter(args[i]); } script = "function() {" + script + "};"; ScriptResult result = page.executeJavaScript(script); Function func = (Function) result.getJavaScriptResult(); result = page.executeJavaScriptFunctionIfPossible( func, (ScriptableObject) currentWindow.getScriptObject(), parameters, page.getDocumentElement()); return parseNativeJavascriptResult(result); } public Object executeAsyncScript(String script, Object... args) { HtmlPage page = getPageToInjectScriptInto(); Object result = new AsyncScriptExecutor(page, scriptTimeout) .execute(script, args); return parseNativeJavascriptResult(result); } private HtmlPage getPageToInjectScriptInto() { if (!isJavascriptEnabled()) { throw new UnsupportedOperationException( "Javascript is not enabled for this HtmlUnitDriver instance"); } final Page lastPage = lastPage(); if (!(lastPage instanceof HtmlPage)) { throw new UnsupportedOperationException("Cannot execute JS against a plain text page"); } else if (!gotPage) { // just to make ExecutingJavascriptTest.testShouldThrowExceptionIfExecutingOnNoPage happy // but does this limitation make sense? throw new WebDriverException("Can't execute JavaScript before a page has been loaded!"); } return (HtmlPage) lastPage; } private Object parseArgumentIntoJavsacriptParameter(Object arg) { if (!(arg instanceof HtmlUnitWebElement || arg instanceof HtmlElement || // special case the underlying type arg instanceof Number || arg instanceof String || arg instanceof Boolean || arg.getClass().isArray() || arg instanceof Collection)) { throw new IllegalArgumentException( "Argument must be a string, number, boolean or WebElement: " + arg + " (" + arg.getClass() + ")"); } if (arg instanceof HtmlUnitWebElement) { HtmlElement element = ((HtmlUnitWebElement) arg).getElement(); return element.getScriptObject(); } else if (arg instanceof HtmlElement) { return ((HtmlElement) arg).getScriptObject(); } else if (arg instanceof Collection) { List list = new ArrayList(); for (Object o : (Collection) arg) { list.add(parseArgumentIntoJavsacriptParameter(o)); } return list.toArray(); } else { return arg; } } public Keyboard getKeyboard() { return keyboard; } public Mouse getMouse() { return mouse; } public ActionChainsGenerator actionsBuilder() { return new DefaultActionChainsGenerator(this); } protected interface JavaScriptResultsCollection { int getLength(); Object item(int index); } private Object parseNativeJavascriptResult(Object result) { Object value; if (result instanceof ScriptResult) { value = ((ScriptResult) result).getJavaScriptResult(); } else { value = result; } if (value instanceof HTMLElement) { return newHtmlUnitWebElement(((HTMLElement) value).getDomNodeOrDie()); } if (value instanceof Number) { final Number n = (Number) value; final String s = n.toString(); if (s.indexOf(".") == -1 || s.endsWith(".0")) { // how safe it is? enough for the unit tests! return n.longValue(); } return n.doubleValue(); } if (value instanceof NativeObject) { final Map map = new HashMap((NativeObject) value); for (final Entry e : map.entrySet()) { e.setValue(parseNativeJavascriptResult(e.getValue())); } return map; } if (value instanceof NativeArray) { final NativeArray array = (NativeArray) value; JavaScriptResultsCollection collection = new JavaScriptResultsCollection() { public int getLength() { return (int) array.getLength(); } public Object item(int index) { return array.get(index); } }; return parseJavascriptResultsList(collection); } if (value instanceof HTMLCollection) { final HTMLCollection array = (HTMLCollection) value; JavaScriptResultsCollection collection = new JavaScriptResultsCollection() { public int getLength() { return array.getLength(); } public Object item(int index) { return array.get(index); } }; return parseJavascriptResultsList(collection); } if (value instanceof Undefined) { return null; } return value; } private List parseJavascriptResultsList(JavaScriptResultsCollection array) { List list = new ArrayList(array.getLength()); for (int i = 0; i < array.getLength(); ++i) { list.add(parseNativeJavascriptResult(array.item(i))); } return list; } public TargetLocator switchTo() { return new HtmlUnitTargetLocator(); } private void switchToDefaultContentOfWindow(WebWindow window) { Page page = window.getEnclosedPage(); if (page instanceof HtmlPage) { currentWindow = window; } } public Navigation navigate() { return new HtmlUnitNavigation(); } protected Page lastPage() { return currentWindow.getEnclosedPage(); } public WebElement findElementByLinkText(String selector) { if (!(lastPage() instanceof HtmlPage)) { throw new IllegalStateException("Cannot find links for " + lastPage()); } String expectedText = selector.trim(); List anchors = ((HtmlPage) lastPage()).getAnchors(); for (HtmlAnchor anchor : anchors) { if (expectedText.equals(anchor.asText().trim())) { return newHtmlUnitWebElement(anchor); } } throw new NoSuchElementException("No link found with text: " + expectedText); } protected WebElement newHtmlUnitWebElement(HtmlElement element) { return new HtmlUnitWebElement(this, element); } public List findElementsByLinkText(String selector) { List elements = new ArrayList(); if (!(lastPage() instanceof HtmlPage)) { return elements; } String expectedText = selector.trim(); List anchors = ((HtmlPage) lastPage()).getAnchors(); for (HtmlAnchor anchor : anchors) { if (expectedText.equals(anchor.asText().trim())) { elements.add(newHtmlUnitWebElement(anchor)); } } return elements; } public WebElement findElementById(String id) { if (!(lastPage() instanceof HtmlPage)) { throw new NoSuchElementException("Unable to locate element by id for " + lastPage()); } try { HtmlElement element = ((HtmlPage) lastPage()).getHtmlElementById(id); return newHtmlUnitWebElement(element); } catch (ElementNotFoundException e) { throw new NoSuchElementException("Unable to locate element with ID: " + id); } } public List findElementsById(String id) { return findElementsByXPath("//*[@id='" + id + "']"); } public WebElement findElementByCssSelector(String using) { if (!(lastPage() instanceof HtmlPage)) { throw new NoSuchElementException("Unable to locate element using css: " + lastPage()); } DomNode node = ((HtmlPage) lastPage()).querySelector(using); if (node instanceof HtmlElement) { return newHtmlUnitWebElement((HtmlElement) node); } throw new NoSuchElementException("Returned node was not an HTML element"); } public List findElementsByCssSelector(String using) { if (!(lastPage() instanceof HtmlPage)) { throw new NoSuchElementException("Unable to locate element using css: " + lastPage()); } DomNodeList allNodes = ((HtmlPage) lastPage()).querySelectorAll(using); List toReturn = new ArrayList(); for (DomNode node : allNodes) { if (node instanceof HtmlElement) { toReturn.add(newHtmlUnitWebElement((HtmlElement) node)); } else { throw new NoSuchElementException("Returned node was not an HTML element"); } } return toReturn; } public WebElement findElementByName(String name) { if (!(lastPage() instanceof HtmlPage)) { throw new IllegalStateException("Unable to locate element by name for " + lastPage()); } List allElements = ((HtmlPage) lastPage()).getElementsByName(name); if (allElements.size() > 0) { return newHtmlUnitWebElement(allElements.get(0)); } throw new NoSuchElementException("Unable to locate element with name: " + name); } public List findElementsByName(String using) { if (!(lastPage() instanceof HtmlPage)) { return new ArrayList(); } List allElements = ((HtmlPage) lastPage()).getElementsByName(using); return convertRawHtmlElementsToWebElements(allElements); } public WebElement findElementByTagName(String name) { if (!(lastPage() instanceof HtmlPage)) { throw new IllegalStateException("Unable to locate element by name for " + lastPage()); } NodeList allElements = ((HtmlPage) lastPage()).getElementsByTagName(name); if (allElements.getLength() > 0) { return newHtmlUnitWebElement((HtmlElement) allElements.item(0)); } throw new NoSuchElementException("Unable to locate element with name: " + name); } public List findElementsByTagName(String using) { if (!(lastPage() instanceof HtmlPage)) { return new ArrayList(); } NodeList allElements = ((HtmlPage) lastPage()).getElementsByTagName(using); List toReturn = new ArrayList(allElements.getLength()); for (int i = 0; i < allElements.getLength(); i++) { Node item = allElements.item(i); if (item instanceof HtmlElement) { toReturn.add(newHtmlUnitWebElement((HtmlElement) item)); } } return toReturn; } public WebElement findElementByXPath(String selector) { if (!(lastPage() instanceof HtmlPage)) { throw new IllegalStateException("Unable to locate element by xpath for " + lastPage()); } Object node = ((HtmlPage) lastPage()).getFirstByXPath(selector); if (node == null) { throw new NoSuchElementException("Unable to locate a node using " + selector); } if (node instanceof HtmlElement) { return newHtmlUnitWebElement((HtmlElement) node); } throw new NoSuchElementException(String.format("Unable to locate element with xpath %s", selector)); } public List findElementsByXPath(String selector) { if (!(lastPage() instanceof HtmlPage)) { return new ArrayList(); } List nodes = ((HtmlPage) lastPage()).getByXPath(selector); return convertRawHtmlElementsToWebElements(nodes); } private List convertRawHtmlElementsToWebElements(List nodes) { List elements = new ArrayList(); for (Object node : nodes) { if (node instanceof HtmlElement) { elements.add(newHtmlUnitWebElement((HtmlElement) node)); } } return elements; } public boolean isJavascriptEnabled() { return webClient.isJavaScriptEnabled(); } public void setJavascriptEnabled(boolean enableJavascript) { this.enableJavascript = enableJavascript; webClient.setJavaScriptEnabled(enableJavascript); } private class HtmlUnitTargetLocator implements TargetLocator { public WebDriver frame(int index) { HtmlPage currentPage = (HtmlPage) currentWindow.getEnclosedPage(); try { // 1.) try to find frame in current window ... currentWindow = currentPage.getFrames().get(index); } catch (IndexOutOfBoundsException ignored) { throw new NoSuchFrameException("Cannot find frame: " + index); } return HtmlUnitDriver.this; } public WebDriver frame(final String nameOrId) { // First check for a frame with the matching name. HtmlPage startPage = (HtmlPage) currentWindow.getEnclosedPage(); for (final FrameWindow frameWindow : startPage.getFrames()) { if (frameWindow.getName().equals(nameOrId)) { currentWindow = frameWindow; return HtmlUnitDriver.this; } } // Next, check fora frame with a matching ID. For simplicity, assume the ID is unique. // Users can still switch to frames with non-unique IDs using a WebElement switch: // WebElement frameElement = driver.findElement(By.xpath("//frame[@id=\"foo\"]")); // driver.switchTo().frame(frameElement); try { HtmlUnitWebElement element = (HtmlUnitWebElement) HtmlUnitDriver.this.findElementById(nameOrId); HtmlElement domElement = element.getElement(); if (domElement instanceof BaseFrame) { currentWindow = ((BaseFrame) domElement).getEnclosedWindow(); return HtmlUnitDriver.this; } } catch (NoSuchElementException ignored) { } throw new NoSuchFrameException("Unable to locate frame with name or ID: " + nameOrId); } public WebDriver frame(WebElement frameElement) { while (frameElement instanceof WrapsElement) { frameElement = ((WrapsElement) frameElement).getWrappedElement(); } HtmlUnitWebElement webElement = (HtmlUnitWebElement) frameElement; webElement.assertElementNotStale(); HtmlElement domElement = webElement.getElement(); if (!(domElement instanceof BaseFrame)) { throw new NoSuchFrameException(webElement.getTagName() + " is not a frame element."); } currentWindow = ((BaseFrame) domElement).getEnclosedWindow(); return HtmlUnitDriver.this; } private WebWindow getWindowByNumericFrameId(String currentFrameId, HtmlPage page) { try { final int index = Integer.parseInt(currentFrameId); return page.getFrames().get(index); } catch (final NumberFormatException e) { // nothing - fall through to returning null. } catch (final IndexOutOfBoundsException e) { // frames may have an int as name // nothing - fall through to returning null. } return null; } public WebDriver window(String windowId) { try { WebWindow window = webClient.getWebWindowByName(windowId); return finishSelecting(window); } catch (WebWindowNotFoundException e) { List allWindows = webClient.getWebWindows(); for (WebWindow current : allWindows) { WebWindow top = current.getTopWindow(); if (String.valueOf(System.identityHashCode(top)).equals(windowId)) { return finishSelecting(top); } } throw new NoSuchWindowException("Cannot find window: " + windowId); } } private WebDriver finishSelecting(WebWindow window) { webClient.setCurrentWindow(window); currentWindow = window; pickWindow(); return HtmlUnitDriver.this; } public WebDriver defaultContent() { switchToDefaultContentOfWindow(currentWindow.getTopWindow()); return HtmlUnitDriver.this; } public WebElement activeElement() { Page page = currentWindow.getEnclosedPage(); if (page instanceof HtmlPage) { HtmlElement element = ((HtmlPage) page).getFocusedElement(); if (element == null) { List allBodies = ((HtmlPage) page).getDocumentElement().getHtmlElementsByTagName("body"); if (allBodies.size() > 0) { return newHtmlUnitWebElement(allBodies.get(0)); } } else { return newHtmlUnitWebElement(element); } } throw new NoSuchElementException("Unable to locate element with focus or body tag"); } public Alert alert() { throw new UnsupportedOperationException("alert()"); } } protected X implicitlyWaitFor(Callable condition) { long end = System.currentTimeMillis() + implicitWait; Exception lastException = null; do { X toReturn = null; try { toReturn = condition.call(); } catch (Exception e) { lastException = e; } if (toReturn instanceof Boolean && !(Boolean) toReturn) { continue; } if (toReturn != null) { return toReturn; } sleepQuietly(200); } while (System.currentTimeMillis() < end); if (lastException != null) { if (lastException instanceof RuntimeException) { throw (RuntimeException) lastException; } throw new WebDriverException(lastException); } return null; } protected WebClient getWebClient() { return webClient; } protected WebWindow getCurrentWindow() { return currentWindow; } private URL getRawUrl() { // TODO(simon): I can see this being baaad. Page page = lastPage(); if (page == null) { return null; } return page.getUrl(); } private class HtmlUnitNavigation implements Navigation { public void back() { try { currentWindow.getHistory().back(); } catch (IOException e) { throw new WebDriverException(e); } } public void forward() { try { currentWindow.getHistory().forward(); } catch (IOException e) { throw new WebDriverException(e); } } public void to(String url) { get(url); } public void to(URL url) { get(url); } public void refresh() { if (lastPage() instanceof HtmlPage) { try { ((HtmlPage) lastPage()).refresh(); } catch (IOException e) { throw new WebDriverException(e); } } } } public Options manage() { return new HtmlUnitOptions(); } private class HtmlUnitOptions implements Options { public void addCookie(Cookie cookie) { Page page = lastPage(); if (!(page instanceof HtmlPage)) { throw new UnableToSetCookieException("You may not set cookies on a page that is not HTML"); } String domain = getDomainForCookie(); verifyDomain(cookie, domain); webClient.getCookieManager().addCookie( new com.gargoylesoftware.htmlunit.util.Cookie(domain, cookie.getName(), cookie.getValue(), cookie.getPath(), cookie.getExpiry(), cookie.isSecure())); } private void verifyDomain(Cookie cookie, String expectedDomain) { String domain = cookie.getDomain(); if (domain == null) { return; } if ("".equals(domain)) { throw new InvalidCookieDomainException( "Domain must not be an empty string. Consider using null instead"); } // Line-noise-tastic if (domain.matches(".*[^:]:\\d+$")) { domain = domain.replaceFirst(":\\d+$", ""); } expectedDomain = expectedDomain.startsWith(".") ? expectedDomain : "." + expectedDomain; domain = domain.startsWith(".") ? domain : "." + domain; if (!expectedDomain.endsWith(domain)) { throw new InvalidCookieDomainException( String.format( "You may only add cookies that would be visible to the current domain: %s => %s", domain, expectedDomain)); } } public Cookie getCookieNamed(String name) { Set allCookies = getCookies(); for (Cookie cookie : allCookies) { if (name.equals(cookie.getName())) { return cookie; } } return null; } public void deleteCookieNamed(String name) { CookieManager cookieManager = webClient.getCookieManager(); URL url = getRawUrl(); Set rawCookies = webClient.getCookieManager().getCookies(url); for (com.gargoylesoftware.htmlunit.util.Cookie cookie : rawCookies) { if (name.equals(cookie.getName())) { cookieManager.removeCookie(cookie); } } } public void deleteCookie(Cookie cookie) { deleteCookieNamed(cookie.getName()); } public void deleteAllCookies() { webClient.getCookieManager().clearCookies(); } public Set getCookies() { URL url = getRawUrl(); // The about:blank URL (the default in case no navigation took place) // does not have a valid 'hostname' part and cannot be used for creating // cookies based on it - return an empty set. if (!url.toString().startsWith("http")) { return new HashSet(); } Set rawCookies = webClient.getCookieManager().getCookies(url); Set retCookies = new HashSet(); for (com.gargoylesoftware.htmlunit.util.Cookie c : rawCookies) { if (c.getPath() != null && getPath().toLowerCase().startsWith(c.getPath())) { retCookies.add(new Cookie.Builder(c.getName(), c.getValue()) .domain(c.getDomain()) .path(c.getPath()) .expiresOn(c.getExpires()) .isSecure(c.isSecure()) .build()); } } return retCookies; } private String getPath() { return getRawUrl().getPath(); } public Speed getSpeed() { return HtmlUnitDriver.this.speed; } /** * {@inheritDoc} *

* This method makes absolutely no difference to the behaviour of the htmlunit driver * * @param speed which is ignored. */ public void setSpeed(Speed speed) { HtmlUnitDriver.this.speed = speed; } private String getDomainForCookie() { URL current = getRawUrl(); return current.getHost(); } public Timeouts timeouts() { return new HtmlUnitTimeouts(); } } class HtmlUnitTimeouts implements Timeouts { public Timeouts implicitlyWait(long time, TimeUnit unit) { HtmlUnitDriver.this.implicitWait = TimeUnit.MILLISECONDS.convert(Math.max(0, time), unit); return this; } public Timeouts setScriptTimeout(long time, TimeUnit unit) { HtmlUnitDriver.this.scriptTimeout = TimeUnit.MILLISECONDS.convert(time, unit); return this; } } public WebElement findElementByPartialLinkText(String using) { if (!(lastPage() instanceof HtmlPage)) { throw new IllegalStateException("Cannot find links for " + lastPage()); } List anchors = ((HtmlPage) lastPage()).getAnchors(); for (HtmlAnchor anchor : anchors) { if (anchor.asText().contains(using)) { return newHtmlUnitWebElement(anchor); } } throw new NoSuchElementException("No link found with text: " + using); } public List findElementsByPartialLinkText(String using) { List anchors = ((HtmlPage) lastPage()).getAnchors(); Iterator allAnchors = anchors.iterator(); List elements = new ArrayList(); while (allAnchors.hasNext()) { HtmlAnchor anchor = allAnchors.next(); if (anchor.asText().contains(using)) { elements.add(newHtmlUnitWebElement(anchor)); } } return elements; } WebElement findElement(final By locator, final SearchContext context) { return implicitlyWaitFor(new Callable() { public WebElement call() throws Exception { return locator.findElement(context); } }); } List findElements(final By by, final SearchContext context) { long end = System.currentTimeMillis() + implicitWait; List found; do { found = by.findElements(context); if (!found.isEmpty()) { return found; } } while (System.currentTimeMillis() < end); return found; } private static void sleepQuietly(long ms) { try { Thread.sleep(ms); } catch (InterruptedException ignored) { } } } PK lC>F駌Jorg/openqa/selenium/htmlunit/.svn/text-base/HtmlUnitKeyboard.java.svn-base/* Copyright 2007-2010 WebDriver committers Copyright 2007-2010 Google Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package org.openqa.selenium.htmlunit; import java.io.IOException; import com.gargoylesoftware.htmlunit.html.HtmlElement; import com.gargoylesoftware.htmlunit.html.HtmlFileInput; import com.gargoylesoftware.htmlunit.html.HtmlInput; import com.gargoylesoftware.htmlunit.html.HtmlTextArea; import com.gargoylesoftware.htmlunit.javascript.host.Event; import com.gargoylesoftware.htmlunit.javascript.host.KeyboardEvent; import org.openqa.selenium.Keyboard; import org.openqa.selenium.Keys; import org.openqa.selenium.WebDriverException; import org.openqa.selenium.WebElement; /** * Implements keyboard operations using the HtmlUnit WebDriver. * */ public class HtmlUnitKeyboard implements Keyboard { private KeyboardModifiersState modifiersState = new KeyboardModifiersState(); private final HtmlUnitDriver parent; HtmlUnitKeyboard(HtmlUnitDriver parent) { this.parent = parent; } private HtmlUnitWebElement getElementToSend(WebElement toElement) { WebElement sendToElement = toElement; if (sendToElement == null) { sendToElement = parent.switchTo().activeElement(); } return (HtmlUnitWebElement) sendToElement; } public void sendKeys(CharSequence... keysToSend) { WebElement toElement = parent.switchTo().activeElement(); HtmlUnitWebElement htmlElem = getElementToSend(toElement); htmlElem.sendKeys(keysToSend); } public void sendKeys(HtmlElement element, String currentValue, InputKeysContainer keysToSend) { keysToSend.setCapitalization(modifiersState.isShiftPressed()); if (parent.isJavascriptEnabled() && !(element instanceof HtmlFileInput)) { try { element.type(keysToSend.toString()); } catch (IOException e) { throw new WebDriverException(e); } } else if (element instanceof HtmlInput) { HtmlInput input = (HtmlInput) element; input.setValueAttribute((currentValue == null ? "" : currentValue) + keysToSend.toString()); } else if (element instanceof HtmlTextArea) { ((HtmlTextArea) element).setText( (currentValue == null ? "" : currentValue) + keysToSend.toString()); } else { throw new UnsupportedOperationException( "You may only set the value of elements that are input elements"); } } public void pressKey(Keys keyToPress) { WebElement toElement = parent.switchTo().activeElement(); HtmlUnitWebElement htmlElement = getElementToSend(toElement); modifiersState.storeKeyDown(keyToPress); htmlElement.sendKeyDownEvent(keyToPress); } public void releaseKey(Keys keyToRelease) { WebElement toElement = parent.switchTo().activeElement(); HtmlUnitWebElement htmlElement = getElementToSend(toElement); modifiersState.storeKeyUp(keyToRelease); htmlElement.sendKeyUpEvent(keyToRelease); } public void performSingleKeyAction(HtmlElement element, Keys modifierKey, String eventDescription) { boolean shiftKey = modifierKey.equals(Keys.SHIFT); boolean ctrlKey = modifierKey.equals(Keys.CONTROL); boolean altKey = modifierKey.equals(Keys.ALT); Event keyEvent = new KeyboardEvent(element, eventDescription, 0, shiftKey, ctrlKey, altKey); element.fireEvent(keyEvent); } public boolean isShiftPressed() { return modifiersState.isShiftPressed(); } public boolean isCtrlPressed() { return modifiersState.isCtrlPressed(); } public boolean isAltPressed() { return modifiersState.isAltPressed(); } } PK lC>xGorg/openqa/selenium/htmlunit/.svn/text-base/HtmlUnitMouse.java.svn-base/* Copyright 2007-2010 WebDriver committers Copyright 2007-2010 Google Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package org.openqa.selenium.htmlunit; import com.google.common.base.Preconditions; import java.io.IOException; import com.gargoylesoftware.htmlunit.ScriptException; import com.gargoylesoftware.htmlunit.html.HtmlElement; import com.gargoylesoftware.htmlunit.html.HtmlInput; import com.gargoylesoftware.htmlunit.javascript.host.MouseEvent; import org.openqa.selenium.Mouse; import org.openqa.selenium.WebDriverException; import org.openqa.selenium.WebElement; import org.openqa.selenium.interactions.InvalidCoordinatesException; import org.openqa.selenium.internal.Locatable; import org.openqa.selenium.interactions.internal.Coordinates; /** * Implements mouse operations using the HtmlUnit WebDriver. * */ public class HtmlUnitMouse implements Mouse { private final HtmlUnitDriver parent; private final HtmlUnitKeyboard keyboard; private HtmlElement currentActiveElement = null; public HtmlUnitMouse(HtmlUnitDriver parent, HtmlUnitKeyboard keyboard) { this.parent = parent; this.keyboard = keyboard; } private HtmlElement getElementForOperation(Coordinates potentialCoordinates) { if (potentialCoordinates != null) { return (HtmlElement) potentialCoordinates.getAuxiliry(); } if (currentActiveElement == null) { throw new InvalidCoordinatesException("About to perform an interaction that relies" + " on the active element, but there isn't one."); } return currentActiveElement; } public void click(Coordinates elementCoordinates) { HtmlElement element = getElementForOperation(elementCoordinates); moveOutIfNeeded(element); try { if (parent.isJavascriptEnabled()) { if (!(element instanceof HtmlInput)) { element.focus(); } element.mouseOver(); element.mouseMove(); } element.click(keyboard.isShiftPressed(), keyboard.isCtrlPressed(), keyboard.isAltPressed()); updateActiveElement(element); } catch (IOException e) { throw new WebDriverException(e); } catch (ScriptException e) { // TODO(simon): This isn't good enough. System.out.println(e.getMessage()); // Press on regardless } } private void moveOutIfNeeded(HtmlElement element) { if ((currentActiveElement != element)) { if (currentActiveElement != null) { currentActiveElement.mouseOver(keyboard.isShiftPressed(), keyboard.isCtrlPressed(), keyboard.isAltPressed(), MouseEvent.BUTTON_LEFT); currentActiveElement.mouseOut(keyboard.isShiftPressed(), keyboard.isCtrlPressed(), keyboard.isAltPressed(), MouseEvent.BUTTON_LEFT); currentActiveElement.blur(); } if (element != null) { mouseMove(element); } } } private void updateActiveElement(HtmlElement element) { if (element != null) { currentActiveElement = element; } } public void click(Coordinates where, long xOffset, long yOffset) { click(where); } public void doubleClick(Coordinates elementCoordinates) { HtmlElement element = getElementForOperation(elementCoordinates); moveOutIfNeeded(element); // Send the state of modifier keys to the dblClick method. try { element.dblClick(keyboard.isShiftPressed(), keyboard.isCtrlPressed(), keyboard.isAltPressed()); updateActiveElement(element); } catch (IOException e) { //TODO(eran.mes): What should we do in case of error? e.printStackTrace(); } } public void contextClick(Coordinates elementCoordinates) { HtmlElement element = getElementForOperation(elementCoordinates); moveOutIfNeeded(element); element.rightClick(keyboard.isShiftPressed(), keyboard.isCtrlPressed(), keyboard.isAltPressed()); updateActiveElement(element); } public void mouseDown(Coordinates elementCoordinates) { HtmlElement element = getElementForOperation(elementCoordinates); moveOutIfNeeded(element); element.mouseDown(keyboard.isShiftPressed(), keyboard.isCtrlPressed(), keyboard.isAltPressed(), MouseEvent.BUTTON_LEFT); updateActiveElement(element); } public void mouseUp(Coordinates elementCoordinates) { HtmlElement element = getElementForOperation(elementCoordinates); moveOutIfNeeded(element); element.mouseUp(keyboard.isShiftPressed(), keyboard.isCtrlPressed(), keyboard.isAltPressed(), MouseEvent.BUTTON_LEFT); updateActiveElement(element); } public void mouseMove(Coordinates elementCoordinates) { Preconditions.checkNotNull(elementCoordinates); HtmlElement element = (HtmlElement) elementCoordinates.getAuxiliry(); moveOutIfNeeded(element); updateActiveElement(element); } private void mouseMove(HtmlElement element) { element.mouseMove(keyboard.isShiftPressed(), keyboard.isCtrlPressed(), keyboard.isAltPressed(), MouseEvent.BUTTON_LEFT); element.mouseOver(keyboard.isShiftPressed(), keyboard.isCtrlPressed(), keyboard.isAltPressed(), MouseEvent.BUTTON_LEFT); } public void mouseMove(Coordinates where, long xOffset, long yOffset) { throw new UnsupportedOperationException("Moving to arbitrary X,Y coordinates not supported."); } } PK lC>$iiLorg/openqa/selenium/htmlunit/.svn/text-base/HtmlUnitWebElement.java.svn-base/* Copyright 2007-2009 WebDriver committers Copyright 2007-2009 Google Inc. Portions copyright 2007 ThoughtWorks, Inc Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package org.openqa.selenium.htmlunit; import com.gargoylesoftware.htmlunit.Page; import com.gargoylesoftware.htmlunit.ScriptException; import com.gargoylesoftware.htmlunit.ScriptResult; import com.gargoylesoftware.htmlunit.SgmlPage; import com.gargoylesoftware.htmlunit.html.DomNode; import com.gargoylesoftware.htmlunit.html.DomText; import com.gargoylesoftware.htmlunit.html.HtmlBody; import com.gargoylesoftware.htmlunit.html.HtmlButton; import com.gargoylesoftware.htmlunit.html.HtmlCheckBoxInput; import com.gargoylesoftware.htmlunit.html.HtmlElement; import com.gargoylesoftware.htmlunit.html.HtmlForm; import com.gargoylesoftware.htmlunit.html.HtmlHiddenInput; import com.gargoylesoftware.htmlunit.html.HtmlHtml; import com.gargoylesoftware.htmlunit.html.HtmlImageInput; import com.gargoylesoftware.htmlunit.html.HtmlInput; import com.gargoylesoftware.htmlunit.html.HtmlOption; import com.gargoylesoftware.htmlunit.html.HtmlPreformattedText; import com.gargoylesoftware.htmlunit.html.HtmlScript; import com.gargoylesoftware.htmlunit.html.HtmlSelect; import com.gargoylesoftware.htmlunit.html.HtmlSubmitInput; import com.gargoylesoftware.htmlunit.html.HtmlTextArea; import com.gargoylesoftware.htmlunit.javascript.host.Event; import net.sourceforge.htmlunit.corejs.javascript.Undefined; import org.openqa.selenium.By; import org.openqa.selenium.Dimension; import org.openqa.selenium.Keys; import org.openqa.selenium.ElementNotVisibleException; import org.openqa.selenium.NoSuchElementException; import org.openqa.selenium.Point; import org.openqa.selenium.RenderedWebElement; import org.openqa.selenium.StaleElementReferenceException; import org.openqa.selenium.WebDriver; import org.openqa.selenium.WebDriverException; import org.openqa.selenium.WebElement; import org.openqa.selenium.internal.FindsByCssSelector; import org.openqa.selenium.internal.FindsById; import org.openqa.selenium.internal.FindsByLinkText; import org.openqa.selenium.internal.FindsByTagName; import org.openqa.selenium.internal.FindsByXPath; import org.openqa.selenium.internal.Locatable; import org.openqa.selenium.internal.WrapsDriver; import org.openqa.selenium.internal.WrapsElement; import org.openqa.selenium.interactions.internal.Coordinates; import org.w3c.dom.Attr; import org.w3c.dom.NamedNodeMap; import java.io.IOException; import java.util.ArrayList; import java.util.LinkedList; import java.util.List; import java.util.concurrent.Callable; import java.util.regex.Matcher; import java.util.regex.Pattern; public class HtmlUnitWebElement implements RenderedWebElement, WrapsDriver, FindsById, FindsByLinkText, FindsByXPath, FindsByTagName, FindsByCssSelector, Locatable { protected final HtmlUnitDriver parent; protected final HtmlElement element; private static final char nbspChar = (char) 160; private static final String[] blockLevelsTagNames = {"p", "h1", "h2", "h3", "h4", "h5", "h6", "dl", "div", "noscript", "blockquote", "form", "hr", "table", "fieldset", "address", "ul", "ol", "pre", "br"}; private String toString; public HtmlUnitWebElement(HtmlUnitDriver parent, HtmlElement element) { this.parent = parent; this.element = element; } public void click() { verifyCanInteractWithElement(); HtmlUnitMouse mouse = (HtmlUnitMouse) parent.getMouse(); mouse.click(getCoordinates()); } public void submit() { assertElementNotStale(); try { if (element instanceof HtmlForm) { submitForm((HtmlForm) element); return; } else if ((element instanceof HtmlSubmitInput) || (element instanceof HtmlImageInput)) { element.click(); return; } else if (element instanceof HtmlInput) { submitForm(element.getEnclosingForm()); return; } WebElement form = findParentForm(); if (form == null) { throw new NoSuchElementException("Unable to find the containing form"); } form.submit(); } catch (IOException e) { throw new WebDriverException(e); } } private void submitForm(HtmlForm form) { assertElementNotStale(); List names = new ArrayList(); names.add("input"); names.add("button"); List allElements = form.getHtmlElementsByTagNames(names); HtmlElement submit = null; for (HtmlElement element : allElements) { if (!isSubmitElement(element)) { continue; } if (isBefore(submit)) { submit = element; } } if (submit == null) { if (parent.isJavascriptEnabled()) { ScriptResult eventResult = form.fireEvent("submit"); if (!ScriptResult.isFalse(eventResult)) { parent.executeScript("arguments[0].submit()", form); } return; } else { throw new WebDriverException("Cannot locate element used to submit form"); } } try { submit.click(); } catch (IOException e) { throw new WebDriverException(e); } } private boolean isSubmitElement(HtmlElement element) { HtmlElement candidate = null; if (element instanceof HtmlSubmitInput && !((HtmlSubmitInput) element).isDisabled()) { candidate = element; } else if (element instanceof HtmlImageInput && !((HtmlImageInput) element).isDisabled()) { candidate = element; } else if (element instanceof HtmlButton) { HtmlButton button = (HtmlButton) element; if ("submit".equalsIgnoreCase(button.getTypeAttribute()) && !button.isDisabled()) { candidate = element; } } return candidate != null; } private boolean isBefore(HtmlElement submit) { return submit == null; } public String getValue() { assertElementNotStale(); if (element instanceof HtmlTextArea) { return ((HtmlTextArea) element).getText(); } String value = getAttribute("value"); return (value == null) ? "" : value; } public void clear() { assertElementNotStale(); if (element instanceof HtmlInput) { ((HtmlInput) element).setValueAttribute(""); } else if (element instanceof HtmlTextArea) { ((HtmlTextArea) element).setText(""); } } private void verifyCanInteractWithElement() { assertElementNotStale(); Boolean displayed = parent.implicitlyWaitFor(new Callable() { public Boolean call() throws Exception { return isDisplayed(); } }); if (displayed == null || !displayed.booleanValue()) { throw new ElementNotVisibleException("You may only sendKeys to visible elements"); } if (!isEnabled()) { throw new UnsupportedOperationException("You may only sendKeys to enabled elements"); } } private void switchFocusToThisIfNeeded() { HtmlUnitWebElement oldActiveElement = ((HtmlUnitWebElement)parent.switchTo().activeElement()); boolean jsEnabled = parent.isJavascriptEnabled(); boolean oldActiveEqualsCurrent = oldActiveElement.equals(this); boolean isBody = oldActiveElement.getTagName().toLowerCase().equals("body"); if (jsEnabled && !oldActiveEqualsCurrent && !isBody) { oldActiveElement.element.blur(); element.focus(); } } public void sendKeyDownEvent(Keys modifierKey) { sendSingleKeyEvent(modifierKey, Event.TYPE_KEY_DOWN); } public void sendKeyUpEvent(Keys modifierKey) { sendSingleKeyEvent(modifierKey, Event.TYPE_KEY_UP); } private void sendSingleKeyEvent(Keys modifierKey, String eventDescription) { verifyCanInteractWithElement(); switchFocusToThisIfNeeded(); HtmlUnitKeyboard keyboard = (HtmlUnitKeyboard) parent.getKeyboard(); keyboard.performSingleKeyAction(getElement(), modifierKey, eventDescription); } public void sendKeys(CharSequence... value) { verifyCanInteractWithElement(); InputKeysContainer keysContainer = new InputKeysContainer(isInputElement(), value); switchFocusToThisIfNeeded(); HtmlUnitKeyboard keyboard = (HtmlUnitKeyboard) parent.getKeyboard(); keyboard.sendKeys(element, getValue(), keysContainer); if (isInputElement() && keysContainer.wasSubmitKeyFound()) { submit(); } } private boolean isInputElement() { return element instanceof HtmlInput; } public String getTagName() { assertElementNotStale(); return element.getNodeName(); } public String getAttribute(String name) { assertElementNotStale(); final String lowerName = name.toLowerCase(); String value = element.getAttribute(name); if (element instanceof HtmlInput && ("selected".equals(lowerName) || "checked".equals(lowerName))) { return ((HtmlInput)element).isChecked() ? "true" : null; } if ("disabled".equals(lowerName)) { return isEnabled() ? "false" : "true"; } if ("selected".equals(lowerName)) { return (value.equalsIgnoreCase("selected") ? "true" : null); } if ("checked".equals(lowerName)) { return (value.equalsIgnoreCase("checked") ? "true" : null); } if ("index".equals(lowerName) && element instanceof HtmlOption) { HtmlSelect select = ((HtmlOption) element).getEnclosingSelect(); List allOptions = select.getOptions(); for (int i = 0; i < allOptions.size(); i++) { HtmlOption option = select.getOption(i); if (element.equals(option)) { return String.valueOf(i); } } return null; } if ("readonly".equalsIgnoreCase(lowerName)) { if (element instanceof HtmlInput) { return String.valueOf(((HtmlInput) element).isReadOnly()); } if (element instanceof HtmlTextArea) { return "".equals(((HtmlTextArea) element).getReadOnlyAttribute()) ? "false" : "true"; } return null; } if (!"".equals(value)) { return value; } if (element.hasAttribute(name)) { return ""; } return null; } public boolean toggle() { assertElementNotStale(); if (!isDisplayed()) throw new ElementNotVisibleException("You may only toggle visible elements"); try { if (element instanceof HtmlCheckBoxInput) { element.click(); return isSelected(); } if (element instanceof HtmlOption) { HtmlOption option = (HtmlOption) element; HtmlSelect select = option.getEnclosingSelect(); if (select.isMultipleSelectEnabled()) { option.setSelected(!option.isSelected()); return isSelected(); } } throw new UnsupportedOperationException( "You may only toggle checkboxes or options in a select which allows multiple selections: " + getTagName()); } catch (IOException e) { throw new WebDriverException("Unexpected exception: " + e); } } public boolean isSelected() { assertElementNotStale(); if (element instanceof HtmlInput) { return ((HtmlInput) element).isChecked(); } else if (element instanceof HtmlOption) { return ((HtmlOption) element).isSelected(); } throw new UnsupportedOperationException( "Unable to determine if element is selected. Tag name is: " + element.getTagName()); } public void setSelected() { assertElementNotStale(); if (!isDisplayed()) throw new ElementNotVisibleException("You may only select visible elements"); String disabledValue = element.getAttribute("disabled"); if (disabledValue.length() > 0) { throw new UnsupportedOperationException("You may not select a disabled element"); } if (element instanceof HtmlInput) { ((HtmlInput) element).setChecked(true); } else if (element instanceof HtmlOption) { ((HtmlOption) element).setSelected(true); } else { throw new UnsupportedOperationException( "Unable to select element. Tag name is: " + element.getTagName()); } } public void hover() { throw new UnsupportedOperationException("Hover is not supported by the htmlunit driver"); } public boolean isEnabled() { assertElementNotStale(); return !element.hasAttribute("disabled"); } public boolean isDisplayed() { assertElementNotStale(); if (!parent.isJavascriptEnabled()) { return true; } return !(element instanceof HtmlHiddenInput) && element.isDisplayed(); } public Point getLocation() { assertElementNotStale(); try { return new Point(readAndRound("left"), readAndRound("top")); } catch (Exception e) { throw new WebDriverException("Cannot determine size of element", e); } } public Dimension getSize() { assertElementNotStale(); try { final int width = readAndRound("width"); final int height = readAndRound("height"); return new Dimension(width, height); } catch (Exception e) { throw new WebDriverException("Cannot determine size of element", e); } } private int readAndRound(final String property) { final String cssValue = getValueOfCssProperty(property).replaceAll("[^0-9\\.]", ""); if (cssValue.length() == 0) { return 5; // wrong... but better than nothing } return Math.round(Float.parseFloat(cssValue)); } public void dragAndDropBy(int moveRightBy, int moveDownBy) { assertElementNotStale(); throw new UnsupportedOperationException("dragAndDropBy"); } public void dragAndDropOn(RenderedWebElement element) { assertElementNotStale(); throw new UnsupportedOperationException("dragAndDropOn"); } // This isn't very pretty. Sorry. public String getText() { assertElementNotStale(); StringBuffer toReturn = new StringBuffer(); StringBuffer textSoFar = new StringBuffer(); getTextFromNode(element, toReturn, textSoFar, element instanceof HtmlPreformattedText); String text = toReturn.toString() + collapseWhitespace(textSoFar); return text.trim(); } protected HtmlUnitDriver getParent() { return parent; } protected HtmlElement getElement() { return element; } private void getTextFromNode(DomNode node, StringBuffer toReturn, StringBuffer textSoFar, boolean isPreformatted) { if (node instanceof HtmlScript) { return; } if (isPreformatted) { getPreformattedText(node, toReturn); } for (DomNode child : node.getChildren()) { // Do we need to collapse the text so far? if (child instanceof HtmlPreformattedText) { if (child.isDisplayed()) { toReturn.append(collapseWhitespace(textSoFar)); textSoFar.delete(0, textSoFar.length()); } getTextFromNode(child, toReturn, textSoFar, true); continue; } // Or is this just plain text? if (child instanceof DomText) { if (child.isDisplayed()) { String textToAdd = ((DomText) child).getData(); textToAdd = textToAdd.replace(nbspChar, ' '); textSoFar.append(textToAdd); } continue; } // Treat as another child node. getTextFromNode(child, toReturn, textSoFar, false); } if (isBlockLevel(node)) { toReturn.append(collapseWhitespace(textSoFar)).append("\n"); textSoFar.delete(0, textSoFar.length()); } } private boolean isBlockLevel(DomNode node) { // From the HTML spec (http://www.w3.org/TR/html401/sgml/dtd.html#block) // // // // if (!(node instanceof HtmlElement)) { return false; } String tagName = ((HtmlElement) node).getTagName().toLowerCase(); for (String blockLevelsTagName : blockLevelsTagNames) { if (blockLevelsTagName.equals(tagName)) { return true; } } return false; } private String collapseWhitespace(StringBuffer textSoFar) { String textToAdd = textSoFar.toString(); return textToAdd.replaceAll("\\p{javaWhitespace}+", " ").replaceAll("\r", ""); } private void getPreformattedText(DomNode node, StringBuffer toReturn) { if (node.isDisplayed()) { String xmlText = node.asXml(); toReturn.append(xmlText.replaceAll("^", "").replaceAll("$", "")); } } public List getElementsByTagName(String tagName) { assertElementNotStale(); List allChildren = element.getByXPath(".//" + tagName); List elements = new ArrayList(); for (Object o : allChildren) { if (!(o instanceof HtmlElement)) { continue; } HtmlElement child = (HtmlElement) o; elements.add(getParent().newHtmlUnitWebElement(child)); } return elements; } public WebElement findElement(By by) { assertElementNotStale(); return parent.findElement(by, this); } public List findElements(By by) { assertElementNotStale(); return parent.findElements(by, this); } public WebElement findElementById(String id) { assertElementNotStale(); return findElementByXPath(".//*[@id = '" + id + "']"); } public List findElementsById(String id) { assertElementNotStale(); return findElementsByXPath(".//*[@id = '" + id + "']"); } public List findElementsByCssSelector(String using) { List allElements = parent.findElementsByCssSelector(using); return findChildNodes(allElements); } public WebElement findElementByCssSelector(String using) { List allElements = parent.findElementsByCssSelector(using); allElements = findChildNodes(allElements); if (allElements.size() == 0) { throw new NoSuchElementException("Cannot find child element using css: " + using); } return allElements.get(0); } private List findChildNodes(List allElements) { List toReturn = new LinkedList(); for (WebElement current : allElements) { if (element.isAncestorOf(((HtmlUnitWebElement) current).element)) { toReturn.add(current); } } return toReturn; } public WebElement findElementByXPath(String xpathExpr) { assertElementNotStale(); HtmlElement match = (HtmlElement) element.getFirstByXPath(xpathExpr); if (match == null) { throw new NoSuchElementException("Unable to find element with xpath " + xpathExpr); } return getParent().newHtmlUnitWebElement(match); } public List findElementsByXPath(String xpathExpr) { assertElementNotStale(); List webElements = new ArrayList(); List htmlElements = element.getByXPath(xpathExpr); for (Object e : htmlElements) { webElements.add(getParent().newHtmlUnitWebElement((HtmlElement) e)); } return webElements; } public WebElement findElementByLinkText(String linkText) { assertElementNotStale(); List elements = findElementsByLinkText(linkText); if (elements.size() == 0) { throw new NoSuchElementException( "Unable to find element with linkText " + linkText); } return elements.size() > 0 ? elements.get(0) : null; } public List findElementsByLinkText(String linkText) { assertElementNotStale(); List htmlElements = element.getHtmlElementsByTagName("a"); List webElements = new ArrayList(); for (HtmlElement e : htmlElements) { if (e.getTextContent().equals(linkText) && e.getAttribute("href") != null) { webElements.add(getParent().newHtmlUnitWebElement(e)); } } return webElements; } public WebElement findElementByPartialLinkText(String linkText) { assertElementNotStale(); List elements = findElementsByPartialLinkText(linkText); if (elements.size() == 0) { throw new NoSuchElementException( "Unable to find element with linkText " + linkText); } return elements.size() > 0 ? elements.get(0) : null; } public List findElementsByPartialLinkText(String linkText) { assertElementNotStale(); List htmlElements = element.getHtmlElementsByTagName("a"); List webElements = new ArrayList(); for (HtmlElement e : htmlElements) { if (e.getTextContent().contains(linkText) && e.getAttribute("href") != null) { webElements.add(getParent().newHtmlUnitWebElement(e)); } } return webElements; } public WebElement findElementByTagName(String name) { assertElementNotStale(); List elements = findElementsByTagName(name); if (elements.size() == 0) { throw new NoSuchElementException("Cannot find element with tag name: " + name); } return elements.get(0); } public List findElementsByTagName(String name) { assertElementNotStale(); List elements = element.getHtmlElementsByTagName(name); List toReturn = new ArrayList(elements.size()); for (HtmlElement element : elements) { toReturn.add(parent.newHtmlUnitWebElement(element)); } return toReturn; } private WebElement findParentForm() { DomNode current = element; while (!(current == null || current instanceof HtmlForm)) { current = current.getParentNode(); } return getParent().newHtmlUnitWebElement((HtmlForm) current); } @Override public String toString() { if (toString == null) { StringBuilder sb = new StringBuilder(); sb.append('<').append(element.getTagName()); NamedNodeMap attributes = element.getAttributes(); int n = attributes.getLength(); for (int i = 0; i < n; ++i) { Attr a = (Attr) attributes.item(i); sb.append(' ').append(a.getName()).append("=\"") .append(a.getValue().replace("\"", """)).append("\""); } if (element.hasChildNodes()) { sb.append('>'); } else { sb.append(" />"); } toString = sb.toString(); } return toString; } protected void assertElementNotStale() { SgmlPage elementPage = element.getPage(); Page currentPage = parent.lastPage(); if (!currentPage.equals(elementPage)) { throw new StaleElementReferenceException( "Element appears to be stale. Did you navigate away from the page that contained it? " + " And is the current window focussed the same as the one holding this element?"); } // We need to walk the DOM to determine if the element is actually attached DomNode parentElement = element; while (parentElement != null && !(parentElement instanceof HtmlHtml)) { parentElement = parentElement.getParentNode(); } if (parentElement == null) { throw new StaleElementReferenceException("The element seems to be disconnected from the DOM. " + " This means that a user cannot interact with it."); } } public String getValueOfCssProperty(String propertyName) { assertElementNotStale(); return getEffectiveStyle(element, propertyName); } private String getEffectiveStyle(HtmlElement htmlElement, String propertyName) { HtmlElement current = htmlElement; String value = "inherit"; while (current instanceof HtmlElement && "inherit".equals(value)) { // Hat-tip to the Selenium team Object result = parent.executeScript( "if (window.getComputedStyle) { " + " return window.getComputedStyle(arguments[0], null).getPropertyValue(arguments[1]); " + "} " + "if (arguments[0].currentStyle) { " + " return arguments[0].currentStyle[arguments[1]]; " + "} " + "if (window.document.defaultView && window.document.defaultView.getComputedStyle) { " + " return window.document.defaultView.getComputedStyle(arguments[0], null)[arguments[1]]; " + "} ", current, propertyName ); if (!(result instanceof Undefined)) { value = String.valueOf(result); } current = (HtmlElement) current.getParentNode(); } if (value.startsWith("rgb")) { return rgbToHex(value); } return value; } // Convert colours to hex if possible private String rgbToHex(final String value) { final Pattern pattern = Pattern.compile("rgb\\((\\d{1,3}),\\s(\\d{1,3}),\\s(\\d{1,3})\\)"); final Matcher matcher = pattern.matcher(value); if (matcher.find()) { String hex = "#"; for (int i = 1; i <= 3; i++) { int colour = Integer.parseInt(matcher.group(i)); String s = Integer.toHexString(colour); if (s.length() == 1) s = "0" + s; hex += s; } hex = hex.toLowerCase(); return hex; } return value; } @Override public boolean equals(Object obj) { if (!(obj instanceof WebElement)) { return false; } WebElement other = (WebElement) obj; if (other instanceof WrapsElement) { other = ((WrapsElement) obj).getWrappedElement(); } return other instanceof HtmlUnitWebElement && element.equals(((HtmlUnitWebElement) other).element); } @Override public int hashCode() { return element.hashCode(); } /* (non-Javadoc) * @see org.openqa.selenium.internal.WrapsDriver#getContainingDriver() */ public WebDriver getWrappedDriver() { return parent; } public Point getLocationOnScreenOnceScrolledIntoView() { return getLocation(); } public Coordinates getCoordinates() { return new Coordinates() { public Point getLocationOnScreen() { throw new UnsupportedOperationException("Not displayed, no screen location."); } public Point getLocationInViewPort() { return getLocation(); } public Point getLocationInDOM() { return getLocation(); } public Object getAuxiliry() { return getElement(); } }; } } PK lC>yLorg/openqa/selenium/htmlunit/.svn/text-base/InputKeysContainer.java.svn-basepackage org.openqa.selenium.htmlunit; import static org.openqa.selenium.Keys.ENTER; import static org.openqa.selenium.Keys.RETURN; /** * Converts a group of character sequences to a string to be sent by sendKeys. * */ public class InputKeysContainer { private final StringBuilder builder = new StringBuilder(); private final boolean submitKeyFound; private boolean capitalize = false; public InputKeysContainer(CharSequence... sequences) { this(false, sequences); } public InputKeysContainer(boolean trimPastEnterKey, CharSequence... sequences) { for (CharSequence seq : sequences) { builder.append(seq); } int indexOfSubmitKey = indexOfSubmitKey(); submitKeyFound = (indexOfSubmitKey != -1); // If inputting keys to an input element, and the string contains one of // ENTER or RETURN, break the string at that point and submit the form if (trimPastEnterKey && (indexOfSubmitKey != -1)) { builder.delete(indexOfSubmitKey, builder.length()); } } private int indexOfSubmitKey() { CharSequence[] terminators = { "\n", ENTER, RETURN }; for (CharSequence terminator : terminators) { String needle = String.valueOf(terminator); int index = builder.indexOf(needle); if (index != -1) { return index; } } return -1; } @Override public String toString() { String toReturn = builder.toString(); if (capitalize) { return toReturn.toUpperCase(); } return toReturn; } public boolean wasSubmitKeyFound() { return submitKeyFound; } public void setCapitalization(boolean capitalize) { this.capitalize = capitalize; } } PK lC>Porg/openqa/selenium/htmlunit/.svn/text-base/KeyboardModifiersState.java.svn-base/* Copyright 2007-2010 WebDriver committers Copyright 2007-2010 Google Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package org.openqa.selenium.htmlunit; import org.openqa.selenium.Keys; /** * Holds the state of the modifier keys (Shift, ctrl, alt) for HtmlUnit. * */ public class KeyboardModifiersState { private boolean shiftPressed = false; private boolean ctrlPressed = false; private boolean altPressed = false; public boolean isShiftPressed() { return shiftPressed; } public boolean isCtrlPressed() { return ctrlPressed; } public boolean isAltPressed() { return altPressed; } public void storeKeyDown(Keys key) { storeIfEqualsShift(key, true); storeIfEqualsCtrl(key, true); storeIfEqualsAlt(key, true); } public void storeKeyUp(Keys key) { storeIfEqualsShift(key, false); storeIfEqualsCtrl(key, false); storeIfEqualsAlt(key, false); } private void storeIfEqualsShift(Keys key, boolean keyState) { if (key.equals(Keys.SHIFT)) shiftPressed = keyState; } private void storeIfEqualsCtrl(Keys key, boolean keyState) { if (key.equals(Keys.CONTROL)) ctrlPressed = keyState; } private void storeIfEqualsAlt(Keys key, boolean keyState) { if (key.equals(Keys.ALT)) altPressed = keyState; } } PK lC>r^?org/openqa/selenium/htmlunit/.svn/text-base/build.desc.svn-base java_library(name = "htmlunit", srcs = [ "*.java" ], deps = [ "//java/client/src/org/openqa/selenium:webdriver-api", "//java/client/src/org/openqa/selenium/browserlaunchers", "//java/client/src/org/openqa/selenium/interactions", "//third_party/java/htmlunit", ]) PK (hC>r^'org/openqa/selenium/htmlunit/build.desc java_library(name = "htmlunit", srcs = [ "*.java" ], deps = [ "//java/client/src/org/openqa/selenium:webdriver-api", "//java/client/src/org/openqa/selenium/browserlaunchers", "//java/client/src/org/openqa/selenium/interactions", "//third_party/java/htmlunit", ]) PK %^D>! ŋ%org/openqa/selenium/support/How.class1Jorg/openqa/selenium/support/Howjava/lang/Enum CLASS_NAME!Lorg/openqa/selenium/support/How;CSSID ID_OR_NAME LINK_TEXTNAMEPARTIAL_LINK_TEXTTAG_NAMEXPATH ENUM$VALUES"[Lorg/openqa/selenium/support/How;()VCode  (Ljava/lang/String;I)V       #  &  )  ,  /  2  4 LineNumberTableLocalVariableTable thisvalues$()[Lorg/openqa/selenium/support/How; <>=java/lang/System ?@ arraycopy*(Ljava/lang/Object;ILjava/lang/Object;II)VvalueOf5(Ljava/lang/String;)Lorg/openqa/selenium/support/How; D AE5(Ljava/lang/Class;Ljava/lang/String;)Ljava/lang/Enum; SourceFileHow.java Signature3Ljava/lang/Enum;@1 @@@@ @ @ @ @ @YYYY!"Y$%Y'(Y*+Y-.Y01 YSYSYSY"SY%SY(SY+SY.SY1S35*  '4AN\jx61*+756 8 9:63YK*Y<YM;,56 AB* *C56FGHIPK %^D>3,org/openqa/selenium/support/ByIdOrName.class1Q&org/openqa/selenium/support/ByIdOrNameorg/openqa/selenium/ByidFinderLorg/openqa/selenium/By; nameFinderidOrNameLjava/lang/String;(Ljava/lang/String;)VCode  ()V    id,(Ljava/lang/String;)Lorg/openqa/selenium/By;    name  LineNumberTableLocalVariableTablethis(Lorg/openqa/selenium/support/ByIdOrName; findElementE(Lorg/openqa/selenium/SearchContext;)Lorg/openqa/selenium/WebElement; $ !"&*org/openqa/selenium/NoSuchElementExceptioncontext#Lorg/openqa/selenium/SearchContext;e,Lorg/openqa/selenium/NoSuchElementException; findElements5(Lorg/openqa/selenium/SearchContext;)Ljava/util/List; SignatureW(Lorg/openqa/selenium/SearchContext;)Ljava/util/List;0java/util/ArrayList / 3 +, 576java/util/List 89addAll(Ljava/util/Collection;)ZelementsLjava/util/List;LocalVariableTypeTable2Ljava/util/List;toString()Ljava/lang/String;Ajava/lang/StringBuilderCby id or name " @E @G HIappend-(Ljava/lang/String;)Ljava/lang/StringBuilder; @K HL(C)Ljava/lang/StringBuilder; @N >? SourceFileByIdOrName.java!   ^* *+*+*+!" #$%  !" a*+#M*+# %+ , .  '( )*+,-. (/Y1M,*+24W,*+24W,479&; ( ('( :;<  :=>? C@YBD*F"JM@  OPPK %^D> -org/openqa/selenium/support/PageFactory.class1'org/openqa/selenium/support/PageFactoryjava/lang/Object()VCode  LineNumberTableLocalVariableTablethis)Lorg/openqa/selenium/support/PageFactory; initElementsD(Lorg/openqa/selenium/WebDriver;Ljava/lang/Class;)Ljava/lang/Object; SignatureP(Lorg/openqa/selenium/WebDriver;Ljava/lang/Class;)TT;  instantiatePage  4(Lorg/openqa/selenium/WebDriver;Ljava/lang/Object;)VdriverLorg/openqa/selenium/WebDriver;pageClassToProxyLjava/lang/Class;pageLjava/lang/Object;LocalVariableTypeTableLjava/lang/Class;TT;"Dorg/openqa/selenium/support/pagefactory/DefaultElementLocatorFactory !$ %"(Lorg/openqa/selenium/WebDriver;)V ' (T(Lorg/openqa/selenium/support/pagefactory/ElementLocatorFactory;Ljava/lang/Object;)V driverRef+=org/openqa/selenium/support/pagefactory/DefaultFieldDecorator *- .B(Lorg/openqa/selenium/support/pagefactory/ElementLocatorFactory;)V 0 1M(Lorg/openqa/selenium/support/pagefactory/FieldDecorator;Ljava/lang/Object;)Vfactory?Lorg/openqa/selenium/support/pagefactory/ElementLocatorFactory; factoryRef 6 78getClass()Ljava/lang/Class; : ;< proxyFields^(Lorg/openqa/selenium/support/pagefactory/FieldDecorator;Ljava/lang/Object;Ljava/lang/Class;)V >@?java/lang/Class A8 getSuperclass decorator8Lorg/openqa/selenium/support/pagefactory/FieldDecorator;proxyInLjava/lang/Class<*>;a(Lorg/openqa/selenium/support/pagefactory/FieldDecorator;Ljava/lang/Object;Ljava/lang/Class<*>;)V >H IJgetDeclaredFields()[Ljava/lang/reflect/Field; >L MNgetClassLoader()Ljava/lang/ClassLoader; PRQ6org/openqa/selenium/support/pagefactory/FieldDecorator STdecorateD(Ljava/lang/ClassLoader;Ljava/lang/reflect/Field;)Ljava/lang/Object; VXWjava/lang/reflect/Field YZ setAccessible(Z)V V\ ]^set'(Ljava/lang/Object;Ljava/lang/Object;)V`java/lang/RuntimeException _b c(Ljava/lang/Throwable;)Ve java/lang/IllegalAccessExceptionfields[Ljava/lang/reflect/Field;fieldLjava/lang/reflect/Field;valuee"Ljava/lang/IllegalAccessException;norg/openqa/selenium/WebDriver >p qrgetConstructor3([Ljava/lang/Class;)Ljava/lang/reflect/Constructor; tvujava/lang/reflect/Constructor wx newInstance'([Ljava/lang/Object;)Ljava/lang/Object; >z w{()Ljava/lang/Object;}java/lang/NoSuchMethodException java/lang/InstantiationException+java/lang/reflect/InvocationTargetException constructorLjava/lang/reflect/Constructor;!Ljava/lang/NoSuchMethodException;"Ljava/lang/InstantiationException;-Ljava/lang/reflect/InvocationTargetException;$Ljava/lang/reflect/Constructor; SourceFilePageFactory.java!/* $  o *+M*,, RS T      U*M!Y,#+& _`a  ) (U*M*Y,,+/ mno 23 43 1~+5M*+,9,=M, yz{|z~ BCD DE ;<F W,GN-Y:66@2:*+5KO: U+[: _Y a/=@d * */5@BLV HWBCWWDRfg3hi*"jB kl  WDE ?+>YmSoM,Y*SsM+yM_Y,aM_Y,aM_Y,a|!~ !~+d +d5 5 * !"+,56 H?? k" k, kl6 k? PK %^D>M.  (org/openqa/selenium/support/FindBy.class1!"org/openqa/selenium/support/FindByjava/lang/Objectjava/lang/annotation/Annotationhow#()Lorg/openqa/selenium/support/How;AnnotationDefault!Lorg/openqa/selenium/support/How;IDusing()Ljava/lang/String;idname classNamecsstagNamelinkTextpartialLinkTextxpath SourceFile FindBy.javaRuntimeVisibleAnnotations Ljava/lang/annotation/Retention;value&Ljava/lang/annotation/RetentionPolicy;RUNTIMELjava/lang/annotation/Target;"Ljava/lang/annotation/ElementType;FIELD&  e   s  s  s  s  s  s  s  s  se[e PK %^D>H{$-org/openqa/selenium/support/CacheLookup.class1'org/openqa/selenium/support/CacheLookupjava/lang/Objectjava/lang/annotation/Annotation SourceFileCacheLookup.javaRuntimeVisibleAnnotations Ljava/lang/annotation/Retention;value&Ljava/lang/annotation/RetentionPolicy;RUNTIMELjava/lang/annotation/Target;"Ljava/lang/annotation/ElementType;FIELD&   e  [ePK %^D>߄)org/openqa/selenium/support/FindBys.class1#org/openqa/selenium/support/FindBysjava/lang/Objectjava/lang/annotation/Annotationvalue'()[Lorg/openqa/selenium/support/FindBy; SourceFile FindBys.javaRuntimeVisibleAnnotations Ljava/lang/annotation/Retention;&Ljava/lang/annotation/RetentionPolicy;RUNTIMELjava/lang/annotation/Target;"Ljava/lang/annotation/ElementType;FIELD&   e [ePK lC>>I..,org/openqa/selenium/support/.svn/all-wcpropsK 25 svn:wc:ra_dav:version-url V 69 /svn/!svn/ver/11240/trunk/java/client/src/org/openqa/selenium/support END PageFactory.java K 25 svn:wc:ra_dav:version-url V 86 /svn/!svn/ver/11224/trunk/java/client/src/org/openqa/selenium/support/PageFactory.java END ByIdOrName.java K 25 svn:wc:ra_dav:version-url V 85 /svn/!svn/ver/11224/trunk/java/client/src/org/openqa/selenium/support/ByIdOrName.java END FindBy.java K 25 svn:wc:ra_dav:version-url V 81 /svn/!svn/ver/11224/trunk/java/client/src/org/openqa/selenium/support/FindBy.java END build.desc K 25 svn:wc:ra_dav:version-url V 80 /svn/!svn/ver/11226/trunk/java/client/src/org/openqa/selenium/support/build.desc END How.java K 25 svn:wc:ra_dav:version-url V 78 /svn/!svn/ver/11224/trunk/java/client/src/org/openqa/selenium/support/How.java END CacheLookup.java K 25 svn:wc:ra_dav:version-url V 86 /svn/!svn/ver/11224/trunk/java/client/src/org/openqa/selenium/support/CacheLookup.java END FindBys.java K 25 svn:wc:ra_dav:version-url V 82 /svn/!svn/ver/11224/trunk/java/client/src/org/openqa/selenium/support/FindBys.java END PK lC>S9(org/openqa/selenium/support/.svn/entries8 dir 11264 http://selenium.googlecode.com/svn/trunk/java/client/src/org/openqa/selenium/support http://selenium.googlecode.com/svn 2011-02-01T18:15:27.349016Z 11240 eran.mes@gmail.com svn:special svn:externals svn:needs-lock 07704840-8298-11de-bf8c-fd130f914ac9 events dir pagefactory dir PageFactory.java file 2011-02-03T12:01:18.000000Z 995c9f4451ec799a06096266ce47f48a 2011-01-23T14:24:15.632580Z 11076 dawagner ByIdOrName.java file 2011-02-03T12:01:18.000000Z 1b01014a94c4a8a98c6c5567c95009d4 2009-10-20T11:48:31.254806Z 7437 michael.tamm2 FindBy.java file 2011-02-03T12:01:18.000000Z d1529d669961ecb9ba4b09467c2c8eb5 2010-11-16T11:14:46.441555Z 10333 simon.m.stewart internal dir build.desc file 2011-02-03T12:01:18.000000Z df604b711f99dbd141c085bcff08a39f 2011-02-01T13:59:17.176547Z 11226 simon.m.stewart testing dir ui dir How.java file 2011-02-03T12:01:18.000000Z ab8f9fd6310dcc35ed48ba1153448e3f 2010-11-16T11:14:46.441555Z 10333 simon.m.stewart CacheLookup.java file 2011-02-03T12:01:18.000000Z 9322f5c9c2e7ed5a3bfd986dc66b4d1f 2009-01-05T15:17:38.587344Z 6031 simon.m.stewart FindBys.java file 2011-02-03T12:01:18.000000Z cd8821d2c2ed0bc083c12de83ebd3494 2009-08-27T19:10:00.567251Z 7172 simon.m.stewart PK lC>G'org/openqa/selenium/support/.svn/format8 PK lC>JCorg/openqa/selenium/support/.svn/text-base/ByIdOrName.java.svn-base/* Copyright 2007-2009 WebDriver committers Copyright 2007-2009 Google Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package org.openqa.selenium.support; import org.openqa.selenium.By; import org.openqa.selenium.SearchContext; import org.openqa.selenium.WebElement; import org.openqa.selenium.NoSuchElementException; import java.util.ArrayList; import java.util.List; public class ByIdOrName extends By { private By idFinder; private By nameFinder; private String idOrName; public ByIdOrName(String idOrName) { this.idOrName = idOrName; idFinder = By.id(idOrName); nameFinder = By.name(idOrName); } @Override public WebElement findElement(SearchContext context) { try { // First, try to locate by id return idFinder.findElement(context); } catch (NoSuchElementException e) { // Then by name return nameFinder.findElement(context); } } @Override public List findElements(SearchContext context) { List elements = new ArrayList(); // First: Find by id ... elements.addAll(idFinder.findElements(context)); // Second: Find by name ... elements.addAll(nameFinder.findElements(context)); return elements; } @Override public String toString() { return "by id or name \"" + idOrName + '"'; } } PK lC>''Dorg/openqa/selenium/support/.svn/text-base/CacheLookup.java.svn-base/* Copyright 2007-2009 WebDriver committers Copyright 2007-2009 Google Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package org.openqa.selenium.support; import java.lang.annotation.ElementType; import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; import java.lang.annotation.Target; /** * Marker annotation to be applied to WebElements to indicate that it never * changes (that is, that the same instance in the DOM will always be used) */ @Retention(RetentionPolicy.RUNTIME) @Target(ElementType.FIELD) public @interface CacheLookup { } PK lC>Cs?org/openqa/selenium/support/.svn/text-base/FindBy.java.svn-base/* Copyright 2007-2009 WebDriver committers Copyright 2007-2009 Google Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package org.openqa.selenium.support; import java.lang.annotation.ElementType; import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; import java.lang.annotation.Target; /** * Used to mark a field on a Page Object to indicate an alternative mechanism * for locating the element. Used in conjunction with * {@link org.openqa.selenium.support.PageFactory#proxyElement(org.openqa.selenium.WebDriver, Object, java.lang.reflect.Field)} * this allows users to quickly and easily create PageObjects. * *

You can either use this annotation by specifying both "how" and "using" * or by specifying one of the location strategies (eg: "id") with an * appropriate value to use. Both options will delegate down to the matching * {@link org.openqa.selenium.By} methods in By class. * * For example, these two annotations point to the same element: * *

 * @FindBy(id = "foobar") WebElement foobar;
 * @FindBy(how = How.ID, using = "foobar") WebElement foobar;
 * 
*/ @Retention(RetentionPolicy.RUNTIME) @Target(ElementType.FIELD) public @interface FindBy { How how() default How.ID; String using() default ""; String id() default ""; String name() default ""; String className() default ""; String css() default ""; String tagName() default ""; String linkText() default ""; String partialLinkText() default ""; String xpath() default ""; } PK lC>o@org/openqa/selenium/support/.svn/text-base/FindBys.java.svn-base/* Copyright 2007-2009 WebDriver committers Copyright 2007-2009 Google Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package org.openqa.selenium.support; import java.lang.annotation.ElementType; import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; import java.lang.annotation.Target; /** * Used to mark a field on a Page Object to indicate that lookup * should use a series of @FindBy tags in a chain as described in * {@link org.openqa.selenium.support.pagefactory.ByChained} * * Eg: * @FindBy({@FindBy(how = How.ID, using = "foo"), * @FindBy(how = How.CLASS_NAME, using = "bar")}) */ @Retention(RetentionPolicy.RUNTIME) @Target(ElementType.FIELD) public @interface FindBys { FindBy[] value(); } PK lC>dNM<org/openqa/selenium/support/.svn/text-base/How.java.svn-base/* Copyright 2007-2009 WebDriver committers Copyright 2007-2009 Google Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package org.openqa.selenium.support; public enum How { CLASS_NAME, CSS, ID, ID_OR_NAME, LINK_TEXT, NAME, PARTIAL_LINK_TEXT, TAG_NAME, XPATH, } PK lC>HfDorg/openqa/selenium/support/.svn/text-base/PageFactory.java.svn-base/* Copyright 2007-2009 WebDriver committers Copyright 2007-2009 Google Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package org.openqa.selenium.support; import org.openqa.selenium.WebDriver; import org.openqa.selenium.support.pagefactory.DefaultElementLocatorFactory; import org.openqa.selenium.support.pagefactory.DefaultFieldDecorator; import org.openqa.selenium.support.pagefactory.ElementLocatorFactory; import org.openqa.selenium.support.pagefactory.FieldDecorator; import java.lang.reflect.Constructor; import java.lang.reflect.Field; import java.lang.reflect.InvocationTargetException; /** * Factory class to make using Page Objects simpler and easier. * * @see http://code.google.com/p/webdriver/wiki/PageObjects */ public class PageFactory { /** * Instantiate an instance of the given class, and set a lazy proxy for each * of the WebElement fields that have been declared, assuming that the * field name is also the HTML element's "id" or "name". This means that for * the class: * * * public class Page { * private WebElement submit; * } * * * there will be an element that can be located using the xpath expression * "//*[@id='submit']" or "//*[@name='submit']" * * Any WebElement in the class will be proxied as a WebElement. You will * not be able to cast this as a RenderedWebElement. If you want to access * the field as a RenderedWebElement, you should declare the field as a * RenderedWebElement, i.e. * * * public class Page { * private RenderedWebElement submit; * } * * * By default, the element is looked up each and every time a method is called * upon it. To change this behaviour, simply annnotate the field with the * {@link @org.openqa.selenium.support.CacheLookup}. To change how the * element is located, use the {@link @org.openqa.selenium.support.FindBy} * annotation. * * This method will attempt to instantiate the class given to it, preferably * using a constructor which takes a WebDriver instance as its only argument * or falling back on a no-arg constructor. An exception will be thrown if * the class cannot be instantiated. * * @see @org.openqa.selenium.support.FindBy * @see @org.openqa.selenium.support.CacheLookup * @param driver The driver that will be used to look up the elements * @param pageClassToProxy A class which will be initialised. * @return An instantiated instance of the class with WebElement fields proxied */ public static T initElements(WebDriver driver, Class pageClassToProxy) { T page = instantiatePage(driver, pageClassToProxy); initElements(driver, page); return page; } /** * As {@link org.openqa.selenium.support.PageFactory#initElements(org.openqa.selenium.WebDriver, Class)} * but will only replace the fields of an already instantiated Page Object. * * @param driver The driver that will be used to look up the elements * @param page The object with WebElement fields that should be proxied. */ public static void initElements(WebDriver driver, Object page) { final WebDriver driverRef = driver; initElements(new DefaultElementLocatorFactory(driverRef), page); } /** * Similar to the other "initElements" methods, but takes an * {@link ElementLocatorFactory} which is used for providing the * mechanism for fniding elements. If the ElementLocatorFactory returns * null then the field won't be decorated. * * @param factory The factory to use * @param page The object to decorate the fields of */ public static void initElements(ElementLocatorFactory factory, Object page) { final ElementLocatorFactory factoryRef = factory; initElements(new DefaultFieldDecorator(factoryRef), page); } /** * Similar to the other "initElements" methods, but takes an * {@link FieldDecorator} which is used for decorating each of the fields. * * @param decorator the decorator to use * @param page The object to decorate the fields of */ public static void initElements(FieldDecorator decorator, Object page) { Class proxyIn = page.getClass(); while (proxyIn != Object.class) { proxyFields(decorator, page, proxyIn); proxyIn = proxyIn.getSuperclass(); } } private static void proxyFields(FieldDecorator decorator, Object page, Class proxyIn) { Field[] fields = proxyIn.getDeclaredFields(); for (Field field : fields) { Object value = decorator.decorate(page.getClass().getClassLoader(), field); if (value != null) { try { field.setAccessible(true); field.set(page, value); } catch (IllegalAccessException e) { throw new RuntimeException(e); } } } } private static T instantiatePage(WebDriver driver, Class pageClassToProxy) { try { try { Constructor constructor = pageClassToProxy.getConstructor(WebDriver.class); return constructor.newInstance(driver); } catch (NoSuchMethodException e) { return pageClassToProxy.newInstance(); } } catch (InstantiationException e) { throw new RuntimeException(e); } catch (IllegalAccessException e) { throw new RuntimeException(e); } catch (InvocationTargetException e) { throw new RuntimeException(e); } } } PK lC>{77>org/openqa/selenium/support/.svn/text-base/build.desc.svn-base java_library(name = "support", deps = [ ":page-factory", "//java/client/src/org/openqa/selenium/support/events", "//java/client/src/org/openqa/selenium/support/ui", ]) java_library(name = "page-factory", srcs = [ "ByIdOrName.java", "CacheLookup.java", "FindBy.java", "FindBys.java", "How.java", "PageFactory.java", "pagefactory/*.java", "pagefactory/internal/*.java", ], deps = [ "//java/client/src/org/openqa/selenium:webdriver-api", "//java/client/src/org/openqa/selenium/support/ui:components", ]) PK )hC>{77&org/openqa/selenium/support/build.desc java_library(name = "support", deps = [ ":page-factory", "//java/client/src/org/openqa/selenium/support/events", "//java/client/src/org/openqa/selenium/support/ui", ]) java_library(name = "page-factory", srcs = [ "ByIdOrName.java", "CacheLookup.java", "FindBy.java", "FindBys.java", "How.java", "PageFactory.java", "pagefactory/*.java", "pagefactory/internal/*.java", ], deps = [ "//java/client/src/org/openqa/selenium:webdriver-api", "//java/client/src/org/openqa/selenium/support/ui:components", ]) PK %^D>  Borg/openqa/selenium/support/events/internal/EventFiringMouse.class1@](Lorg/openqa/selenium/WebDriver;Lorg/openqa/selenium/support/events/WebDriverEventListener;)VCode  ()V    #org/openqa/selenium/HasInputDevices  getMouse()Lorg/openqa/selenium/Mouse;  LineNumberTableLocalVariableTablethis>Lorg/openqa/selenium/support/events/internal/EventFiringMouse;click:(Lorg/openqa/selenium/interactions/internal/Coordinates;)V & #$where7Lorg/openqa/selenium/interactions/internal/Coordinates; doubleClick + )$ mouseDown . ,$mouseUp 1 /$ mouseMove 4 2$<(Lorg/openqa/selenium/interactions/internal/Coordinates;JJ)V 7 25xOffsetJyOffset contextClick = ;$ SourceFileEventFiringMouse.java!   m**+*,**  !" #$C *+%    !" '()$C *+*   !" '(,$C *+- # $  !" '(/$C *+0 ' (  !" '(2$C *+3 + ,  !" '(25Z*+ 6 / 0 *!"'(89:9;$C *+< 3 4  !" '(>?PK %^D>CEEEorg/openqa/selenium/support/events/internal/EventFiringKeyboard.class15?org/openqa/selenium/support/events/internal/EventFiringKeyboardjava/lang/Objectorg/openqa/selenium/KeyboarddriverLorg/openqa/selenium/WebDriver; dispatcher;Lorg/openqa/selenium/support/events/WebDriverEventListener;keyboardLorg/openqa/selenium/Keyboard;](Lorg/openqa/selenium/WebDriver;Lorg/openqa/selenium/support/events/WebDriverEventListener;)VCode  ()V    #org/openqa/selenium/HasInputDevices   getKeyboard ()Lorg/openqa/selenium/Keyboard;  LineNumberTableLocalVariableTablethisALorg/openqa/selenium/support/events/internal/EventFiringKeyboard;sendKeys([Ljava/lang/CharSequence;)V & #$ keysToSend[Ljava/lang/CharSequence;pressKey(Lorg/openqa/selenium/Keys;)V , )* keyToPressLorg/openqa/selenium/Keys; releaseKey 1 /* keyToRelease SourceFileEventFiringKeyboard.java!   m**+*,**  !" #$C *+%    !" '()*C *++    !" -./*C *+0 " #  !" 2.34PK lC>*HP<org/openqa/selenium/support/events/internal/.svn/all-wcpropsK 25 svn:wc:ra_dav:version-url V 85 /svn/!svn/ver/11224/trunk/java/client/src/org/openqa/selenium/support/events/internal END EventFiringKeyboard.java K 25 svn:wc:ra_dav:version-url V 110 /svn/!svn/ver/11224/trunk/java/client/src/org/openqa/selenium/support/events/internal/EventFiringKeyboard.java END EventFiringMouse.java K 25 svn:wc:ra_dav:version-url V 107 /svn/!svn/ver/11224/trunk/java/client/src/org/openqa/selenium/support/events/internal/EventFiringMouse.java END PK lC>2fSS8org/openqa/selenium/support/events/internal/.svn/entries8 dir 11264 http://selenium.googlecode.com/svn/trunk/java/client/src/org/openqa/selenium/support/events/internal http://selenium.googlecode.com/svn 2011-01-18T16:04:46.488656Z 11008 eran.mes@gmail.com svn:special svn:externals svn:needs-lock 07704840-8298-11de-bf8c-fd130f914ac9 EventFiringKeyboard.java file 2011-02-03T12:01:18.000000Z 9274db7bf942b4b5216dc2cc2b6f5b10 2010-12-30T16:03:40.482723Z 10802 eran.mes@gmail.com EventFiringMouse.java file 2011-02-03T12:01:18.000000Z f39c2872b7b8c91943c2f9f4a74eccb4 2011-01-18T16:04:46.488656Z 11008 eran.mes@gmail.com PK lC>G7org/openqa/selenium/support/events/internal/.svn/format8 PK lC>Z\org/openqa/selenium/support/events/internal/.svn/text-base/EventFiringKeyboard.java.svn-base// Copyright 2010 Google Inc. All Rights Reserved. package org.openqa.selenium.support.events.internal; import org.openqa.selenium.HasInputDevices; import org.openqa.selenium.Keyboard; import org.openqa.selenium.Keys; import org.openqa.selenium.WebDriver; import org.openqa.selenium.support.events.WebDriverEventListener; /** * A keyboard firing events. */ public class EventFiringKeyboard implements Keyboard { private final WebDriver driver; private final WebDriverEventListener dispatcher; private final Keyboard keyboard; public EventFiringKeyboard(WebDriver driver, WebDriverEventListener dispatcher) { this.driver = driver; this.dispatcher = dispatcher; this.keyboard = ((HasInputDevices) this.driver).getKeyboard(); } public void sendKeys(CharSequence... keysToSend) { keyboard.sendKeys(keysToSend); } public void pressKey(Keys keyToPress) { keyboard.pressKey(keyToPress); } public void releaseKey(Keys keyToRelease) { keyboard.releaseKey(keyToRelease); } } PK lC>ȩlYorg/openqa/selenium/support/events/internal/.svn/text-base/EventFiringMouse.java.svn-base// Copyright 2010 Google Inc. All Rights Reserved. package org.openqa.selenium.support.events.internal; import org.openqa.selenium.HasInputDevices; import org.openqa.selenium.Mouse; import org.openqa.selenium.WebDriver; import org.openqa.selenium.WebElement; import org.openqa.selenium.internal.WrapsElement; import org.openqa.selenium.interactions.internal.Coordinates; import org.openqa.selenium.support.events.WebDriverEventListener; /** * A mouse that fires events. */ public class EventFiringMouse implements Mouse { private final WebDriver driver; private final WebDriverEventListener dispatcher; private final Mouse mouse; public EventFiringMouse(WebDriver driver, WebDriverEventListener dispatcher) { this.driver = driver; this.dispatcher = dispatcher; this.mouse = ((HasInputDevices) this.driver).getMouse(); } public void click(Coordinates where) { mouse.click(where); } public void doubleClick(Coordinates where) { mouse.doubleClick(where); } public void mouseDown(Coordinates where) { mouse.mouseDown(where); } public void mouseUp(Coordinates where) { mouse.mouseUp(where); } public void mouseMove(Coordinates where) { mouse.mouseMove(where); } public void mouseMove(Coordinates where, long xOffset, long yOffset) { mouse.mouseMove(where, xOffset, yOffset); } public void contextClick(Coordinates where) { mouse.contextClick(where); } } PK &^D> 82com/thoughtworks/selenium/condition/Presence.class1;,com/thoughtworks/selenium/condition/Presence-com/thoughtworks/selenium/condition/ConditionlocatorLjava/lang/String;(Ljava/lang/String;)VCode java/lang/StringBuilder java/lang/String valueOf&(Ljava/lang/Object;)Ljava/lang/String;   is present  append-(Ljava/lang/String;)Ljava/lang/StringBuilder;  toString()Ljava/lang/String;   LineNumberTableLocalVariableTablethis.Lcom/thoughtworks/selenium/condition/Presence;isTrue@(Lcom/thoughtworks/selenium/condition/ConditionRunner$Context;)Z (*);com/thoughtworks/selenium/condition/ConditionRunner$Context +, getSelenium&()Lcom/thoughtworks/selenium/Selenium; .0/"com/thoughtworks/selenium/Selenium 12isElementPresent(Ljava/lang/String;)Zcontext=Lcom/thoughtworks/selenium/condition/ConditionRunner$Context; SourceFile Presence.java InnerClasses93com/thoughtworks/selenium/condition/ConditionRunnerContext! Y* Y+ *+! "#$%& D+'*-!#"#$34567 (8: PK &^D>S,J.com/thoughtworks/selenium/condition/Text.class1H(com/thoughtworks/selenium/condition/Text-com/thoughtworks/selenium/condition/ConditionlocatorLjava/lang/String; expectedText(Ljava/lang/String;)VCode   '(Ljava/lang/String;Ljava/lang/String;)VLineNumberTableLocalVariableTablethis*Lcom/thoughtworks/selenium/condition/Text;java/lang/StringBuilderExpecting text    append-(Ljava/lang/String;)Ljava/lang/StringBuilder; in ! "#toString()Ljava/lang/String;  &  ( isTrue@(Lcom/thoughtworks/selenium/condition/ConditionRunner$Context;)Z ,.-;com/thoughtworks/selenium/condition/ConditionRunner$Context /0 getSelenium&()Lcom/thoughtworks/selenium/Selenium; 243"com/thoughtworks/selenium/Selenium 56 isTextPresent(Ljava/lang/String;)Z 28 9:getText&(Ljava/lang/String;)Ljava/lang/String; <>=java/lang/String ?6equalsIgnoreCasecontext=Lcom/thoughtworks/selenium/condition/ConditionRunner$Context; SourceFile Text.java InnerClassesF3com/thoughtworks/selenium/condition/ConditionRunnerContext!  ?*+  "#  ;*Y+,Y,  $*,%*+',0-5.:/ ;;;)* j.*%++*'1++*%7*';235..@ABCD ,EG PK &^D> Lcom/thoughtworks/selenium/condition/DefaultConditionRunner$ContextImpl.class1Fcom/thoughtworks/selenium/condition/DefaultConditionRunner$ContextImpljava/lang/Object;com/thoughtworks/selenium/condition/ConditionRunner$ContextstartJinfoLjava/util/List; Signature$Ljava/util/List;lastInfoLjava/lang/String;this$0?(Lcom/thoughtworks/selenium/condition/DefaultConditionRunner;)VCode    ()Vjava/util/ArrayList    !now()J # LineNumberTableLocalVariableTablethisHLcom/thoughtworks/selenium/condition/DefaultConditionRunner$ContextImpl; )+*java/lang/System ,!currentTimeMillis(Ljava/lang/String;)V /  132java/lang/String 45equals(Ljava/lang/Object;)Z 798java/util/List :5addelapsed getSelenium&()Lcom/thoughtworks/selenium/Selenium; ?A@:com/thoughtworks/selenium/condition/DefaultConditionRunner BCaccess$0b(Lcom/thoughtworks/selenium/condition/DefaultConditionRunner;)Lcom/thoughtworks/selenium/Selenium;getConditionRunner7()Lcom/thoughtworks/selenium/condition/ConditionRunner;failureMessageU(Ljava/lang/String;Lcom/thoughtworks/selenium/condition/Condition;)Ljava/lang/String;Ijava/lang/StringBuilder KML-com/thoughtworks/selenium/condition/Condition NOtoString()Ljava/lang/String; 1Q RSvalueOf&(Ljava/lang/Object;)Ljava/lang/String; HU -W failed to become true within HY Z[append-(Ljava/lang/String;)Ljava/lang/StringBuilder; ] ^_timeout()I Ha Zb(I)Ljava/lang/StringBuilder;d msec HMgi; 7k lmisEmpty()Z Ho Zp-(Ljava/lang/Object;)Ljava/lang/StringBuilder; narrative condition/Lcom/thoughtworks/selenium/condition/Condition;message ?v wxaccess$1?(Lcom/thoughtworks/selenium/condition/DefaultConditionRunner;)IK(Lcom/thoughtworks/selenium/condition/DefaultConditionRunner$ContextImpl;)I(Lcom/thoughtworks/selenium/condition/DefaultConditionRunner$ContextImpl;Ljava/lang/String;Lcom/thoughtworks/selenium/condition/Condition;)Ljava/lang/String; | FG SourceFileDefaultConditionRunner.java InnerClasses3com/thoughtworks/selenium/condition/ConditionRunnerContext ContextImpl0     S*+**Y**"$ % &' !.($% &' -\+*.0*+6W*+.$ %&' ;!4 **"e$%  &'<=2*>$% &'DE/*$% &'FG|HY,JPTVX*\`cXeNHY-PT+f0fHYhT+XeXeN*jHY-PThX*neN-$#S_z%*|&'|q|rs#Yt^_2*u$% &'By%*\$%wz'*+,{$%}~ ?PK &^D>2֙Mcom/thoughtworks/selenium/condition/DefaultConditionRunner$Log4jMonitor.class1ZGcom/thoughtworks/selenium/condition/DefaultConditionRunner$Log4jMonitorjava/lang/ObjectBcom/thoughtworks/selenium/condition/DefaultConditionRunner$MonitorloggerLjava/util/logging/Logger;()VCode :com/thoughtworks/selenium/condition/DefaultConditionRunner java/lang/Class getName()Ljava/lang/String; java/util/logging/Logger  getLogger.(Ljava/lang/String;)Ljava/util/logging/Logger;  LineNumberTableLocalVariableTable   thisILcom/thoughtworks/selenium/condition/DefaultConditionRunner$Log4jMonitor;conditionWasReachedo(Lcom/thoughtworks/selenium/condition/ConditionRunner$Context;Lcom/thoughtworks/selenium/condition/Condition;)V&java/lang/StringBuilder(Reached %* +(Ljava/lang/String;)V -/.-com/thoughtworks/selenium/condition/Condition 0toString %2 34append-(Ljava/lang/String;)Ljava/lang/StringBuilder; %/ 7 8+logcontext=Lcom/thoughtworks/selenium/condition/ConditionRunner$Context; condition/Lcom/thoughtworks/selenium/condition/Condition; waitHasBegun? Waiting for conditionFailed(Lcom/thoughtworks/selenium/condition/ConditionRunner$Context;Lcom/thoughtworks/selenium/condition/Condition;Ljava/lang/String;)VmessageLjava/lang/String; % Fjava/util/Date E %I 3J-(Ljava/lang/Object;)Ljava/lang/StringBuilder;L - N O+info SourceFileDefaultConditionRunner.java InnerClassesT;com/thoughtworks/selenium/condition/ConditionRunner$ContextV3com/thoughtworks/selenium/condition/ConditionRunnerContext Log4jMonitorMonitor1  4     /* !"#$ Z*%Y'),,156  !"9:;<=$ Z*%Y>),,156  !"9:;<@A R*-6 *!"9:;<BC8+ \$%YDEYGHK1+15M #$!"$BCPQRSUW  X Y PK &^D>MgPHcom/thoughtworks/selenium/condition/DefaultConditionRunner$Monitor.class1Bcom/thoughtworks/selenium/condition/DefaultConditionRunner$Monitorjava/lang/Object waitHasBeguno(Lcom/thoughtworks/selenium/condition/ConditionRunner$Context;Lcom/thoughtworks/selenium/condition/Condition;)VconditionWasReachedconditionFailed(Lcom/thoughtworks/selenium/condition/ConditionRunner$Context;Lcom/thoughtworks/selenium/condition/Condition;Ljava/lang/String;)V SourceFileDefaultConditionRunner.java InnerClasses;com/thoughtworks/selenium/condition/ConditionRunner$Context3com/thoughtworks/selenium/condition/ConditionRunnerContext:com/thoughtworks/selenium/condition/DefaultConditionRunnerMonitor      PK &^D>SܝLcom/thoughtworks/selenium/condition/DefaultConditionRunner$NoOpMonitor.class1'Fcom/thoughtworks/selenium/condition/DefaultConditionRunner$NoOpMonitorjava/lang/ObjectBcom/thoughtworks/selenium/condition/DefaultConditionRunner$Monitor()VCode  LineNumberTableLocalVariableTablethisHLcom/thoughtworks/selenium/condition/DefaultConditionRunner$NoOpMonitor; waitHasBeguno(Lcom/thoughtworks/selenium/condition/ConditionRunner$Context;Lcom/thoughtworks/selenium/condition/Condition;)Vcontext=Lcom/thoughtworks/selenium/condition/ConditionRunner$Context; condition/Lcom/thoughtworks/selenium/condition/Condition;conditionWasReachedconditionFailed(Lcom/thoughtworks/selenium/condition/ConditionRunner$Context;Lcom/thoughtworks/selenium/condition/Condition;Ljava/lang/String;)VmessageLjava/lang/String; SourceFileDefaultConditionRunner.java InnerClasses;com/thoughtworks/selenium/condition/ConditionRunner$Context!3com/thoughtworks/selenium/condition/ConditionRunnerContext$:com/thoughtworks/selenium/condition/DefaultConditionRunnerMonitor NoOpMonitor1 /*    ?   ?   I  * " #% #&PK &^D>M<;@com/thoughtworks/selenium/condition/DefaultConditionRunner.class1:com/thoughtworks/selenium/condition/DefaultConditionRunnerjava/lang/Object3com/thoughtworks/selenium/condition/ConditionRunnermonitorDLcom/thoughtworks/selenium/condition/DefaultConditionRunner$Monitor;selenium$Lcom/thoughtworks/selenium/Selenium; initialDelayIintervaltimeoutn(Lcom/thoughtworks/selenium/condition/DefaultConditionRunner$Monitor;Lcom/thoughtworks/selenium/Selenium;III)VCode  ()V        LineNumberTableLocalVariableTablethis@?Bcom/thoughtworks/selenium/condition/DefaultConditionRunner$Monitor AB waitHasBeguno(Lcom/thoughtworks/selenium/condition/ConditionRunner$Context;Lcom/thoughtworks/selenium/condition/Condition;)V D EF threadSleep(I)V HJI-com/thoughtworks/selenium/condition/Condition KLisTrue@(Lcom/thoughtworks/selenium/condition/ConditionRunner$Context;)Z >N OBconditionWasReached 8Q RSelapsed()J 8U VWaccess$0K(Lcom/thoughtworks/selenium/condition/DefaultConditionRunner$ContextImpl;)IYjava/lang/StringBuilder[Exception while waiting for ' X] ^(Ljava/lang/String;)V H` abtoString()Ljava/lang/String; Xd efappend-(Ljava/lang/String;)Ljava/lang/StringBuilder;h' X` k lmthrowAssertionException*(Ljava/lang/String;Ljava/lang/Throwable;)Vo%SeleniumException while waiting for 'q' (otherwise timed out) 8s tuaccess$1(Lcom/thoughtworks/selenium/condition/DefaultConditionRunner$ContextImpl;Ljava/lang/String;Lcom/thoughtworks/selenium/condition/Condition;)Ljava/lang/String; >w xyconditionFailed(Lcom/thoughtworks/selenium/condition/ConditionRunner$Context;Lcom/thoughtworks/selenium/condition/Condition;Ljava/lang/String;)V { l^}+com/thoughtworks/selenium/SeleniumExceptionjava/lang/RuntimeException narrativeLjava/lang/String;contextHLcom/thoughtworks/selenium/condition/DefaultConditionRunner$ContextImpl;seleniumException-Lcom/thoughtworks/selenium/SeleniumException;seeLjava/lang/RuntimeException;message java/lang/Thread sleep(J)Vjava/lang/InterruptedException ~] ~ m throwableLjava/lang/Throwable;b(Lcom/thoughtworks/selenium/condition/DefaultConditionRunner;)Lcom/thoughtworks/selenium/Selenium;?(Lcom/thoughtworks/selenium/condition/DefaultConditionRunner;)I SourceFileDefaultConditionRunner.java InnerClasses;com/thoughtworks/selenium/condition/ConditionRunner$ContextContext ContextImplGcom/thoughtworks/selenium/condition/DefaultConditionRunner$Log4jMonitor Log4jMonitorMonitor NoOpMonitor!     **+*,***67 89:;< > !"      #g*$Y&,' HI 4!"   )g*$Y&+' QR 4!"    *[*$Y&++ Z[ *!"   -J*$Y&+.+ cd !" /0@*1+3  !"67/58Y*:N:*-,=**C(:,-G*-,M::**C-P-Tѧ#:*XYZ\,_cgcij!*XYn\,_cpcij-+,r:*-,v*z%89| 8W~9TW~V "%-89;?GWYw| R!"67  ;YEFN M  !" l^= ~Y+  !" lmH ~Y+,  !"  V%*' t%** * 8> $PK &^D>~~Acom/thoughtworks/selenium/condition/ConditionRunner$Context.class1;com/thoughtworks/selenium/condition/ConditionRunner$Contextjava/lang/ObjectgetConditionRunner7()Lcom/thoughtworks/selenium/condition/ConditionRunner; getSelenium&()Lcom/thoughtworks/selenium/Selenium;info(Ljava/lang/String;)Velapsed()J SourceFileConditionRunner.java InnerClasses3com/thoughtworks/selenium/condition/ConditionRunnerContext     PK &^D>Et69com/thoughtworks/selenium/condition/ConditionRunner.class13com/thoughtworks/selenium/condition/ConditionRunnerjava/lang/ObjectwaitFor2(Lcom/thoughtworks/selenium/condition/Condition;)VD(Ljava/lang/String;Lcom/thoughtworks/selenium/condition/Condition;)V SourceFileConditionRunner.java InnerClasses ;com/thoughtworks/selenium/condition/ConditionRunner$ContextContext    PK &^D>$3com/thoughtworks/selenium/condition/Condition.class1-com/thoughtworks/selenium/condition/Conditionjava/lang/ObjectmessageLjava/lang/String;isTrue@(Lcom/thoughtworks/selenium/condition/ConditionRunner$Context;)Z()VCode   getClass()Ljava/lang/Class; java/lang/Class getCanonicalName()Ljava/lang/String;  LineNumberTableLocalVariableTablethis/Lcom/thoughtworks/selenium/condition/Condition;((Ljava/lang/String;[Ljava/lang/Object;)V java/lang/NullPointerException" Condition names must not be null $ %(Ljava/lang/String;)V ' ()simulateStringDotFormatMethod9(Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/String;args[Ljava/lang/Object;-java.class.version /10java/lang/System 23 getProperty&(Ljava/lang/String;)Ljava/lang/String; 576java/lang/String 89 substring(II)Ljava/lang/String; ;=<java/lang/Integer >?parseInt(Ljava/lang/String;)IAformat+ D EF getMethod@(Ljava/lang/String;[Ljava/lang/Class;)Ljava/lang/reflect/Method; HJIjava/lang/reflect/Method KLinvoke9(Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/Object; NPO+java/lang/reflect/InvocationTargetException QRgetCause()Ljava/lang/Throwable;Tjava/lang/RuntimeExceptionV,String.format(..) can't be that hard to call S$Y[java/lang/StringBuilder 5] ^_valueOf&(Ljava/lang/Object;)Ljava/lang/String; Z$b Zd efappend-(Ljava/lang/String;)Ljava/lang/StringBuilder; Zh ei-(Ljava/lang/Object;)Ljava/lang/StringBuilder; Zk ltoStringnjava/lang/NoSuchMethodExceptionp java/lang/IllegalAccessExceptionversILjava/lang/reflect/Method;e-Ljava/lang/reflect/InvocationTargetException; throwableLjava/lang/Throwable;msgi { '(Ljava/lang/String;Ljava/lang/Object;)VargLjava/lang/Object;9(Ljava/lang/String;Ljava/lang/Object;Ljava/lang/Object;)Varg0arg1K(Ljava/lang/String;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;)Varg2](Ljava/lang/String;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;)Varg3o(Ljava/lang/String;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;)Varg4 getMessage k Condition "" SourceFileCondition.java InnerClasses;com/thoughtworks/selenium/condition/ConditionRunner$Context3com/thoughtworks/selenium/condition/ConditionRunnerContext!   B* **+,-   k* + Y!#**+,&4569: *+() u,.4:>1[5@Y5SYBSC:Y+SY,SG5:::M:S SSYUWX:+:6#ZY\`ac,2gj:,@Am@Fo@KNF=>@+AABFCKDMETF\GbJlLpMsNyONQ\ *+qr+AsMtuTvwp3xv*yr % B *+z Y Z   | P*+Y,Sz ] ^ }~  ^*+Y,SY-Sz ab*~~  m*+Y,SY-SYSz ef4~~~  |*+Y,SY-SYSYSz ij>~~~~  !*+Y,SY-SYSYSYSz m nH!!!~!~!~!~!~ /*q l CZY`*ccju   PK &^D>/pp-com/thoughtworks/selenium/condition/Not.class13'com/thoughtworks/selenium/condition/Not-com/thoughtworks/selenium/condition/ConditionpositiveCondition/Lcom/thoughtworks/selenium/condition/Condition;2(Lcom/thoughtworks/selenium/condition/Condition;)VCode java/lang/StringBuilder NOT of (  (Ljava/lang/String;)V   getMessage()Ljava/lang/String;  append-(Ljava/lang/String;)Ljava/lang/StringBuilder;)  toString   LineNumberTableLocalVariableTablethis)Lcom/thoughtworks/selenium/condition/Not;isTrue@(Lcom/thoughtworks/selenium/condition/ConditionRunner$Context;)Z ( %&context=Lcom/thoughtworks/selenium/condition/ConditionRunner$Context; SourceFileNot.java InnerClasses/;com/thoughtworks/selenium/condition/ConditionRunner$Context13com/thoughtworks/selenium/condition/ConditionRunnerContext! ^"* Y +*+!!""#$"%& E*+'!!"#$)*+,- .02 PK &^D>QY >com/thoughtworks/selenium/condition/JUnitConditionRunner.class1P8com/thoughtworks/selenium/condition/JUnitConditionRunner:com/thoughtworks/selenium/condition/DefaultConditionRunnern(Lcom/thoughtworks/selenium/condition/DefaultConditionRunner$Monitor;Lcom/thoughtworks/selenium/Selenium;III)VCode  LineNumberTableLocalVariableTablethis:Lcom/thoughtworks/selenium/condition/JUnitConditionRunner;monitorDLcom/thoughtworks/selenium/condition/DefaultConditionRunner$Monitor;selenium$Lcom/thoughtworks/selenium/Selenium; initialDelayIintervaltimeoutm(Lcom/thoughtworks/selenium/condition/DefaultConditionRunner$Monitor;Lcom/thoughtworks/selenium/Selenium;II)V  *(Lcom/thoughtworks/selenium/Selenium;III)V  )(Lcom/thoughtworks/selenium/Selenium;II)V  '(Lcom/thoughtworks/selenium/Selenium;)V ! throwAssertionException(Ljava/lang/String;)V %'&junit/framework/Assert (#failmessageLjava/lang/String;*(Ljava/lang/String;Ljava/lang/Throwable;)V -/.java/lang/Throwable 01 getMessage()Ljava/lang/String;3java/lang/StringBuilder 576java/lang/String 89valueOf&(Ljava/lang/Object;)Ljava/lang/String; 2; #=? ; cause: 2A BCappend-(Ljava/lang/String;)Ljava/lang/StringBuilder; 2E F1toStringcauseLjava/lang/Throwable; causeText SourceFileJUnitConditionRunner.java InnerClassesNBcom/thoughtworks/selenium/condition/DefaultConditionRunner$MonitorMonitor!l *+, " # >     ` *+, ' ( 4    ` *+ + , 4    T*+ /0 * >*+  34  "#=+$ 78  )*"+3,,N2Y+4:-<2Y>:-@D@D$ ;<2= *3 3)*3GH.I*JKL MO PK &^D>[KHcom/thoughtworks/selenium/condition/JUnit4AndTestNgConditionRunner.class1MBcom/thoughtworks/selenium/condition/JUnit4AndTestNgConditionRunner:com/thoughtworks/selenium/condition/DefaultConditionRunnern(Lcom/thoughtworks/selenium/condition/DefaultConditionRunner$Monitor;Lcom/thoughtworks/selenium/Selenium;III)VCode  LineNumberTableLocalVariableTablethisDLcom/thoughtworks/selenium/condition/JUnit4AndTestNgConditionRunner;monitorDLcom/thoughtworks/selenium/condition/DefaultConditionRunner$Monitor;selenium$Lcom/thoughtworks/selenium/Selenium; initialDelayIintervaltimeoutm(Lcom/thoughtworks/selenium/condition/DefaultConditionRunner$Monitor;Lcom/thoughtworks/selenium/Selenium;II)V  *(Lcom/thoughtworks/selenium/Selenium;III)V  )(Lcom/thoughtworks/selenium/Selenium;II)V  '(Lcom/thoughtworks/selenium/Selenium;)V ! throwAssertionException(Ljava/lang/String;)V%java/lang/AssertionError $' ((Ljava/lang/Object;)VmessageLjava/lang/String;*(Ljava/lang/String;Ljava/lang/Throwable;)V-java/lang/StringBuilder /10java/lang/String 23valueOf&(Ljava/lang/Object;)Ljava/lang/String; ,5 #7 ; cause: ,9 :;append-(Ljava/lang/String;)Ljava/lang/StringBuilder; =?>java/lang/Throwable @A getMessage()Ljava/lang/String; ,C DAtoStringcauseLjava/lang/Throwable; SourceFile#JUnit4AndTestNgConditionRunner.java InnerClassesKBcom/thoughtworks/selenium/condition/DefaultConditionRunner$MonitorMonitor!l *+,  ! >     ` *+, % & 4    ` *+ * + 4    T*+ ./ * >*+  23  "#= $Y+& 7  )*"+`"$Y,Y+.468,<8B& < " ")*"EFGHI JL PK lC>4com/thoughtworks/selenium/condition/.svn/all-wcpropsK 25 svn:wc:ra_dav:version-url V 77 /svn/!svn/ver/11226/trunk/java/client/src/com/thoughtworks/selenium/condition END Not.java K 25 svn:wc:ra_dav:version-url V 86 /svn/!svn/ver/11226/trunk/java/client/src/com/thoughtworks/selenium/condition/Not.java END ConditionRunner.java K 25 svn:wc:ra_dav:version-url V 98 /svn/!svn/ver/11226/trunk/java/client/src/com/thoughtworks/selenium/condition/ConditionRunner.java END Text.java K 25 svn:wc:ra_dav:version-url V 87 /svn/!svn/ver/11226/trunk/java/client/src/com/thoughtworks/selenium/condition/Text.java END Presence.java K 25 svn:wc:ra_dav:version-url V 91 /svn/!svn/ver/11226/trunk/java/client/src/com/thoughtworks/selenium/condition/Presence.java END DefaultConditionRunner.java K 25 svn:wc:ra_dav:version-url V 105 /svn/!svn/ver/11226/trunk/java/client/src/com/thoughtworks/selenium/condition/DefaultConditionRunner.java END JUnit4AndTestNgConditionRunner.java K 25 svn:wc:ra_dav:version-url V 113 /svn/!svn/ver/11226/trunk/java/client/src/com/thoughtworks/selenium/condition/JUnit4AndTestNgConditionRunner.java END Condition.java K 25 svn:wc:ra_dav:version-url V 92 /svn/!svn/ver/11226/trunk/java/client/src/com/thoughtworks/selenium/condition/Condition.java END JUnitConditionRunner.java K 25 svn:wc:ra_dav:version-url V 103 /svn/!svn/ver/11226/trunk/java/client/src/com/thoughtworks/selenium/condition/JUnitConditionRunner.java END build.desc K 25 svn:wc:ra_dav:version-url V 88 /svn/!svn/ver/11226/trunk/java/client/src/com/thoughtworks/selenium/condition/build.desc END PK lC>)rr6com/thoughtworks/selenium/condition/.svn/dir-prop-baseK 10 svn:ignore V 88 selenium.ipr selenium.iws dist classes selenium.xml .project .classpath *.log *.log.lck END PK lC>VJ0com/thoughtworks/selenium/condition/.svn/entries8 dir 11264 http://selenium.googlecode.com/svn/trunk/java/client/src/com/thoughtworks/selenium/condition http://selenium.googlecode.com/svn 2011-02-01T13:59:17.176547Z 11226 simon.m.stewart has-props svn:special svn:externals svn:needs-lock 07704840-8298-11de-bf8c-fd130f914ac9 Not.java file 2011-02-03T12:01:18.000000Z c136aab6dd664f96be19f6d991dabe4a 2008-11-08T00:12:39.916296Z 5818 paul ConditionRunner.java file 2011-02-03T12:01:18.000000Z 7eabfb40f9b59fb6e6d17c50f30a7d09 2008-12-10T00:23:07.431635Z 5913 paul Text.java file 2011-02-03T12:01:18.000000Z c6ba6280fdcf1f0498cbfa649357f11a 2008-06-16T19:23:56.535941Z 5278 paul Presence.java file 2011-02-03T12:01:18.000000Z 4223dd3000b05af0be4724a79dbce759 2008-06-16T19:23:56.535941Z 5278 paul DefaultConditionRunner.java file 2011-02-03T12:01:18.000000Z d0af19481bbc0d537965a7c07c855ec7 2009-02-03T15:45:35.127900Z 6194 paul JUnit4AndTestNgConditionRunner.java file 2011-02-03T12:01:18.000000Z 7bf77746104e7fcbc321bcdd31ee56fc 2010-03-05T11:36:26.627529Z 8483 eran.mes Condition.java file 2011-02-03T12:01:18.000000Z 5446c3496c19050dd5186acc5148d03c 2008-11-08T00:12:39.916296Z 5818 paul JUnitConditionRunner.java file 2011-02-03T12:01:18.000000Z 59f73791562af6a8eebac9d02ce7bb53 2009-02-03T15:45:35.127900Z 6194 paul build.desc file 2011-02-03T12:01:18.000000Z 135e9a4cf0963f0f74aac8eb30225447 2011-02-01T13:59:17.176547Z 11226 simon.m.stewart PK lC>G/com/thoughtworks/selenium/condition/.svn/format8 PK lC>.-Jcom/thoughtworks/selenium/condition/.svn/text-base/Condition.java.svn-base/* * Copyright 2008 ThoughtWorks, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package com.thoughtworks.selenium.condition; import java.lang.reflect.Method; import java.lang.reflect.InvocationTargetException; /** * Simple predicate class, which also knows how to wait for the condition to be true. * Used by Selenium tests. *

*

Conditions have two basic properties: *

*

    *
  • a message (purely used for displaying purposes) *
  • an implementation of * {@link #isTrue(com.google.testing.selenium.condition.ConditionRunner.Context)} *
*/ public abstract class Condition { private final String message; public abstract boolean isTrue(ConditionRunner.Context runner); /** * Creates an instance of Condition with is canonical name as message */ public Condition() { this.message = getClass().getCanonicalName(); } /** * Creates an instance of Condition with the given {@code message} and * {@code args}, which are in the {@link String#format(String, Object...)} * modeal. */ public Condition(String message, Object[] args) { if (null == message) { throw new NullPointerException("Condition names must not be null"); } // this.message = String.format(message, args); this.message = simulateStringDotFormatMethod(message, args); } private String simulateStringDotFormatMethod(String message, Object[] args) { int vers = Integer.parseInt(System.getProperty("java.class.version").substring(0, 2)); if (vers >= 49) { try { Method format = String.class.getMethod("format", new Class[]{String.class, Object[].class}); return (String) format.invoke(null, new Object[]{message, args}); } catch (NoSuchMethodException e) { } catch (IllegalAccessException e) { } catch (InvocationTargetException e) { Throwable throwable = e.getCause(); if (throwable instanceof RuntimeException) { throw (RuntimeException) throwable; } } throw new RuntimeException("String.format(..) can't be that hard to call"); } else { String msg = ""; msg = message; for (int i = 0; i < args.length; i++) { msg = msg + " " + args[i]; } return msg; } } // drop these for var-args in another year. public Condition(String message) { this(message, new Object[0]); } public Condition(String message, Object arg) { this(message, new Object[]{arg}); } public Condition(String message, Object arg0, Object arg1) { this(message, new Object[]{arg0, arg1}); } public Condition(String message, Object arg0, Object arg1, Object arg2) { this(message, new Object[]{arg0, arg1, arg2}); } public Condition(String message, Object arg0, Object arg1, Object arg2, Object arg3) { this(message, new Object[]{arg0, arg1, arg2, arg3}); } public Condition(String message, Object arg0, Object arg1, Object arg2, Object arg3, Object arg4) { this(message, new Object[]{arg0, arg1, arg2, arg3, arg4}); } public String getMessage() { return toString(); } public String toString() { return "Condition \"" + this.message + "\""; } } PK lC>fD~O O Pcom/thoughtworks/selenium/condition/.svn/text-base/ConditionRunner.java.svn-base/* * Copyright 2008 ThoughtWorks, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package com.thoughtworks.selenium.condition; import com.thoughtworks.selenium.Selenium; /** * A ConditionRunner is a class that can execute a {@link Condition}, which * need certain basic pieces that it needs to execute (e.g. an instance * of {@link Selenium}). This is achieved through the {@link Context} interface. */ public interface ConditionRunner { /** * This method will, every so often, evaluate the given {@code condition}'s * {@link Condition#isTrue(ConditionRunner.Context)} method, until: *

*

    *
  • it becomes true, in which case it simply returns *
  • a certain amount of time is passed, in which case it fails by throwing * an failure exception tailored to a given test framework -- e.g. * {@link junit.framework.AssertionFailedError} in the case of JUnit *
  • it throws an exception, in which case that is wrapped inside a * {@link RuntimeException} and rethrown *
*

* How often if "every so often" and how long is the "certain amount of time" * is left to the specific implementations of this interface. */ void waitFor(Condition condition); /** * As above but with an additonal 'should' phrase narrative used in the * event of the condition failing to become true */ void waitFor(String narrative, Condition condition); /** * Used by implementations of {@link ConditionRunner#waitFor(Condition)} to * provide context to the * {@link Condition#isTrue(com.google.testing.selenium.condition.ConditionRunner.Context)} * method */ public interface Context { /** * Returns the condition runner inside which this condition is being run. *

*

This allows for a condition to chain to other conditions. */ ConditionRunner getConditionRunner(); /** * Returns the {@link Selenium} associated with this instance. This method * will almost always be called by any * {@link Condition#isTrue(ConditionRunner.Context)}. */ Selenium getSelenium(); /** * A {@link Condition#isTrue(ConditionRunner.Context)} can call this method * to set extra information to be displayed upon a failure. */ void info(String string); /** * Returns the amount of time elapsed since the {@link #waitFor(Condition)} * method for this context was called. */ long elapsed(); } } PK lC>nfw$w$Wcom/thoughtworks/selenium/condition/.svn/text-base/DefaultConditionRunner.java.svn-base/* * Copyright 2008 ThoughtWorks, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package com.thoughtworks.selenium.condition; import com.thoughtworks.selenium.Selenium; import com.thoughtworks.selenium.SeleniumException; import java.util.Date; import java.util.List; import java.util.ArrayList; import java.util.logging.Logger; /** * {@inheritDoc} *

*

This implementation throws a simple {@link RuntimeException} when the * condition is not met in the {@link #waitFor(Condition)} method. More specific * runners are preferred for different testing frameworks. E.g. JUnit tests * would prefer to use {@link JUnitConditionRunner}. */ public class DefaultConditionRunner implements ConditionRunner { private final Monitor monitor; private final Selenium selenium; private final int initialDelay; private final int interval; private final int timeout; /** * @param selenium the selenium to be passed to the Conditions run from within * this runner. * @param initialDelay (in millis) how long to wait before the initial test of the condition * @param interval (in millis) when waiting for a condition, how long to wait * between calls to * {@link Condition#isTrue(com.thoughtworks.selenium.condition.ConditionRunner.Context)} * @param timeout (in millis) when waiting for a condition, how long to wait * until we give up. */ public DefaultConditionRunner(Monitor monitor, Selenium selenium, int initialDelay, int interval, int timeout) { this.monitor = monitor; this.selenium = selenium; this.initialDelay = initialDelay; this.interval = interval; this.timeout = timeout; } /** * @param selenium the selenium to be passed to the Conditions run from within * this runner. * @param interval (in millis) when waiting for a condition, how long to wait * between calls to * {@link Condition#isTrue(com.thoughtworks.selenium.condition.ConditionRunner.Context)} * @param timeout (in millis) when waiting for a condition, how long to wait * until we give up. */ public DefaultConditionRunner(Monitor monitor, Selenium selenium, int interval, int timeout) { this(new NoOpMonitor(), selenium, interval, interval, timeout); } /** * Constructs an instance of this class with a {@link NoOpMonitor}. * * @see DefaultConditionRunner#DefaultConditionRunner(Monitor, Selenium, int, int) */ public DefaultConditionRunner(Selenium selenium, int initialDelay, int interval, int timeout) { this(new NoOpMonitor(), selenium, initialDelay, interval, timeout); } /** * Constructs an instance of this class with a {@link NoOpMonitor}. * * @see DefaultConditionRunner#DefaultConditionRunner(Monitor, Selenium, int, int) */ public DefaultConditionRunner(Selenium selenium, int interval, int timeout) { this(new NoOpMonitor(), selenium, interval, timeout); } /** * Constructs an instance of this class with reasonable defaults. * * @see DefaultConditionRunner#DefaultConditionRunner(Monitor, Selenium, int, int) */ public DefaultConditionRunner(Selenium selenium) { this(new NoOpMonitor(), selenium, 500, 45 * 1000); } /** * A {@link Monitor} can be installed in {@link DefaultConditionRunner} as an * open ended way of being notified of certain events. */ public interface Monitor { /** * Called whenever a {@link DefaultConditionRunner#waitFor(Condition)} has * begun, and is being tracked with the given {@code condition}. */ void waitHasBegun(ConditionRunner.Context context, Condition condition); /** * Called whenever a {@link DefaultConditionRunner#waitFor(Condition)} is * successful (i.e. * {@link Condition#isTrue(com.thoughtworks.selenium.condition.ConditionRunner.Context)} * returned true within the timeout}. */ void conditionWasReached(ConditionRunner.Context context, Condition condition); void conditionFailed(ConditionRunner.Context context, Condition condition, String message); } /** * A no-op implementation of {@link Monitor}. *

* {@inheritDoc} */ public static final class NoOpMonitor implements Monitor { public void waitHasBegun(ConditionRunner.Context context, Condition condition) { } public void conditionWasReached(ConditionRunner.Context context, Condition condition) { } public void conditionFailed(Context context, Condition condition, String message) { } } /** * A Log4j implementation of {@link Monitor}. *

* {@inheritDoc} */ public static final class Log4jMonitor implements Monitor { private static final Logger logger = Logger.getLogger(DefaultConditionRunner.class.getName()); public void conditionWasReached(ConditionRunner.Context context, Condition condition) { log("Reached "+condition.toString()); } public void waitHasBegun(ConditionRunner.Context context, Condition condition) { log("Waiting for "+condition.toString()); } public void conditionFailed(ConditionRunner.Context context, Condition condition, String message) { log(message); } protected void log(String message) { logger.info(new Date() + " - " + message); } } public void waitFor(Condition condition) { waitFor("", condition); } public void waitFor(String narrative, Condition condition) { ContextImpl context = new ContextImpl(); SeleniumException seleniumException = null; try { monitor.waitHasBegun(context, condition); threadSleep(initialDelay); while (context.elapsed() < context.timeout()) { seleniumException = null; try { if (condition.isTrue(context)) { monitor.conditionWasReached(context, condition); return; } } catch (SeleniumException se) { seleniumException = se; } threadSleep(interval); } } catch (RuntimeException e) { throwAssertionException("Exception while waiting for '" + condition.toString() + "'", e); } if (seleniumException != null) { throwAssertionException("SeleniumException while waiting for '" + condition.toString() + "' (otherwise timed out)", seleniumException); } // Note that AssertionFailedError will pass right through String message = context.failureMessage(narrative, condition); monitor.conditionFailed(context, condition, message); throwAssertionException(message); } private void threadSleep(int interval) { try { Thread.sleep(interval); } catch (InterruptedException ignore) { } } protected void throwAssertionException(String message) { throw new RuntimeException(message); } protected void throwAssertionException(String message, Throwable throwable) { throw new RuntimeException(message, throwable); } private final class ContextImpl implements ConditionRunner.Context { private final long start; private List info = new ArrayList(); private String lastInfo; public ContextImpl() { this.start = now(); } private long now() { return System.currentTimeMillis(); } public void info(String info) { if (!info.equals(lastInfo)) { this.info.add(info); } lastInfo = info; } public long elapsed() { return now() - start; } public Selenium getSelenium() { return selenium; } public ConditionRunner getConditionRunner() { return DefaultConditionRunner.this; } private String failureMessage(String narrative, Condition condition) { String message = condition.toString() + " failed to become true within " + timeout() + " msec"; message += narrative.equals("") ? "" : "; " + narrative; if (!info.isEmpty()) { message += "; " + info; } return message; } private int timeout() { return timeout; } } } PK lC>_com/thoughtworks/selenium/condition/.svn/text-base/JUnit4AndTestNgConditionRunner.java.svn-base/* * Copyright 2008 ThoughtWorks, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package com.thoughtworks.selenium.condition; import com.thoughtworks.selenium.Selenium; /** * {@inhreritDoc} *

* This class throws an {@link java.lang.AssertionError} when * the condition is not met - the same as JUnit4 and TestNG do. */ public class JUnit4AndTestNgConditionRunner extends DefaultConditionRunner { public JUnit4AndTestNgConditionRunner(Monitor monitor, Selenium selenium, int initialDelay, int interval, int timeout) { super(monitor, selenium, initialDelay, interval, timeout); } public JUnit4AndTestNgConditionRunner(Monitor monitor, Selenium selenium, int interval, int timeout) { super(monitor, selenium, interval, timeout); } public JUnit4AndTestNgConditionRunner(Selenium selenium, int initialDelay, int interval, int timeout) { super(selenium, initialDelay, interval, timeout); } public JUnit4AndTestNgConditionRunner(Selenium selenium, int interval, int timeout) { super(selenium, interval, timeout); } public JUnit4AndTestNgConditionRunner(Selenium selenium) { super(selenium); } public void throwAssertionException(String message) { // same as Junit4's and TestNG's fail(..) methods. throw new AssertionError(message); } public void throwAssertionException(String message, Throwable cause) { // same as Junit4's and TestNG's fail(..) methods. throw new AssertionError(message + "; cause: " + cause.getMessage()); } }PK lC>ڗ2Ucom/thoughtworks/selenium/condition/.svn/text-base/JUnitConditionRunner.java.svn-base/* * Copyright 2008 ThoughtWorks, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package com.thoughtworks.selenium.condition; import com.thoughtworks.selenium.Selenium; import junit.framework.Assert; /** * {@inhreritDoc} *

* This class throws an {@link junit.framework.AssertionFailedError} when * the condition is not met. */ public class JUnitConditionRunner extends DefaultConditionRunner { public JUnitConditionRunner(Monitor monitor, Selenium selenium, int initialDelay, int interval, int timeout) { super(monitor, selenium, initialDelay, interval, timeout); } public JUnitConditionRunner(Monitor monitor, Selenium selenium, int interval, int timeout) { super(monitor, selenium, interval, timeout); } public JUnitConditionRunner(Selenium selenium, int initialDelay, int interval, int timeout) { super(selenium, initialDelay, interval, timeout); } public JUnitConditionRunner(Selenium selenium, int interval, int timeout) { super(selenium, interval, timeout); } public JUnitConditionRunner(Selenium selenium) { super(selenium); } public void throwAssertionException(String message) { Assert.fail(message); } public void throwAssertionException(String message, Throwable cause) { String causeText = cause.getMessage(); Assert.fail(message + (causeText == null ? "" : "; cause: " + causeText)); } } PK lC>tкDcom/thoughtworks/selenium/condition/.svn/text-base/Not.java.svn-base/* * Copyright 2008 ThoughtWorks, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package com.thoughtworks.selenium.condition; /** * Simple predicate class, which also knows how to wait for its condition to be true. * Used by Selenium tests. A "Not" is the inverse of any other Condition. */ public class Not extends Condition { private Condition positiveCondition; public Not(Condition positiveCondition) { super("NOT of (" + positiveCondition.getMessage() + ")"); this.positiveCondition = positiveCondition; } public boolean isTrue(ConditionRunner.Context context) { return !positiveCondition.isTrue(context); } } PK lC>%bbIcom/thoughtworks/selenium/condition/.svn/text-base/Presence.java.svn-base/* * Copyright 2008 ThoughtWorks, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package com.thoughtworks.selenium.condition; /** * Checks whether a given locator exists on the page. */ public class Presence extends Condition { private final String locator; /** * @param locator the element which must be present */ public Presence(String locator) { super(locator + " is present"); this.locator = locator; } public boolean isTrue(ConditionRunner.Context context) { return context.getSelenium().isElementPresent(locator); } } PK lC>,Ecom/thoughtworks/selenium/condition/.svn/text-base/Text.java.svn-base/* * Copyright 2008 ThoughtWorks, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package com.thoughtworks.selenium.condition; /** * Checks whether text exists either anywhere on the page, or inside a * given locator. */ public class Text extends Condition { private final String locator; private final String expectedText; /** * Look for text anywhere on the page. * * @param expectedText text we're looking for */ public Text(String expectedText) { this(expectedText, null); } /** * Look for text inside a given locator. * * @param expectedText text we're looking for * @param locator Selenium locator */ public Text(String expectedText, String locator) { super("Expecting text " + expectedText + (null == locator ? "" : " in " + locator)); this.locator = locator; this.expectedText = expectedText; } public boolean isTrue(ConditionRunner.Context context) { if (null == locator) { return context.getSelenium().isTextPresent(expectedText); } else { return context.getSelenium().getText(locator).equalsIgnoreCase(expectedText); } } } PK lC>Fcom/thoughtworks/selenium/condition/.svn/text-base/build.desc.svn-base java_library(name = "condition", srcs = [ "*.java" ], deps = [ "//java/client/src/com/thoughtworks/selenium:api", "//third_party/java/junit", ]) PK )hC>.com/thoughtworks/selenium/condition/build.desc java_library(name = "condition", srcs = [ "*.java" ], deps = [ "//java/client/src/com/thoughtworks/selenium:api", "//third_party/java/junit", ]) PK{D>w9)'META-INF/MANIFEST.MFPK $^D> A?oorg/openqa/selenium/support/ui/UnexpectedTagNameException.classPK $^D>!~cc6org/openqa/selenium/support/ui/LoadableComponent.classPK $^D><:Qorg/openqa/selenium/support/ui/SlowLoadableComponent.classPK $^D>g+org/openqa/selenium/support/ui/Select.classPK $^D>l';g*&org/openqa/selenium/support/ui/Clock.classPK $^D>RW2'org/openqa/selenium/support/ui/WebDriverWait.classPK $^D> iSS56org/openqa/selenium/support/ui/TimeoutException.classPK $^D>K0A9org/openqa/selenium/support/ui/SystemClock.classPK $^D>FNN)X<org/openqa/selenium/support/ui/Wait.classPK $^D> N==6=org/openqa/selenium/support/ui/ExpectedCondition.classPK lC>u%n/~?org/openqa/selenium/support/ui/.svn/all-wcpropsPK lC>B+Forg/openqa/selenium/support/ui/.svn/entriesPK lC>G*Norg/openqa/selenium/support/ui/.svn/formatPK lC>'::AfNorg/openqa/selenium/support/ui/.svn/text-base/Clock.java.svn-basePK lC>x"MQorg/openqa/selenium/support/ui/.svn/text-base/ExpectedCondition.java.svn-basePK lC>0IA;I I M}Worg/openqa/selenium/support/ui/.svn/text-base/LoadableComponent.java.svn-basePK lC>aם""B1borg/openqa/selenium/support/ui/.svn/text-base/Select.java.svn-basePK lC>ˀX Qorg/openqa/selenium/support/ui/.svn/text-base/SlowLoadableComponent.java.svn-basePK lC>G Gorg/openqa/selenium/support/ui/.svn/text-base/SystemClock.java.svn-basePK lC>DZLorg/openqa/selenium/support/ui/.svn/text-base/TimeoutException.java.svn-basePK lC>yVuorg/openqa/selenium/support/ui/.svn/text-base/UnexpectedTagNameException.java.svn-basePK lC>KLYY@org/openqa/selenium/support/ui/.svn/text-base/Wait.java.svn-basePK lC>=>Ikorg/openqa/selenium/support/ui/.svn/text-base/WebDriverWait.java.svn-basePK lC> m#  Aorg/openqa/selenium/support/ui/.svn/text-base/build.desc.svn-basePK )hC> m#  )org/openqa/selenium/support/ui/build.descPK &^D>fj[*lorg/openqa/selenium/TimeoutException.classPK &^D>`s4org/openqa/selenium/UnableToSetCookieException.classPK &^D>I1,"org/openqa/selenium/JavascriptExecutor.classPK &^D>org/openqa/selenium/Alert.classPK &^D>LD&org/openqa/selenium/OutputType$1.classPK &^D>k++&org/openqa/selenium/OutputType$2.classPK &^D>< &_org/openqa/selenium/OutputType$3.classPK &^D>,Ȓ$org/openqa/selenium/OutputType.classPK &^D>EM{}})oorg/openqa/selenium/Proxy$ProxyType.classPK &^D>ͯX 3org/openqa/selenium/Proxy.classPK &^D>EOtt,Uorg/openqa/selenium/RenderedWebElement.classPK &^D>,org/openqa/selenium/Speed.classPK &^D>?mEE1corg/openqa/selenium/WebDriverBackedSelenium.classPK &^D>_A"jjorg/openqa/selenium/Mouse.classPK %^D>$org/openqa/selenium/WebElement.classPK &^D>TA+org/openqa/selenium/SuppliesWebDriver.classPK &^D>nk#org/openqa/selenium/Rotatable.classPK &^D> 1org/openqa/selenium/UnhandledAlertException.classPK &^D>qn-RR1org/openqa/selenium/IllegalLocatorException.classPK %^D>+=  . org/openqa/selenium/XPathLookupException.classPK &^D>[8Aorg/openqa/selenium/SeleneseCommandExecutor$SelenseTimeouts.classPK &^D>~ %%1org/openqa/selenium/SeleneseCommandExecutor.classPK &^D>JB%%+1<org/openqa/selenium/ScreenOrientation.classPK &^D>:##6Aorg/openqa/selenium/InvalidCookieDomainException.classPK &^D> KEE)Eorg/openqa/selenium/HasInputDevices.classPK &^D>"Forg/openqa/selenium/Keyboard.classPK &^D>6y&Gorg/openqa/selenium/Capabilities.classPK &^D>sɼ&KK.Iorg/openqa/selenium/WebDriver$Navigation.classPK &^D>gNtt+Korg/openqa/selenium/WebDriver$Options.classPK &^D>DQQ1OOorg/openqa/selenium/WebDriver$TargetLocator.classPK &^D>ONN,Qorg/openqa/selenium/WebDriver$Timeouts.classPK &^D>2֛#Sorg/openqa/selenium/WebDriver.classPK &^D>ԫ yy'cXorg/openqa/selenium/SearchContext.classPK &^D>m88#!Zorg/openqa/selenium/Dimension.classPK %^D>INv  ,]org/openqa/selenium/WebDriverException.classPK &^D>GG.gorg/openqa/selenium/NoSuchFrameException.classPK &^D>#@yjorg/openqa/selenium/Keys.classPK &^D>w\/org/openqa/selenium/NoSuchWindowException.classPK &^D>۪e+org/openqa/selenium/NotFoundException.classPK &^D> gg8ކorg/openqa/selenium/StaleElementReferenceException.classPK &^D>Y%d(org/openqa/selenium/Cookie$Builder.classPK &^D>p Kll org/openqa/selenium/Cookie.classPK &^D>{dd17org/openqa/selenium/NoAlertPresentException.classPK &^D>6`0e$org/openqa/selenium/Platform$1.classPK &^D>-P$&org/openqa/selenium/Platform$2.classPK &^D>4 $Iorg/openqa/selenium/Platform$3.classPK &^D>$oorg/openqa/selenium/Platform$4.classPK &^D>y$ìorg/openqa/selenium/Platform$5.classPK &^D>$org/openqa/selenium/Platform$6.classPK &^D>֪MM$:org/openqa/selenium/Platform$7.classPK &^D>N"$ɵorg/openqa/selenium/Platform$8.classPK &^D>4x"org/openqa/selenium/Platform.classPK &^D>xxm+org/openqa/selenium/ExplodingSupplier.classPK %^D>ozTT3jorg/openqa/selenium/WebDriverCommandProcessor.classPK &^D> nn)"org/openqa/selenium/TakesScreenshot.classPK &^D>f[[4$org/openqa/selenium/ElementNotVisibleException.classPK &^D>MM03'org/openqa/selenium/NoSuchElementException.classPK &^D>,l77)org/openqa/selenium/Point.classPK &^D>7RRB.org/openqa/selenium/By$1.classPK &^D>sc4org/openqa/selenium/By$2.classPK &^D>Go:org/openqa/selenium/By$3.classPK &^D> cc@org/openqa/selenium/By$4.classPK &^D>UU!Gorg/openqa/selenium/By$5.classPK &^D>8mMorg/openqa/selenium/By$6.classPK &^D>EXuSorg/openqa/selenium/By$7.classPK &^D>W*/V[org/openqa/selenium/By$8.classPK &^D>F n($Sporg/openqa/selenium/.svn/all-wcpropsPK lC>i.A[[ org/openqa/selenium/.svn/entriesPK lC>G6org/openqa/selenium/.svn/formatPK lC>ύ''6uorg/openqa/selenium/.svn/text-base/Alert.java.svn-basePK lC>;*/*/3org/openqa/selenium/.svn/text-base/By.java.svn-basePK lC>㞺=korg/openqa/selenium/.svn/text-base/Capabilities.java.svn-basePK lC>y@7dorg/openqa/selenium/.svn/text-base/Cookie.java.svn-basePK lC>NWFF:^org/openqa/selenium/.svn/text-base/Dimension.java.svn-basePK lC>8;A  Korg/openqa/selenium/.svn/text-base/ElementNotVisibleException.java.svn-basePK lC>{ަBnorg/openqa/selenium/.svn/text-base/ExplodingSupplier.java.svn-basePK lC>fs@torg/openqa/selenium/.svn/text-base/HasInputDevices.java.svn-basePK lC>Q00Hlorg/openqa/selenium/.svn/text-base/IllegalLocatorException.java.svn-basePK lC>FFM org/openqa/selenium/.svn/text-base/InvalidCookieDomainException.java.svn-basePK lC>C7jC org/openqa/selenium/.svn/text-base/JavascriptExecutor.java.svn-basePK lC>9# org/openqa/selenium/.svn/text-base/Keyboard.java.svn-basePK lC>sUU5$org/openqa/selenium/.svn/text-base/Keys.java.svn-basePK lC>7xi63org/openqa/selenium/.svn/text-base/Mouse.java.svn-basePK lC>@Qn //H8org/openqa/selenium/.svn/text-base/NoAlertPresentException.java.svn-basePK lC>˭|bddGX<org/openqa/selenium/.svn/text-base/NoSuchElementException.java.svn-basePK lC>[AAE!Aorg/openqa/selenium/.svn/text-base/NoSuchFrameException.java.svn-basePK lC>_4FEorg/openqa/selenium/.svn/text-base/NoSuchWindowException.java.svn-basePK lC>fcB  BIorg/openqa/selenium/.svn/text-base/NotFoundException.java.svn-basePK lC>n)! ! ;Norg/openqa/selenium/.svn/text-base/OutputType.java.svn-basePK lC>Q  9Xorg/openqa/selenium/.svn/text-base/Platform.java.svn-basePK lC>rr6lorg/openqa/selenium/.svn/text-base/Point.java.svn-basePK lC>36oorg/openqa/selenium/.svn/text-base/Proxy.java.svn-basePK lC>'WՃ7 7 C,org/openqa/selenium/.svn/text-base/RenderedWebElement.java.svn-basePK lC>6@':Čorg/openqa/selenium/.svn/text-base/Rotatable.java.svn-basePK lC> Borg/openqa/selenium/.svn/text-base/ScreenOrientation.java.svn-basePK lC>+P>org/openqa/selenium/.svn/text-base/SearchContext.java.svn-basePK lC>mbE*E*H org/openqa/selenium/.svn/text-base/SeleneseCommandExecutor.java.svn-basePK lC>vB6org/openqa/selenium/.svn/text-base/Speed.java.svn-basePK lC>fErOorg/openqa/selenium/.svn/text-base/StaleElementReferenceException.java.svn-basePK lC>\bB>org/openqa/selenium/.svn/text-base/SuppliesWebDriver.java.svn-basePK lC>@org/openqa/selenium/.svn/text-base/TakesScreenshot.java.svn-basePK lC>Aorg/openqa/selenium/.svn/text-base/TimeoutException.java.svn-basePK lC>3RottKorg/openqa/selenium/.svn/text-base/UnableToSetCookieException.java.svn-basePK lC>~<==Hkorg/openqa/selenium/.svn/text-base/UnhandledAlertException.java.svn-basePK lC>%A44:org/openqa/selenium/.svn/text-base/WebDriver.java.svn-basePK lC>1.Horg/openqa/selenium/.svn/text-base/WebDriverBackedSelenium.java.svn-basePK lC>eX#VVJ org/openqa/selenium/.svn/text-base/WebDriverCommandProcessor.java.svn-basePK lC>Cworg/openqa/selenium/.svn/text-base/WebDriverException.java.svn-basePK lC>w.; org/openqa/selenium/.svn/text-base/WebElement.java.svn-basePK lC>{Eorg/openqa/selenium/.svn/text-base/XPathLookupException.java.svn-basePK lC>ARzU6org/openqa/selenium/.svn/text-base/build.desc.svn-basePK )hC>ARzUdorg/openqa/selenium/build.descPK lC>2VVorg/.svn/all-wcpropsPK lC>w  &org/.svn/entriesPK lC>G`org/.svn/formatPK %^D>X_6 6 -org/openqa/selenium/firefox/Preferences.classPK %^D>s.6,990org/openqa/selenium/firefox/FirefoxProfile.classPK %^D>5=rorg/openqa/selenium/firefox/FirefoxBinary$OutputWatcher.classPK %^D>x)%%/org/openqa/selenium/firefox/FirefoxBinary.classPK %^D>D665p7org/openqa/selenium/firefox/ExtensionConnection.classPK %^D>438org/openqa/selenium/firefox/FirefoxWebElement.classPK %^D> ?7=org/openqa/selenium/firefox/NotConnectedException.classPK %^D>wJZZ1DBorg/openqa/selenium/firefox/FirefoxDriver$1.classPK %^D>&!8 8 CForg/openqa/selenium/firefox/FirefoxDriver$LazyCommandExecutor.classPK %^D>.&}!}!/Porg/openqa/selenium/firefox/FirefoxDriver.classPK %^D>VV@Prorg/openqa/selenium/firefox/UnableToCreateProfileException.classPK lC>,uorg/openqa/selenium/firefox/.svn/all-wcpropsPK lC>O22(%{org/openqa/selenium/firefox/.svn/entriesPK lC>G'org/openqa/selenium/firefox/.svn/formatPK lC>.qLorg/openqa/selenium/firefox/.svn/text-base/ExtensionConnection.java.svn-basePK lC>`+i--Forg/openqa/selenium/firefox/.svn/text-base/FirefoxBinary.java.svn-basePK lC>|PuG""F"org/openqa/selenium/firefox/.svn/text-base/FirefoxDriver.java.svn-basePK lC>)vCCGorg/openqa/selenium/firefox/.svn/text-base/FirefoxProfile.java.svn-basePK lC>me@Jorg/openqa/selenium/firefox/.svn/text-base/FirefoxWebElement.java.svn-basePK lC> YYNa"org/openqa/selenium/firefox/.svn/text-base/NotConnectedException.java.svn-basePK lC>yyD&'org/openqa/selenium/firefox/.svn/text-base/Preferences.java.svn-basePK lC>-W/org/openqa/selenium/firefox/.svn/text-base/UnableToCreateProfileException.java.svn-basePK lC>R_>3org/openqa/selenium/firefox/.svn/text-base/build.desc.svn-basePK (hC>R_&W5org/openqa/selenium/firefox/build.descPK %^D>:57org/openqa/selenium/os/WindowsRegistryException.classPK %^D><*<org/openqa/selenium/os/CommandLine$1.classPK %^D>M*?org/openqa/selenium/os/CommandLine$2.classPK %^D>oo6Corg/openqa/selenium/os/CommandLine$StreamDrainer.classPK %^D>LVN%%(}Jorg/openqa/selenium/os/CommandLine.classPK %^D>)dm &Nporg/openqa/selenium/os/UnixUtils.classPK %^D>XXD4{org/openqa/selenium/os/ProcessUtils$ProcessStillAliveException.classPK %^D>Y7}org/openqa/selenium/os/ProcessUtils$ProcessWaiter.classPK %^D>+D)сorg/openqa/selenium/os/ProcessUtils.classPK %^D>N<ř5org/openqa/selenium/os/WindowsUtils$RegKeyValue.classPK %^D>Qɨ!=!=)org/openqa/selenium/os/WindowsUtils.classPK lC>kĹ' org/openqa/selenium/os/.svn/all-wcpropsPK lC>uee# org/openqa/selenium/os/.svn/entriesPK lC>G"org/openqa/selenium/os/.svn/formatPK lC>#3BB@org/openqa/selenium/os/.svn/prop-base/ProcessUtils.java.svn-basePK lC>%%?org/openqa/selenium/os/.svn/text-base/CommandLine.java.svn-basePK lC>!@org/openqa/selenium/os/.svn/text-base/ProcessUtils.java.svn-basePK lC>ER``=org/openqa/selenium/os/.svn/text-base/UnixUtils.java.svn-basePK lC>nllLorg/openqa/selenium/os/.svn/text-base/WindowsRegistryException.java.svn-basePK lC>9mQmQ@!org/openqa/selenium/os/.svn/text-base/WindowsUtils.java.svn-basePK lC>9_sorg/openqa/selenium/os/.svn/text-base/build.desc.svn-basePK (hC>!torg/openqa/selenium/os/build.descPK %^D>pU&oo6uorg/openqa/selenium/remote/html5/AddWebStorage$1.classPK %^D>xR4~zorg/openqa/selenium/remote/html5/AddWebStorage.classPK %^D>0Ii- - <j~org/openqa/selenium/remote/html5/AddApplicationCache$1.classPK %^D>Jx:org/openqa/selenium/remote/html5/AddApplicationCache.classPK %^D>;org/openqa/selenium/remote/html5/AddLocationContext$1.classPK %^D>Rt1J9)org/openqa/selenium/remote/html5/AddLocationContext.classPK %^D> =8org/openqa/selenium/remote/html5/AddBrowserConnection$1.classPK %^D>p;Worg/openqa/selenium/remote/html5/AddBrowserConnection.classPK %^D>ձ ;torg/openqa/selenium/remote/html5/AddDatabaseStorage$1.classPK %^D>Z9org/openqa/selenium/remote/html5/AddDatabaseStorage.classPK lC>\ 1˶org/openqa/selenium/remote/html5/.svn/all-wcpropsPK lC>jO-org/openqa/selenium/remote/html5/.svn/entriesPK lC>G,org/openqa/selenium/remote/html5/.svn/formatPK lC>.x; ; QDorg/openqa/selenium/remote/html5/.svn/text-base/AddApplicationCache.java.svn-basePK lC>yRorg/openqa/selenium/remote/html5/.svn/text-base/AddBrowserConnection.java.svn-basePK lC>1z4ZJ J Pnorg/openqa/selenium/remote/html5/.svn/text-base/AddDatabaseStorage.java.svn-basePK lC>>꫔P&org/openqa/selenium/remote/html5/.svn/text-base/AddLocationContext.java.svn-basePK lC>,Hy%%K(org/openqa/selenium/remote/html5/.svn/text-base/AddWebStorage.java.svn-basePK lC>PPVVcom/.svn/all-wcpropsPK lC>vV>com/.svn/entriesPK lC>G~com/.svn/formatPK %^D> 1org/openqa/selenium/chrome/ChromeWebElement.classPK %^D>%>Forg/openqa/selenium/chrome/ChromeCommandExecutor$ListeningThread.classPK %^D>xF2F26qorg/openqa/selenium/chrome/ChromeCommandExecutor.classPK %^D>m 0 :org/openqa/selenium/chrome/ChromeExtension.classPK %^D>¢ E:$:$-,Eorg/openqa/selenium/chrome/ChromeBinary.classPK %^D>L/iorg/openqa/selenium/chrome/ChromeDriver$1.classPK %^D>˱dd-norg/openqa/selenium/chrome/ChromeDriver.classPK %^D>%5}org/openqa/selenium/chrome/FatalChromeException.classPK %^D> ʐ.org/openqa/selenium/chrome/ChromeProfile.classPK %^D>4{;((:org/openqa/selenium/chrome/ChromeNotRunningException.classPK lC>r+"org/openqa/selenium/chrome/.svn/all-wcpropsPK lC>o'/org/openqa/selenium/chrome/.svn/entriesPK lC>G&org/openqa/selenium/chrome/.svn/formatPK lC>18i$$D͘org/openqa/selenium/chrome/.svn/text-base/ChromeBinary.java.svn-basePK lC>ӿ己PPMorg/openqa/selenium/chrome/.svn/text-base/ChromeCommandExecutor.java.svn-basePK lC>3Um''D org/openqa/selenium/chrome/.svn/text-base/ChromeDriver.java.svn-basePK lC>蘵G org/openqa/selenium/chrome/.svn/text-base/ChromeExtension.java.svn-basePK lC>l~Q1 org/openqa/selenium/chrome/.svn/text-base/ChromeNotRunningException.java.svn-basePK lC>ϳIz z E6 org/openqa/selenium/chrome/.svn/text-base/ChromeProfile.java.svn-basePK lC> KKHD org/openqa/selenium/chrome/.svn/text-base/ChromeWebElement.java.svn-basePK lC>?CLBM org/openqa/selenium/chrome/.svn/text-base/FatalChromeException.java.svn-basePK lC>=N org/openqa/selenium/chrome/.svn/text-base/build.desc.svn-basePK )hC>%O org/openqa/selenium/chrome/build.descPK lC>O_Rww5P org/openqa/selenium/support/internal/.svn/all-wcpropsPK lC>1YQ org/openqa/selenium/support/internal/.svn/entriesPK lC>G0R org/openqa/selenium/support/internal/.svn/formatPK %^D>R R 7S org/openqa/selenium/browserlaunchers/AsyncExecute.classPK %^D>*RRC\ org/openqa/selenium/browserlaunchers/MacProxyManager$CodeName.classPK %^D>xXMqe org/openqa/selenium/browserlaunchers/MacProxyManager$MacNetworkSettings.classPK %^D>LSm org/openqa/selenium/browserlaunchers/MacProxyManager$MacNetworkSetupException.classPK %^D>_44:s org/openqa/selenium/browserlaunchers/MacProxyManager.classPK %^D>o,xl/ب org/openqa/selenium/browserlaunchers/Maps.classPK %^D>nQ2 org/openqa/selenium/browserlaunchers/Proxies.classPK %^D>H` org/openqa/selenium/browserlaunchers/DoNotUseProxyPac$DefaultProxy.classPK %^D>#QQH org/openqa/selenium/browserlaunchers/DoNotUseProxyPac$ProxyHostVia.classPK %^D>G org/openqa/selenium/browserlaunchers/DoNotUseProxyPac$ProxyUrlVia.classPK %^D>n; org/openqa/selenium/browserlaunchers/DoNotUseProxyPac.classPK %^D>o&"QQ: org/openqa/selenium/browserlaunchers/BrowserLauncher.classPK %^D>**8 org/openqa/selenium/browserlaunchers/LauncherUtils.classPK %^D>o`\\K% org/openqa/selenium/browserlaunchers/CapabilityType$ForSeleniumServer.classPK %^D>hh9z( org/openqa/selenium/browserlaunchers/CapabilityType.classPK %^D>7‰,,J9- org/openqa/selenium/browserlaunchers/WindowsProxyManager$HudsuckrKey.classPK %^D>;O4 org/openqa/selenium/browserlaunchers/WindowsProxyManager$HudsuckrSettings.classPK %^D>11E; org/openqa/selenium/browserlaunchers/WindowsProxyManager$RegKey.classPK %^D>̩KU org/openqa/selenium/browserlaunchers/WindowsProxyManager$SuffixFilter.classPK %^D>Q|;;>Y org/openqa/selenium/browserlaunchers/WindowsProxyManager.classPK lC>ȍ1>5 org/openqa/selenium/browserlaunchers/.svn/all-wcpropsPK lC>j]1ǜ org/openqa/selenium/browserlaunchers/.svn/entriesPK lC>G0 org/openqa/selenium/browserlaunchers/.svn/formatPK lC>, N org/openqa/selenium/browserlaunchers/.svn/text-base/AsyncExecute.java.svn-basePK lC>NQ org/openqa/selenium/browserlaunchers/.svn/text-base/BrowserLauncher.java.svn-basePK lC>/T=P org/openqa/selenium/browserlaunchers/.svn/text-base/CapabilityType.java.svn-basePK lC>4R org/openqa/selenium/browserlaunchers/.svn/text-base/DoNotUseProxyPac.java.svn-basePK lC>244O org/openqa/selenium/browserlaunchers/.svn/text-base/LauncherUtils.java.svn-basePK lC>X0RRQ org/openqa/selenium/browserlaunchers/.svn/text-base/MacProxyManager.java.svn-basePK lC>鯞Fa org/openqa/selenium/browserlaunchers/.svn/text-base/Maps.java.svn-basePK lC>gtIh org/openqa/selenium/browserlaunchers/.svn/text-base/Proxies.java.svn-basePK lC>WeeUZ org/openqa/selenium/browserlaunchers/.svn/text-base/WindowsProxyManager.java.svn-basePK lC>_G org/openqa/selenium/browserlaunchers/.svn/text-base/build.desc.svn-basePK (hC>_/ org/openqa/selenium/browserlaunchers/build.descPK %^D>T6n org/openqa/selenium/iphone/IPhoneSimulatorDriver.classPK %^D>6o org/openqa/selenium/iphone/IPhoneSimulatorBinary.classPK %^D>'eA org/openqa/selenium/iphone/IPhoneDriver$IPhoneTargetLocator.classPK %^D>i - org/openqa/selenium/iphone/IPhoneDriver.classPK %^D>(Fbz$ org/openqa/selenium/iphone/IPhoneSimulatorCommandExecutor$IPhoneSimulatorNotRunningException.classPK %^D>DZڙ ?( org/openqa/selenium/iphone/IPhoneSimulatorCommandExecutor.classPK lC>ST3}}+6 org/openqa/selenium/iphone/.svn/all-wcpropsPK lC>u': org/openqa/selenium/iphone/.svn/entriesPK lC>G&> org/openqa/selenium/iphone/.svn/formatPK lC>&Z^PPD> org/openqa/selenium/iphone/.svn/text-base/IPhoneDriver.java.svn-basePK lC>h(MQ org/openqa/selenium/iphone/.svn/text-base/IPhoneSimulatorBinary.java.svn-basePK lC>ZZZVm org/openqa/selenium/iphone/.svn/text-base/IPhoneSimulatorCommandExecutor.java.svn-basePK lC>#"wM} org/openqa/selenium/iphone/.svn/text-base/IPhoneSimulatorDriver.java.svn-basePK lC>Lyy= org/openqa/selenium/iphone/.svn/text-base/build.desc.svn-basePK (hC>Lyy%o org/openqa/selenium/iphone/build.descPK &^D>b@+ com/thoughtworks/selenium/SeleniumCommandTimedOutException.classPK &^D>![[( com/thoughtworks/selenium/Selenium.classPK &^D>:1 com/thoughtworks/selenium/SeleniumLogLevels.classPK &^D>>#"X)X)0 com/thoughtworks/selenium/SeleneseTestBase.classPK &^D>$e: com/thoughtworks/selenium/Wait$WaitTimedOutException.classPK &^D><$ com/thoughtworks/selenium/Wait.classPK &^D>Qskߺ- com/thoughtworks/selenium/RemoteCommand.classPK &^D>/Ynf f 2 com/thoughtworks/selenium/ScreenshotListener.classPK &^D>B*''4 com/thoughtworks/selenium/HttpCommandProcessor.classPK &^D>vv08 com/thoughtworks/selenium/SeleneseTestCase.classPK &^D> (1 com/thoughtworks/selenium/SeleniumException.classPK &^D>tٳqSS/@ com/thoughtworks/selenium/DefaultSelenium.classPK &^D>X(4dn com/thoughtworks/selenium/DefaultRemoteCommand.classPK &^D>S;;4Dw com/thoughtworks/selenium/SeleneseTestNgHelper.classPK &^D>7//0щ com/thoughtworks/selenium/CommandProcessor.classPK &^D>|ee;N com/thoughtworks/selenium/BrowserConfigurationOptions.classPK lC>K * com/thoughtworks/selenium/.svn/all-wcpropsPK lC>^R R &R com/thoughtworks/selenium/.svn/entriesPK lC>G% com/thoughtworks/selenium/.svn/formatPK lC> 8QQG- com/thoughtworks/selenium/.svn/prop-base/CommandProcessor.java.svn-basePK lC> 8QQK com/thoughtworks/selenium/.svn/prop-base/DefaultRemoteCommand.java.svn-basePK lC> 8QQH com/thoughtworks/selenium/.svn/prop-base/SeleniumException.java.svn-basePK lC>xǥRT com/thoughtworks/selenium/.svn/text-base/BrowserConfigurationOptions.java.svn-basePK lC>Si Gi com/thoughtworks/selenium/.svn/text-base/CommandProcessor.java.svn-basePK lC>T*P P KP com/thoughtworks/selenium/.svn/text-base/DefaultRemoteCommand.java.svn-basePK lC>9kkF com/thoughtworks/selenium/.svn/text-base/DefaultSelenium.java.svn-basePK lC>d=F55KScom/thoughtworks/selenium/.svn/text-base/HttpCommandProcessor.java.svn-basePK lC>SttD|com/thoughtworks/selenium/.svn/text-base/RemoteCommand.java.svn-basePK lC>SOёIRcom/thoughtworks/selenium/.svn/text-base/ScreenshotListener.java.svn-basePK lC>L!@@GJcom/thoughtworks/selenium/.svn/text-base/SeleneseTestBase.java.svn-basePK lC>k [ݎ!!Gcom/thoughtworks/selenium/.svn/text-base/SeleneseTestCase.java.svn-basePK lC>bKwcom/thoughtworks/selenium/.svn/text-base/SeleneseTestNgHelper.java.svn-basePK lC>ZZ?com/thoughtworks/selenium/.svn/text-base/Selenium.java.svn-basePK lC>FppWcom/thoughtworks/selenium/.svn/text-base/SeleniumCommandTimedOutException.java.svn-basePK lC>%S)##H| com/thoughtworks/selenium/.svn/text-base/SeleniumException.java.svn-basePK lC>ݦfHcom/thoughtworks/selenium/.svn/text-base/SeleniumLogLevels.java.svn-basePK lC>`Y ;com/thoughtworks/selenium/.svn/text-base/Wait.java.svn-basePK lC>a&&<3#com/thoughtworks/selenium/.svn/text-base/build.desc.svn-basePK )hC>a&&$'com/thoughtworks/selenium/build.descPK %^D>ΨP  M,org/openqa/selenium/support/pagefactory/internal/LocatingElementHandler.classPK lC>??A2org/openqa/selenium/support/pagefactory/internal/.svn/all-wcpropsPK lC> =D4org/openqa/selenium/support/pagefactory/internal/.svn/entriesPK lC>G<_6org/openqa/selenium/support/pagefactory/internal/.svn/formatPK lC>Dd6org/openqa/selenium/support/pagefactory/internal/.svn/text-base/LocatingElementHandler.java.svn-basePK lC>3#W]]=org/openqa/.svn/all-wcpropsPK lC>NAm=org/openqa/.svn/entriesPK lC>G>org/openqa/.svn/formatPK %^D>^# N/?org/openqa/selenium/internal/seleniumemulation/CaptureScreenshotToString.classPK %^D>E=JbZZGLEorg/openqa/selenium/internal/seleniumemulation/NameLookupStrategy.classPK %^D>==N Vorg/openqa/selenium/internal/seleniumemulation/LabelOptionSelectStrategy.classPK %^D>z}-TTGYorg/openqa/selenium/internal/seleniumemulation/NameFilterFunction.classPK %^D>Ri9m]org/openqa/selenium/internal/seleniumemulation/Open.classPK %^D>W9h9=corg/openqa/selenium/internal/seleniumemulation/KeyState.classPK %^D>+?eorg/openqa/selenium/internal/seleniumemulation/OpenWindow.classPK %^D>6 I=korg/openqa/selenium/internal/seleniumemulation/AltKeyUp.classPK %^D>J=p;;Hporg/openqa/selenium/internal/seleniumemulation/XPathLookupStrategy.classPK %^D>N=eeKuorg/openqa/selenium/internal/seleniumemulation/IdOptionSelectStrategy.classPK %^D>-q`77J]yorg/openqa/selenium/internal/seleniumemulation/AddLocationStrategy$1.classPK %^D>0\  Horg/openqa/selenium/internal/seleniumemulation/AddLocationStrategy.classPK %^D>@org/openqa/selenium/internal/seleniumemulation/SelectFrame.classPK %^D>ceGыorg/openqa/selenium/internal/seleniumemulation/GetAllWindowTitles.classPK %^D>kI;org/openqa/selenium/internal/seleniumemulation/TextMatchingStrategy.classPK %^D>*f99Corg/openqa/selenium/internal/seleniumemulation/WaitForPopup$1.classPK %^D>U7A!org/openqa/selenium/internal/seleniumemulation/WaitForPopup.classPK %^D> 7==H/org/openqa/selenium/internal/seleniumemulation/ValueFilterFunction.classPK %^D>9J}llCҩorg/openqa/selenium/internal/seleniumemulation/FireNamedEvent.classPK %^D>4?wwEorg/openqa/selenium/internal/seleniumemulation/GetSelectOptions.classPK %^D>OQBBMyorg/openqa/selenium/internal/seleniumemulation/SetNextConfirmationState.classPK %^D>IZ< D&org/openqa/selenium/internal/seleniumemulation/CompoundMutator.classPK %^D>Cm=Rorg/openqa/selenium/internal/seleniumemulation/GetValue.classPK %^D>|@Auorg/openqa/selenium/internal/seleniumemulation/GetAttribute.classPK %^D>Horg/openqa/selenium/internal/seleniumemulation/VariableDeclaration.classPK %^D>r9oQorg/openqa/selenium/internal/seleniumemulation/FindSelectedOptionProperties.classPK %^D>iEKKAqorg/openqa/selenium/internal/seleniumemulation/GetAllFields.classPK %^D>}p@org/openqa/selenium/internal/seleniumemulation/GetLocation.classPK %^D>' <org/openqa/selenium/internal/seleniumemulation/Uncheck.classPK %^D>׈=org/openqa/selenium/internal/seleniumemulation/AssignId.classPK %^D>QÔ:org/openqa/selenium/internal/seleniumemulation/Check.classPK %^D>ƷlooO org/openqa/selenium/internal/seleniumemulation/DomTraversalLookupStrategy.classPK %^D>zForg/openqa/selenium/internal/seleniumemulation/JavascriptLibrary.classPK %^D>GE{{CB!org/openqa/selenium/internal/seleniumemulation/FilterFunction.classPK %^D>wC#org/openqa/selenium/internal/seleniumemulation/LookupStrategy.classPK %^D>E/AAH$org/openqa/selenium/internal/seleniumemulation/FunctionDeclaration.classPK %^D>3 ='+org/openqa/selenium/internal/seleniumemulation/GetTable.classPK %^D>%yKDE8org/openqa/selenium/internal/seleniumemulation/GetElementIndex.classPK %^D>e\ \ BAorg/openqa/selenium/internal/seleniumemulation/AlertOverride.classPK %^D> OMKorg/openqa/selenium/internal/seleniumemulation/GetAttributeFromAllWindows.classPK %^D>l,[[DTorg/openqa/selenium/internal/seleniumemulation/GetElementWidth.classPK %^D>u77Nr[org/openqa/selenium/internal/seleniumemulation/IndexOptionSelectStrategy.classPK %^D>*j]Daorg/openqa/selenium/internal/seleniumemulation/IsCookiePresent.classPK %^D>`x>>Nforg/openqa/selenium/internal/seleniumemulation/ValueOptionSelectStrategy.classPK %^D>#a7hh?;jorg/openqa/selenium/internal/seleniumemulation/SetTimeout.classPK %^D>huӅ=porg/openqa/selenium/internal/seleniumemulation/GetTitle.classPK %^D>2`:[torg/openqa/selenium/internal/seleniumemulation/Close.classPK %^D>EPTTMxorg/openqa/selenium/internal/seleniumemulation/BaseOptionSelectStrategy.classPK %^D>žAPorg/openqa/selenium/internal/seleniumemulation/SelectWindow.classPK %^D> \Torg/openqa/selenium/internal/seleniumemulation/FindFirstSelectedOptionProperty.classPK %^D>0dd@Όorg/openqa/selenium/internal/seleniumemulation/WindowFocus.classPK %^D>cէ=org/openqa/selenium/internal/seleniumemulation/GetAlert.classPK %^D>ۀ슱Lorg/openqa/selenium/internal/seleniumemulation/DeleteAllVisibleCookies.classPK %^D>+eeMorg/openqa/selenium/internal/seleniumemulation/GlobTextMatchingStrategy.classPK %^D>T4OooA͡org/openqa/selenium/internal/seleniumemulation/MouseEventAt.classPK %^D>GL@org/openqa/selenium/internal/seleniumemulation/GetBodyText.classPK %^D>Q~~Dorg/openqa/selenium/internal/seleniumemulation/SeleneseCommand.classPK %^D>;ʹorg/openqa/selenium/internal/seleniumemulation/GoBack.classPK %^D>I*iiBorg/openqa/selenium/internal/seleniumemulation/IsTextPresent.classPK %^D>8  9rorg/openqa/selenium/internal/seleniumemulation/Type.classPK %^D>ۋ#Borg/openqa/selenium/internal/seleniumemulation/ScriptMutator.classPK %^D>67bBorg/openqa/selenium/internal/seleniumemulation/GetXpathCount.classPK %^D>7p4gg9oorg/openqa/selenium/internal/seleniumemulation/NoOp.classPK %^D>>*N-org/openqa/selenium/internal/seleniumemulation/ExactTextMatchingStrategy.classPK %^D>]hEhorg/openqa/selenium/internal/seleniumemulation/IdLookupStrategy.classPK %^D>M^DKorg/openqa/selenium/internal/seleniumemulation/GetConfirmation.classPK %^D>' ff@org/openqa/selenium/internal/seleniumemulation/GetAllLinks.classPK %^D>gLˁBorg/openqa/selenium/internal/seleniumemulation/GetAllButtons.classPK %^D>^^Heorg/openqa/selenium/internal/seleniumemulation/DragAndDropToObject.classPK %^D>yB?)org/openqa/selenium/internal/seleniumemulation/ShiftKeyUp.classPK %^D>=Corg/openqa/selenium/internal/seleniumemulation/TypeKeys.classPK %^D>ClA[ org/openqa/selenium/internal/seleniumemulation/ControlKeyUp.classPK %^D>H<org/openqa/selenium/internal/seleniumemulation/Windows.classPK %^D>A> org/openqa/selenium/internal/seleniumemulation/GetCookie.classPK %^D>pC'org/openqa/selenium/internal/seleniumemulation/ControlKeyDown.classPK %^D>h@,org/openqa/selenium/internal/seleniumemulation/MetaKeyDown.classPK %^D>ffK 2org/openqa/selenium/internal/seleniumemulation/GetElementPositionLeft.classPK %^D>J[[D8org/openqa/selenium/internal/seleniumemulation/GetCookieByName.classPK %^D>AuCCI>org/openqa/selenium/internal/seleniumemulation/OptionSelectStrategy.classPK %^D>$EC?@org/openqa/selenium/internal/seleniumemulation/WindowMaximize.classPK %^D>=nccAxForg/openqa/selenium/internal/seleniumemulation/SelectOption.classPK %^D> RRH:Morg/openqa/selenium/internal/seleniumemulation/IsSomethingSelected.classPK %^D>L!DTorg/openqa/selenium/internal/seleniumemulation/RemoveSelection.classPK %^D>aaK]org/openqa/selenium/internal/seleniumemulation/ImplicitLookupStrategy.classPK %^D>Naorg/openqa/selenium/internal/seleniumemulation/RegExTextMatchingStrategy.classPK %^D>1AAC'forg/openqa/selenium/internal/seleniumemulation/IsAlertPresent.classPK %^D>J?mmLjorg/openqa/selenium/internal/seleniumemulation/Timer$SeleneseTimerTask.classPK %^D>gu :norg/openqa/selenium/internal/seleniumemulation/Timer.classPK %^D>B{org/openqa/selenium/internal/seleniumemulation/GetExpression.classPK %^D>2s G~org/openqa/selenium/internal/seleniumemulation/LinkLookupStrategy.classPK %^D>I+  B݌org/openqa/selenium/internal/seleniumemulation/ElementFinder.classPK %^D>z]]JHorg/openqa/selenium/internal/seleniumemulation/IsConfirmationPresent.classPK %^D>%{F org/openqa/selenium/internal/seleniumemulation/CssLookupStrategy.classPK %^D>0Z:org/openqa/selenium/internal/seleniumemulation/Click.classPK %^D>95RbbD2org/openqa/selenium/internal/seleniumemulation/SeleniumMutator.classPK %^D>]dLorg/openqa/selenium/internal/seleniumemulation/SeleniumSelect$Property.classPK %^D>9C'org/openqa/selenium/internal/seleniumemulation/SeleniumSelect.classPK %^D>I>org/openqa/selenium/internal/seleniumemulation/FireEvent.classPK %^D> 2AAGorg/openqa/selenium/internal/seleniumemulation/BaseFilterFunction.classPK %^D>I@org/openqa/selenium/internal/seleniumemulation/DoubleClick.classPK %^D>`E=org/openqa/selenium/internal/seleniumemulation/KeyEvent.classPK %^D><org/openqa/selenium/internal/seleniumemulation/Refresh.classPK %^D>x 99Forg/openqa/selenium/internal/seleniumemulation/MethodDeclaration.classPK %^D>.9&ATorg/openqa/selenium/internal/seleniumemulation/ShiftKeyDown.classPK %^D>_E66Hvorg/openqa/selenium/internal/seleniumemulation/IndexFilterFunction.classPK %^D>< Horg/openqa/selenium/internal/seleniumemulation/RemoveAllSelections.classPK %^D>ccJorg/openqa/selenium/internal/seleniumemulation/GetElementPositionTop.classPK %^D>0aRR;org/openqa/selenium/internal/seleniumemulation/Submit.classPK %^D>J@vorg/openqa/selenium/internal/seleniumemulation/DragAndDrop.classPK %^D>9>E%org/openqa/selenium/internal/seleniumemulation/IsElementPresent.classPK %^D>GNH ,org/openqa/selenium/internal/seleniumemulation/WaitForPageToLoad$1.classPK %^D>7jHHF2org/openqa/selenium/internal/seleniumemulation/WaitForPageToLoad.classPK %^D>qB:org/openqa/selenium/internal/seleniumemulation/GetHtmlSource.classPK %^D>ǎ > ?org/openqa/selenium/internal/seleniumemulation/IsOrdered.classPK %^D>v7uDDAoHorg/openqa/selenium/internal/seleniumemulation/DeleteCookie.classPK %^D><Norg/openqa/selenium/internal/seleniumemulation/GetText.classPK %^D>1Ni>BUorg/openqa/selenium/internal/seleniumemulation/Highlight.classPK %^D>~-->\org/openqa/selenium/internal/seleniumemulation/RunScript.classPK %^D>=ӻ>corg/openqa/selenium/internal/seleniumemulation/MetaKeyUp.classPK %^D>A#horg/openqa/selenium/internal/seleniumemulation/AddSelection.classPK %^D>~rMJporg/openqa/selenium/internal/seleniumemulation/IdentifierLookupStrategy.classPK %^D>VWhhHtorg/openqa/selenium/internal/seleniumemulation/ClassLookupStrategy.classPK %^D>V<{yorg/openqa/selenium/internal/seleniumemulation/GetEval.classPK %^D>4c?org/openqa/selenium/internal/seleniumemulation/IsEditable.classPK %^D>Q``Forg/openqa/selenium/internal/seleniumemulation/AltLookupStrategy.classPK %^D>Nة>_org/openqa/selenium/internal/seleniumemulation/IsChecked.classPK %^D>4___Edorg/openqa/selenium/internal/seleniumemulation/GetElementHeight.classPK %^D>?&org/openqa/selenium/internal/seleniumemulation/AltKeyDown.classPK %^D>9'y A>org/openqa/selenium/internal/seleniumemulation/CreateCookie.classPK %^D>bh?corg/openqa/selenium/internal/seleniumemulation/MouseEvent.classPK %^D>f  ?horg/openqa/selenium/internal/seleniumemulation/AttachFile.classPK %^D>֎+6>org/openqa/selenium/internal/seleniumemulation/IsVisible.classPK %^D>y JGorg/openqa/selenium/internal/seleniumemulation/WaitForCondition$1.classPK %^D>vtE org/openqa/selenium/internal/seleniumemulation/WaitForCondition.classPK lC>T>WW?Gorg/openqa/selenium/internal/seleniumemulation/.svn/all-wcpropsPK lC>@¡9HH;=,org/openqa/selenium/internal/seleniumemulation/.svn/entriesPK lC>G::uorg/openqa/selenium/internal/seleniumemulation/.svn/formatPK lC>G_uorg/openqa/selenium/internal/seleniumemulation/.svn/text-base/AddLocationStrategy.java.svn-basePK lC>SX|org/openqa/selenium/internal/seleniumemulation/.svn/text-base/AddSelection.java.svn-basePK lC>ʚD YRorg/openqa/selenium/internal/seleniumemulation/.svn/text-base/AlertOverride.java.svn-basePK lC>ãVRorg/openqa/selenium/internal/seleniumemulation/.svn/text-base/AltKeyDown.java.svn-basePK lC>=Z=Tiorg/openqa/selenium/internal/seleniumemulation/.svn/text-base/AltKeyUp.java.svn-basePK lC>cW]{org/openqa/selenium/internal/seleniumemulation/.svn/text-base/AltLookupStrategy.java.svn-basePK lC>g`Torg/openqa/selenium/internal/seleniumemulation/.svn/text-base/AssignId.java.svn-basePK lC>ɱVorg/openqa/selenium/internal/seleniumemulation/.svn/text-base/AttachFile.java.svn-basePK lC>{2^org/openqa/selenium/internal/seleniumemulation/.svn/text-base/BaseFilterFunction.java.svn-basePK lC>f~wdorg/openqa/selenium/internal/seleniumemulation/.svn/text-base/BaseOptionSelectStrategy.java.svn-basePK lC>'||eTorg/openqa/selenium/internal/seleniumemulation/.svn/text-base/CaptureScreenshotToString.java.svn-basePK lC>?1.!QSorg/openqa/selenium/internal/seleniumemulation/.svn/text-base/Check.java.svn-basePK lC>9_xorg/openqa/selenium/internal/seleniumemulation/.svn/text-base/ClassLookupStrategy.java.svn-basePK lC>ZQorg/openqa/selenium/internal/seleniumemulation/.svn/text-base/Click.java.svn-basePK lC>vMQZorg/openqa/selenium/internal/seleniumemulation/.svn/text-base/Close.java.svn-basePK lC>`f f [norg/openqa/selenium/internal/seleniumemulation/.svn/text-base/CompoundMutator.java.svn-basePK lC>~#YZMorg/openqa/selenium/internal/seleniumemulation/.svn/text-base/ControlKeyDown.java.svn-basePK lC>DTo  Xorg/openqa/selenium/internal/seleniumemulation/.svn/text-base/ControlKeyUp.java.svn-basePK lC>N` ` XTorg/openqa/selenium/internal/seleniumemulation/.svn/text-base/CreateCookie.java.svn-basePK lC>͚]*org/openqa/selenium/internal/seleniumemulation/.svn/text-base/CssLookupStrategy.java.svn-basePK lC>ɧcMorg/openqa/selenium/internal/seleniumemulation/.svn/text-base/DeleteAllVisibleCookies.java.svn-basePK lC>F  Xuorg/openqa/selenium/internal/seleniumemulation/.svn/text-base/DeleteCookie.java.svn-basePK lC>dW{{f org/openqa/selenium/internal/seleniumemulation/.svn/text-base/DomTraversalLookupStrategy.java.svn-basePK lC>GBvvW org/openqa/selenium/internal/seleniumemulation/.svn/text-base/DoubleClick.java.svn-basePK lC>#UKKWorg/openqa/selenium/internal/seleniumemulation/.svn/text-base/DragAndDrop.java.svn-basePK lC>jA_org/openqa/selenium/internal/seleniumemulation/.svn/text-base/DragAndDropToObject.java.svn-basePK lC>i9 9 Y org/openqa/selenium/internal/seleniumemulation/.svn/text-base/ElementFinder.java.svn-basePK lC>y!||ezorg/openqa/selenium/internal/seleniumemulation/.svn/text-base/ExactTextMatchingStrategy.java.svn-basePK lC>Z||Zyorg/openqa/selenium/internal/seleniumemulation/.svn/text-base/FilterFunction.java.svn-basePK lC>ukmorg/openqa/selenium/internal/seleniumemulation/.svn/text-base/FindFirstSelectedOptionProperty.java.svn-basePK lC>s!!h$org/openqa/selenium/internal/seleniumemulation/.svn/text-base/FindSelectedOptionProperties.java.svn-basePK lC>WU*org/openqa/selenium/internal/seleniumemulation/.svn/text-base/FireEvent.java.svn-basePK lC>HHZ0org/openqa/selenium/internal/seleniumemulation/.svn/text-base/FireNamedEvent.java.svn-basePK lC>37_5org/openqa/selenium/internal/seleniumemulation/.svn/text-base/FunctionDeclaration.java.svn-basePK lC>$i?  T<org/openqa/selenium/internal/seleniumemulation/.svn/text-base/GetAlert.java.svn-basePK lC> O1UY@org/openqa/selenium/internal/seleniumemulation/.svn/text-base/GetAllButtons.java.svn-basePK lC>/aNrrXForg/openqa/selenium/internal/seleniumemulation/.svn/text-base/GetAllFields.java.svn-basePK lC>ML7WLorg/openqa/selenium/internal/seleniumemulation/.svn/text-base/GetAllLinks.java.svn-basePK lC> 00^Rorg/openqa/selenium/internal/seleniumemulation/.svn/text-base/GetAllWindowTitles.java.svn-basePK lC>LsjXXorg/openqa/selenium/internal/seleniumemulation/.svn/text-base/GetAttribute.java.svn-basePK lC>gk f^org/openqa/selenium/internal/seleniumemulation/.svn/text-base/GetAttributeFromAllWindows.java.svn-basePK lC>Weorg/openqa/selenium/internal/seleniumemulation/.svn/text-base/GetBodyText.java.svn-basePK lC>b,+!![Yiorg/openqa/selenium/internal/seleniumemulation/.svn/text-base/GetConfirmation.java.svn-basePK lC>[-VVUmorg/openqa/selenium/internal/seleniumemulation/.svn/text-base/GetCookie.java.svn-basePK lC>-XK[rorg/openqa/selenium/internal/seleniumemulation/.svn/text-base/GetCookieByName.java.svn-basePK lC>xP\0worg/openqa/selenium/internal/seleniumemulation/.svn/text-base/GetElementHeight.java.svn-basePK lC>|`kk[|org/openqa/selenium/internal/seleniumemulation/.svn/text-base/GetElementIndex.java.svn-basePK lC>lqbjorg/openqa/selenium/internal/seleniumemulation/.svn/text-base/GetElementPositionLeft.java.svn-basePK lC>Baωorg/openqa/selenium/internal/seleniumemulation/.svn/text-base/GetElementPositionTop.java.svn-basePK lC> }[/org/openqa/selenium/internal/seleniumemulation/.svn/text-base/GetElementWidth.java.svn-basePK lC>0mmSorg/openqa/selenium/internal/seleniumemulation/.svn/text-base/GetEval.java.svn-basePK lC>ŸjjY]org/openqa/selenium/internal/seleniumemulation/.svn/text-base/GetExpression.java.svn-basePK lC> Y>org/openqa/selenium/internal/seleniumemulation/.svn/text-base/GetHtmlSource.java.svn-basePK lC>șW[org/openqa/selenium/internal/seleniumemulation/.svn/text-base/GetLocation.java.svn-basePK lC>3x\xorg/openqa/selenium/internal/seleniumemulation/.svn/text-base/GetSelectOptions.java.svn-basePK lC>+ت Torg/openqa/selenium/internal/seleniumemulation/.svn/text-base/GetTable.java.svn-basePK lC>=lSorg/openqa/selenium/internal/seleniumemulation/.svn/text-base/GetText.java.svn-basePK lC>̯ݻTtorg/openqa/selenium/internal/seleniumemulation/.svn/text-base/GetTitle.java.svn-basePK lC>VbbTorg/openqa/selenium/internal/seleniumemulation/.svn/text-base/GetValue.java.svn-basePK lC>YZorg/openqa/selenium/internal/seleniumemulation/.svn/text-base/GetXpathCount.java.svn-basePK lC>XJWdorg/openqa/selenium/internal/seleniumemulation/.svn/text-base/GlobTextMatchingStrategy.java.svn-basePK lC>1nRorg/openqa/selenium/internal/seleniumemulation/.svn/text-base/GoBack.java.svn-basePK lC>mc\Uorg/openqa/selenium/internal/seleniumemulation/.svn/text-base/Highlight.java.svn-basePK lC>\)org/openqa/selenium/internal/seleniumemulation/.svn/text-base/IdLookupStrategy.java.svn-basePK lC>4Nb}org/openqa/selenium/internal/seleniumemulation/.svn/text-base/IdOptionSelectStrategy.java.svn-basePK lC>dorg/openqa/selenium/internal/seleniumemulation/.svn/text-base/IdentifierLookupStrategy.java.svn-basePK lC>atborg/openqa/selenium/internal/seleniumemulation/.svn/text-base/ImplicitLookupStrategy.java.svn-basePK lC>=D6___.org/openqa/selenium/internal/seleniumemulation/.svn/text-base/IndexFilterFunction.java.svn-basePK lC>5zze org/openqa/selenium/internal/seleniumemulation/.svn/text-base/IndexOptionSelectStrategy.java.svn-basePK lC>e 55Uorg/openqa/selenium/internal/seleniumemulation/.svn/text-base/IsChecked.java.svn-basePK lC>=700aAorg/openqa/selenium/internal/seleniumemulation/.svn/text-base/IsConfirmationPresent.java.svn-basePK lC>}[org/openqa/selenium/internal/seleniumemulation/.svn/text-base/IsCookiePresent.java.svn-basePK lC>_tV org/openqa/selenium/internal/seleniumemulation/.svn/text-base/IsEditable.java.svn-basePK lC>o7\org/openqa/selenium/internal/seleniumemulation/.svn/text-base/IsElementPresent.java.svn-basePK lC>11Uorg/openqa/selenium/internal/seleniumemulation/.svn/text-base/IsOrdered.java.svn-basePK lC>Ӟ_org/openqa/selenium/internal/seleniumemulation/.svn/text-base/IsSomethingSelected.java.svn-basePK lC>x77Y #org/openqa/selenium/internal/seleniumemulation/.svn/text-base/IsTextPresent.java.svn-basePK lC>$fNU(org/openqa/selenium/internal/seleniumemulation/.svn/text-base/IsVisible.java.svn-basePK lC>t ]-org/openqa/selenium/internal/seleniumemulation/.svn/text-base/JavascriptLibrary.java.svn-basePK lC>yT;org/openqa/selenium/internal/seleniumemulation/.svn/text-base/KeyEvent.java.svn-basePK lC>vy,,TAorg/openqa/selenium/internal/seleniumemulation/.svn/text-base/KeyState.java.svn-basePK lC>͎[9 ^Iorg/openqa/selenium/internal/seleniumemulation/.svn/text-base/LinkLookupStrategy.java.svn-basePK lC>ffZTorg/openqa/selenium/internal/seleniumemulation/.svn/text-base/LookupStrategy.java.svn-basePK lC>j.צWWorg/openqa/selenium/internal/seleniumemulation/.svn/text-base/MetaKeyDown.java.svn-basePK lC>3ԢU Zorg/openqa/selenium/internal/seleniumemulation/.svn/text-base/MetaKeyUp.java.svn-basePK lC>Uh]"\org/openqa/selenium/internal/seleniumemulation/.svn/text-base/MethodDeclaration.java.svn-basePK lC>֏&&VZaorg/openqa/selenium/internal/seleniumemulation/.svn/text-base/MouseEvent.java.svn-basePK lC>O==Xforg/openqa/selenium/internal/seleniumemulation/.svn/text-base/MouseEventAt.java.svn-basePK lC>b^lorg/openqa/selenium/internal/seleniumemulation/.svn/text-base/NameFilterFunction.java.svn-basePK lC> ^porg/openqa/selenium/internal/seleniumemulation/.svn/text-base/NameLookupStrategy.java.svn-basePK lC> P~org/openqa/selenium/internal/seleniumemulation/.svn/text-base/NoOp.java.svn-basePK lC> Poorg/openqa/selenium/internal/seleniumemulation/.svn/text-base/Open.java.svn-basePK lC>ڪd[[Vxorg/openqa/selenium/internal/seleniumemulation/.svn/text-base/OpenWindow.java.svn-basePK lC> v`Gorg/openqa/selenium/internal/seleniumemulation/.svn/text-base/OptionSelectStrategy.java.svn-basePK lC>0Snorg/openqa/selenium/internal/seleniumemulation/.svn/text-base/Refresh.java.svn-basePK lC>ʶ..e}org/openqa/selenium/internal/seleniumemulation/.svn/text-base/RegExTextMatchingStrategy.java.svn-basePK lC>--_.org/openqa/selenium/internal/seleniumemulation/.svn/text-base/RemoveAllSelections.java.svn-basePK lC>rT[؟org/openqa/selenium/internal/seleniumemulation/.svn/text-base/RemoveSelection.java.svn-basePK lC> U<org/openqa/selenium/internal/seleniumemulation/.svn/text-base/RunScript.java.svn-basePK lC> Y_org/openqa/selenium/internal/seleniumemulation/.svn/text-base/ScriptMutator.java.svn-basePK lC>WҰorg/openqa/selenium/internal/seleniumemulation/.svn/text-base/SelectFrame.java.svn-basePK lC>`6lXHorg/openqa/selenium/internal/seleniumemulation/.svn/text-base/SelectOption.java.svn-basePK lC>x$WXorg/openqa/selenium/internal/seleniumemulation/.svn/text-base/SelectWindow.java.svn-basePK lC>ڒ[#org/openqa/selenium/internal/seleniumemulation/.svn/text-base/SeleneseCommand.java.svn-basePK lC>:#[org/openqa/selenium/internal/seleniumemulation/.svn/text-base/SeleniumMutator.java.svn-basePK lC>,VVZorg/openqa/selenium/internal/seleniumemulation/.svn/text-base/SeleniumSelect.java.svn-basePK lC>>܇dorg/openqa/selenium/internal/seleniumemulation/.svn/text-base/SetNextConfirmationState.java.svn-basePK lC>.ooVorg/openqa/selenium/internal/seleniumemulation/.svn/text-base/SetTimeout.java.svn-basePK lC> hvXorg/openqa/selenium/internal/seleniumemulation/.svn/text-base/ShiftKeyDown.java.svn-basePK lC>ʎVorg/openqa/selenium/internal/seleniumemulation/.svn/text-base/ShiftKeyUp.java.svn-basePK lC>q5Rorg/openqa/selenium/internal/seleniumemulation/.svn/text-base/Submit.java.svn-basePK lC>j""`iorg/openqa/selenium/internal/seleniumemulation/.svn/text-base/TextMatchingStrategy.java.svn-basePK lC>U U Q org/openqa/selenium/internal/seleniumemulation/.svn/text-base/Timer.java.svn-basePK lC>I&- - Porg/openqa/selenium/internal/seleniumemulation/.svn/text-base/Type.java.svn-basePK lC>::Th org/openqa/selenium/internal/seleniumemulation/.svn/text-base/TypeKeys.java.svn-basePK lC>kSorg/openqa/selenium/internal/seleniumemulation/.svn/text-base/Uncheck.java.svn-basePK lC>B_org/openqa/selenium/internal/seleniumemulation/.svn/text-base/ValueFilterFunction.java.svn-basePK lC>_~ueorg/openqa/selenium/internal/seleniumemulation/.svn/text-base/ValueOptionSelectStrategy.java.svn-basePK lC>_w_(org/openqa/selenium/internal/seleniumemulation/.svn/text-base/VariableDeclaration.java.svn-basePK lC> \#org/openqa/selenium/internal/seleniumemulation/.svn/text-base/WaitForCondition.java.svn-basePK lC>^e  ]+org/openqa/selenium/internal/seleniumemulation/.svn/text-base/WaitForPageToLoad.java.svn-basePK lC>yX`5org/openqa/selenium/internal/seleniumemulation/.svn/text-base/WaitForPopup.java.svn-basePK lC>Z;88W<org/openqa/selenium/internal/seleniumemulation/.svn/text-base/WindowFocus.java.svn-basePK lC>QZmAorg/openqa/selenium/internal/seleniumemulation/.svn/text-base/WindowMaximize.java.svn-basePK lC>)SForg/openqa/selenium/internal/seleniumemulation/.svn/text-base/Windows.java.svn-basePK lC>Uc55_Yorg/openqa/selenium/internal/seleniumemulation/.svn/text-base/XPathLookupStrategy.java.svn-basePK lC>ٱQt^org/openqa/selenium/internal/seleniumemulation/.svn/text-base/build.desc.svn-basePK lC>DϊS_org/openqa/selenium/internal/seleniumemulation/.svn/text-base/htmlutils.js.svn-basePK lC> .44\zorg/openqa/selenium/internal/seleniumemulation/.svn/text-base/injectableSelenium.js.svn-basePK (hC>ٱ9org/openqa/selenium/internal/seleniumemulation/build.descPK (hC>Dϊ;org/openqa/selenium/internal/seleniumemulation/htmlutils.jsPK (hC> .44Dmorg/openqa/selenium/internal/seleniumemulation/injectableSelenium.jsPK %^D>8RH H 7vorg/openqa/selenium/support/testing/Verifications.classPK %^D>kԉ4 org/openqa/selenium/support/testing/Assertions.classPK lC>44447org/openqa/selenium/support/testing/.svn/all-wcpropsPK lC>WHtϹ0!org/openqa/selenium/support/testing/.svn/entriesPK lC>G/$org/openqa/selenium/support/testing/.svn/formatPK lC>}K%org/openqa/selenium/support/testing/.svn/text-base/Assertions.java.svn-basePK lC>$ݮ==N<org/openqa/selenium/support/testing/.svn/text-base/Verifications.java.svn-basePK lC>ggF9Korg/openqa/selenium/support/testing/.svn/text-base/build.desc.svn-basePK )hC>gg.Lorg/openqa/selenium/support/testing/build.descPK %^D>%5Lorg/openqa/selenium/lift/match/SelectionMatcher.classPK %^D>u1 Rorg/openqa/selenium/lift/match/ValueMatcher.classPK %^D>{45jXorg/openqa/selenium/lift/match/AttributeMatcher.classPK %^D>ǿ)6`org/openqa/selenium/lift/match/NumericalMatchers.classPK %^D>7)0jdorg/openqa/selenium/lift/match/TextMatcher.classPK lC>rr/gkorg/openqa/selenium/lift/match/.svn/all-wcpropsPK lC>W+&oorg/openqa/selenium/lift/match/.svn/entriesPK lC>G*Wsorg/openqa/selenium/lift/match/.svn/formatPK lC> AALsorg/openqa/selenium/lift/match/.svn/text-base/AttributeMatcher.java.svn-basePK lC>ʹ-SSMLzorg/openqa/selenium/lift/match/.svn/text-base/NumericalMatchers.java.svn-basePK lC>SL org/openqa/selenium/lift/match/.svn/text-base/SelectionMatcher.java.svn-basePK lC>c2o]Gorg/openqa/selenium/lift/match/.svn/text-base/TextMatcher.java.svn-basePK lC>M44HEorg/openqa/selenium/lift/match/.svn/text-base/ValueMatcher.java.svn-basePK %^D>V xxAߋorg/openqa/selenium/interactions/internal/KeysRelatedAction.classPK %^D>||Borg/openqa/selenium/interactions/internal/MouseRelatedAction.classPK %^D>`88:org/openqa/selenium/interactions/internal/BaseAction.classPK %^D>\\?"org/openqa/selenium/interactions/internal/SingleKeyAction.classPK %^D>h3;77;۞org/openqa/selenium/interactions/internal/Coordinates.classPK lC>wN:korg/openqa/selenium/interactions/internal/.svn/all-wcpropsPK lC>6]6yorg/openqa/selenium/interactions/internal/.svn/entriesPK lC>G5org/openqa/selenium/interactions/internal/.svn/formatPK lC>%Qorg/openqa/selenium/interactions/internal/.svn/text-base/BaseAction.java.svn-basePK lC>bAR&org/openqa/selenium/interactions/internal/.svn/text-base/Coordinates.java.svn-basePK lC> Xorg/openqa/selenium/interactions/internal/.svn/text-base/KeysRelatedAction.java.svn-basePK lC>ߓMooYorg/openqa/selenium/interactions/internal/.svn/text-base/MouseRelatedAction.java.svn-basePK lC>!99Vorg/openqa/selenium/interactions/internal/.svn/text-base/SingleKeyAction.java.svn-basePK lC>dycc!-com/thoughtworks/.svn/all-wcpropsPK lC>a com/thoughtworks/.svn/entriesPK lC>G%com/thoughtworks/.svn/formatPK %^D>_  0aorg/openqa/selenium/lift/find/BaseFinder$1.classPK %^D>0g* * .org/openqa/selenium/lift/find/BaseFinder.classPK %^D>Z.1org/openqa/selenium/lift/find/LinkFinder.classPK %^D>" /korg/openqa/selenium/lift/find/InputFinder.classPK %^D>?  /org/openqa/selenium/lift/find/TableFinder.classPK %^D>83org/openqa/selenium/lift/find/PageTitleFinder.classPK %^D>E}*Morg/openqa/selenium/lift/find/Finder.classPK %^D>Dy/org/openqa/selenium/lift/find/XPathFinder.classPK %^D>o|b1org/openqa/selenium/lift/find/HtmlTagFinder.classPK %^D>F-org/openqa/selenium/lift/find/DivFinder.classPK %^D>/org/openqa/selenium/lift/find/ImageFinder.classPK %^D>(**3org/openqa/selenium/lift/find/TableCellFinder.classPK lC>.dorg/openqa/selenium/lift/find/.svn/all-wcpropsPK lC>fDp*horg/openqa/selenium/lift/find/.svn/entriesPK lC>G)org/openqa/selenium/lift/find/.svn/formatPK lC>{sG  Eorg/openqa/selenium/lift/find/.svn/text-base/BaseFinder.java.svn-basePK lC>Dp!org/openqa/selenium/lift/find/.svn/text-base/DivFinder.java.svn-basePK lC>"A&org/openqa/selenium/lift/find/.svn/text-base/Finder.java.svn-basePK lC>ffH*org/openqa/selenium/lift/find/.svn/text-base/HtmlTagFinder.java.svn-basePK lC>ZnUUFx1org/openqa/selenium/lift/find/.svn/text-base/ImageFinder.java.svn-basePK lC>j{F16org/openqa/selenium/lift/find/.svn/text-base/InputFinder.java.svn-basePK lC>QCGVVEZ>org/openqa/selenium/lift/find/.svn/text-base/LinkFinder.java.svn-basePK lC>nJDorg/openqa/selenium/lift/find/.svn/text-base/PageTitleFinder.java.svn-basePK lC>@)JJorg/openqa/selenium/lift/find/.svn/text-base/TableCellFinder.java.svn-basePK lC>{mmFOorg/openqa/selenium/lift/find/.svn/text-base/TableFinder.java.svn-basePK lC>YYFSorg/openqa/selenium/lift/find/.svn/text-base/XPathFinder.java.svn-basePK %^D>望-Yorg/openqa/selenium/html5/AppCacheEntry.classPK %^D>GR.^org/openqa/selenium/html5/AppCacheStatus.classPK %^D>A0AA,dorg/openqa/selenium/html5/AppCacheType.classPK %^D>cAA)kjorg/openqa/selenium/html5/ResultSet.classPK %^D>ko,morg/openqa/selenium/html5/LocalStorage.classPK %^D>a>1(oorg/openqa/selenium/html5/Location.classPK %^D>fS+/6torg/openqa/selenium/html5/LocationContext.classPK %^D>Ϸ*uorg/openqa/selenium/html5/WebStorage.classPK %^D>d}1vorg/openqa/selenium/html5/BrowserConnection.classPK %^D>UE>-4xorg/openqa/selenium/html5/ResultSetRows.classPK %^D>y.U|org/openqa/selenium/html5/SessionStorage.classPK %^D>7뇛0@~org/openqa/selenium/html5/ApplicationCache.classPK %^D>\BB/org/openqa/selenium/html5/DatabaseStorage.classPK lC>Z*org/openqa/selenium/html5/.svn/all-wcpropsPK lC>Z&ɉorg/openqa/selenium/html5/.svn/entriesPK lC>G%org/openqa/selenium/html5/.svn/formatPK lC> >>D2org/openqa/selenium/html5/.svn/text-base/AppCacheEntry.java.svn-basePK lC>{-Eҙorg/openqa/selenium/html5/.svn/text-base/AppCacheStatus.java.svn-basePK lC>WCorg/openqa/selenium/html5/.svn/text-base/AppCacheType.java.svn-basePK lC>IQQGorg/openqa/selenium/html5/.svn/text-base/ApplicationCache.java.svn-basePK lC>''Horg/openqa/selenium/html5/.svn/text-base/BrowserConnection.java.svn-basePK lC>&F=org/openqa/selenium/html5/.svn/text-base/DatabaseStorage.java.svn-basePK lC>[CCorg/openqa/selenium/html5/.svn/text-base/LocalStorage.java.svn-basePK lC>'nD'((?org/openqa/selenium/html5/.svn/text-base/Location.java.svn-basePK lC>I<&&Forg/openqa/selenium/html5/.svn/text-base/LocationContext.java.svn-basePK lC>qm@org/openqa/selenium/html5/.svn/text-base/ResultSet.java.svn-basePK lC>N{Dworg/openqa/selenium/html5/.svn/text-base/ResultSetRows.java.svn-basePK lC>֞Eorg/openqa/selenium/html5/.svn/text-base/SessionStorage.java.svn-basePK lC>udAorg/openqa/selenium/html5/.svn/text-base/WebStorage.java.svn-basePK %^D>8^{{H/org/openqa/selenium/browserlaunchers/locators/SingleBrowserLocator.classPK %^D>tGorg/openqa/selenium/browserlaunchers/locators/GoogleChromeLocator.classPK %^D>ke C1org/openqa/selenium/browserlaunchers/locators/Firefox2Locator.classPK %^D>`{‰Bcorg/openqa/selenium/browserlaunchers/locators/BrowserLocator.classPK %^D>F|YYALorg/openqa/selenium/browserlaunchers/locators/SafariLocator.classPK %^D>b[Eorg/openqa/selenium/browserlaunchers/locators/Firefox3Locator$1.classPK %^D>|LT Cc org/openqa/selenium/browserlaunchers/locators/Firefox3Locator.classPK %^D>".nnForg/openqa/selenium/browserlaunchers/locators/Firefox2or3Locator.classPK %^D>ht%%B"org/openqa/selenium/browserlaunchers/locators/FirefoxLocator.classPK %^D>   K%org/openqa/selenium/browserlaunchers/locators/InternetExplorerLocator.classPK %^D>%G+org/openqa/selenium/browserlaunchers/locators/BrowserInstallation.classPK lC>H>%>.org/openqa/selenium/browserlaunchers/locators/.svn/all-wcpropsPK lC>G9>org/openqa/selenium/browserlaunchers/locators/.svn/formatPK lC>;;^>org/openqa/selenium/browserlaunchers/locators/.svn/text-base/BrowserInstallation.java.svn-basePK lC>d11YAorg/openqa/selenium/browserlaunchers/locators/.svn/text-base/BrowserLocator.java.svn-basePK lC>~ZCorg/openqa/selenium/browserlaunchers/locators/.svn/text-base/Firefox2Locator.java.svn-basePK lC>d  ]Lorg/openqa/selenium/browserlaunchers/locators/.svn/text-base/Firefox2or3Locator.java.svn-basePK lC>[S Z5Rorg/openqa/selenium/browserlaunchers/locators/.svn/text-base/Firefox3Locator.java.svn-basePK lC>ussY`org/openqa/selenium/browserlaunchers/locators/.svn/text-base/FirefoxLocator.java.svn-basePK lC>9m( ( ^jborg/openqa/selenium/browserlaunchers/locators/.svn/text-base/GoogleChromeLocator.java.svn-basePK lC>blorg/openqa/selenium/browserlaunchers/locators/.svn/text-base/InternetExplorerLocator.java.svn-basePK lC>X{porg/openqa/selenium/browserlaunchers/locators/.svn/text-base/SafariLocator.java.svn-basePK lC>._uorg/openqa/selenium/browserlaunchers/locators/.svn/text-base/SingleBrowserLocator.java.svn-basePK lC>>"PԌorg/openqa/selenium/browserlaunchers/locators/.svn/text-base/build.desc.svn-basePK (hC>>"8Eorg/openqa/selenium/browserlaunchers/locators/build.descPK %^D><5org/openqa/selenium/internal/FindsByCssSelector.classPK %^D>:6./org/openqa/selenium/internal/WrapsElement.classPK %^D><1org/openqa/selenium/internal/ReturnedCookie.classPK %^D>Zs91org/openqa/selenium/internal/FindsByTagName.classPK %^D> [,_org/openqa/selenium/internal/NullTrace.classPK %^D>nɥ3morg/openqa/selenium/internal/FindsByClassName.classPK %^D>:V-p5Jorg/openqa/selenium/internal/NullTraceGenerator.classPK %^D>z>pp,zorg/openqa/selenium/internal/FindsById.classPK %^D>||/4org/openqa/selenium/internal/FindsByXPath.classPK %^D>)_ -org/openqa/selenium/internal/SocketLock.classPK %^D>"(.ܲorg/openqa/selenium/internal/WrapsDriver.classPK %^D>7{n>>(org/openqa/selenium/internal/Trace.classPK %^D>l'oorg/openqa/selenium/internal/Lock.classPK %^D>- 0Worg/openqa/selenium/internal/Base64Encoder.classPK %^D>05/org/openqa/selenium/internal/TraceFactory.classPK %^D>փE2org/openqa/selenium/internal/FindsByLinkText.classPK %^D>kxx.org/openqa/selenium/internal/FindsByName.classPK %^D>S'',org/openqa/selenium/internal/Locatable.classPK lC>Rܞ )org/openqa/selenium/internal/.svn/entriesPK lC>G(org/openqa/selenium/internal/.svn/formatPK lC>VG org/openqa/selenium/internal/.svn/text-base/Base64Encoder.java.svn-basePK lC>^qqJorg/openqa/selenium/internal/.svn/text-base/FindsByClassName.java.svn-basePK lC>'տyyLorg/openqa/selenium/internal/.svn/text-base/FindsByCssSelector.java.svn-basePK lC>ޟ-CCCorg/openqa/selenium/internal/.svn/text-base/FindsById.java.svn-basePK lC>tIoorg/openqa/selenium/internal/.svn/text-base/FindsByLinkText.java.svn-basePK lC>etIIEorg/openqa/selenium/internal/.svn/text-base/FindsByName.java.svn-basePK lC>>MkkHPorg/openqa/selenium/internal/.svn/text-base/FindsByTagName.java.svn-basePK lC>u LLF! org/openqa/selenium/internal/.svn/text-base/FindsByXPath.java.svn-basePK lC>vvC org/openqa/selenium/internal/.svn/text-base/Locatable.java.svn-basePK lC>^Y>org/openqa/selenium/internal/.svn/text-base/Lock.java.svn-basePK lC>ikkCorg/openqa/selenium/internal/.svn/text-base/NullTrace.java.svn-basePK lC>wdP00Lorg/openqa/selenium/internal/.svn/text-base/NullTraceGenerator.java.svn-basePK lC>CH=org/openqa/selenium/internal/.svn/text-base/ReturnedCookie.java.svn-basePK lC>Wi1oXXD~"org/openqa/selenium/internal/.svn/text-base/SocketLock.java.svn-basePK lC>Lҹ?81org/openqa/selenium/internal/.svn/text-base/Trace.java.svn-basePK lC>[FN3org/openqa/selenium/internal/.svn/text-base/TraceFactory.java.svn-basePK lC>~,E7org/openqa/selenium/internal/.svn/text-base/WrapsDriver.java.svn-basePK lC>VVF;org/openqa/selenium/internal/.svn/text-base/WrapsElement.java.svn-basePK lC>z??org/openqa/selenium/internal/.svn/text-base/build.desc.svn-basePK (hC>z'Aorg/openqa/selenium/internal/build.descPK %^D>l:gBorg/openqa/selenium/firefox/internal/FileExtension$1.classPK %^D>8|Horg/openqa/selenium/firefox/internal/FileExtension.classPK %^D>:&ı5[org/openqa/selenium/firefox/internal/Executable.classPK %^D>;,6sorg/openqa/selenium/firefox/internal/ProfilesIni.classPK %^D>vX 2org/openqa/selenium/firefox/internal/Streams.classPK %^D> #2 2 =org/openqa/selenium/firefox/internal/ClasspathExtension.classPK %^D> [4org/openqa/selenium/firefox/internal/Extension.classPK %^D>7H==Horg/openqa/selenium/firefox/internal/NewProfileExtensionConnection.classPK lC>fS5\org/openqa/selenium/firefox/internal/.svn/all-wcpropsPK lC>1org/openqa/selenium/firefox/internal/.svn/entriesPK lC>G0ͷorg/openqa/selenium/firefox/internal/.svn/formatPK lC>~f5p p Torg/openqa/selenium/firefox/internal/.svn/text-base/ClasspathExtension.java.svn-basePK lC>?eekLorg/openqa/selenium/firefox/internal/.svn/text-base/Executable.java.svn-basePK lC>k&  Kaorg/openqa/selenium/firefox/internal/.svn/text-base/Extension.java.svn-basePK lC>?``Oorg/openqa/selenium/firefox/internal/.svn/text-base/FileExtension.java.svn-basePK lC>t/_org/openqa/selenium/firefox/internal/.svn/text-base/NewProfileExtensionConnection.java.svn-basePK lC>0ߣM org/openqa/selenium/firefox/internal/.svn/text-base/ProfilesIni.java.svn-basePK lC>ɩI!org/openqa/selenium/firefox/internal/.svn/text-base/Streams.java.svn-basePK %^D>)-=&org/openqa/selenium/interactions/Action.classPK %^D>08'org/openqa/selenium/interactions/DoubleClickAction.classPK %^D>2&11<;+org/openqa/selenium/interactions/ActionChainsGenerator.classPK %^D>Z 20org/openqa/selenium/interactions/ClickAction.classPK %^D>,,C4org/openqa/selenium/interactions/DefaultActionChainsGenerator.classPK %^D>f4,,6ROorg/openqa/selenium/interactions/MoveMouseAction.classPK %^D>5P2..5Sorg/openqa/selenium/interactions/SendKeysAction.classPK %^D>96SYorg/openqa/selenium/interactions/CompositeAction.classPK %^D>.+2^org/openqa/selenium/interactions/KeyUpAction.classPK %^D>{#gg9corg/openqa/selenium/interactions/MoveToOffsetAction.classPK %^D>̢X9Chorg/openqa/selenium/interactions/ClickAndHoldAction.classPK %^D>:blorg/openqa/selenium/interactions/ButtonReleaseAction.classPK %^D>Dih9porg/openqa/selenium/interactions/ContextClickAction.classPK %^D>.)Btorg/openqa/selenium/interactions/InvalidCoordinatesException.classPK %^D>gD>4vorg/openqa/selenium/interactions/KeyDownAction.classPK lC>f f 1{org/openqa/selenium/interactions/.svn/all-wcpropsPK lC>1nC+ + -yorg/openqa/selenium/interactions/.svn/entriesPK lC>G,org/openqa/selenium/interactions/.svn/formatPK lC>D;org/openqa/selenium/interactions/.svn/text-base/Action.java.svn-basePK lC>4rSorg/openqa/selenium/interactions/.svn/text-base/ActionChainsGenerator.java.svn-basePK lC>uHHQorg/openqa/selenium/interactions/.svn/text-base/ButtonReleaseAction.java.svn-basePK lC>{ Iorg/openqa/selenium/interactions/.svn/text-base/ClickAction.java.svn-basePK lC>o`xxPorg/openqa/selenium/interactions/.svn/text-base/ClickAndHoldAction.java.svn-basePK lC>J[؞M׮org/openqa/selenium/interactions/.svn/text-base/CompositeAction.java.svn-basePK lC>5ZZPorg/openqa/selenium/interactions/.svn/text-base/ContextClickAction.java.svn-basePK lC>XZorg/openqa/selenium/interactions/.svn/text-base/DefaultActionChainsGenerator.java.svn-basePK lC>SO<org/openqa/selenium/interactions/.svn/text-base/DoubleClickAction.java.svn-basePK lC>qqqYEorg/openqa/selenium/interactions/.svn/text-base/InvalidCoordinatesException.java.svn-basePK lC>AK-org/openqa/selenium/interactions/.svn/text-base/KeyDownAction.java.svn-basePK lC>LJ.L\\Mrorg/openqa/selenium/interactions/.svn/text-base/MoveMouseAction.java.svn-basePK lC>*P9org/openqa/selenium/interactions/.svn/text-base/MoveToOffsetAction.java.svn-basePK lC>6OLorg/openqa/selenium/interactions/.svn/text-base/SendKeysAction.java.svn-basePK lC>wCorg/openqa/selenium/interactions/.svn/text-base/build.desc.svn-basePK )hC>w+Yorg/openqa/selenium/interactions/build.descPK %^D>?(>org/openqa/selenium/remote/internal/CircularOutputStream.classPK %^D>[sPKK7org/openqa/selenium/remote/internal/OutputWatcher.classPK %^D>f0. . Cborg/openqa/selenium/remote/internal/WebElementToJsonConverter.classPK %^D> /Pԭ 4org/openqa/selenium/remote/internal/SubProcess.classPK %^D>pUYQ Q Corg/openqa/selenium/remote/internal/JsonToWebElementConverter.classPK lC>ŲEϽ4u&org/openqa/selenium/remote/internal/.svn/all-wcpropsPK lC>* 0*org/openqa/selenium/remote/internal/.svn/entriesPK lC>G/.org/openqa/selenium/remote/internal/.svn/formatPK lC> U /org/openqa/selenium/remote/internal/.svn/text-base/CircularOutputStream.java.svn-basePK lC>E ZL9org/openqa/selenium/remote/internal/.svn/text-base/JsonToWebElementConverter.java.svn-basePK lC>v@@NQDorg/openqa/selenium/remote/internal/.svn/text-base/OutputWatcher.java.svn-basePK lC>$$KHorg/openqa/selenium/remote/internal/.svn/text-base/SubProcess.java.svn-basePK lC> ZXorg/openqa/selenium/remote/internal/.svn/text-base/WebElementToJsonConverter.java.svn-basePK %^D>__?borg/openqa/selenium/support/events/WebDriverEventListener.classPK %^D>_&%%?forg/openqa/selenium/support/events/EventFiringWebDriver$1.classPK %^D> ~~?morg/openqa/selenium/support/events/EventFiringWebDriver$2.classPK %^D>`Storg/openqa/selenium/support/events/EventFiringWebDriver$EventFiringNavigation.classPK %^D>Yۭ P=~org/openqa/selenium/support/events/EventFiringWebDriver$EventFiringOptions.classPK %^D>alU [Xorg/openqa/selenium/support/events/EventFiringWebDriver$EventFiringRenderedWebElement.classPK %^D>,˛VSorg/openqa/selenium/support/events/EventFiringWebDriver$EventFiringTargetLocator.classPK %^D>cm!Qborg/openqa/selenium/support/events/EventFiringWebDriver$EventFiringTimeouts.classPK %^D>ִUɡorg/openqa/selenium/support/events/EventFiringWebDriver$EventFiringWebElement$1.classPK %^D>c>?CCS9org/openqa/selenium/support/events/EventFiringWebDriver$EventFiringWebElement.classPK %^D>r}5,5,=org/openqa/selenium/support/events/EventFiringWebDriver.classPK %^D> Y:U8 8 G}org/openqa/selenium/support/events/AbstractWebDriverEventListener.classPK lC>6't3org/openqa/selenium/support/events/.svn/all-wcpropsPK lC>p~~/org/openqa/selenium/support/events/.svn/entriesPK lC>G.Lorg/openqa/selenium/support/events/.svn/formatPK lC>V: : ^org/openqa/selenium/support/events/.svn/text-base/AbstractWebDriverEventListener.java.svn-basePK lC>\1DDTP org/openqa/selenium/support/events/.svn/text-base/EventFiringWebDriver.java.svn-basePK lC>Î)yyVjQorg/openqa/selenium/support/events/.svn/text-base/WebDriverEventListener.java.svn-basePK lC>RY!EWcorg/openqa/selenium/support/events/.svn/text-base/build.desc.svn-basePK )hC>RY!-dorg/openqa/selenium/support/events/build.descPK lC>ERRe.svn/all-wcpropsPK lC>gD 7f.svn/entriesPK lC>G pg.svn/formatPK %^D>Jgorg/openqa/selenium/support/pagefactory/DefaultElementLocatorFactory.classPK %^D>g::Skorg/openqa/selenium/support/pagefactory/AjaxElementLocator$NoSuchElementError.classPK %^D>"7ME E SXoorg/openqa/selenium/support/pagefactory/AjaxElementLocator$SlowLoadingElement.classPK %^D>"+ @yorg/openqa/selenium/support/pagefactory/AjaxElementLocator.classPK %^D>w99org/openqa/selenium/support/pagefactory/Annotations.classPK %^D>Q<9org/openqa/selenium/support/pagefactory/FieldDecorator.classPK %^D>S__Corg/openqa/selenium/support/pagefactory/DefaultElementLocator.classPK %^D>fY 7Borg/openqa/selenium/support/pagefactory/ByChained.classPK %^D>_ZC:org/openqa/selenium/support/pagefactory/DefaultFieldDecorator.classPK %^D> ,Gworg/openqa/selenium/support/pagefactory/AjaxElementLocatorFactory.classPK %^D>Corg/openqa/selenium/support/pagefactory/ElementLocatorFactory.classPK %^D>8<+org/openqa/selenium/support/pagefactory/ElementLocator.classPK lC>m**8Uorg/openqa/selenium/support/pagefactory/.svn/all-wcpropsPK lC>#\K4org/openqa/selenium/support/pagefactory/.svn/entriesPK lC>G3org/openqa/selenium/support/pagefactory/.svn/formatPK lC>j tqqWCorg/openqa/selenium/support/pagefactory/.svn/text-base/AjaxElementLocator.java.svn-basePK lC>eX^)org/openqa/selenium/support/pagefactory/.svn/text-base/AjaxElementLocatorFactory.java.svn-basePK lC>~  P+org/openqa/selenium/support/pagefactory/.svn/text-base/Annotations.java.svn-basePK lC>B}  Norg/openqa/selenium/support/pagefactory/.svn/text-base/ByChained.java.svn-basePK lC>M)ZAorg/openqa/selenium/support/pagefactory/.svn/text-base/DefaultElementLocator.java.svn-basePK lC>lK%%aorg/openqa/selenium/support/pagefactory/.svn/text-base/DefaultElementLocatorFactory.java.svn-basePK lC> W4 ZAorg/openqa/selenium/support/pagefactory/.svn/text-base/DefaultFieldDecorator.java.svn-basePK lC>yneSorg/openqa/selenium/support/pagefactory/.svn/text-base/ElementLocator.java.svn-basePK lC>uԗ++ZB!org/openqa/selenium/support/pagefactory/.svn/text-base/ElementLocatorFactory.java.svn-basePK lC>8S%org/openqa/selenium/support/pagefactory/.svn/text-base/FieldDecorator.java.svn-basePK %^D>.='+org/openqa/selenium/internal/selenesedriver/FindElement.classPK %^D>| ?<4org/openqa/selenium/internal/selenesedriver/SwitchToFrame.classPK %^D>wUDc@org/openqa/selenium/internal/selenesedriver/SetElementSelected.classPK %^D>ކEEDHorg/openqa/selenium/internal/selenesedriver/IsElementDisplayed.classPK %^D>I<<aNorg/openqa/selenium/internal/selenesedriver/GetTagName.classPK %^D>"k?LUorg/openqa/selenium/internal/selenesedriver/SubmitElement.classPK %^D>3~T>~^org/openqa/selenium/internal/selenesedriver/ClearElement.classPK %^D>Ecorg/openqa/selenium/internal/selenesedriver/GetElementAttribute.classPK %^D>? korg/openqa/selenium/internal/selenesedriver/GetPageSource.classPK %^D>:Ю:porg/openqa/selenium/internal/selenesedriver/GetTitle.classPK %^D>...7torg/openqa/selenium/internal/selenesedriver/Close.classPK %^D>mA   :{org/openqa/selenium/internal/selenesedriver/SendKeys.classPK %^D>h$NNCorg/openqa/selenium/internal/selenesedriver/IsElementSelected.classPK %^D>Sj?org/openqa/selenium/internal/selenesedriver/ToggleElement.classPK %^D>8org/openqa/selenium/internal/selenesedriver/GetUrl.classPK %^D>gX@@Borg/openqa/selenium/internal/selenesedriver/IsElementEnabled.classPK %^D> %m m >Rorg/openqa/selenium/internal/selenesedriver/FindElements.classPK %^D>[lXXForg/openqa/selenium/internal/selenesedriver/ExecuteAsyncScript$1.classPK %^D>`eD׵org/openqa/selenium/internal/selenesedriver/ExecuteAsyncScript.classPK %^D>  ?org/openqa/selenium/internal/selenesedriver/ExecuteScript.classPK %^D>HZTIorg/openqa/selenium/internal/selenesedriver/AbstractElementFinder$ImplicitWait.classPK %^D>#CCGorg/openqa/selenium/internal/selenesedriver/AbstractElementFinder.classPK %^D>`ԎBzorg/openqa/selenium/internal/selenesedriver/SeleneseFunction.classPK %^D>|9?horg/openqa/selenium/internal/selenesedriver/GetCurrentUrl.classPK %^D>DǘȆ>morg/openqa/selenium/internal/selenesedriver/QuitSelenium.classPK %^D>@Oorg/openqa/selenium/internal/selenesedriver/GetElementText.classPK %^D>e__Aorg/openqa/selenium/internal/selenesedriver/ElementFunction.classPK %^D>䧵>i org/openqa/selenium/internal/selenesedriver/ClickElement.classPK %^D>Az org/openqa/selenium/internal/selenesedriver/GetElementValue.classPK %^D>EU`ʏ< org/openqa/selenium/internal/selenesedriver/NewSession.classPK lC>{:i((< org/openqa/selenium/internal/selenesedriver/.svn/all-wcpropsPK lC>8F, org/openqa/selenium/internal/selenesedriver/.svn/entriesPK lC>G7= org/openqa/selenium/internal/selenesedriver/.svn/formatPK lC>   ^= org/openqa/selenium/internal/selenesedriver/.svn/text-base/AbstractElementFinder.java.svn-basePK lC>UnK org/openqa/selenium/internal/selenesedriver/.svn/text-base/ClearElement.java.svn-basePK lC>2ǩUO org/openqa/selenium/internal/selenesedriver/.svn/text-base/ClickElement.java.svn-basePK lC>0܎"NS org/openqa/selenium/internal/selenesedriver/.svn/text-base/Close.java.svn-basePK lC>2XY org/openqa/selenium/internal/selenesedriver/.svn/text-base/ElementFunction.java.svn-basePK lC> [-_ org/openqa/selenium/internal/selenesedriver/.svn/text-base/ExecuteAsyncScript.java.svn-basePK lC>kd. . V-k org/openqa/selenium/internal/selenesedriver/.svn/text-base/ExecuteScript.java.svn-basePK lC>v  Tt org/openqa/selenium/internal/selenesedriver/.svn/text-base/FindElement.java.svn-basePK lC>L&CCUM{ org/openqa/selenium/internal/selenesedriver/.svn/text-base/FindElements.java.svn-basePK lC>UV org/openqa/selenium/internal/selenesedriver/.svn/text-base/GetCurrentUrl.java.svn-basePK lC>t\ org/openqa/selenium/internal/selenesedriver/.svn/text-base/GetElementAttribute.java.svn-basePK lC>XW org/openqa/selenium/internal/selenesedriver/.svn/text-base/GetElementText.java.svn-basePK lC>UX org/openqa/selenium/internal/selenesedriver/.svn/text-base/GetElementValue.java.svn-basePK lC>yVV org/openqa/selenium/internal/selenesedriver/.svn/text-base/GetPageSource.java.svn-basePK lC>S org/openqa/selenium/internal/selenesedriver/.svn/text-base/GetTagName.java.svn-basePK lC>.F=,QO org/openqa/selenium/internal/selenesedriver/.svn/text-base/GetTitle.java.svn-basePK lC>OS org/openqa/selenium/internal/selenesedriver/.svn/text-base/GetUrl.java.svn-basePK lC>[| org/openqa/selenium/internal/selenesedriver/.svn/text-base/IsElementDisplayed.java.svn-basePK lC>YĪ org/openqa/selenium/internal/selenesedriver/.svn/text-base/IsElementEnabled.java.svn-basePK lC>N1Z org/openqa/selenium/internal/selenesedriver/.svn/text-base/IsElementSelected.java.svn-basePK lC>[[S* org/openqa/selenium/internal/selenesedriver/.svn/text-base/NewSession.java.svn-basePK lC>U org/openqa/selenium/internal/selenesedriver/.svn/text-base/QuitSelenium.java.svn-basePK lC>;(MMY org/openqa/selenium/internal/selenesedriver/.svn/text-base/SeleneseFunction.java.svn-basePK lC>   Q org/openqa/selenium/internal/selenesedriver/.svn/text-base/SendKeys.java.svn-basePK lC>08m[O org/openqa/selenium/internal/selenesedriver/.svn/text-base/SetElementSelected.java.svn-basePK lC>ˑibbV org/openqa/selenium/internal/selenesedriver/.svn/text-base/SubmitElement.java.svn-basePK lC>-V org/openqa/selenium/internal/selenesedriver/.svn/text-base/SwitchToFrame.java.svn-basePK lC>{w77V org/openqa/selenium/internal/selenesedriver/.svn/text-base/ToggleElement.java.svn-basePK lC>,  N org/openqa/selenium/internal/selenesedriver/.svn/text-base/build.desc.svn-basePK (hC>,  6 org/openqa/selenium/internal/selenesedriver/build.descPK %^D>yp 9w org/openqa/selenium/remote/SimplePropertyDescriptor.classPK %^D>XX2 org/openqa/selenium/remote/AugmenterProvider.classPK %^D>l))4 org/openqa/selenium/remote/JsonToBeanConverter.classPK %^D>%1%!org/openqa/selenium/remote/RemoteWebElement.classPK %^D>bGG.D!org/openqa/selenium/remote/DriverCommand.classPK %^D>v HHAfX!org/openqa/selenium/remote/CapabilityType$ForSeleniumServer.classPK %^D>/ [!org/openqa/selenium/remote/CapabilityType.classPK %^D>4  /Z_!org/openqa/selenium/remote/AddRotatable$1.classPK %^D>sSS-f!org/openqa/selenium/remote/AddRotatable.classPK %^D>A ++8Pj!org/openqa/selenium/remote/InterfaceImplementation.classPK %^D>,9  *k!org/openqa/selenium/remote/SessionId.classPK %^D> 04%o!org/openqa/selenium/remote/ScreenshotException.classPK %^D>?UU4r!org/openqa/selenium/remote/BeanToJsonConverter.classPK %^D>1 :9!org/openqa/selenium/remote/Augmenter$CompoundHandler.classPK %^D>*m!org/openqa/selenium/remote/Augmenter.classPK %^D>$ˢC!org/openqa/selenium/remote/ErrorHandler$FrameInfoToStackFrame.classPK %^D>!D!org/openqa/selenium/remote/ErrorHandler$UnknownServerException.classPK %^D>.C)-!org/openqa/selenium/remote/ErrorHandler.classPK %^D>~n ;h!org/openqa/selenium/remote/ReusingSocketSocketFactory.classPK %^D>.!org/openqa/selenium/remote/ExecuteMethod.classPK %^D>] +!org/openqa/selenium/remote/ErrorCodes.classPK %^D>M^aa/(!org/openqa/selenium/remote/PropertyMunger.classPK %^D>"H<!org/openqa/selenium/remote/RemoteWebDriver$RemoteAlert.classPK %^D>VT? "org/openqa/selenium/remote/RemoteWebDriver$RemoteKeyboard.classPK %^D>u u < "org/openqa/selenium/remote/RemoteWebDriver$RemoteMouse.classPK %^D>A"org/openqa/selenium/remote/RemoteWebDriver$RemoteNavigation.classPK %^D> {  DX!"org/openqa/selenium/remote/RemoteWebDriver$RemoteTargetLocator.classPK %^D>K/?-"org/openqa/selenium/remote/RemoteWebDriver$RemoteTimeouts.classPK %^D>G;4"org/openqa/selenium/remote/RemoteWebDriver$RemoteWebDriverOptions.classPK %^D>]}==0~H"org/openqa/selenium/remote/RemoteWebDriver.classPK %^D>V @ޅ"org/openqa/selenium/remote/HttpCommandExecutor$CommandInfo.classPK %^D>;LT  G"org/openqa/selenium/remote/HttpCommandExecutor$EntityWithEncoding.classPK %^D>ֲ:1?Y"org/openqa/selenium/remote/HttpCommandExecutor$HttpVerb$1.classPK %^D>c?:"org/openqa/selenium/remote/HttpCommandExecutor$HttpVerb$2.classPK %^D>Yi?"org/openqa/selenium/remote/HttpCommandExecutor$HttpVerb$3.classPK %^D>}˅="org/openqa/selenium/remote/HttpCommandExecutor$HttpVerb.classPK %^D>vwCC4T"org/openqa/selenium/remote/HttpCommandExecutor.classPK %^D>|0s"org/openqa/selenium/remote/CommandExecutor.classPK %^D>C5"org/openqa/selenium/remote/AddTakesScreenshot$1.classPK %^D>n3"org/openqa/selenium/remote/AddTakesScreenshot.classPK %^D>>w"")"org/openqa/selenium/remote/Response.classPK %^D>b47#org/openqa/selenium/remote/DesiredCapabilities.classPK %^D>(,#org/openqa/selenium/remote/Command.classPK %^D>5x#org/openqa/selenium/remote/AddFindsChildByCss$1.classPK %^D>wv3(#org/openqa/selenium/remote/AddFindsChildByCss.classPK %^D>" FNN0,#org/openqa/selenium/remote/AddFindsByCss$1.classPK %^D>=kp|.T5#org/openqa/selenium/remote/AddFindsByCss.classPK %^D>F.-9#org/openqa/selenium/remote/JsonException.classPK %^D>pQKK;.;#org/openqa/selenium/remote/RenderedRemoteWebElement$1.classPK %^D>_-9@#org/openqa/selenium/remote/RenderedRemoteWebElement.classPK lC><+P#org/openqa/selenium/remote/.svn/all-wcpropsPK lC>4='b#org/openqa/selenium/remote/.svn/entriesPK lC>G&t#org/openqa/selenium/remote/.svn/formatPK lC>h ""Rt#org/openqa/selenium/remote/.svn/prop-base/ReusingSocketSocketFactory.java.svn-basePK lC>̯Ezu#org/openqa/selenium/remote/.svn/text-base/AddFindsByCss.java.svn-basePK lC>BJ|#org/openqa/selenium/remote/.svn/text-base/AddFindsChildByCss.java.svn-basePK lC>~UD#org/openqa/selenium/remote/.svn/text-base/AddRotatable.java.svn-basePK lC>œUJE#org/openqa/selenium/remote/.svn/text-base/AddTakesScreenshot.java.svn-basePK lC>; ""A#org/openqa/selenium/remote/.svn/text-base/Augmenter.java.svn-basePK lC>uI#org/openqa/selenium/remote/.svn/text-base/AugmenterProvider.java.svn-basePK lC>sJ__K#org/openqa/selenium/remote/.svn/text-base/BeanToJsonConverter.java.svn-basePK lC>JF#org/openqa/selenium/remote/.svn/text-base/CapabilityType.java.svn-basePK lC>)a  ?#org/openqa/selenium/remote/.svn/text-base/Command.java.svn-basePK lC>|GM#org/openqa/selenium/remote/.svn/text-base/CommandExecutor.java.svn-basePK lC>u`K#org/openqa/selenium/remote/.svn/text-base/DesiredCapabilities.java.svn-basePK lC>U)llE1$org/openqa/selenium/remote/.svn/text-base/DriverCommand.java.svn-basePK lC>aճ1B$org/openqa/selenium/remote/.svn/text-base/ErrorCodes.java.svn-basePK lC>AśD($org/openqa/selenium/remote/.svn/text-base/ErrorHandler.java.svn-basePK lC>U"y\\EH$org/openqa/selenium/remote/.svn/text-base/ExecuteMethod.java.svn-basePK lC> jLjLKO$org/openqa/selenium/remote/.svn/text-base/HttpCommandExecutor.java.svn-basePK lC>'%FFO\$org/openqa/selenium/remote/.svn/text-base/InterfaceImplementation.java.svn-basePK lC>fDDE$org/openqa/selenium/remote/.svn/text-base/JsonException.java.svn-basePK lC>ΤR''K$org/openqa/selenium/remote/.svn/text-base/JsonToBeanConverter.java.svn-basePK lC>*F$org/openqa/selenium/remote/.svn/text-base/PropertyMunger.java.svn-basePK lC>(&P&PG$org/openqa/selenium/remote/.svn/text-base/RemoteWebDriver.java.svn-basePK lC>!"GkkH%%org/openqa/selenium/remote/.svn/text-base/RemoteWebElement.java.svn-basePK lC>_PrA%org/openqa/selenium/remote/.svn/text-base/RenderedRemoteWebElement.java.svn-basePK lC>@'m}pp@P%org/openqa/selenium/remote/.svn/text-base/Response.java.svn-basePK lC>¶CCRjV%org/openqa/selenium/remote/.svn/text-base/ReusingSocketSocketFactory.java.svn-basePK lC>8F~~Kj%org/openqa/selenium/remote/.svn/text-base/ScreenshotException.java.svn-basePK lC>u""Ao%org/openqa/selenium/remote/.svn/text-base/SessionId.java.svn-basePK lC>m8~ ~ Ps%org/openqa/selenium/remote/.svn/text-base/SimplePropertyDescriptor.java.svn-basePK lC>@=q%org/openqa/selenium/remote/.svn/text-base/build.desc.svn-basePK (hC>@%%org/openqa/selenium/remote/build.descPK %^D>2rr67%org/openqa/selenium/net/NetworkInterfaceProvider.classPK %^D>*%org/openqa/selenium/net/NetworkUtils.classPK %^D> tq .ܧ%org/openqa/selenium/net/NetworkInterface.classPK %^D>$wu"%org/openqa/selenium/net/Urls.classPK %^D>axz =%org/openqa/selenium/net/DefaultNetworkInterfaceProvider.classPK %^D>*O%org/openqa/selenium/net/PortProber$1.classPK %^D>̳%( ( (|%org/openqa/selenium/net/PortProber.classPK %^D>@_FF)%org/openqa/selenium/net/INetAddress.classPK lC>)(w%org/openqa/selenium/net/.svn/all-wcpropsPK lC>9VAC$%org/openqa/selenium/net/.svn/entriesPK lC>G#%org/openqa/selenium/net/.svn/formatPK lC>h ""T%org/openqa/selenium/net/.svn/prop-base/DefaultNetworkInterfaceProvider.java.svn-basePK lC>h ""@%org/openqa/selenium/net/.svn/prop-base/INetAddress.java.svn-basePK lC>h ""E%org/openqa/selenium/net/.svn/prop-base/NetworkInterface.java.svn-basePK lC>h ""M%org/openqa/selenium/net/.svn/prop-base/NetworkInterfaceProvider.java.svn-basePK lC>h ""A%%org/openqa/selenium/net/.svn/prop-base/NetworkUtils.java.svn-basePK lC>ڢ???%org/openqa/selenium/net/.svn/prop-base/PortProber.java.svn-basePK lC>G TB%org/openqa/selenium/net/.svn/text-base/DefaultNetworkInterfaceProvider.java.svn-basePK lC>@%org/openqa/selenium/net/.svn/text-base/INetAddress.java.svn-basePK lC> %k  E%org/openqa/selenium/net/.svn/text-base/NetworkInterface.java.svn-basePK lC>`/-kkM &org/openqa/selenium/net/.svn/text-base/NetworkInterfaceProvider.java.svn-basePK lC>&ڳA&org/openqa/selenium/net/.svn/text-base/NetworkUtils.java.svn-basePK lC>R ?+&org/openqa/selenium/net/.svn/text-base/PortProber.java.svn-basePK lC>97&org/openqa/selenium/net/.svn/text-base/Urls.java.svn-basePK lC>n:=&org/openqa/selenium/net/.svn/text-base/build.desc.svn-basePK (hC>n">&org/openqa/selenium/net/build.descPK %^D>ѱ@@/?&org/openqa/selenium/android/AndroidDriver.classPK lC>7aj,xN&org/openqa/selenium/android/.svn/all-wcpropsPK lC>LdG'R&org/openqa/selenium/android/.svn/formatPK lC>u$ FR&org/openqa/selenium/android/.svn/text-base/AndroidDriver.java.svn-basePK lC>p#>*`&org/openqa/selenium/android/.svn/text-base/build.desc.svn-basePK (hC>p#&a&org/openqa/selenium/android/build.descPK %^D>*a&org/openqa/selenium/lift/TestContext.classPK %^D>YUC C (Cf&org/openqa/selenium/lift/Finders$1.classPK %^D>oh &o&org/openqa/selenium/lift/Finders.classPK %^D>!5{&org/openqa/selenium/lift/WebDriverTestContext$1.classPK %^D>Tqq5&org/openqa/selenium/lift/WebDriverTestContext$2.classPK %^D>03&org/openqa/selenium/lift/WebDriverTestContext.classPK %^D>zz8&org/openqa/selenium/lift/HamcrestWebDriverTestCase.classPK %^D>DՈϨ'&org/openqa/selenium/lift/Matchers.classPK lC>)l&org/openqa/selenium/lift/.svn/all-wcpropsPK lC>rr%&org/openqa/selenium/lift/.svn/entriesPK lC>G$5&org/openqa/selenium/lift/.svn/formatPK lC>%W=y&org/openqa/selenium/lift/.svn/text-base/Finders.java.svn-basePK lC>[O&org/openqa/selenium/lift/.svn/text-base/HamcrestWebDriverTestCase.java.svn-basePK lC>St>&org/openqa/selenium/lift/.svn/text-base/Matchers.java.svn-basePK lC>DA<&org/openqa/selenium/lift/.svn/text-base/TestContext.java.svn-basePK lC>0?qTTJ\&org/openqa/selenium/lift/.svn/text-base/WebDriverTestContext.java.svn-basePK lC>GL}11;'org/openqa/selenium/lift/.svn/text-base/build.desc.svn-basePK (hC>GL}11#'org/openqa/selenium/lift/build.descPK %^D>bɠH""2'org/openqa/selenium/io/TemporaryFilesystem$1.classPK %^D>+ 0'org/openqa/selenium/io/TemporaryFilesystem.classPK %^D> 9 'org/openqa/selenium/io/FileHandler$FileSuffixFilter.classPK %^D>O/$'org/openqa/selenium/io/FileHandler$Filter.classPK %^D>F'ľ1%'org/openqa/selenium/io/FileHandler$NoFilter.classPK %^D>q()'org/openqa/selenium/io/FileHandler.classPK %^D>ry$-I'org/openqa/selenium/io/Cleanly.classPK %^D>:$N'org/openqa/selenium/io/IOUtils.classPK %^D> ;R'org/openqa/selenium/io/Zip.classPK lC>'e'org/openqa/selenium/io/.svn/all-wcpropsPK lC>sdcPP#h'org/openqa/selenium/io/.svn/entriesPK lC>G"m'org/openqa/selenium/io/.svn/formatPK lC>H33;m'org/openqa/selenium/io/.svn/prop-base/IOUtils.java.svn-basePK lC>u;Oo'org/openqa/selenium/io/.svn/text-base/Cleanly.java.svn-basePK lC>?7?v'org/openqa/selenium/io/.svn/text-base/FileHandler.java.svn-basePK lC>R;'org/openqa/selenium/io/.svn/text-base/IOUtils.java.svn-basePK lC>rXE  G'org/openqa/selenium/io/.svn/text-base/TemporaryFilesystem.java.svn-basePK lC>XQU7o'org/openqa/selenium/io/.svn/text-base/Zip.java.svn-basePK lC>ɳ"9h'org/openqa/selenium/io/.svn/text-base/build.desc.svn-basePK )hC>ɳ"!q'org/openqa/selenium/io/build.descPK %^D>gqB4b'org/openqa/selenium/ie/InternetExplorerElement.classPK %^D>cp5'org/openqa/selenium/ie/InternetExplorerKeyboard.classPK %^D>--5'org/openqa/selenium/ie/InternetExplorerDriver$1.classPK %^D>,L85'org/openqa/selenium/ie/InternetExplorerDriver$2.classPK %^D>Yb<)'org/openqa/selenium/ie/InternetExplorerDriver$IEServer.classPK %^D>>3'org/openqa/selenium/ie/InternetExplorerDriver.classPK lC>]g'v'org/openqa/selenium/ie/.svn/all-wcpropsPK lC>)Ǘ5``#'org/openqa/selenium/ie/.svn/entriesPK lC>G"-'org/openqa/selenium/ie/.svn/formatPK lC>Mh4Jo'org/openqa/selenium/ie/.svn/text-base/InternetExplorerDriver.java.svn-basePK lC>泀XddK (org/openqa/selenium/ie/.svn/text-base/InternetExplorerElement.java.svn-basePK lC>v~~L(org/openqa/selenium/ie/.svn/text-base/InternetExplorerKeyboard.java.svn-basePK lC>\t  9z(org/openqa/selenium/ie/.svn/text-base/build.desc.svn-basePK (hC>\t  !(org/openqa/selenium/ie/build.descPK %^D>~Un65""(org/openqa/selenium/htmlunit/InputKeysContainer.classPK %^D>‚H<*(org/openqa/selenium/htmlunit/AsyncScriptExecutor$AsyncScriptResult.classPK %^D>~Pͦ6$3(org/openqa/selenium/htmlunit/AsyncScriptExecutor.classPK %^D>y9C(org/openqa/selenium/htmlunit/KeyboardModifiersState.classPK %^D>JFF0I(org/openqa/selenium/htmlunit/HtmlUnitMouse.classPK %^D>>23(\(org/openqa/selenium/htmlunit/HtmlUnitKeyboard.classPK %^D> ILL7o(org/openqa/selenium/htmlunit/HtmlUnitWebElement$1.classPK %^D>FF74t(org/openqa/selenium/htmlunit/HtmlUnitWebElement$2.classPK %^D>Ϫ6Mbb5y(org/openqa/selenium/htmlunit/HtmlUnitWebElement.classPK %^D>Ff3(org/openqa/selenium/htmlunit/HtmlUnitDriver$1.classPK %^D>v`]3(org/openqa/selenium/htmlunit/HtmlUnitDriver$2.classPK %^D>ۦ3n(org/openqa/selenium/htmlunit/HtmlUnitDriver$3.classPK %^D>Q,wpp3(org/openqa/selenium/htmlunit/HtmlUnitDriver$4.classPK %^D>ђX%%D(org/openqa/selenium/htmlunit/HtmlUnitDriver$HtmlUnitNavigation.classPK %^D>A (org/openqa/selenium/htmlunit/HtmlUnitDriver$HtmlUnitOptions.classPK %^D>oGH)org/openqa/selenium/htmlunit/HtmlUnitDriver$HtmlUnitTargetLocator.classPK %^D>O$$B2)org/openqa/selenium/htmlunit/HtmlUnitDriver$HtmlUnitTimeouts.classPK %^D>,UUM+8)org/openqa/selenium/htmlunit/HtmlUnitDriver$JavaScriptResultsCollection.classPK %^D>c}fmm19)org/openqa/selenium/htmlunit/HtmlUnitDriver.classPK lC>y?AA-)org/openqa/selenium/htmlunit/.svn/all-wcpropsPK lC>#l))org/openqa/selenium/htmlunit/.svn/entriesPK lC>G()org/openqa/selenium/htmlunit/.svn/formatPK lC> *[22Mѳ)org/openqa/selenium/htmlunit/.svn/text-base/AsyncScriptExecutor.java.svn-basePK lC>aHn)org/openqa/selenium/htmlunit/.svn/text-base/HtmlUnitDriver.java.svn-basePK lC>F駌Jk*org/openqa/selenium/htmlunit/.svn/text-base/HtmlUnitKeyboard.java.svn-basePK lC>xG{*org/openqa/selenium/htmlunit/.svn/text-base/HtmlUnitMouse.java.svn-basePK lC>$iiL(*org/openqa/selenium/htmlunit/.svn/text-base/HtmlUnitWebElement.java.svn-basePK lC>yL*org/openqa/selenium/htmlunit/.svn/text-base/InputKeysContainer.java.svn-basePK lC>P+org/openqa/selenium/htmlunit/.svn/text-base/KeyboardModifiersState.java.svn-basePK lC>r^? +org/openqa/selenium/htmlunit/.svn/text-base/build.desc.svn-basePK (hC>r^' +org/openqa/selenium/htmlunit/build.descPK %^D>! ŋ% +org/openqa/selenium/support/How.classPK %^D>3,+org/openqa/selenium/support/ByIdOrName.classPK %^D> -+org/openqa/selenium/support/PageFactory.classPK %^D>M.  (*+org/openqa/selenium/support/FindBy.classPK %^D>H{$-).+org/openqa/selenium/support/CacheLookup.classPK %^D>߄)0+org/openqa/selenium/support/FindBys.classPK lC>>I.., 2+org/openqa/selenium/support/.svn/all-wcpropsPK lC>S9(6+org/openqa/selenium/support/.svn/entriesPK lC>G';+org/openqa/selenium/support/.svn/formatPK lC>JC<+org/openqa/selenium/support/.svn/text-base/ByIdOrName.java.svn-basePK lC>''DC+org/openqa/selenium/support/.svn/text-base/CacheLookup.java.svn-basePK lC>Cs?H+org/openqa/selenium/support/.svn/text-base/FindBy.java.svn-basePK lC>o@dP+org/openqa/selenium/support/.svn/text-base/FindBys.java.svn-basePK lC>dNM<U+org/openqa/selenium/support/.svn/text-base/How.java.svn-basePK lC>HfDY+org/openqa/selenium/support/.svn/text-base/PageFactory.java.svn-basePK lC>{77>p+org/openqa/selenium/support/.svn/text-base/build.desc.svn-basePK )hC>{77&s+org/openqa/selenium/support/build.descPK %^D>  Bu+org/openqa/selenium/support/events/internal/EventFiringMouse.classPK %^D>CEEE}+org/openqa/selenium/support/events/internal/EventFiringKeyboard.classPK lC>*HP<+org/openqa/selenium/support/events/internal/.svn/all-wcpropsPK lC>2fSS8݄+org/openqa/selenium/support/events/internal/.svn/entriesPK lC>G7+org/openqa/selenium/support/events/internal/.svn/formatPK lC>Z\݇+org/openqa/selenium/support/events/internal/.svn/text-base/EventFiringKeyboard.java.svn-basePK lC>ȩlYS+org/openqa/selenium/support/events/internal/.svn/text-base/EventFiringMouse.java.svn-basePK &^D> 82i+com/thoughtworks/selenium/condition/Presence.classPK &^D>S,J.+com/thoughtworks/selenium/condition/Text.classPK &^D> L+com/thoughtworks/selenium/condition/DefaultConditionRunner$ContextImpl.classPK &^D>2֙M+com/thoughtworks/selenium/condition/DefaultConditionRunner$Log4jMonitor.classPK &^D>MgPHl+com/thoughtworks/selenium/condition/DefaultConditionRunner$Monitor.classPK &^D>SܝL+com/thoughtworks/selenium/condition/DefaultConditionRunner$NoOpMonitor.classPK &^D>M<;@+com/thoughtworks/selenium/condition/DefaultConditionRunner.classPK &^D>~~A+com/thoughtworks/selenium/condition/ConditionRunner$Context.classPK &^D>Et69+com/thoughtworks/selenium/condition/ConditionRunner.classPK &^D>$3+com/thoughtworks/selenium/condition/Condition.classPK &^D>/pp-+com/thoughtworks/selenium/condition/Not.classPK &^D>QY >+com/thoughtworks/selenium/condition/JUnitConditionRunner.classPK &^D>[KH+com/thoughtworks/selenium/condition/JUnit4AndTestNgConditionRunner.classPK lC>4+com/thoughtworks/selenium/condition/.svn/all-wcpropsPK lC>)rr69,com/thoughtworks/selenium/condition/.svn/dir-prop-basePK lC>VJ0,com/thoughtworks/selenium/condition/.svn/entriesPK lC>G/ ,com/thoughtworks/selenium/condition/.svn/formatPK lC>.-J\ ,com/thoughtworks/selenium/condition/.svn/text-base/Condition.java.svn-basePK lC>fD~O O PP,com/thoughtworks/selenium/condition/.svn/text-base/ConditionRunner.java.svn-basePK lC>nfw$w$W ',com/thoughtworks/selenium/condition/.svn/text-base/DefaultConditionRunner.java.svn-basePK lC>_K,com/thoughtworks/selenium/condition/.svn/text-base/JUnit4AndTestNgConditionRunner.java.svn-basePK lC>ڗ2U$U,com/thoughtworks/selenium/condition/.svn/text-base/JUnitConditionRunner.java.svn-basePK lC>tкD],com/thoughtworks/selenium/condition/.svn/text-base/Not.java.svn-basePK lC>%bbIb,com/thoughtworks/selenium/condition/.svn/text-base/Presence.java.svn-basePK lC>,Ekg,com/thoughtworks/selenium/condition/.svn/text-base/Text.java.svn-basePK lC>Fn,com/thoughtworks/selenium/condition/.svn/text-base/build.desc.svn-basePK )hC>.o,com/thoughtworks/selenium/condition/build.descPKp,