<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<title type="html"><![CDATA[Серый форум &mdash; AHK: IE_com_checked]]></title>
	<link rel="self" href="https://forum.script-coding.com/extern.php?action=feed&amp;tid=14512&amp;type=atom" />
	<updated>2019-01-27T07:43:47Z</updated>
	<generator>PunBB</generator>
	<id>https://forum.script-coding.com/viewtopic.php?id=14512</id>
		<entry>
			<title type="html"><![CDATA[Re: AHK: IE_com_checked]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=131635#p131635" />
			<content type="html"><![CDATA[<p>Добрый день! Подскажите пож-та возможно ли заменить </p><div class="quotebox"><blockquote><p>ie.document.getElementsByTagName(&quot;input&quot;)[].click()</p></blockquote></div><p>&nbsp; &nbsp;</p><div class="quotebox"><blockquote><p>&lt;input type=&quot;checkbox&quot; data-bind=&quot;checked: isAccessible, value: ID, click:editItem&quot; value=&quot;16&quot;&gt;</p></blockquote></div><p>, т.к. click() не всегда срабатывает. </p><div class="quotebox"><blockquote><p>ie.document.getElementsByTagName(&quot;input&quot;)[].checked := false или true</p></blockquote></div><p>&nbsp; - при обновлении страницы возвращается в исходное состояние</p>]]></content>
			<author>
				<name><![CDATA[inseption86]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=38818</uri>
			</author>
			<updated>2019-01-27T07:43:47Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=131635#p131635</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: IE_com_checked]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=131623#p131623" />
			<content type="html"><![CDATA[<p>решил проблему </p><div class="codebox"><pre><code>if ie.document.getElementsByTagName(&quot;input&quot;)[].checked = -1 {
ie.document.getElementsByTagName(&quot;input&quot;)[].click()
}</code></pre></div>]]></content>
			<author>
				<name><![CDATA[inseption86]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=38818</uri>
			</author>
			<updated>2019-01-26T13:20:49Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=131623#p131623</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[AHK: IE_com_checked]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=131621#p131621" />
			<content type="html"><![CDATA[<p>Добрый день! Имеется скрипт, но проблема в том, что&nbsp; скрипт не определяет &quot;if document.getElementsByTagName(&quot;input&quot;)[].checked = true, скорее всего потому что. IE пишет &quot;Объект не поддерживает свойство или метод &quot;closest&quot;&quot;. Возможно ли это сделать через Silenium? (у меня получилось только залогиниться, MsgBox % driver.findElementsByName(&quot;li&quot;).item[1].Attribute(&quot;innerText&quot;) - ошибка ), либо этот как то допилить. Заранее спасибо!</p><div class="codebox"><pre><code>&lt;li data-bind=&quot;click: selectUser&quot; class=&quot;selectedUser&quot;&gt;&lt;span data-bind=&quot;text: SurName&quot;&gt;Смирнов&lt;/span&gt;&amp;nbsp;(&amp;nbsp;&lt;span data-bind=&quot;text: NTLogin&quot;&gt;smirnovaa&lt;/span&gt;&amp;nbsp;)&amp;nbsp;&lt;/li&gt;</code></pre></div><p> - document.getElementsByTagName(&quot;li&quot;)</p><div class="codebox"><pre><code>&lt;input type=&quot;checkbox&quot; data-bind=&quot;checked: isAccessible, value: ID, click:editItem&quot; value=&quot;16&quot;&gt;</code></pre></div><p> - document.getElementsByTagName(&quot;input&quot;)[11]</p><div class="codebox"><pre><code>#NoEnv  ; Recommended for performance and compatibility with future AutoHotkey releases.
SendMode Input  ; Recommended for new scripts due to its superior speed and reliability.
SetWorkingDir %A_ScriptDir%  ; Ensures a consistent starting directory.
#SingleInstance force 


URL := &quot;***&quot;
ie := ComObjCreate(&quot;{D5E8041D-920F-45e9-B8FB-B1DEB82C6E5E}&quot;)
ie.Visible := true
ie.Navigate(URL)

while (ie.busy || ie.readyState &lt;&gt; 4)
  sleep 100


loop % ie.document.getElementsByTagName(&quot;li&quot;).lenght
{
ie.document.getElementsByTagName(&quot;li&quot;)[A_index].click()

if ie.document.getElementsByTagName(&quot;input&quot;)[11].checked = true {
ie.document.getElementsByTagName(&quot;input&quot;)[11].checked := false
}

if ie.document.getElementsByTagName(&quot;input&quot;)[12].checked = true {
ie.document.getElementsByTagName(&quot;input&quot;)[12].checked := false
}

if ie.document.getElementsByTagName(&quot;input&quot;)[13].checked = true {
ie.document.getElementsByTagName(&quot;input&quot;)[13].checked := false
}

sleep 500
}


MsgBox, 4160, , Готово!
Process, close, iexplore.exe
ExitApp</code></pre></div><br /><div class="codebox"><pre><code>driver:= ComObjCreate(&quot;Selenium.CHROMEDriver&quot;) 
driver.Get(&quot;*****&quot;)
 
User = %username%
driver.findElementById(&quot;username&quot;).sendKeys(User)
 driver.findElementById(&quot;password&quot;).sendKeys(&quot;******&quot;)
  driver.findElementById(&quot;loginFormSubmit&quot;).click()</code></pre></div>]]></content>
			<author>
				<name><![CDATA[inseption86]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=38818</uri>
			</author>
			<updated>2019-01-26T11:18:12Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=131621#p131621</id>
		</entry>
</feed>
