what is the equivalent option for displaying a notificationbox in chrome extension like in firefox addon - notifications

I am developing extensions for a site for major three browsers (FF,Chrome,IE).
I started with firefox and now working with chrome.
I want to know how to implement an option like the firefox xul notificationbox https://developer.mozilla.org/En/XUL:notificationbox in chrome?
How to display the do you want to save password panel in chrome like in firefox notificationbox?
I inspected LastPass and found that they are injecting a div inside the body tag as the first child of the body tag. is that the way it has to be ? or some other option?

There is an experimental API for this: chrome.experimental.infobars.
Until it gets stable creating your own div is the only option.

Related

Testing a chrome extension using Testcafe with switchToIframe

I've currently got an extension running on testcafe within chrome by having the extension installed on chrome and running: testcafe chrome:userProfile test.js
The content_script in my extension injects an iframe pointing to the web_accessible_resource index.html asset. However when I switch to the iframe context using t.switchToIframe testcafe returns "Content of the iframe to which you are switching did not load"
From what I can see it looks like testcafe-hammerhead isn't rewriting the iframe src when it's in the format of chrome-extension://[PACKAGE ID]/[PATH]) so I've tried changing the url to point to a url i.e. localhost:8080/index.html but this doesn't work either.
If I create an html file inject the iframe using a js file I'm able to get the test to run and interact with the iframe. Therefore I think it's related to how content scripts are run and how they inject content in to the DOM.
Has anyone else run in to this issue/have any better suggestions on how to write tests for extensions in general?
Thanks
Unfortunately, TestCafe doesn't support browser extension testing. TestCafe was designed for cross-browser HTML5 web app testing, so it needs a lot of improvements to cover browser-specific extension APIs.
I suggest you create an issue in the https://github.com/DevExpress/testcafe repository and add +1 to it. If it receives enough votes, we might consider its implementation.

Log binding context for HTML element when using Aurelia

For a site using knockout.js you could select an element in chrome with the picker (dev tools) and then write in the console ko.contextFor($0) is there an eqivalent in Aurelia that would let me see the binding context for an HTML element?
There is a Chrome addon exactly for that (GitHub repo).
Looking at the code from the chrome addon it seems that $0.au gives a decent amount of information.
To get the binding context you can find it with $0.au.show.scope.bindingContext

How to automate shadow dom elements on browser by integrating shady dom api?

We are facing issues while automating the shadow dom elements using selenium web driver on safari browser.
The main issue we are facing is that we are not able to send keys to the text boxes which are in shadow-root. We tried to set value of textbook using javascript but that too is not working.
Above functionality is working fine with Firefox, but problem is with Safari.

Does Opera extension manifest have a similar set default tab page like Chrome?

I'm trying to port a Chrome extension to Opera.
In my chrome manifest.json I have the following lines which tells the Chrome browser to use a specific html page when it launches and whenever it opens a new tab.
"chrome_url_overrides" : {
"newtab": "my-page.html"
},
How would one create this same action in Opera? I looked at the Browser and Page actions but they don't seem to do the trick.
Unfortunately, it's not supported in Opera.

Opening Selenium in a Iframe

I am using selenium to perform screen scraping on some application(url).I am using IE/Firefox driver.Can we open the browser which selenium opens in an iframe instead of opening it in a new window.To be more precise driver.get should open the url in an iframe and not a window.
No. You can't open a browser inside an IFRAME. The contents of an IFRAME are always displayed by the same browser that displays the IFRAMEing page.
How to work around this strongly depends on what you are trying to accomplish and on whether you are using Selenium 1 (a browser plugin that rewrites pages by injecting JavaScript into them) or Selenium 2 (which uses WebDriver to communicate with browsers). But I'm pretty sure you'd need to rewrite some of the Selenium software.