I need to debug the AJAX-Call (XHR) in Safari-Browser. I found the Developer-Console, but not the part where i can see the Ajax-Calls, like with Chrome where it is under Network.
Can someone show me the right way?
I found a way to debug AJAX-Calls (XHR) in Safari.
You need to get the Develop menu item
In the Safari Menu Click Preferences
In the Advanced Tab enable Show Develop menu in menu bar
Now you got the Develop Menu Item in the top-bar.
On the page, where you want to debug ajax,
Click the Develop Menu Item
Click Show Web Inspector or just use the keyboard shortcut: Option + Command + I
In the Web Inspector
Click the Network Tab
In the left-bottom corner Click All Resources
Send your ajax call (e.g. clicking button or link)
Now you find something like: index.php in the left window
If you double-click on this
You got your Debug / the ajax result in a new tab ;)
EDIT:
I made a mistake. That was the reason, why i didn't get an ajax-call in the Network-Tab:
Behind the gear-symbol on the right side of the Web Inspector you can configure this option: Show Scope Chain on pause.
Because of this, the Call was paused, and i got no ajax-load.
Related
Most of the web browses like Chrome, FireFox and Edge provide for Disabling Mouse Right Button Click.
For my Java based web application, I want to customise the Popup menu items from the standard items like cut, copy, paste, print etc and include few more custom Menu Items as required by my web application use.
I did my search on stackoverflow and with other search engines and did not any method to customise the Right Button popup menu.
Can someone help in this regard.
I am trying to mouse hover a menu option using blue prism. I tried HTML/Win32/AA/Region mode while spying but none of them worked. If I click on that element, I will be navigated to a different page.
Any pointers will help.
Thanks
Not sure if you still need an answer on that as this question is more than month old.
If I understood you correctly, you want to hover mouse pointer over menu and then select one of the options from the drop down list. If so, there might be some options to achieve that without clicking on the menu itself.
If you want to open same link every time you navigate through this website, then you can launch the target URL instead of navigating through the menu.
Some HTML elements doesn't need to be visible to be active, on some websites you can 'click' on menu item without it being presented in form of drop down list. You can try to spy that element and navigate directly to it. If you won't be able to spy it you can search for correct element in application tree (Application Modeller -> Select some element -> click on arrow next to Identify button -> Open Application Navigator). Then you can use Mouse Click on that element via Navigate stage.
I've tried to imitate mouse hover on some website by spying whole browser window with Win32 mode, and then using Drop option in Navigate stage, giving the menu exact coordinates. Seems to be working, you can try this option as well.
You can test how menu reacts on Focus method in Navigate stage, but I wouldn't get my hopes up with this option.
If you share link to the website, then maybe I'll be able to help more.
A button in a website triggers a popup menu when clicked (only when clicked, and not when hovered over). I want to be able to inspect this popup menu but after I right click it and select "Inspect Element", it disappears so I can no longer inspect it.
When the popup menu is displayed, I can see that an entry for it appears in the HTML in the Inspector tab but when I click the entry, the popup menu disappears an so does the HTML entry.
For cases in which a menu appears when a button is hovered over (not clicked) I would click an entry in the Inspector tab to switch focus to it, then I would just hover over the button and use the arrow keys to navigate to the entry in the Inspector tab. But since this button needs to be clicked, then I lose the focus on the Inspector tab.
I thought this could be solved by switching the focus to the Inspector tab in Firefox's Web Tools without clicking anything.
I've tried using different shortcuts such as Ctrl+Shift+C or Ctrl+Shift+I (opens the Web Tool) but I haven't been able to switch the focus to the the Inspector tab to navigate through the HTML after using these shortcuts.
I've also tried using inspect mode (the button left of the Inspector tab), which lets me inspect anything I click. The problem with this method is that to get to the menu I need to click a button first and inspect mode only inspect the first thing I click. Maybe there's a way to ignore the first click while on inspect mode?
EDIT:
Pressing the TAB key numerous times, sometimes focuses on the Inspector tab. Sometimes it just loops through the elements in the website and never focuses on the Inspector tab. Even so, the times I was able to use TAB to focus on the Inspector tab, the popup menu disappeared after pressing TAB about 20 times so I need a different method that doesn't use the TAB key.
I have a deviantart account so I was able to reproduce the issue you described.
The problem is that the popup that appears on click is hidden when the window is blurred or when the page gets clicked. And because focusing the inspector will always cause the content window to blur, there's no way you could switch over to the inspector while keeping the popup displayed.
So, as #Callahad said in a comment, the only viable option here is to use a breakpoint to force the javascript code to pause at a certain point in time that lets you inspect the popup without having it be closed under you.
Now, the question becomes: what is this point in time, and how can you set a breakpoint there.
When the popup appears: this happens when the edit button's element is clicked. If you could add a breakpoint to this exact line in the debugger panel, then you'd be able to click on the edit button, and step through the code until the popup is shown, and then switch over to the inspector again to inspect it. Unfortunately, the javascript event handler for this is in a onclick attribute on the node, and you can't set a breakpoint there.
When the popup is about to be hidden. This happens on window blur. To set a breakpoint there, you could try and follow these steps:
find the html element in the inspector (that's the element where events added to window are shown),
click on the [ev] icon next to it,
find the "blur" event in the list that appears,
click on the debugger icon next to it, this takes you to the debugger at the right line, hopefully
maybe pretty-print the code if needed, using the {} button in the lower left corner of the debugger
add a breakpoint at the right place in this code
and then just click to show the popup, and then click outside the window, this will pause the javascript execution where you added the breakpoint, which is, just before the popup gets hidden, therefore giving you a chance to switch over to the inspector and inspect the popup before it closes.
The popup also gets hidden on page click, so you could do the same thing by looking at this event.
Another valid approach could be:
Override the code that hides popups! Javascript is dynamic, so you could totally turn this to your advantage. Find the function in the deviantart code that hides popup, and change it.
By quickly looking at what was on the window object in the web console, I got lucky and found: Popup2.hideAll. So if you just run this in the web console: Popup2.hideAll = function(){}, and then open the popup, it will just stay there and never get hidden again until you reload the page. This gives you a good way to inspect it.
Last, one very good way to work with DOM changes like this would be to have the "break on DOM mutations" feature in the devtools. Firebug has this, Chrome devtools too, unfortunately Firefox doesn't yet.
The idea of this feature is simple, in the inspector: right click any node (in this case, the parent element of where the popup would appear in the DOM), select "break on mutation", then click to open the popup. When the popup gets inserted into the DOM, devtools would see this and automatically halt javascript execution.
I am using Firefox Developer Edition and when I had the Inspector open, which is accessed by right-clicking an item and selecting Inspect Element, I then right clicked something in the Inspector and selected Show DOM Properties, which you can see in the screenshot below:
However I cannot figure out for the life of me how to close the DOM Properties window.
How can one do this?
The feature you're referring to is called the "split console." You have it toggled on currently. It will show when a tab other than the console is selected. You can click in the split console, or command+alt+k on OSX, and hit escape to close it, or click on the console tab, or click the button in the top right of the dev tools to toggle it back off. I find it most usefull with the debugger tab. When the debugger is paused, you can access variables within the scope of the breakpoint.
Pressing escape with the DOM properties panel focused should get rid of it.
I've got Firebug open on my website, and then I click a button which opens a popup window. However, Firebug is always greyed out by default in the popup window. I can click the icon or press F12 to start it, but I really need it to start itself, immediately, because I want to watch the AJAX requests that happen on page initialization of the popup window. By the time I click or press F12 it's already too late; it's missed those requests.
How do I get Firebug to persist in my popup window?
There is an option in the Firebug menu called On For All Web Pages, which opens Firebug automatically. Though unfortunately that also doesn't allow you to track the network requests.
So this actually looks like a bug to me. You should report that in the Firebug issue tracker, so it can be fixed.