I've noticed instinctively that with too many tabs open, Chrome tends to prioritze suspending those WITHOUT user inputted data -- like form fields, composing a message, writing a comment, etc., to save on RAM.
Is this true?
And is there a way to detect which tabs have user inputted data via the Chrome Extension API?
Thanks :)
Related
I have requirement to record browser or tab with audio. Currently I can able to record browser and audio using chrome extension. But the problem is, I need to ask user to click on chrome extension every time.
So is there any way to record tab/browser with audio without asking user approval?
Please assist.
No. Chrome values the user desire to control their own computer higher than your desire to record their actions.
See also https://w3c.github.io/mediacapture-screen-share/#active-user-consent for the privacy considerations around this.
I am writing a test that verifies that a warning to the user before the user opens a document. If the user says that they still would like to open the document, the document opens in an external application (pdf or word).
But now I have an external application over the browser window, and it messes up for other tests.
So, what are the best practices around this kind of issue? Rewrite of the appliction to allow for not opening documents in test?
Added description:
The problem is twofold.
1) It starts processes (word and acrobat) that fills the desctop and requires resources from the test-slave
2) The external process seems to interfer with other tests since (guessing here) it is located over the browser window.
what i understood from your post is, the document(word/pdf) is opening in the browser window hence you are not able to proceed with further steps. If so, you can verify the Title to make sure the document is opened in browser window and can navigate back using below snippet.
driver.navigate().back();
Hope this helps.
What I understand from the line
'But now I have an external application over the browser window, and it messes up for other tests.'
is that once user clicks on open button a new window opens up (Window based application) since you have mentioned PDF or Word.
You can use robot class in such cases, below code snippet will close the current active window:
Robot rbt = new Robot();
rbt.keyPress(KeyEvent.VK_ALT);
rbt.keyPress(KeyEvent.VK_F4);
rbt.keyRelease(KeyEvent.VK_ALT);
rbt.keyRelease(KeyEvent.VK_F4);
Make sure you deal with sync issues properly so that intended window is closed instead of AUT.
I want to show "Welcome Back" popup after auto-signIn process as stated in the following documentation(FAQ part) :
https://developers.google.com/games/services/branding-guidelines
I have tried some methods like reconnecting etc. but it couldn't work. How can I show Welcome popup without signing out the user and showing account selection popup again?
What you are asking does not appear to be possible. According to the documentation at Google Developer
public GamesClient.Builder setShowConnectingPopup (boolean showConnectingPopup)
Sets whether a "connecting" popup should be displayed automatically at the start of the sign-in flow. By default this is enabled.
Note that this call will use the default gravity for the "connecting" popup, which will display the popup at the center of the screen. If you prefer that the popup appear in a different section of the screen, you can use setShowConnectingPopup(boolean, int), and provide a Gravity value.
Parameters
showConnectingPopup Whether or not to show a "connecting" popup at the beginning of the sign-in flow. Default behavior is for this to be true.
Returns
This Builder.
In watching the log output during a reconnect, I can find no discernible difference if performing it after backing out and immediately reconnecting (without logging out the user). Only if the user if forcibly disconnected.
Yet, looking at the flow, and this documentation, and the branding guidelines, the behavior Should be to show the "Welcome" popup as long as the setShowConnectingPopup is set to true.
It would be nice if Bruno (hint hint) or any other Google Play Services could weigh-in on this, as it would appear we are violating the branding guidelines if we DON'T have the "Welcome" on each sign in (even though this is a new requirement as worded by Google, along with some of the other branding stuff)
As far as I can tell my original answer StackOverflow link is still the only way to do this "Every" time, but if a user has multiple accounts, then yes the account selection will popup.
(my tests are on multiple devices, running from 4.1.32 and before.)
Hi ive developed a application that works with my site by using
SendKeys.send("{ENTER}") to submit info on one of my forms.
Is there a way to stop it from running outside the application?
For example im trying to run the program in the background and when im browsing my facebook or on google it randomly keeps hitting enter.
Any help is greatly appreciated thanks for your time.
The short answer is to look at the windows available for a process and check the titles to see if it's the page you want.
If System.Diagnostics.Process.GetProcessesByName("firefox").MainWindowTitle = 'My Page Title'
...
End If
That said, there are much better ways to do this - If you're using firefox, look into GreaseMonkey, if in Chrome, look at TamperMonkey.
Both allow you to inject custom javascript into any page whose url matches a pattern you choose. In effect, you could write some Javascript to submit a form (say) 30 seconds after page load.
This would have the benefit of working if a different tab is selected as well as not requiring a whole application.
The SendKeys.Send method will indiscriminately send the key stroke to the active application. There is no way to use this API to target a specific application.
You could change your app to try and verify the active application is the one you want to send keys too. This is destined to be a flaky process though. No matter how good your verification is it's always possible that the active app is switched to another app after your verification completes.
If VerifyActiveAppIsTarget() Then
SendKeys.Send("{Enter}") ' Active app could change before this runs
I would persue a different solution for sending data between my apps
I've passed many hours searching the web for a solution to something which seems obvious, but without results.
I need to automate a task in a Flash application running on my intranet.
I can't change the Flash application nor do I have access to the source code.
it's not a Flash movie but an application.
I can't download the swf.
I'm using a WebBrowser in a form. The Flash app is displaying without issues.
So far, I have been able to automate the task (clicking on some buttons, then inputting text and finally saving the results on a server). It works but it's not clean at all because I use hard-coded timers to wait a given action is done and then I click on very specific point at given coordinates in the application.
What I would like to do:
Avoid hard-coded timers. the Flash application takes some time to display all elements on the window (from 20 to 60+ sec). I would like to be able to detect when all elements are loaded. I tried to retrieve the text of the windows handle, but while I can retrieve the Flash hwnd, I can't retrieve the content (through messages).
In brief, instead of waiting 60sec (and not being 100% sure it's enough), if the last element to load in the Flash app has "ABC" written in it, I would like to detect it's displayed so that I can continue the sequence (click on the next button).
I'm using VB.net. Any hints to achieve that would be appreciated.
Lol. I am trying to do the same thing but with no results. You can try to see if there are POST/GET codes that can help you if the application has an online nature. Other than that you can only simulate clicks, because flash can't be easily interacted with. This is why most of the things are going to swap with HTML5 now.