Auto open Chrome web inspector for all pages - debugging

I need to trace redirect using network tab, but it works only if I open web inspector and then reload page. Unfortunatly, I open this page from external native program and need to found, which URL is passed to browser. Is it possible to do this? I bneed to do this on Windows 7.

As far as I know this isn't possible. The complete list of up-to-date chromium command line switches can be found here: http://peter.sh/experiments/chromium-command-line-switches/
I thought you might be able to to get something working using --wait-for-debugger-children, giving you enough time to open the developer tools before the page loads, but setting that flag also gives the developer tools a 1 minute delay before loading.

Related

Selectors only work when webpage is opened in Internet Explorer

I created a login sequence and my selectors for the input email, password, click login and element exists are valid. But only when I have the Internet Explorer page open on the website I'm working with.
I did that sequence again, and I ran it, initially it worked but when I ran the hole project it broke again, I tried "repair" and "indicate", I tried to eliminate the title but nothing is working.
As far as I can see, you are using selector attribute:
"title=ACME System 1 - Dashboard"
Try using a wildcard: title='ACME System 1*', so it can work when you leave the dashboard.
This worked for me when I took those UiPath Academy courses.
In order to automate tasks within a browser with UiPath, the browser must be open. There is an activity called Open Browser that's included in the default activities for every project. You need to add this activity to the beginning of your sequence and pass in the appropriate parameters, (ie. URL, browser type) you can then pass the outputted browser variable to an attach browser sequence and execute your browser automation acivities within that.
Browser activity sceenshot
In addition, the selector that you have shared does not look like a stable selector. There may be other 'H1' elements on the screen that will cause your automation to fail. I would use the UI explorer to help you build a better, more stable selector.
Did you initially use IE to indicate screen elements and then changed the BrowserType property to use a different browser? Please share the sequence to suggest you a fix for your issue.
I would also suggest you to modify the selector to 'title='ACME System *'.
In order for selector to work the application needs to be open and the desired element needs to be available. So when you close the browser the selector disappears.
You may consider swithching to 'Modern Design Experience' and use 'Use Application/Browser' scope to make this more intuitive, and it will also automatically open the browser for you if it is closed.

Content script file not visible in addon debugger

I've created an addon using the addon SDK and installed it in Firefox (version 35.0.1). The addon has the following files -
data/login.js (content script file)
lib/main.js (main addon code)
test/test-main.js (auto-generated)
package.json
In the main addon code I'm creating a panel, and the content script file is loaded using the contentScriptFile property of the panel. However when I launch the addon debugger, I'm able to see only the main.js script and not the content script. I've checked that the xpi file actually contains the content script file. So why isn't the debugger showing it?
I think I found it (using Firefox Developer Edition 42.0a2 though).
Open the Default Web developer Tools (Ctrl+shift+I)
Go to Settings (cog wheel top right)
Enable "Advanced Settings" > "Enable worker debugging (in development)"
Enable "Inspector" > "Show Browser styles" (for seeing your content style (files))
Reload the page
Try using the browser toolbox or the browser content toolbox which is not scoped to a single addon.
Afaik the addon debugger only shows scripts running in the same compartment as the addon main, which may miss scripts running in sandboxes/other compartments.
Its probably an error in your content script code that prevents the file from appearing in the debugger file list. I had this problem and it's difficult to find these errors as the Firefox error log often doesn't refer to the which file is in error or the line number. Check for unpaired braces that kind of thing

How do I know which part of JavaScript is executed when some event is occurred

How do I know which part of JavaScript that is executed when some event is occurred in Mozilla Firefox?
This is a very broad question but I'll take a shot. I was a bit curious about the now native debugger in Firefox so I looked into this for you. Firebug is still a nice tool but you don't need it for debugging if you're running Firefox 19 or later. Let me also suggest trying Chrome's DevTools, they are my personal favorite.
To use the native debugger in Firefox, there's two options you will need to configure. Go to about:config (paste that in the address bar). Proceed past the warning. Update the following settings to be true (search is your friend):
devtools.chrome.enabled: true
devtools.debugger.remote-enabled: true
You need to do that so you can set breakpoints in the code. Now load the debugger, the shortcut is Ctrl+Shift+S.
At this point you need to have some idea where to set your breakpoints. If you wrote the JavaScript, you shouldn't have much trouble. If you're inspecting 3rd party code, you might need to browse the source code to get an idea where to begin.
With the debugger loaded, select a source file in the dropdown. It could be a JavaScript file, or any other resource that has JavaScript. You should open whichever file you're interested in inspecting.
To add a breakpoint, click to the left of the line number. You can also right-click on a given line and select "Add breakpoint." If you are debugging something that happens on page load, refresh the page. If it's an event handler, interact with the page to fire the event.
Those are the basics you'll need to get started with debugging in Firefox. Here are some resources you might need to go further.
MDN article: Debugging JavaScript
YouTube video using FireBug: Firebug DebuggingIntro
Chrome DevTools: Breakpoints in Chrome
I hope that helps!

