Root domain error

  • Автор темы Автор темы nitin2003
  • Дата начала Дата начала

nitin2003

Client
Регистрация
18.09.2012
Сообщения
195
Реакции
11
Баллы
18
Hi,

I tried using this:
Код:
Развернуть Свернуть Копировать
Uri myUri = new Uri("www.eataly.com/nyc-restaurants/");
string host = myUri.Host;

But, I am getting an exception. What's it which I am doing wrong here?
Attached image shows the error.

Thanks,
Nitin
 

Вложения

  • zenno_root_domain_error.JPG
    zenno_root_domain_error.JPG
    69,9 KB · Просмотры: 427
Also, if I want to use the url from a variable. Is this the correct format?

Код:
Развернуть Свернуть Копировать
Uri myUri = new Uri(Convert.ToString(project.Variables["FromGoogle"].Value));
string host = myUri.Host;
 
You need to set variable's value in Tested. Or simply execute action within PM.
 
Hi,

I tried using this:
Код:
Развернуть Свернуть Копировать
Uri myUri = new Uri("www.eataly.com/nyc-restaurants/");
string host = myUri.Host;

But, I am getting an exception. What's it which I am doing wrong here?
Attached image shows the error.

Thanks,
Nitin
Код:
Развернуть Свернуть Копировать
 Uri myUri = new Uri("http://www.eataly.com/nyc-restaurants/");
string host = myUri.Host;

Should be http://
 
  • Спасибо
Реакции: nitin2003

Кто просматривает тему: (Всего: 0, Пользователи: 0, Гости: 0)