Chrome ctrl comma and ctrl period no longer able to traverse call frame? - google-chrome

This stopped working recently, what happened? Is there a way I can configure it so that it would work?
Edit: So I verified with the following, apparently CTRL + , still works as traverse up, but not CTRL + .
This is across multiple installations I use so it is in the latest chrome on all my Mac OS machines.
(function a() {
return function b() {
debugger;
}
})()()
Edit
It appears Chrome recently (Apr 2019) fixed this issue.

One thing that you can check is that if Ctrl+. and Ctrl+, is not mapped in operating system command shortcuts because it will take precedence over chrome shortcuts/shortkeys

Related

Autohotkey: Identify Google Chrome vs Google Chromium

I can't seem to figure this out
On autohotkey, there's documentation on how to identify a window / program running.
Google Chrome and Google Chromium both use the same ahk_class and the same .exe name of chrome.exe
How does one use something like winTitle or winGet to distinguish the difference? I tried looking into PID values but they don't seem to be consistent.
EDIT via WinSpy++
Using winspy++, I ran a simple experiment. 2 Chromium Windows and 2 Chrome Windows so I can have a control group. Differences:
INSTANCE HANDLE: Chrome shows 0F2C0000, Chromium shows A2820000
Process ID: Chrome shows 00003528 (13608), Chromium shows 00001B74 (7028)
Thread ID: Chrome shows 00003524 (13604), Chromium 00000220 (544)
In this case you have two possibilities to distinguish between the two programs:
(1) Using SetTitleMatchMode 2 and the part of the title that all windows of this program have in common:
SetTitleMatchMode 2
If WinExist("- Chromium")
WinActivate
(2) Using "ahk_exe Path":
If WinExist("ahk_exe full_path_of_the_executable_chrome.exe")
WinActivate
To get the full path of the active window process use this:
F1::
WinGet, Path, ProcessPath, A
MsgBox, %Path%
return
Using Windows Spy (came with autohotkey). Is not the same as winspy++
To access Windows Spy found here:
Differences are found in WinTitle

Sikuli Key.CTRL does not work

Using Sikuli IDE 1.0.1 (according to the "About SikuliX" menu).
Ubuntu 14.04.3, 64 bit, virtual server, via tightvnc + Xfce 4.
One day everything just stopped working though we did not change the sources. Server updates (ubuntu software) are off. Combinations like type('a', Key.CTRL) started to type plain 'a' char, not selecting a text (as before).
We even tried to spin up the same instance type, set everything up there, and run agian. And Sikuli failed to type "Ctrl" again!
We also tried to run the script with "-r", skipping IDE. Same thing - no Ctrl.
Can anybody help?
Thanks!
I suppose you should do it as sequential actions (like you actually do on your keyboard):
keyDown(Key.CTRL)
type("a")
keyUp(Key.CTRL)
Alternatively, you can use the KeyModifier.CTRL in the function type
type("a", KeyModifier.CTRL)
If you're using the
type('a', Key.CTRL)
to simulate holding CTRL and pressing the 'a' key, the method you're using has been depricated. It should more properly be
type('a', KeyModifier.CTRL)
as per the documentation.
Try that and see if that will solve your problem. :)

How to Start ChromeDriver.exe without EULA with Selenium Webdriver? [duplicate]