Nusphere PhpEd Debugger (With CodeIgniter ) Issues

I am using Nusphere PHPED for my CodeIgniter Project. I am trying to use the debugger, it first gave me problems and I had to alter php.ini to get it to start the debug session. Now, I start the debugger from index.php, and it looks like it starts, but every time I do something (like clicking an anchor or something), it takes me back to index.php and has to start initializing everything again before it jumps to the specific task. In the log it says that the session ended and it "failed to navigate to URL localhost/project/profile" (where project is my project and profile is the controller i am targeting with the anchor)
Any ideas?
Thanks in advance.
you can use external browsers like IE, FF or Chrome with installed DBG debugger toolbars. One for IE is shipped and installed with PhpED and bars for FF and Chrome are avilable for free on their forum. Using debugger toolbar you can trigger debugger from the right place.

HTML parsing error in IE8(KB927917)

Webpage error details
User Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1; Trident/4.0; .NET CLR 2.0.50727)
Timestamp: Wed, 18 Jan 2012 05:02:49 UTC
Message: HTML Parsing Error: Unable to modify the parent container element before the child element is closed (KB927917)
Line: 0
Char: 0
Code: 0
URI: http://collaborize.collaborizeclassroom.com/portal/portal/collaborize/site/window?actionEvent=homePage&action=2&fpg=1&unId=umb8N95lhIoXOVKzTTrtcPoCrixd4wMdScQv8mEwqFT962zy3VSh4mzQNeugOWVV&ts=1326862916939&publishUrl=class2&siteName=class2&siteId=20941
I get the above problem only when i open and close the browser and log-in for the first time and even though i delete cache,cookies and history and login again i don't get the problem.
is there something else other than the above that gets deleted when we close the browser because the error only comes when i login the first time after i open the browser
Example: call document.body.appendChild when the page has not loaded.
Need to call javascript when the page is loaded, example:
document.body.onload = function()
{
document.body.appendChild(...)
}
Add few characters spaces in-between script tags to fix this.
ie., space inbetween start and close script tags in case you are referring outside library using src attribute
IE takes some time to render elements. In that case, if we are referencing the element in Javascript it will throw this error.
Solution is to check on your Javascript or Jquery codes and use the codes inside the $(document).ready(function() { } function.
It works for me.
This is a bug in IE8.try following the method provided below. After using this my problem is resolved.
Reset your Internet Explorer settings and run it. You can do this by following the steps given below.
If the problem is caused by damaged or incompatible Internet Explorer settings or add-ons, you can usually resolve the problem by resetting Internet Explorer settings.
To use the Reset Internet Explorer Settings feature from Control Panel, follow these steps:
First of all clear your IE history.
Exit all programs, including Internet Explorer (if it is running).
If you use Windows XP, click Start, and then click Run. Type the following command in the Open box, and then press ENTER:
inetcpl.cpl
If you use Windows Vista, click Start Collapse this imageExpand this image . Type the following command in the Start Search box, and then press ENTER:
inetcpl.cpl
The Internet Options dialog box appears.
Click the Advanced tab.
Under Reset Internet Explorer settings, click Reset. Then click Reset again.
When Internet Explorer finishes resetting the settings, click Close in the Reset Internet Explorer Settings dialog box.
After that you have to download the Cumulative Security update for Internet Explorer KB2360131 to resolve this.
http://www.microsoft.com/download/en/details.aspx?displaylang=en&id=27630 (Windows XP)
OR
http://www.microsoft.com/download/en/details.aspx?displaylang=en&id=27622 (Windows Vista)
-- Start Internet Explorer again.
Not sure if this will be on any help but it might give you an idea of your problem.
I'm still learning js but I got the same problem and only in IE8. I had suspicion that it was the facebook plugin I got from facebook which stated to place the code at the top of page. I removed the code and page loaded without error then added it back and I got the error. I moved the code to the bottom of the page and it worked with no errors. The page even loaded faster.
I added the $(document).ready(...) and still had a problem. After further analysis, I isolated the problem to an em value in a CSS media query (I am using respond.js). I have not investigate the root cause further, but I was able to consistently view the page without errors after switching the media query from ems to pixels.
The problem happens when JS tried to appendChild to a DOM element that has not finished loading. I fixed with
window.onload=function() {
//append code
}
if the issue is still happening within here I would surmise that the ready code is creating new elements and trying to append children to them before they are loaded.
To solve the issue:
Please check your source codes, that all the HTML tags are opened and closed properly.
If all are fine then you will not get this kind of errors in IE.

Resources