Hi Jan, sorry for being too vague in my description. The issue I have is that when I run FF manually with my settings a HAR file is automatically created in the log directory. It is named with the baseurl + timedate.
When I run my Selenium test I expect it to navigate according to my code - and it does - and I also expect to have at least one HAR file in the defined log directory - but there is no file. So the selenium test goes through but I have no HAR file. 2011/9/20 Jan Honza Odvarko <[email protected]> > On Sep 19, 10:47 am, Cy Bercom <[email protected]> wrote: > > Hello, > > > > I am not sure if this is the appropriate group for this question but I > Yes it is > > > am using Selenium and like to have automatic output from the Net tab > > in firebug. I have installed net export and it works when I run FF > > manually. > > > > But when I try the same thing when running FF from Selenium I get > > nada. > nada? Does it mean the result file is there but empty or it isn't > there at all? > > > > I checked with about:config and set the firebug and netexport > > preferences marked as user defined. > > > > This is the C# code I am using: > > > > try > > { > > textBox1.Text = "Starting Firefox.." + > > Environment.NewLine; > > > > //Add firebug & netxport > > > > FirefoxProfile profile = new FirefoxProfile(); > > string firebugPath = "C:\\Mozilla plugins\ > > \firebug-1.8.2.xpi"; > > string netexportPath = "C:\\Mozilla plugins\ > > \netExport-0.8b17.xpi"; > > profile.AddExtension(firebugPath); > > profile.AddExtension(netexportPath); > > > > profile.SetPreference("extensions.firebug.currentVersion","1.8.2"); // > > remove first run tab > Try to use bigger number e.g. 2.0 to avoid the 'firstrun' page being > opened. > > > // > > profile.SetPreference("extensions.firebug.addonBarOpened", true); > I guess this could be false > > > > > profile.SetPreference("extensions.firebug.console.enableSites", true); > > // > > profile.SetPreference("extensions.firebug.allPagesActivation;on", > > "on"); > > > > profile.SetPreference("extensions.firebug.previousPlacement",1); > > > > profile.SetPreference("extensions.firebug.onByDefault",true); > > > > profile.SetPreference("extensions.firebug.defaultPanelName","net"); > > > > profile.SetPreference("extensions.firebug.net.enableSites",true); > > // > > profile.SetPreference("extensions.firebug.script.enableSites", true); > > string output_dir = > > Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments); > > output_dir = Path.Combine(output_dir,"Firebug > > netexports"); > > if (!Directory.Exists(output_dir)) > > { > > Directory.CreateDirectory(output_dir); > > } > > > > > profile.SetPreference("extensions.firebug.netexport.defaultLogDir",output_dir); > > > > > profile.SetPreference("extensions.firebug.netexport.alwaysEnableAutoExport",true); > > > > profile.SetPreference("extensions.firebug.netexport.showPreview", > > true); // preview > I would set this to false to avoid opening an extra Firefox tab with > the preview. > > > > > profile.SetPreference("extensions.firebug.netexport.sendToConfirmation", > > false); > > > > profile.SetPreference("extensions.firebug.netexport.pageLoadedTimeout", > > 3000); > > > > > profile.SetPreference("extensions.firebug.netexport.autoExportToFile",true); > > > > profile.SetPreference("extensions.firebug.netexport.Automation", > > true); > > > > System.Threading.Thread.Sleep(5000); //allow firebug > > to load > > textBox1.AppendText("Added firebug extension and set > > preferences" + Environment.NewLine); > > textBox1.AppendText("Netexport output folder: " + > > output_dir + Environment.NewLine); > > > > IWebDriver driver = new > > FirefoxDriver(profile); > > //IWebDriver driver = new FirefoxDriver(); > > driver.Navigate().GoToUrl("http://www.dn.se"); > > System.Threading.Thread.Sleep(4000); > > driver.FindElement(By.LinkText("Ekonomi")).Click(); > > System.Threading.Thread.Sleep(4000); > > > > textBox1.AppendText("FÃĪrdigt"); > > driver.Quit(); > > } > > catch (Exception exc) > > { > > textBox1.Text = exc.ToString(); > > } > > > > Is there anyone that have this working? I am using the latest 6.x > > version of FF. > What version of Firebug and NetExport? > > Any Errors in FBTrace or Firefox Error console? > > > Honza > > > > > /Cy > > -- > You received this message because you are subscribed to the Google Groups > "Firebug" group. > To post to this group, send email to [email protected]. > To unsubscribe from this group, send email to > [email protected]. > For more options, visit this group at > http://groups.google.com/group/firebug?hl=en. > > -- You received this message because you are subscribed to the Google Groups "Firebug" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/firebug?hl=en.