I am learning to use Selenium (v2.20) to get ahead of some of our programmers who will soon be creating some browser tests with it. I'd like to uncover the pitfalls before they get there, and I've stumbled into one.
When I create my ChromeDriver, it always brings up a "Google Chrome EULA" and presents two buttons: "Accept and Run" and "Cancel". As I want this to be an automated test, having a user click a button is out of the question.
I looked at a list of Chromium Command Switches but did not find any that worked, nor any that mentioned EULA. The test works fine if I (at a breakpoint) click "Accept and Run" and then let the code continue.
The code, up to the line that causes the problem, is below:
using (var driverService = ChromeDriverService.CreateDefaultService(#"C:\Apps\ChromeDriver\"))
{
driverService.Start();
// This line pops up the EULA
IWebDriver driver = new ChromeDriver(#"C:\Apps\ChromeDriver\");
// rest of test...
}
Has anyone else run into this issue? If so, how did you solve it?
UPDATE 4/4/12
I just ran the same code on my computer at work and I succeed without triggering the EULA (consistent with Slanec's experience). This leads me to believe the cause is environmental. I'm looking into the differences between the two systems (both Win7 x64) to determine the cause. I'll update once I have more information.
Thanks much,
-Seth
In case you still have this problem, the error occurs because you are opening up a brand new instance of the chrome browser every time you run the test, thereby triggering the EULA. If you copy the default chrome profile into a custom location of your choice, and then add the "--user-data-dir=yourcustomlocation" flag to ChromeOptions, you can bypass the EULA and open up the existing profile instead.
ChromeOptions crOptions = new ChromeOptions();
crOptions.AddArgument(#"--user-data-dir=C:\custom location");
return new ChromDriver(crOptions);
Steps:
Copy your chromedriver.exe into Windows/System32
Now Go to your chrome folder, for me it is: C:\Users\"%USERNAME%"\AppData\Local\Google\Chrome\
There is a master_preferences file.
Open it and false EULA option.
It works for me, hope will work for you all also.

How to delete indexedDB?

I'm working in a project which involves using IndexedDB.
As I'm begining to know this technology, I need to be able to delete an indexedDB by hand so I can start over.
I found the way to do it in Firefox, but I can't find the way for Google Chrome.
I tried deleting the content of this folder (I'm using Mac):
{home}/Library/Application Support/Google/Chrome/Default/IndexedDB
but it seems Chrome stil have the DB anywhere so I can't start over.
I've had success running the following in Chrome:
indexedDB.deleteDatabase('DB NAME')
In theory, all you need to do to delete an IndexedDB in Chrome is:
In Chrome, go to Options > Under the Hood > Content Settings > All cookies and Site Data > find the domain where you created the IndexedDB
Hit either the "X" or click "Indexed Database" > Remove
In Windows, the file is located here:
%USERPROFILE%\AppData\Local\Google\Chrome\User Data\Default\IndexedDB
On Mac, do the following:
In Chrome, go to "Settings" (or "Preferences" under the Chrome menu)
Click "show advanced settings" (at the bottom of the page)
Go to "Privacy" > "Content Settings" > "All cookies and Site Data" > find the domain where you created the IndexedDB
Hit either the "X" or click "Indexed Database" > Remove
On Mac, the folder is located here:
/Users/[USERNAME]/Library/Application Support/Google/Chrome/Default/IndexedDB/
On Linux, the folder is located at:
/home/[USERNAME]/.config/google-chrome/Default/IndexedDB/
Alternarive is to do it in the developers console, using this command:
indexedDB.deleteDatabase("databaseName")
In Chrome webkit you can use webkitGetDatabaseNames which returns all database names
With this code, you can delete all local indexedDB:
window.indexedDB.webkitGetDatabaseNames().onsuccess = function(sender,args)
{
var r = sender.target.result;
for(var i in r)
indexedDB.deleteDatabase(r[i]);
};
To remove all Chrome IndexedDB databases run the following in OSX terminal emulator.
rm -rf ${HOME}/Library/Application\ Support/Google/Chrome/Default/IndexedDB/*
Now restart your browser and that's it.
Because I need to purge IndexedDB databases very often, I have set up an alias in my ~./bash_profile.
alias purge-idb="rm -rf ${HOME}/Library/Application\ Support/Google/Chrome/Default/IndexedDB/*"
Chrome -> Inspector Window -> Application -> look at left hand menu -> Storage -> IndexedDB
You have to be on your application's page though. Also I think Safari expires IDB data after 7 days or something.
write this code segment in console
window.indexedDB.deleteDatabase(<your db name>)
To delete an IndexedDB from the OS X version of Chrome:
1) In Preferences, show Advanced Settings then click the "Content Settings" button under the "Privacy" section.
2) In the "Content Settings" popup, click the "All Cookies and Site Data" button under the "Cookies" section.
3) In the "Cookies and site data" popup, use the "Search Cookies" textbox to look up the domain that is the source of the IndexedDB.
4) Click on the domain entry in the list.
5) Click on the "indexed database" tag listed under the domain.
6) Click on the "Remove" button in the drop down detail for the indexed database.
Chrome Developer tools now have an option to delete all databases for an app, under "Application/Clear Storage".
In Debian GNU/Linux directory
/home/[username]/.config/google-chrome/Default/IndexedDB/chrome-xxx.indexeddb.leveldb/
contains regular files (for example):
000003.log, CURRENT, LOCK, LOG, MANIFEST-000002
It's not possible to delete IndexedDB database (as opposed to stores and indexes) programmatically.
As for manual workarounds, this post details the location of the database on Windows systems for Firefox and Chrome.
Update: Thanks to developer Joshua Bell, Chrome implements an off-spec (but insanely useful) deleteDatabase method on the window.indexedDB object. Here's the crbug that landed this patch. Moreover, in newer versions of IE, you can delete databases via a settings panel.
This is maybe overkill for your specific question, but I kept ending up here in my struggle to delete my idb.
My solution in the end was based on mozilla's documentation, but required that I first close the database.
For me, in Javascript, the code looked like this:
my_db_instance.close(function(e){console.log(e)});
var DBDeleteRequest = indexedDB.deleteDatabase("my_db_name");
// When i had the base open, the closure was blocked, so i left this here
DBDeleteRequest.onblocked = function(event) {
console.log("Blocked");
};
DBDeleteRequest.onerror = function(event) {
console.log("Error deleting database.");
console.log(event);
};
DBDeleteRequest.onsuccess = function(event) {
console.log("Database deleted successfully");
};
In order to complete #Judson's answer, based on #fullstacklife's comment; for deleting IndexedDB in chrome using javascript you should:
let currentIDB = indexedDB.open("DB_NAME", DB_VERSION_INTEGER);
currentIDB.onblocked = function(){
//
};
currentIDB.onerror = function(){
//
};
currentIDB.onsuccess = function(){
var idb = currentIDB.result;
idb.close();
indexedDB.deleteDatabase("DB_NAME");
};
To delete IndexedDB in Chrome on Android:
Settings
Site settings
Data stored
Search needed site and press
Delete stored data
(You cannot delete IndexedDB via Settings -> Privacy and security section, what is quite misleading...)
Alternatively, use your web application in a new incognito window, and close it when you're done: database deleted.
In chrome OSX- /Users/user/Library/Application Support/Google/Chrome/Default/IndexedDB
Firefox OSX - Users/user/Library/Application Support/Firefox/Profiles/4zaemxcn.default/indexedDB
You just need to make visible the library folder. All of the files are stored in folders(which are called as domain name) and the files use hash, but you can figure out the name of database from it.
You can delete data from IDB because it is a client side database and all of the data is stored locally.
In windows, you can manually delete the whole IndexedDB databases by locating the IndexedDB directory for the browser and deleting it
For Chrome:
C:\Users\user-name\AppData\Local\Google\Chrome\User Data\Profile 1\IndexedDB
You can delete every folder which clears up the indexedDB. You can start over now.
I needed to get rid of an indexedDB in Chrome. So I search for this lousy thing called "email assistant" on my computer using MasterSeeker. Found the thing in a bunch folders that were indexedDB in Chrome. It seemed too easy that I just delete those files. I looked up how, and ended up here. I went to chrome settings with my Windows 10 PC. I just gave it a shot at trying to clear the browsing data. Presto - all those files disappeared from indexedDB, including that dreaded "email assistant" crapola. Now when I look in the indexedDB folder all I see that has reappeared is https_mail.google.com_0.indexeddb.leveldb - which looks like a safe non-irritating thing.
//By for loop
const deleteAllDBs=async()=>{
const existingDBs=await indexedDB.databases()
for (let i = 0; i < existingDBs.length; i++) {
indexedDB.deleteDatabase(existingDBs[i].name)
}
}
//By forEach loop
const dbs = await window.indexedDB.databases()
dbs.forEach(db => { window.indexedDB.deleteDatabase(db.name) })
Since most of the answers not mentioned how to find the db names:
Open the site you want db to be cleared.
Press F12 in Chrome, select console regime.
Type indexedDB.databases().then(res => console.log(res)) to learn database names used by this website (open the result with interactive console, find the name).
Finally, as mentioned above, execute in the console indexedDB.deleteDatabase('<your database name>').

Disable shortcuts in Google Chrome

Is there a way to disable and replace shortcut commands in Google Chrome. I want to use Chrome for a public computer that only can access one site. Because of this I want to disable keys like Ctrl+Tab, Ctrl+T, Alt+F4 and I want to change F11 to a command like Ctrl+Shift+Alt+J (example) to stop users from exiting full screen mode.
Settings on the network block everything but a specific domain but now I want to block the user from exiting the browser.
I know this question is quite old, but I found a solution that works for me (and probably many others too).
If you don't use the CTRL and ALT keys in the browser at all, you can disable them in the OS itself.
Under Linux, I used xmodmap -pke to find out which key is mapped to which code.
Knowing the keycodes, I used:
xmodmap -e "keycode 37 = "
xmodmap -e "keycode 105 = "
to disable both left and right CTRL keys (to prevent something like CTRL+W, CTRL+T, etc.), then with:
xmodmap -e "keycode 133 = "
xmodmap -e "keycode 134 = "
both left and right SUPER keys (Windows Keys) (to prevent opening the start menu and such fancy stuff)
and then finally with xmodmap -e "keycode 105 = " I disabled the ALT key (to prevent ALT+F4, etc.).
And optionally, we can disable F1 too, so that the Chrome Support Page doesn't open, with: xmodmap -e "keycode 67 = "
Finally, let Chromium or Chrome lock the rest down for us using Kiosk Mode:
chromium-browser --kiosk http://example.com/
or
google-chrome --kiosk http://example.com/
And right click is already disabled in kiosk mode, so we don't need to change anything there.
With all that done, the end user can only navigate with the mouse within the predefined webpage (And links leading to some other content, of course) and write stuff with the normal characters on the keyboard, but nothing more.
Reloading may be still possible (F5), but even that can be disabled with: xmodmap -e "keycode 71 = "
Caution: Please execute xmodmap -pke first to discover if your keyboard or OS have the same keymapping, or you may disable other normal keys without knowing.
Caution 2: Note that if you've done everyhing above and then launch Chrome or Chromium in Kiosk Mode, you can't get out anymore! Only physically pressing the power button or killing the application over SSH or Telnet will let you resume normal operation again.
To make those changes permanent, read the end of this guide:
https://stackoverflow.com/a/11219056/3525780
EDIT: To those who have problems disabling the F1, F5, etc. keys, use following as a workaround:
xmodmap -e "keycode 67 = Escape"
(Somehow those "F keys" need to be assigned to an already existing and assigned key)
Having recently encountered the same kiosk-type problem (and not being able disable all keys in Chrome) I eventually found a solution which I thought I would share:
Using node-webkit I created the following package.json file:
{
"name" : "mykiosk",
"window" : {
"fullscreen" : true,
"toolbar" : false
},
"main" : "http://the-one-and-only-allowed.url/"
}
Launch with: ./nw
All function keys are blocked. Ctrl+N/T do not create tabs. It is quite nice
One last javascript/onload trick to disable the right-click context menu:
window.oncontextmenu = function(ev) {
ev.preventDefault();
ev.stopPropogation();
return false;
}
Chrome has Kiosk Mode, but that won't prevent users from using OS keyboard shortcuts (like ALT+F4, which aren't part of Chrome. Windows handles those). To start it in Kiosk Mode, run it using these parameters:
chrome.exe --kiosk http://www.google.com
My public library actually did something pretty awesome: they installed an extremely minimal Debian build on their kiosks, and run Google Chrome on each one. There are no close buttons, and no desktop to get into, so this deters virtually all the CTRL+ALT+DELETE hackers out there. ALT+F4 doesn't work either, and closing the browser by right-clicking opens up another one instantly.
But they forgot to get rid of GRUB's 10 second timeout, which lets users (well, me) get into recovery mode -_-, so I'm working with them to get that fixed...
I'd seriously consider Linux, as you can install it really quickly on multiple computers and basically forget about viruses and security. But the downside is that there isn't a "Administrator Panel" for you to tweak things with. You'd have to whip out nano (sorry, can't get used to vim) and edit some config files.
For me using version 52.0.2743 the --kiosk tag didn't work, but the --app="http://www.example.com" did what I wanted. (Disabled chrome keyboard shortcuts so I could use shellinabox + nano without issue.)
Also works on Chrome Canary (for which the --kiosk tag also didnt' work).
Other possibly helpful links:
Chrome support how to make a Kiosk App: https://support.google.com/chrome/a/answer/3316168?hl=en
Kiosk App for Chrome: https://chrome.google.com/webstore/detail/kiosk/afhcomalholahplbjhnmahkoekoijban?hl=en