added function for sending data with js and double checking that it got input
This commit is contained in:
@@ -16,6 +16,25 @@ JS_TryToExecute(JsToExecute,NumberofAttempts := 1,SleepLength:=1000){
|
||||
|
||||
|
||||
|
||||
js_SendAndCheckWithQuerySelector(Selector,ValueToCheck:="value",SleepLength:=1000,JSStringText:="TEXT"){
|
||||
js = document.querySelector("%Selector%").value = "%JSStringText%";
|
||||
try driver.executeScript(js)
|
||||
|
||||
sleep, %SleepLength%
|
||||
|
||||
js = return document.querySelector("#title").value;
|
||||
try, status := driver.executeScript(js)
|
||||
|
||||
; DevModeMsgBox(status)
|
||||
|
||||
if(Status = "")
|
||||
return "Failed"
|
||||
else,
|
||||
return ""
|
||||
|
||||
}
|
||||
|
||||
|
||||
; ValueToCheckOptions = innertext,textContent,InnerHTML,outerHTML,value,href,option value
|
||||
js_SendAndCheckWithClassName(ClassName:="",ClassIndexNum:=0,ValueToCheck:="textContent",SleepLength:=1000,JSStringText:="TEXT"){
|
||||
jsSend = document.getElementsByClassName('%ClassName%')[%ClassIndexNum%].value = "%JSStringText%";
|
||||
|
||||
Reference in New Issue
Block a user