<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<title type="html"><![CDATA[Серый форум &mdash; AHK: Получить HTML код текущей залогиненой страницы в Firefox]]></title>
	<link rel="self" href="https://forum.script-coding.com/extern.php?action=feed&amp;tid=13480&amp;type=atom" />
	<updated>2021-02-16T08:51:20Z</updated>
	<generator>PunBB</generator>
	<id>https://forum.script-coding.com/viewtopic.php?id=13480</id>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Получить HTML код текущей залогиненой страницы в Firefox]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=146229#p146229" />
			<content type="html"><![CDATA[<p>Появился SeleniumBasic для Selenium v3.141.000:<br /><a href="https://www.cnblogs.com/ryueifu-VBA/p/13661128.html">https://www.cnblogs.com/ryueifu-VBA/p/13661128.html</a></p>]]></content>
			<author>
				<name><![CDATA[Malcev]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=26930</uri>
			</author>
			<updated>2021-02-16T08:51:20Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=146229#p146229</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Получить HTML код текущей залогиненой страницы в Firefox]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=123799#p123799" />
			<content type="html"><![CDATA[<p><a href="https://github.com/florentbr/SeleniumBasic/issues/162">https://github.com/florentbr/SeleniumBasic/issues/162</a></p>]]></content>
			<author>
				<name><![CDATA[Malcev]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=26930</uri>
			</author>
			<updated>2018-02-21T09:27:24Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=123799#p123799</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Получить HTML код текущей залогиненой страницы в Firefox]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=123797#p123797" />
			<content type="html"><![CDATA[<p>Забыл упомянуть что путь к geckodriver.exe записал в path.</p>]]></content>
			<author>
				<name><![CDATA[Dworkin]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=27052</uri>
			</author>
			<updated>2018-02-20T19:17:44Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=123797#p123797</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Получить HTML код текущей залогиненой страницы в Firefox]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=123796#p123796" />
			<content type="html"><![CDATA[<div class="quotebox"><cite>teadrinker пишет:</cite><blockquote><p>Я совсем не в теме, но какой смысл в присваивании одной и той же переменной двух разных объектов подряд?</p></blockquote></div><p>Смысл в том что я почти не умею работать с объектами.<br />Если так даже для хрома:<br /></p><div class="codebox"><pre><code>#Persistent

chromePath := &quot;C:\Program Files (x86)\Google\Chrome\Application\chrome.exe&quot;  
chromedriverpath := &quot;C:\Users\Mir\AppData\Local\SeleniumBasic\chromedriver.exe&quot; 
options := new ChromeOptions()
options.setBinary(chromepath) 
System.setProperty(&quot;webdriver.chrome.driver&quot;, chromedriverpath) 

driver := new ChromeDriver(options)
driver.Get(&quot;http://www.google.ca/&quot;)</code></pre></div><p>То не работает.</p><p>Если даже так указать на старый драйвер хрома с которым не работало то все равно работает:<br /></p><div class="codebox"><pre><code>
#Persistent

chromePath := &quot;C:\Program Files (x86)\Google\Chrome\Application\chrome.exe&quot;  
chromedriverpath := &quot;C:\Users\Mir\AppData\Local\SeleniumBasic\chromedriver_old.exe&quot; 
options := new ChromeOptions()
options.setBinary(chromepath) 
System.setProperty(&quot;webdriver.chrome.driver&quot;, chromedriverpath) 

driver := ComObjCreate(&quot;Selenium.ChromeDriver&quot;)
driver.Get(&quot;http://www.google.ca/&quot;)
</code></pre></div>]]></content>
			<author>
				<name><![CDATA[Dworkin]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=27052</uri>
			</author>
			<updated>2018-02-20T18:35:22Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=123796#p123796</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Получить HTML код текущей залогиненой страницы в Firefox]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=123795#p123795" />
			<content type="html"><![CDATA[<p>Я совсем не в теме, но какой смысл в присваивании одной и той же переменной двух разных объектов подряд?<br /></p><div class="quotebox"><cite>Dworkin пишет:</cite><blockquote><div class="codebox"><pre><code>driver := new FireFoxDriver(options)
 
driver := ComObjCreate(&quot;Selenium.FireFoxDriver&quot;)</code></pre></div></blockquote></div><p>Очевидно, что первый объект не сохраняется (хотя, возможно, достаточно его запустить, не знаю).</p>]]></content>
			<author>
				<name><![CDATA[teadrinker]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=24515</uri>
			</author>
			<updated>2018-02-20T18:21:39Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=123795#p123795</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[AHK: Получить HTML код текущей залогиненой страницы в Firefox]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=123794#p123794" />
			<content type="html"><![CDATA[<p>Добрый вечер. <br />Нужен скрипт который бы получал html код или скачивал страницу сайта на котором надо залогиниться что бы увидеть содержимое.<br />Если даже в браузере залогиненый и скачиваю страницу или получаю ее html код то получаю код страницы где надо водить логин и пароль вместо содержимого.<br />Где-то прочитал что в Firefox с помощью ahk такое не получится сделать.</p><p>Нужно именно для Firefox.<br />Нашел SeleniumBasic. Для проверки работоспособности скачал новый chromedriver.exe и для Chrome работает:</p><div class="codebox"><pre><code>
#Persistent
driver := ComObjCreate(&quot;Selenium.ChromeDriver&quot;)
driver.Get(&quot;http://www.google.com/&quot;)
</code></pre></div><p>Для Firefox выдает ошибку таймаута прослушивания порта. Прочитал что для Firefox&#039;a надо скачать geckodriver.exe. <br />В python&#039;e надо указывать путь к geckodriver.exe, значит в ахк тоже надо указать путь. Нашел код для хрома где указывают путь:</p><div class="codebox"><pre><code>
#Persistent

chromePath := &quot;C:\Program Files (x86)\Google\Chrome\Application\chrome.exe&quot;  
chromedriverpath := &quot;C:\Users\Mir\AppData\Local\SeleniumBasic\chromedriver.exe&quot; 
options := new ChromeOptions()
options.setBinary(chromepath) 
System.setProperty(&quot;webdriver.chrome.driver&quot;, chromedriverpath) 
driver := new ChromeDriver(options)
 
driver := ComObjCreate(&quot;Selenium.ChromeDriver&quot;)
driver.Get(&quot;http://www.google.ca/&quot;)
</code></pre></div><p>Работает.</p><p>Решил изменить для firefox:<br /></p><div class="codebox"><pre><code>
#Persistent
firefoxPath := &quot;C:\Program Files\Mozilla Firefox\firefox.exe&quot;  
firefoxdriverpath := &quot;C:\Users\Mir\AppData\Local\SeleniumBasic\geckodriver.exe&quot; 
options := new FireFoxOptions()
options.setBinary(firefoxpath) 
System.setProperty(&quot;webdriver.firefox.driver&quot;, firefoxdriverpath) 
driver := new FireFoxDriver(options)
 
driver := ComObjCreate(&quot;Selenium.FireFoxDriver&quot;)
driver.Get(&quot;http://www.google.com/&quot;)
</code></pre></div><p>Не работает.<br />Помогите пожалуйста.</p>]]></content>
			<author>
				<name><![CDATA[Dworkin]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=27052</uri>
			</author>
			<updated>2018-02-20T16:52:11Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=123794#p123794</id>
		</entry>
</feed>
