How to select the device to cast from popup in capybara, selenium, Ruby in chrome - ruby

I am trying to select the first device from popup to cast using selenium, capybara but I am not able to do it. Please find the popup below
I have tried following and it does not seem to be working
popup = page.driver.browser.window_handles.last
page.driver.browser.switch_to.window(popup)
page.driver.browser.switch_to.alert.accept
page.driver.browser.switch_to.alert.dismiss
page.driver.browser.switch_to.alert.text
Please provide sugggestions!

You can't - that's a system dialog and selenium can't interact with it once opened. It MAY be possible to set a default to launch and prevent the dialog from opening via chrome command line switches but I'm afraid I don't know what that would be.

Related

File selection dialog popup underlays behind chrome extension popup window

In my browser extension, I am trying to upload a file from my computer. When I click on "select a file" option inside my browser (), the file selection dialog box underlays behind the popup window.
This appears only when the browser is in full screen mode and on MAC OS. Once I switch the tab or remove full screen mode it overlays as expected.
Can someone please provide a solution or workaround to this issue?
I encountered the same issue recently with a Chrome extension. How did the issue appear? I don't think I've changed anything, it seems to have appeared out of nowhere.
If you have any insights, I'm interested in collaborating with you to debug the issue with my own extension. Let me know!

Presentationrequest.start showing different UI compared to cast dialog in chrome

I was using PresentationRequest.start Google API to launch Cast dialog.
After recent update PresentationRequest.start open chromecast dialog but UI is different as compared to chrome browser manually open cast dialog.
Sources selection button not showing now.
UI preview when used PresentationRequest.start
If anyone know why it is different? and how we can get same UI as cast dialog open in chrome browser manually? Is there any command line option is there to open cast dialog and cast desktop?

text entered into textbox is not taking by safari browser in selenium webdriver for mac

Im using sendkeys to enter text into the text box in safari browser using selenium web driver in Mac OS. But when i try submit it it is giving error saying there is no text entered. but i can able to see the text in the textbox.
Please provide me some suggitions for this.
I was able to resolve this issue by adding JavaScript Event after entering the text.
JavascriptExecutor jsExecutor = (JavascriptExecutor) driver;
jsExecutor.executeScript("$(arguments[0]).change();", WebElement);

How to stop javascript popup in embedded browser? in windows application?

Let i show u my problem.
I have one windows application .
In that application we r using watin.
In my application i am using embedded browser.
Using watin we check every mail and check every link.
we used for loop to check all links ,when we embedded browser open link then loop moves and browser open second link. If that first link contains popup/leave page dialog then it popup on browser.
watin can not find that popup then application crashes.
I have tried lot of technique but i fail.
When we try to find that popup we did not get anything.
So ,please give me such a technique so that popup will not come or close that popup using watin.
How to identify that popup.When this popup comes we unable to do anything.
Please give me any technique so that popup can be completely solved.
Take a look at this post. Of course the built-in could do just the same:
WatiN.Core.DialogHandlers.AlertDialogHandler adh = new
WatiN.Core.DialogHandlers.AlertDialogHandler();
ie.AddDialogHandler(adh);

Handle Certificate dialog window in Windows 7 with WatiN

I've faced with a problem handling certificate dialog window in Windows 7 with WatiN. What dialog handler should I use? I've tried all available classes but still no results.
You can handle the dialog without watin help by using SendKeys method
See this post:
Need a way to perform auto confirm for firefox or any other browser popup's

Resources