There is some page, which contains:
<input type="input" id='input_value' ...>
<button id='btn_find' ... >
<input type="checkbox" name="chbox1" ...">
For each string from memo1, I want:
put the string in input_value,
click on btn_find,
wait several seconds (until completed page loading or 3 seconds)
if string exist, the chbox1 appears we must click on it
if string doesn't exist, the chbox1 invisible we must in memo2 lines add string; I use TEdgeBrowser
for i := 0 to memo1.lines.Count - 1 do begin js:='document.getElementById("input_value").value="'+memo1.lines[i]+'"'; EdgeBrowser1.ExecuteScript(js); EdgeBrowser1.ExecuteScript('document.getElementById("btn_find").click()'); Delay(3000); // here I must check if the chbox1 visible if {chbox1 visible} then EdgeBrowser1.ExecuteScript('document.getElementsByName("chbox1")[0].click()') else memo2.lines.add(memo1.lines[i]); end;