This question already has answers here:
Closed 10 years ago.
Possible Duplicate:
Using HTML5/Canvas/Javascript to take screenshots
Is there a way for a browser to take a global screenshot ? I mean, the entire screen, including what is not in the browser.
I kown that I may sound a little bit silly by asking this.
There is experimental support for full-screen capture in Chrome's getUserMedia WebRTC function, using a {chromeMediaSource: 'screen'} parameter. The functionality currently requires explicit activation by an option in chrome://flags, and (like all WebRTC capture mechanisms) requires explicit consent from the user when the function is called.
Other than that experimental option in Chrome, is not possible using pure JavaScript, but you could probably do it using a plugin like Flash, or an ActiveX control.
If you only want to capture a web page (rather than the whole screen), see Using HTML5/Canvas/JavaScript to take screenshots.
Related
This question already has answers here:
How to work while Selenium tests are working
(2 answers)
Closed 5 years ago.
I am using Selenium to automate a website. First, I open the main website with C#.
Then, I manually click to open new windows from the main site. Now, I want to scrape the data of these new windows. This is not an issue. The problem lies in the fact that Selenium seems to need a window to be focused to scrape it. I use the SwitchTo method currently before scraping. When you switch, the new windows pop to the front and steal focus from other windows. Is there a way to scrape a window without giving it focus?
Saying that “Selenium requires focus when scraping a page” is a gross oversimplification at best, and a complete misassignment if responsibility at worst. Whether a driver used by Selenium to automate a page requires focus is highly dependent on the driver’s implementation. You haven’t said what browser you’re using, but if it’s Chrome or Firefox, those implementations are created and maintained by the browser vendors (Google and Mozilla, respectively).
There are alternatives in both cases, as both browsers officially support a “headless” mode, which can be used with Selenium. Note, however, that use of that mode would require you to automate the steps you’re currently doing manually.
Answering straight, No Selenium can't scrape a window without the required focus.
It's not only Selenium needs focus. The WebElements with whom you intend to interact with, needs to be within the Viewport
Update:
As per your comment if you want to work through an alternatives to Selenium that wouldn't require focus the Answer is Beautiful Soup through Selenium Python Clients using urllib.request module.
This question already has answers here:
How to create an Explorer-like folder browser control?
(3 answers)
Closed 5 years ago.
Not sure if this is off topic or not, if it is i will gladly delete.
I am converting one of my companies utility programs to C#.NET in winforms it is written in vb6, DEFINITELY NOT .NET as it is 15 years old. and in the UI it has a tool which looks like this
it acts like a folder browser put stays on the UI unlike a folder browser dialog which is a popup. is there a .NET tool which does the same thing or do i have to use a folder browser dialog. ideally i would like to keep it on the screen because i think it looks better to keep it on the screen rather than a separate box. if anyone knows if this is actually a tool in C#.NET winforms or not that would be great
Yes these controls are no longer avaiable in .net, you can create one yourself relatively easily, here is a MSDN link describing what you want
https://msdn.microsoft.com/en-us/library/ms171645(v=vs.110).aspx
This question already has answers here:
Is it possible to use Selenium with C# windows Form that contains a WebBrowser object?
(5 answers)
Closed 7 years ago.
I have been looking all over the internet for resources that explaining a way of using selenium with a C# Windows Form that contains a WebBrowser object. We have this project that requires implementing selenium to interact with the Embedded webBrowser.
Any resource would be useful.
I have looked into this but it gets no where.
Is it possible to use Selenium with C# windows Form that contains a WebBrowser object?
Thanks in advance.
No, its not possible to use selenium with your own browser. Selenium can be used only for browsers that selenium support (opera, safari, firefox, chrome, phantomjs, ie, etc)
But you can use native c# functionality for this. There is possible to do some actions as clicking on elements and some another, but its pretty poor.
This question already has answers here:
Custom button captions in .NET messagebox?
(8 answers)
Closed 9 years ago.
I've a winform application, and we are trying to make it ergonomic as possible, so we respect a lot microsoft guidelines.
We have some "Deletion confirmation" to implement, and according the guidelines and what I found accross the web, the more adequate buttons would be:
Delete and Cancel
But since we use the MessageBoxButtons to specify which buttons we have to display, I can't see how we can do this except implementing ourself a confirmation dialog.
I don't find very logical that microsoft encourage in one side the use of "action" text on button, and the other side doesn't give us the tools to be compliant, so I think I'm missing something?
Please note that I don't need more results possibility than currently, My Delete option would be the same as Ok for me, I just want to have differents texts.
So: Is there a way to specify easily buttons we want to show different text here?
There is no easy way other than creating your own implementation using form and show it as dialog?
We did the same some time back because of localization specialities in our project.
This question already has answers here:
Closed 10 years ago.
Possible Duplicate:
Force WinRT app to snapped view
Is it possible to start a MetroApp directly in snapped mode?
I want to call another App by Protocol, an the App should open in Snapped mode.
The call to the App by Protocol is not a problem, it works fine, but the App opens in Fullscreen or Main-Content Mode.
I have'nt found any configuration to say "start on Sidebar".
Please Help!
As of now the answer is no. Since the snapped mode functionality depends on the user , you cant skip it / restrict it using code , Hope MS might provide this feature in further .
As #Hermit Dave mentioned unsnapping is possible.
The ApplicationView class that i have come across only exposes TryUnsnap and Value (current view value) which is used to request a change from snapped to unsnapped view.
http://msdn.microsoft.com/en-us/library/windows/apps/hh701658.aspx
I dont think what you want is possible.