Hm... I don't see any errors when loading: http://origin-www4.hasbro.com/littlestpetshop/
(nor Firebug neither ErrorCollector) Honza On May 26, 5:29 pm, Krishnamoorthy Cognizant <[email protected]> wrote: > Thanks for the updates. I have provided theURL in the above code > itself. > FYIP; > driver.get(line); //http://origin-www4.hasbro.com/littlestpetshop/ > en_US/ > > Many of the errors are not identified by JS error collector when > comparing with Firebug. Please share your thoughts. > > Thanks > Krish > > On May 23, 11:51 am, Jan Honza Odvarko <[email protected]> wrote: > > > > > > > > > The way how JSErrorCollector collects errors is slightly different, > > but when I loadwww.google.com > > I see two (the same) errors produced by Firebug and JSErrorCollector > > > What page should I load to see a difference? > > > Honza > > > On May 22, 9:00 pm, Krishnamoorthy Cognizant > > > <[email protected]> wrote: > > > Hi all, > > > I have been using public mguillem / JSErrorCollector for JS Error > > > validation. I have compared the Firebug console Js Error count with > > > JSErrorCollector count and observed that both are not matched. > > > > Please find code for JSErrorCollector. I would like to know which is > > > showing correct value. Can any one help me please. > > > > public class temp{ > > > static BufferedWriter bw; > > > static WebDriver driver; > > > > static void writeline(String line){ > > > try{ > > > bw.write(line); > > > bw.newLine(); > > > bw.flush(); > > > }catch(Exception ioe){ioe.printStackTrace();}} > > > > public static void main(String a[])throws Exception{ > > > bw = new BufferedWriter(new FileWriter("out.txt",true)); > > > //final String firebugPath = > > > "d:\\selenium\\firebug-1.9.2-fx.xpi"; > > > FirefoxDriver driver = new FirefoxDriver(); > > > FirefoxProfile ffprofile = new > > > ProfilesIni().getProfile("default");//FirefoxProfile(); > > > //ffprofile.addExtension(new File(firebugPath)); > > > > > > //ffprofile.setPreference("extensions.firebug.currentversion", > > > "1.9.2"); > > > JavaScriptError.addExtension(ffprofile); > > > driver = new FirefoxDriver(ffprofile); > > > > FileReader fr = new FileReader(new File("url.txt")); > > > BufferedReader reader = new BufferedReader(fr); > > > String line=""; > > > writeline("-------------------------------"); > > > while((line=reader.readLine())!=null){ > > > try{ > > > driver.get(line); > > > //http://origin-www4.hasbro.com/littlestpetshop/ > > > en_US/ > > > //Thread.sleep(10000); > > > List<JavaScriptError> jsErrors = > > > JavaScriptError.readErrors(driver); > > > // Thread.sleep(6000); > > > System.out.println("###start displaying errors"); > > > for(int i = 0; i < jsErrors.size(); i++) { > > > writeline("Web URL Name= " +line); > > > writeline("Get Source Name= " + > > > jsErrors.get(i).getSourceName()); > > > writeline("Get JavaScript Error Message= > > > "+jsErrors.get(i).getErrorMessage()); > > > > > > System.out.println(jsErrors.get(i).getErrorMessage()); > > > writeline(String.valueOf("Get LineNumber= > > > "+jsErrors.get(i).getLineNumber())); > > > writeline(" "); > > > > > > System.out.println(jsErrors.get(i).getSourceName()); > > > > } > > > }catch(Exception e){e.printStackTrace();} > > > // driver.close(); > > > // driver.quit(); > > > > } > > > bw.close(); > > > } > > > > }- Hide quoted text - > > > - Show quoted text - -- 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
