How can I test a Crosswalk application with BrowserStack? - selenium

At our company, we maintain a legacy Android application which uses Crosswalk to embed a web view. We would like to implement automated end-to-end tests for this app using Appium and ChromeDriver.
Unfortunately, the version of Chrome used by Crosswalk is modified in such a way that ChromeDriver cannot connect to it. This is a known issue, and the recommended workaround is to use a custom patched version of ChromeDriver instead.
This solution works for running tests locally. But BrowserStack doesn't seem to allow for supplying a custom build of ChromeDriver. I can choose from a set list of versions, but that won't help, as none of those versions have the Crosswalk patch.
Is there a way to make this work with BrowserStack?

I had used BrowserStack for my native app tests as well. Currently, they do not provide any custom capability to select the ChromeDriver version.

Related

Java Selenium DevTools V105

I'm using selenium 4 devtools in my tests. Recently, my local browser got updated to v105. However, doesn't seem like mvn repository has artifacts to support it. The latest version is available v104 https://mvnrepository.com/artifact/org.seleniumhq.selenium/selenium-devtools-v104. With that, is there any work around I can utilize until v105 becomes available
Thank you!
Download 4.5.0 Selenium Verison. Need not to add selenium devtools dependency seperately. It has CDP support for v104, v105, and v106 also.
https://github.com/SeleniumHQ/selenium/blob/trunk/java/CHANGELOG

How to run chrome driver in background using selenium with Ruby for Mac OSx?

Sometimes, the browser window comes to the foreground and I'm clicking it accidentally which makes the test fails on some occasions. So, I just want to know, is there any way that I can keep the chrome driver window in the background.
Details:
< ChromeDriver version: 2.28.455517 >
< Chrome version: 58.0.3029.96 >
A few words about the solution to your Question:
As per best practices, you should try to execute your Test-scripts / Automation-framework in an isolated Test Environment with all the required Hardware and Software configurations and setup.
While the execution is in process, there should be no manual user interaction in-between.
In-case you want to do multitasking, use Ghost/Headless Browsers. You will find a detailed discussion in Which drivers support “no-browser”/“headless” testing?.
Htmlunitdriver & PhantomJS are the two mostly widely used Ghost/Headless Browsers.
If you are specific about using ChromeDriver you can use Chrome headless as per the documentation here.
First and foremost rule is that we should not do any other work while your scripts are running. We may use actions class for hovering., etc, while you move your cursor it may lead to failing your test case. Hope It will be useful to you.
You can try using headless switch available for Chrome.
This will run the automation in the headless mode and you will not be disturbed.
options = Selenium::WebDriver::Chrome::Options.new
options.add_argument('--headless')
Afterward, initiate Chrome.

Are there NPAPI testing tools?

I'm using firebreath to build a plugin that downloads an application and runs it (something very simple). I know that some browsers are dropping npapi support, but I need to run this plugin just in old versions of browsers (e.g. IE 6, Firefox 38, Chrome 31). I'd like to know if there are any tools that could help testing the plugin's in a variety of environments (e.g. Firefox on Linux,windows, Safari on OSX). So far, what I'm doing, is setting up each environment (windows, linux, Mac) and building/installing the plugins manually. I think cross browser testing tools that I've found on internet won't help, because they don't allow plugin install.
I couldn't find anything on my research, so thanks in advance
Any browser automation tool capable of instrumenting pages on all of those platforms can test NPAPI, since it runs in a browser...
so, Selenium, for example.

Why does Appium use platformName instead of platform

Selenium exposes a PLATFORM capability:
Appium's MobileCapabilityType extends Selenium's CapabilityType interface but instead of using the PLATFORM capability, it exposes PLATFORM_NAME:
Tried searching why this is the case but couldn't find any explanation. Does anyone here know the reason?
Well that's not used Nowadays PLATFORM_NAME was used till appium java-client 1.7. From 2.0 it's just used internally
From ReadME
AppiumDriver is now an abstract class, use IOSDriver and AndroidDriver
which both extend it. You no longer need to include the PLATFORM_NAME
desired capability since it's automatic for each class. Thanks to
#TikhomirovSergey for all their work
And for why, they were using Selenium's Platform in the first version 1.3 but then everything changed in the 1.4 where they decide to make their own capabilities with the future of Appium in their mind
This is to avoid the conflict of using MAC platform to test on iOS devices
Coz Selenium provided only ANDROID and MAC as platforms and though you want to test on ios devices which runs on iOS and you have to set MAC as platform [which will be odd right]
Now you can have Firefox as platformName as well
And Appium is a seperate entity from Selenium and they can't ask Selenium to add a Platform as IOS for them.So They created their own capability I guess.

Is Selenium platform specific?

Is Selenium paltform specific. If yes then how can I develop a cross-platform specific application with it by first identifying the platform and then call the platform-specific selenium routines.
The IDE is a firefox plugin, but you can develop tests in multiple languages, which run on and against multiple platforms (including multiple browsers). Not really sure what you're trying to accomplish, but hopefully that helps.
Selenium is platform independent. This is because you run a Selenium RC server (which is a java application and hence can be run on any platform). Then you send selenese commands to the server which controls the testing activity on the browser. To send the selenese commands you can use any language (such as Java, PHP, Ruby etc). Now this again does not limit you in any way to a certain OS.
If you are using the Firefox plugin IDE to run the test cases then of course the platforms supported would be limited to platforms supported by Firefox.
Hope that answers.
I may be misunderstanding your question, but:
With Selenium RC (or Grid, more specifically), you can specify what platform you want your test to run on. Each node registers with the hub under a particular platform, and each test's DesiredCapabilities can request a platform.
As the other answers have stated, Selenium itself is platform independent but you can run your tests on a by-platform by-browser basis. Either way, the tests (in theory) should look the same and use the same native Selenium commands.
I am not so familiar with Selenium, but it looks to me that it works almost everywhere where you can install Firefox 2+.
Platforms Supported by Selenium
I'm using Selenium for a project that runs under Windows and Ubuntu. The only platform specific code is for starting the environment where it executes (headless X server under Ubuntu) and starting the Selenium jar file. The rest is all platform independent. I don't know if this will also work as smoothly when you try to use different browsers (I'm using Firefox on both platforms).