1# JS API Changes of the Testing Framework Subsystem 2 3The table below lists the APIs changes of the testing framework subsystem in OpenHarmony 3.1 Release over OpenHarmony 3.0 LTS. 4 5## API Changes 6 7| Module| Class| Method/Attribute/Enumeration/Constant| Change Type| 8|---|---|---|---| 9| ohos.uitest | UiDriver | screenCap(savePath:string):Promise\<bool>; | Added| 10| ohos.uitest | UiDriver | swipe(startx:number,starty:number,endx:number,endy:number):Promise\<void>; | Added| 11| ohos.uitest | UiDriver | longClick(x:number,y:number):Promise\<void>; | Added| 12| ohos.uitest | UiDriver | doubleClick(x:number,y:number):Promise\<void>; | Added| 13| ohos.uitest | UiDriver | click(x:number,y:number):Promise\<void>; | Added| 14| ohos.uitest | UiDriver | triggerKey(keyCode:number):Promise\<void>; | Added| 15| ohos.uitest | UiDriver | pressBack():Promise\<void>; | Added| 16| ohos.uitest | UiDriver | assertComponentExist(by:By):Promise\<void>; | Added| 17| ohos.uitest | UiDriver | findComponents(by:By):Promise\<Array\<UiComponent>>; | Added| 18| ohos.uitest | UiDriver | findComponent(by:By):Promise\<UiComponent>; | Added| 19| ohos.uitest | UiDriver | delayMs(duration:number):Promise\<void>; | Added| 20| ohos.uitest | UiDriver | static create():UiDriver; | Added| 21| ohos.uitest | UiComponent | scrollSearch(by:By):Promise\<UiComponent>; | Added| 22| ohos.uitest | UiComponent | inputText(text: string):Promise\<void>; | Added| 23| ohos.uitest | UiComponent | isSelected():Promise\<bool>; | Added| 24| ohos.uitest | UiComponent | isFocused():Promise\<bool>; | Added| 25| ohos.uitest | UiComponent | isEnabled():Promise\<bool>; | Added| 26| ohos.uitest | UiComponent | isScrollable():Promise\<bool>; | Added| 27| ohos.uitest | UiComponent | isClickable():Promise\<bool>; | Added| 28| ohos.uitest | UiComponent | getType():Promise\<string>; | Added| 29| ohos.uitest | UiComponent | getText():Promise\<string>; | Added| 30| ohos.uitest | UiComponent | getKey():Promise\<string>; | Added| 31| ohos.uitest | UiComponent | getId():Promise\<number>; | Added| 32| ohos.uitest | UiComponent | longClick():Promise\<void>; | Added| 33| ohos.uitest | UiComponent | doubleClick():Promise\<void>; | Added| 34| ohos.uitest | UiComponent | click():Promise\<void>; | Added| 35| ohos.uitest | By | isAfter(by:By):By; | Added| 36| ohos.uitest | By | isBefore(by:By):By; | Added| 37| ohos.uitest | By | selected(b?:bool):By; | Added| 38| ohos.uitest | By | focused(b?:bool):By; | Added| 39| ohos.uitest | By | enabled(b?:bool):By; | Added| 40| ohos.uitest | By | scrollable(b?:bool):By; | Added| 41| ohos.uitest | By | clickable(b?:bool):By; | Added| 42| ohos.uitest | By | type(tp:string):By; | Added| 43| ohos.uitest | By | id(id:number):By; | Added| 44| ohos.uitest | By | key(key:string):By; | Added| 45| ohos.uitest | By | text(txt:string,pattern?:MatchPattern):By; | Added| 46| ohos.uitest | MatchPattern | ENDS_WITH = 3 | Added| 47| ohos.uitest | MatchPattern | STARTS_WITH = 2 | Added| 48| ohos.uitest | MatchPattern | CONTAINS = 1 | Added| 49| ohos.uitest | MatchPattern | EQUALS = 0 | Added| 50