make_screenshots($enable=true); - включить или выключить режим, при котором во время сбора будут делаться скриншоты страницы.
Функция на вход принимает параметры:
$enable – разрешить (true) или запретить (false)
После отработки функция возвращает результат своей работы в робот :
true – успешно выполнили false – выполнить не удалось
Пример использования make_screenshots (Python):
# Additional paths import sys sys.path.insert(0, '../../../Templates PY/') xhe_host = "127.0.0.1:7013" from xweb_human_emulator import * # начало echo("<hr><font color=blue>ftp.xxxxxxxxx</font><hr>") # 1 echo("1. Сфорируем файл с урлами : "); path = "test/in_file.urls"; echo(file_os.delete("test/in_file.urls")," "); echo(textfile.add_string_to_file("test/in_file.urls","ya.ru\n")," "); echo(textfile.add_string_to_file("test/in_file.urls","google.com\n")," "); echo(textfile.add_string_to_file("test/in_file.urls","yandex.ru\n")," "); echo(textfile.add_string_to_file("test/in_file.urls","vk.com\n")," "); echo(textfile.add_string_to_file("test/in_file.urls","ttttttt\n")," "); # 2 echo("\n2. Инициализируем сборщик файлом с урлами: "); echo(harvestor.init("test/in_file.urls")," "); # 3 echo("\n3. Запуститм сбор и дождемся окончания : "); echo(harvestor.start(false),"<br>"); while not harvestor.is_finished(): echo("."+str(harvestor.get_completed_count())+"."); # 4 echo("\n4. Выведем длину полученных урлов в файле : "); count = textfile.get_lines_count(path); for i in range(0, count): echo(len(harvestor.get_html(i))," ") # конец echo("<hr><br>") # Quit app.quit()