File tree Expand file tree Collapse file tree 1 file changed +31
-0
lines changed Expand file tree Collapse file tree 1 file changed +31
-0
lines changed Original file line number Diff line number Diff line change @@ -923,6 +923,37 @@ Func _WDShutdown()
923
923
EndFunc
924
924
925
925
926
+ ; #FUNCTION# ====================================================================================================================
927
+ ; Name ..........: _WD_NewTab
928
+ ; Syntax ........: _WD_NewTab($sSession[, $lSwitch = True])
929
+ ; Parameters ....: $sSession - Session ID from _WDCreateSession
930
+ ; $lSwitch - [optional] Switch session context to new tab? Default is True.
931
+ ; Return values .: String representing handle of new tab
932
+ ; Author ........: Dan Pollak
933
+ ; Modified ......:
934
+ ; Remarks .......:
935
+ ; Related .......:
936
+ ; Link ..........:
937
+ ; Example .......: No
938
+ ; ===============================================================================================================================
939
+ Func _WD_NewTab($sSession , $lSwitch = True )
940
+ Local $sTabHandle = ' '
941
+
942
+ _WDExecuteScript($sSession , ' window.open()' , ' {}' )
943
+
944
+ If @error = $_WD_ERROR_Success Then
945
+ Local $aHandles = _WDWindow($sSession , ' handles' , ' ' )
946
+
947
+ $sTabHandle = $aHandles [UBound ($aHandles ) - 1 ]
948
+
949
+ If $lSwitch Then
950
+ _WDWindow($sSession , ' Switch' , ' {"handle":"' & $sTabHandle & ' "}' )
951
+ EndIf
952
+ EndIf
953
+
954
+ Return $sTabHandle
955
+ EndFunc
956
+
926
957
; #INTERNAL_USE_ONLY# ===========================================================================================================
927
958
; Name ..........: __WD_Get
928
959
; Description ...: Submit GET request to WD console app
You can’t perform that action at this time.
0 commit comments