U
U
Uncle Bogdan2021-05-30 18:40:39
C++ / C#
Uncle Bogdan, 2021-05-30 18:40:39

How to wait for the site to load before executing the code?

Tipo the site will not have time to load, and the line with getting html is already running and as a result an error appears, how to fix it?

browser.ViewSource();
html = browser.GetSourceAsync().Result;  // Если страница не успеет загрузиться, то html будет пустым.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
F
freeExec, 2021-05-30
@freeExec

https://metanit.com/sharp/tutorial/13.3.php

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question