firefox: take screenshot programmatically - firefox

It's possible to take screenshots of web pages in Firefox using the developer toolbar. Is it possible to do this programmatically too, e.g., from the command line? I've tried with Selenium, but with no luck.
edit: I know it's possible to take screenshots using Selenium, but this only gets you the full screen. Using the developer toolbar in Firefox, one can use CSS selectors to select only parts of a page, which is what I want to do (and forgot to specify, sorry). What I've read online is that Selenium cannot access the developer toolbar because it's not part of the DOM.

Related

UiPath cannot click Chrome inspect feature "accessibility checker"

I have to automate on button "Accessibility Checker" which will come after inspecting the web page as shown in the picture. Please suggest me how to automate this as of now I am using UiPath, but that is not working (not able to select a correct Selector).
As far as I know chrome is a bit tricky since it has a lot more background updates than other browsers. So use something like IE if you can. Other than that, you can use anchor base activity with image activities. I get accurate results with that solution on cases where I am not able to use clicks.

Scraping an Angular website with selenium and C# returns the angular script, not the rendered web page

This seems to be by design as far as I can tell. Selenium can see the initially loaded HTML, but not the HTML after it's been massaged. I've tried IE, Chrome and PhantomJS and they all show the same behavior. So does the built-in Chrome debugger, until you inspect an element on the page, you can't query any of the rendered HTML.
I'm looking for any suggestions about how to scrape the web page. The only option I see right now is finding the chrome process, triggering the inspector, clicking inside, then running the Javascript. Needless to say, this sounds fragile.
I also haven't been able to find anything on capturing the Ajax calls from selenium so I can make them and capture the JSON. When tried copy / paste from the chrome network tab into selenium I got a missing application block message.
Does anyone have any other advice?
Since I can replicate the issue in the chrome debugger, I don't see posting code as useful. It looks like a design decision.
Ralph
Sadly, I wasn't able to do things in a straightforward way. Instead, I used Selenium to do the login and navigate to the page, then use windows API calls to click inside the window send ^a^c to copy the data and an absolute location to click on the button to go to the next page.
The site is set up so that ^a^c copies the raw data for this site. I don't know if that's standard for Angular or not.
Fragile, but it works.

FireBug is showing deactivated and I am not able to activate it. I am using FF 56.0.2

I am using latest fireFox version and not able to turn on firebug. It is showing deactivated. can anyone help me how to activate it? As I am not able to search xpath.
Firebug is no longer available in Firefox, now replaced by the Firefox Developer Tools. There's a guide for migrating.
What you are seeing are actually the Firefox DevTools. When opening it the first time, there is a hint explaining the transition a little:
Note that even the Firebug toolbar button disappears with the release of Firefox 57. The backgrounds are outlined in a related blog post.
Unfortunately, the DevTools do not provide an XPath search within their Inspector yet. There's an enhancement request filed for this feature, though.
Having said that, you can at least copy the XPath to an element via the context menu:
Furthermore, if you need the XPath for automated testing like Selenium, you can use CSS selectors in most cases instead, which can be searched for using the search field.

How to check the css display value (block, inline, etc) for element in Firefox Web Developer tool?

I am quite sure that with the good old Firebug, it was shown in the Layout tab, together with the box-sizing property.
Is it possible to tell in the Web Developer too? There is a Box Model tab which is quite similar to the Layout tab of Firebug, but it does not show this information.
Btw: I thought the built-in Web Developer was built on Firebug, but when reading about it it actually seems that they are two quite separate things.
That feature is currently only available in Firefox Nightly.

WebKit shell browser for internal web application

I am creating an in-house web application that I want to run in a WebKit shell browser on the Mac. I searched and came up empty. Basically, I want the site rendered and shown in a window with no chrome for navigating to other pages, bookmarks, etc. Seems to me that there should be a relatively easy way to get something like that up and running in Xcode, but alas I don't know how. The more barebones the better. Anybody know the answer?
Not sure if this is what you're looking for, but you could use a WebView. The content is rendered by Safari/WebKit.
As for chrome, if you just put the view, that's all you'll have. You can shape the rest of the User Interface however you'd like.
Apple's documentation has a couple of examples using WebView... Should this solve your problem.
Did you take a look at the phonegap mac project.
Its a full screen webkit without any chrome in which you can put your html / css / javascript to run:
https://github.com/callback/callback-mac

Resources