def count_overlaps (string, look_for):
start = 0
matches = 0
while True:
start = string.find (look_for, start)
if start < 0:
break
start += 1
matches += 1
return matches
print count_overlaps ('abrabra', 'abra')
Я полагаю, что безопасность большинства веб-браузеров такова, что вы можете получить только имя и значение из куки, чтобы вы знали. Не слишком уверен насчет c #, но
driver.manage().getCookies())
возвращает массив файлов cookie в Java; но Эта страница дает синтаксис в C #
return _driver.Manage().Cookies.AllCookies.ToDictionary(cookie => cookie.Name, cookie => cookie.Value);