Task: Debug other extensions using chrome debugger api.
Expected Output: http request logs made by other installed extensions.
Method: Running chrome webdriver with selenium in python setting flag chromeopts.add_argument('--silent-debugger-extension-api' ). Inside my extension, On event chrome.management.onInstalled using following code
chrome.debugger.attach({ extensionId: info.id }, version, onAttach.bind(null, info.id));
chrome.debugger.sendCommand({ extensionId: info.id }, "Network.enable");
chrome.debugger.onEvent.addListener(onEvent);
Error: Cannot access a chrome-extension:// URL of different extension
To debug the background page of another extension, you need to set two flags:
--silent-debugger-extension-api
To allow debugging of background pages.
--extensions-on-chrome-urls
To allow debugging of other extensions.
Related
I'm running cordova for the browser: cordova run browser
I'm opening unsecured chrome browser in Ubuntu:
google-chrome --user-data-dir=/tmp/temp_chrome_user_data_dir_for_cordova --disable-web-security --no-referrers
But loadstop event returns empty url: {type: "loadstop", url: null}
(Also, I'm injecting and using cordova from an iframe)
edits:
--no-referrers flag doesn't affect the event return
can't test it in Firefox with security.fileuri.strict_origin_policy=false because don't let me inject cordova
SecurityError: Permission denied to access property "cordova" on cross-origin object
Seems related to this chrome bug: https://github.com/cypress-io/cypress/issues/1951
The solution for me was:
Add the --disable-site-isolation-trials argument to chrome
I'm working on a chrome extension that uses native messaging. Native messaging works great on my personal copy of Chrome, but I get error messages from the extension when using it in selenium via ChromeDriver:
Error in event handler for runtime.onMessage: Error: Attempting to use a disconnected port object
I'm loading the extension via the following protractor config:
capabilities: {
'browserName': 'chrome',
'chromeOptions': {
'args': [
'--load-extension=./build/chrome'
]
},
}
Does one have to do something special to enable native messaging in ChromeDriver? I've tried adding our native messaging manifest file(s) to the global locations for both Chrome and Chromium, but still no luck.
as of 2018.11, with Chrome 70 and chromedriver 2.43, native messaging works well.
When trying to access a specific test environment with Chrome, spawned by protractor/ selenium webdriver, a chrome popup is displayed prompting me to select the client certificate to use to authenticate with this site.
There's only one certificate installed - is there any way for this to be autoselected?
Try to add following configuration to Protractor conf.js:
capabilities : {
browserName : 'chrome',
'chromeOptions': {args: ['--test-type']}
}
I am trying to use Chrome browser with my Test cases. Same tests work fine with Firefox and PhantomJs.
However , Chrome browser starts but never opens a page.
I have installed
1. Chromdriver : port=9515 version=19.0.1068.0
2. Chrome : Version : 37.0.2062.120 (64-bit)
3. Selenium: Version : 2.42.1
4. RobotFramework : Version : 2.8.5
I think I have Paths variables configured accordingly as well.
google-chrome , starts Chrome
chromedriver , starts chromeDriver
Following line is responsible for starting chrome and opening page.
*** Variables ***
${BROWSER} Chrome
${MY-URL} http://www.google.com/
Open Browser | ${MY-URL} | ${BROWSER}
Errors :
Chrome:
WebDriverException: Message: u'Unable to either launch or connect to Chrome. Please check that ChromeDriver is up-to-date. Using Chrome binary at: /opt/google/chrome/google-chrome'
WebDriver Logs Shows Error
Initializing session with capabilities {
"browserName": "chrome",
"chromeOptions": {
"args": [ ],
"extensions": [ ]
},
"javascriptEnabled": true,
"platform": "ANY",
"version": ""
}
[1.001][INFO]: Launching chrome: /opt/google/chrome/google-chrome --disable-hang-monitor --disable-prompt-on-repost --dom-automation --full-memory-crash-report --no-default-browser-check --no-first-run --ignore-certificate-errors --homepage=about:blank
[46.004][SEVERE]: Failed to initialize connection
<br><br>
Can someone point something I am missing ?
Anyother way of debuging the problem ? Any Clue will be good.
Have you put chromedriver in your PATH ?
And do you run the test with current user or with root ?
Selenium needs chromedriver to call chrome, so you can download it from google.com and put it in /usr/bin, or just update your PATH environment variable.
Then, on Debian, root can't (otherwise with errors) call google-chrome browser, so try it with your account.
Hope it helpful.
NODE,
Please re-check your web driver, delete chrome web driver and download new web driver: Here
Check your VARIABLE NAME again! Do NOT use the "-" character to set a variable name like ${MY-URL}! You should change it => ${MY_URL}
You can try to turn of UAC or/and Firewall and try again.
As i know, when you use selenium2library, you don't need to set path to web driver(!?)
Hope it helpful.
I am a newbie to webrtc2sip. I have setup my webrtc2sip gateway and registered to sip2sip.info as my domain. The problem is when I make video calls from chrome to any SIP client(ekiga/jitsi) the call gets connected but I am unable to see videos on both the sides.
==================================================================================
Case 1: Chrome calls SIP client
Result: No video shown on both transmit and receive side
==================================================================================
On the chrome JS console it says that :
State machine: tsip_dialog_register_InProgress_2_Connected_X_2xx SIPml-api.js?svn=179:1
==session event = m_stream_video_local_added SIPml-api.js?svn=179:1
==session event = m_stream_video_remote_added SIPml-api.js?svn=179:1
==session event = m_stream_audio_local_added SIPml-api.js?svn=179:1
==session event = m_stream_audio_remote_added SIPml-api.js?svn=179:1
I have attached the JS console logs(case1_web2SIPClient_JSLogs.txt), wireshark trace(case1_web2SIPClient_WStrace.pcap) , webrtc2sip gateway console logs(case1_web2SIPClient_gatewayLogs.txt), sipml5 expert settings (Expert_settings.png) and config.xml (config.xml) for this case. I did not change anything in the config.xml that was generated after i built the source as mentioned in the instructions of this page (http://linux.autostatic.com/installing-webrtc2sip-on-ubuntu-1204).
I gave a try making calls between chrome and a android SIP client (CSipSimple) and the problem remains the same.
==================================================================================
case 2: SIP client calling chrome.
Result: as soon as I click answer button on chrome, the calls gets rejected.
==================================================================================
The JS console logs states that:
State machine: tsip_transac_ist_Proceeding_2_Completed_X_300_to_699 SIPml-api.js?svn=179:1
SEND: SIP/2.0 603 Failed to get local SDP
Via: SIP/2.0/WS 172.21.128.118:10060;rport=10060;branch=z9hG4bK-1441398960
From: <sip:tata#172.21.229.127>;tag=300647977
To: <sip:amshyam320#sip2sip.info>;tag=ZxQFfM7fIIP3rT1HINzb
Call-ID: fbdf5a11-ff9e-0072-fa8b-09525220cec6
CSeq: 1670757835 INVITE
Content-Length: 0
Reason: SIP; cause=603; text="Failed to get local SDP"
For this case I am attaching JS logs(case2_SIPClient2WebJSLogs.txt), wireshark dump(case2_jitsiToWeb_WStrace.pcap)
Configuration:
Chrome Version: checked on 30.0.1599.114 and even on Latest chrome version
Webrtc2sip version: 2.6.0
sipml5 Version: svn=203
ubuntu version: 12.04 (checked on both desktop and server editions)
Am I missing something in my setup or configuration please guide and help in moving further.
Thanks,
Shyam
Case2:
You're using RTCWeb-capable browser(Chrome) and trying to call a SIP client which may not be implementing some mandatory features like ICE,SRTP. Chrome uses SRTP-SDES and Firefox uses SRTP-DTLS.
Enable RTCWeb Breaker in sipml5 expert settings and check.
The RTCWeb Breaker is used to enable audio and video transcoding when the endpoints do not support the same codecs or the remote server is not RTCWeb-compliant.
Case:1:
Is audio working? and I can't see your logs.