Jan Honza Odvarko,

Can you show your entire php example (or point me to an entire php example) 
that accesses and uses a firefox addon extension?  I'm trying to use php 
and selenium for testing, but I don't see any examples except for your 
small excerpt that actually use an addon.  I have to use a ibm firefox 
addon/extension that logs in and then push a button on that addon/extension 
to produce a report.  Any complete examples that do any of that in php 
would be very helpful.  Thank you for your time and have a great day!

Best regards,

David Paul
 

On Sunday, October 2, 2011 2:34:24 AM UTC-5, Jan Honza Odvarko wrote:
>
> Just tested NetExport & Selenium and it works for me. 
>
> Some notes: 
>
> 1) The following pref (from your summary) is wrong: 
> profile.SetPreference("extensions.firebug.allPagesActivation;on", 
> "on"); 
> it should be: 
> profile.SetPreference("extensions.firebug.allPagesActivation", "on"); 
>
> 2) I used setSleep(3) (PHPUnit, set the number of seconds the Selenium 
> RC client should sleep between sending action commands to the Selenium 
> RC server) so, NetExport has time to actually export something (before 
> Selenium closes the browser). 
>
> Here is my simple test in PHP: 
>
> class HAR_Test2 extends HAR_TestCase 
> { 
>     protected function setUp() 
>     { 
>         $this->setBrowser("*firefox"); 
>         $this->setBrowserUrl("http://www.janodvarko.cz/har/viewer";); 
>     } 
>
>     public function testTabs() 
>     { 
>         $this->setSleep(3); 
>         $this->open("http://www.janodvarko.cz/har/viewer";); 
>     } 
> } 
>
> 3) Here are prefs I changed: 
>
> extensions.firebug.netexport.alwaysEnableAutoExport; true 
> extensions.firebug.netexport.defaultLogDir; I:\www\har\selenium\logs 
> extensions.firebug.netexport.showPreview; false 
> extensions.firebug.allPagesActivation; on 
> extensions.firebug.net.enableSites; true 
>
> Honza 
>
> On Sep 21, 9:00 am, Jan Honza Odvarko <[email protected]> wrote: 
> > This sounds like a bug. Please create a new report and I'll take a 
> > look.http://code.google.com/p/fbug/issues/list 
> > 
> > Honza 
> > 
> > On Sep 20, 8:33 pm, Cy Bercom <[email protected]> wrote: 
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> > > 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 mySeleniumtest 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 theseleniumtest 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 usingSeleniumand 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 fromSeleniumI 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 andnetexport 
> > > > > 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("Netexportoutput 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 andNetExport? 
> > 
> > > > 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]<javascript:>. 
>
> > > > To unsubscribe from this group, send email to 
> > > > [email protected] <javascript:>. 
> > > > 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
https://groups.google.com/forum/#!forum/firebug

--- 
You received this message because you are subscribed to the Google Groups 
"Firebug" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to