instance.UseTrafficMonitoring = true;

lokiys

Moderator
Регистрация
01.02.2012
Сообщения
4 770
Благодарностей
1 182
Баллы
113
But when I take traffic var traffic = instance.ActiveTab.GetTraffic(); it always shows 0 items.

When using instance.UseTrafficMonitoring = false;
There are items but i need response body. How to get that?
I can see my needed traffic item in the traffic monitor but i can not get it in my collection.
How come?
 

lokiys

Moderator
Регистрация
01.02.2012
Сообщения
4 770
Благодарностей
1 182
Баллы
113
What this means? I totally know how to get a body from traffic item. I'm telling that variable traffic.Count(); after
var traffic = instance.ActiveTab.GetTraffic();

Shows zero. So there is not a single item recorded.

And by testing further I can see that with version 7.3 I get always 0, but with version 7.1 sometimes i get items in collection.
 

Phoenix78

Client
Read only
Регистрация
06.11.2018
Сообщения
11 790
Благодарностей
5 690
Баллы
113

lokiys

Moderator
Регистрация
01.02.2012
Сообщения
4 770
Благодарностей
1 182
Баллы
113
first you put a label to use traffic
, then you click on the link
, then you get traffic. in this case, the traffic is reset to zero.
Yes i know. I understand how you work with traffic. It looks more like a bug or something. Or maybe page blocks something. Or like i told I can get traffic in v7.7.1.0 ( sometimes) but never in v7.7.3.0 that alone tells me there is something wrong with it.

PS.

UseTrafficMonitoring = false. then it works fine i can get urls.
UseTrafficMonitoring = true; then it does not work and there is neither urls nor any response body obvious.
 

zactyson64

Client
Регистрация
18.03.2019
Сообщения
43
Благодарностей
3
Баллы
8
Yes i know. I understand how you work with traffic. It looks more like a bug or something. Or maybe page blocks something. Or like i told I can get traffic in v7.7.1.0 ( sometimes) but never in v7.7.3.0 that alone tells me there is something wrong with it.

PS.

UseTrafficMonitoring = false. then it works fine i can get urls.
UseTrafficMonitoring = true; then it does not work and there is neither urls nor any response body obvious.
It's a bug, what I think would work for you is if you navigate to your desired URL then get traffic in the same cube, this always returns the traffic, if it doesn't then execute the same cube again and it's basically 100% success rate but if you try to go to a URL in a cube then in another cube you decided to get the traffic it never works
 
  • Спасибо
Реакции: lokiys

lokiys

Moderator
Регистрация
01.02.2012
Сообщения
4 770
Благодарностей
1 182
Баллы
113
It's a bug, what I think would work for you is if you navigate to your desired URL then get traffic in the same cube, this always returns the traffic, if it doesn't then execute the same cube again and it's basically 100% success rate but if you try to go to a URL in a cube then in another cube you decided to get the traffic it never works
Thank you for input. I just tried your suggestion, but it did not work for my site. :(
 

zactyson64

Client
Регистрация
18.03.2019
Сообщения
43
Благодарностей
3
Баллы
8
Thank you for input. I just tried your suggestion, but it did not work for my site. :(
C#:
instance.UseTrafficMonitoring=true;
instance.ActiveTab.Navigate("https://www.example.com");
if (instance.ActiveTab.IsBusy) instance.ActiveTab.WaitDownloading();
var list = instance.ActiveTab.GetTraffic();
string ob = "";
foreach(var t in list)
    if(t.ResponseBody != null)
        if(t.Url.ToString().Contains("https://www.example.com") == true)
            ob = System.Text.Encoding.UTF8.GetString(t.ResponseBody);

        
return ob;
This is how my working code look like
 
Последнее редактирование:

lokiys

Moderator
Регистрация
01.02.2012
Сообщения
4 770
Благодарностей
1 182
Баллы
113
@VladZen there are ticket opened also, and I'm impatiently waiting for some answer/solution.
Conversation ID:53236
 

lokiys

Moderator
Регистрация
01.02.2012
Сообщения
4 770
Благодарностей
1 182
Баллы
113
@VladZen can you please look at this case? It's almost a week around since I posted this? There are some answers on the ticket I posted with additional data, but those are not making any sense there.

Thanks
 

VladZen

Administrator
Команда форума
Регистрация
05.11.2014
Сообщения
22 233
Благодарностей
5 846
Баллы
113
@VladZen can you please look at this case? It's almost a week around since I posted this? There are some answers on the ticket I posted with additional data, but those are not making any sense there.

Thanks
I've checked, useTrafficMonitor=true worked for me.
C#:
instance.UseTrafficMonitoring = true;
instance.ActiveTab.Navigate("https://zennolab.com");
var traffic = instance.ActiveTab.GetTraffic();
project.SendInfoToLog("Number of traffic elements = " + traffic.Count());
 

VladZen

Administrator
Команда форума
Регистрация
05.11.2014
Сообщения
22 233
Благодарностей
5 846
Баллы
113
  • Спасибо
Реакции: lokiys

lokiys

Moderator
Регистрация
01.02.2012
Сообщения
4 770
Благодарностей
1 182
Баллы
113

VladZen

Administrator
Команда форума
Регистрация
05.11.2014
Сообщения
22 233
Благодарностей
5 846
Баллы
113

lokiys

Moderator
Регистрация
01.02.2012
Сообщения
4 770
Благодарностей
1 182
Баллы
113
responded to you in the ticket
Tested with your template and it still does not work. Same issue I'm reporting. 0 traffic.
More details on the ticket. And I think we should move this issue to bugs, because I notice that with the CEF engine I can get some traffic but i need chromium.

105425
 

VladZen

Administrator
Команда форума
Регистрация
05.11.2014
Сообщения
22 233
Благодарностей
5 846
Баллы
113

lokiys

Moderator
Регистрация
01.02.2012
Сообщения
4 770
Благодарностей
1 182
Баллы
113
@VladZen this suggestion fixed the issue.
106553

Traffic window should be closed at all and not only switched on/off. If i have traffic window opened, I get no traffic items; it seems the traffic window reads them therefore i can not get them. Please report this as bug. As when i work with traffic I especially need traffic window open at all times. Also make sure you add my reported site in bug report from ticket id: 53236 Because it happens for this site, and not for others. No idea why.
 

lokiys

Moderator
Регистрация
01.02.2012
Сообщения
4 770
Благодарностей
1 182
Баллы
113

VladZen

Administrator
Команда форума
Регистрация
05.11.2014
Сообщения
22 233
Благодарностей
5 846
Баллы
113
@VladZen same issue with different page, only this time disabling traffic window does not help... Any ideas?
I suppose it does not depend on a website since it worked properly for me on your first website from the beginning. It seems depend on envryronment
I would suggest making clean installation of ZennoPoster and also install latest net.framework in windows OS.
 

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