Selenium give empty perfomance log. Why?

22 views
Skip to first unread message

Николай Беляев

unread,
Aug 18, 2017, 3:10:00 PM8/18/17
to Selenium Users
Please give me a tip. The idea is to check chain of the redirects and control final page (advertisement). I get chain of the redirects urls from selenium's performance logs. This works, but then I try to get page with url http://aiasmbapps.tk/dload/app/a767459c8a3adb46bd099ca8425f625c/MixApp.apk (I got this url after 3-4 redirects, this is final url). I get empty logs this is my code
options=new ChromeOptions();
options
.setBinary("/usr/bin/chromium-browser");
options
.addArguments(standardOptions);
options
.addArguments("--safebrowsing-disable-download-protection");
options
.addArguments("--user-agent=Mozilla/5.0 (Linux; Android 5.1; m2 note Build/LMY47D) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/58.0.3029.83 Mobile Safari/537.36");
capabilities
=DesiredCapabilities.chrome();
capabilities
.setPlatform(Platform.ANDROID);

String downloadFilepath = "/tmp";
prefs
.put("profile.default_content_settings.popups", 0);
prefs
.put("download.default_directory", downloadFilepath);
prefs
.put("safebrowsing.enabled", "false");
options
.setExperimentalOption("prefs", prefs);

logPrefs
= new LoggingPreferences();
logPrefs
.enable(LogType.PERFORMANCE, Level.ALL);
capabilities
.setCapability(CapabilityType.LOGGING_PREFS, logPrefs);
capabilities
.setCapability(ChromeOptions.CAPABILITY, options);
capabilities
.setCapability(CapabilityType.UNEXPECTED_ALERT_BEHAVIOUR, UnexpectedAlertBehaviour.IGNORE);
driver
=new ChromeDriver(capabilities);

Why performance log are empty then i try to work with this link? May be you know better way to get redirects url?
Reply all
Reply to author
Forward
0 new messages