Attach watir-webdriver to an existing window - watir

Is it possible to attach a watir-webdriver to an already opened browser window?

Watir-webdriver is built on top of selenium-webdriver, and this is a pending feature at this point.
See: http://code.google.com/p/selenium/issues/detail?id=18&colspec=ID%20Stars%20Type%20Status%20Priority%20Milestone%20Owner%20Summary

Related

Is it possible to move Google Chrome tab between windows? got it :)

Edit: Thank you wOxxOm. It worked :)
chrome.tabs.move(XXX,{windowId:YYY, index:ZZZ})
Somehow I did not see the move option :(
I am writing simple Google Chrome web extension and I want to manipulate the tabs and windows. I actually want to be able to move a tab between the windows. The tab will have programatically spawned dynamic page, that I do not want to reload. The windowId is not listed in the modifiable properties chrome.tabs.
Am I missing something or it is currently not supported? What are the workarounds?
p.s. In extreme case also powershell or .Net might be acceptable (I have total control of the target PC). Currently spawning clearly distinguishable iframe over the web pages (background script injected and message listener) but the iframe gets reloaded, which I want to avoid.
p.p.s. Workaround might be to detect the currently active window and spawn new tab in the active window (if required), but this would require to save the page state, close the inactive tab and spown new one in the active window (this should be possible)
p.p.p.s. Main target is Google Chrome, but want it also for Microsoft Edge. Hopefully also for other browsers.
Edit: Thank you wOxxOm. It worked :)
chrome.tabs.move(XXX,{windowId:YYY, index:ZZZ})
Somehow I did not see the move option :(

Error while spying elements on Chrome browser in blue prism

After spying element in web application in chrome browser and highlighting the element it throws an error like:
Error - Highlighting results - No matching Web elements found
Using BP version 6
The problem is that there are multimple chrome processes running in the background on your machine.
Solution:
1. Open Task Manager and kill all instances of Chrome process.
2. Launch new Chrome window from BluePrism
3. You should be able to spy element of the displayed web page now.
You should download the Blue Prism Browser extension for Google Chrome
and try spying the elements again.

WebGL - Open URL in new tab?

How to open URL in new tab for WebGL?
Tried Application.OpenURL("url"). But it's opens a tab in same window
Thanks
Thankfully, "Application.OpenURL" now opens your URL in a new tab, as you can see in the official Unity documentation.
WebGL: From version 2019.4.25f1, 2020.3.5f1, 2021.1.2f1, and 2021.2.0a11, Application.OpenURL opens url in a new browser tab. In previous versions, Application.OpenURL opens url in the same browser tab, which terminates the running Unity application.
Thus, it is the right solution to your question.
If you still want to try valyard's solution, shared by Mijago, be aware that is at least partially deprecated.
I got that message from my browser (Firefox) when trying it today.
The JavaScript function 'Pointer_stringify(ptrToSomeCString)' is obsoleted and will be removed in a future Unity version. Please call 'UTF8ToString(ptrToSomeCString)' instead.
Have a nice day :)
This should fit for you:
http://va.lent.in/opening-links-in-a-unity-webgl-project/
Github: https://github.com/valyard/UnityWebGLOpenLink

Interacting with Chrome extension using watir-webdriver

I am able to launch Chrome browser with extension in the browser. But I am not able to interact with the extension.
When I launch Chrome browser manually, I go to chrome://extensions and configure command for that extension and set short cut like "Alt+H" to launch the extension from short cut and after hitting Alt+H the extension gets invoked.
But when I launch chrome browser with extension using watir webdriver, the configure command setting for that extension is not set. After I set that manually again to "Alt+H" and try to invoke the extension on the browser which is launched using watir-webdriver, I don't see extension getting invoked.
Please let me know how can I interact with the chrome extension using watir-webdriver.
I do not think watir can interact with the extensions. It can only interact with the page. But, I could be wrong. I had moderate success with Sikuli when I needed to do something like that.

Is it possible to call one extension from another

I have Google Chrome and the extensions installed on it. I would like to reduce number of extension buttons on Chrome panel.
For this I want to create my plugin which will display popup window and allow to run another extension installed on my browser?
Is it possible and where I can find examples?
The messaging API has an external extension feature. You can use that communicate between extensions.

Resources