I am using robot framework, SeleniumLibrary and browserstack for automation. The issue I am having is now that the keyboard for iphone is not open every time I interact with input field. Although, it is working fine in any Android & any browsers.
Input Text xpath=//input[#class='example'] XXX
I tried to first click on the input field, then insert the string. But the issue is still occurs. Anyone has any ideas why?
Thank you.
Related
When starting a website, I find it difficult to click Block button on Microphone popup because I can't query this popup (and also with block btn)
How can I handle this problem with Webdriver.io in browser?
enter image description here
One option is to use chrome command line switches. You can find the list here.
The one you are looking for is use-fake-device-for-media-stream. You can set this in your config file so that every time the chrome is launched, it won't show this popup since it is already set to a fake device.
I have a web app that records sound when the user presses a button. I created a selenium script that clicks on the element to record the sound. It works perfectly except in headless mode. The script log shows that the element was pressed but the result is an empty sound file.
Is there a chromedriver option that would allow for it to record sound while in headless mode? I am thinking that the mic is not picking up sound or gets muted(?). This is probably a very limited use case. I searched quite a bit but could not find anybody with similar issues.
Thanks for your help
I am hardly trying to automate some of the scripts for regression testing in the application, but the challenge am facing over here is, the application running under the Citrix XenApp so am not able to automate it in a usual way(Selenium & UFT) please anyone help me to find the way to automate the application under citrix :)
With Citrix, like any other image based screen, you can use :
Insigth Object to locate and interact with images on the screen
GetTextLocation method to locate text using OCR (optical character recognition)
Low level recording to click at some screen location, by coordinates
SendKeys function to input text on the screen
I have a selenium test that tests the login of a site through a browser instance available on a selenium-grid. This works fine when using a firefox browser instance but when using safari the test cannot get through the entire test because safari pops up a window with the question "Would you like me to save this password".
It doesn't seem to appear as a window_handle nor as an alert. How can I have selenium dismiss this safari popup and continue its test?
You can't. WebDriver cannot interact with browser and/or OS specific dialogs.
You probably have two choices:
Save/dismiss the password manually the first time you run through the test, then reuse the profile every time.
Press Enter or Esc programatically via your programming language. You didn't specify which one you're using, so here's a Java example:
Robot robot = new Robot();
robot.keyPress(KeyEvent.VK_ESCAPE);
robot.keyRelease(KeyEvent.VK_ESCAPE);
It's a hack, but it's reliable and it's what I've been doing to overcome similar issues.
Try this code, it uses JavaScript to change the password to text, and this stops the pop-up:
driver.executeScript("Array.prototype.slice.call(document.getElementsByTagName('input')).forEach(function(e){e.type=e.type=='password'?'text':e.type;});");
Alternatively, you can selectively disable password capture for specific domains. You can also disable password capture altogether by clearing the auto-fill option for username/password.
I started learning how to use Selenium today. I have never used it before. I downloaded the Selenium IDE (1.0.10) plugin for FireFox (3.5.16). The way it's behaving is not matching up to the docs.
When I click the record button and perform actions in my browser, nothing happens in the IDE (nothing is recorded). (Actually, initially it did record, but now it doesn't) I tried restarting FireFox and that had no effect.
Also, the main controls are now inactive. I've included a screen shot to show what I mean by that. The controls remain inactive even it I click or double click on the name of a test case in the panel on the left.
And one final question -- it appears that a Selenium test case mentions Chrome in its default configuration even though the docs say you can only record tests using FireFox. Should I do anything about that?
If anyone can shed light on any of the above mysteries I would appreciate it. Thanks!
UPDATE
I restarted FireFox again and now it's recording actions, but the controls are still greyed-out as in the screenshot, so I can't play back the test.
The issue is that you are not in the HTML runner mode. The IDE has no concept of ruby or python or c# or Java. That is up to plugins which just essentially do a find an replace.
*chrome means Firefox Chrome. Something that has been around for a lot longer than Google Chrome the browser. It means use the browser chrome which removes a couple sandboxing issues.
If you want to play back the tests you can't go out of the table mode otherwise the IDE won't understand what to do. The code in the screenshot should be stored in a .rb file and that should be executed.
Let me try to unravel mysteries -
As soon as you launch the IDE it would be in recording mode. Do you see last Red button which is enabled.
IDE Tests can be executed only when in the selenese/html format (aka table format). I guess you have changed the format to ruby (I guess so), from Option > Format.
To be able to execute tests change it back to html from option > Format > HTML
Take my words, IDE is only and only for firefox