Can we automate an application which runs on mobile browser(Not mobile app) using Selenium Webdriver - mobile

There is an application which users access on Samsung NOTE devices. Requirement is to automate the regression suite on mobile(Samsung NOTE). This application works on PC also, and I have managed to automate using selenium on PC successfully.
Could anyone help me know, if we can use selenium to automate the mobile version of it? I mean can my selenium script automate the mobile browser.
If we can't achieve, what automation tool can I use to automate the same?

Based on the provided comment you have 2 approaches you may take at this point:
Using Chrome options and mobile emulation params in WebDriver as DesiredCapabilities refer to this page for more details:
https://sites.google.com/a/chromium.org/chromedriver/mobile-emulation - you can do the same from your own browser in dev tools. This should be enough for 90% of cases, however if you want to make sure that env you're running your tests is as close to real users as possible see 2.
Using special tools that create specific instances of WebDriver, like Selendroid or Appium - in this case you may either run your tests on emulated device(by creating instances from Android SDK or from Xcode) or you even have ability to connect real devices and execute your tests on them

Related

Need help to choose Automation Tool which can allow me to switch between Web and Mobile emulator

My Web Application based on Salesforce has few steps that can be performed through mobile application only. With current automation tool I can execute test cases either on Web page or on Mobile device/emulator. Both can not be switched in between withing single test case. What is another tool available can be used in such case?

Does anyone know if webdriver-io can be used with AWS device farm ? How to set it up?

I am trying to setup e2e for my react apps using AWS Device Farm Browser Testing, I can see it supports selenium-remote-web-driver on documentation but I am interested on knowing if I can use webdriver-io and execute my tests on device farm ?
I can’t find a service runner available for device-farm ? Aren’t there any yet ?
Assuming it is just as any other cloud web and mobile testing platform like browserstack and saucelab, it is possible to do it.
Reference: https://kapoorlakshya.github.io/executing-webdriverio-browser-tests-aws-device-farm
As mentioned by another user this reference example looks very good. In AWS Device Farm Desktop Browser Testing documentation also there is one small example on how to configure web driver io. Check this link

Selenium vs Puppeteer to test the UI of a CEF application

I am planning to build integration test for my CEF application. The integration test will focus on verifying the UI of the app. I think there might be two ways to do it:
1. Use Selenium/webdriver + chromedriver: Selenium talks to chromedriver through
webdriver protocol, and chromedriver talks to my CEF application through
Chrome Devtools Protocol
2. Use Puppeteer or similar library that talks to CEF application directly
through Chrome Devtools Protocol
First of all, is there a way for Puppeteer to connect to a remote chrome debugger? Most of the use cases seems to be launching a headless chrome within Puppeteer which is not what I want.
If both options are doable, which option would you prefer? Puppeteer seems to have richer functionalities than Selenium for testing user-agent that implements Chrome Devtools Protocol. The cross-platform benefit from Selenium/webdriver seems irrelevant for testing CEF application.
First of all, is there a way for Puppeteer to connect to a remote chrome debugger?
Yes, there's a puppeteer.connect that allows connecting to already-running browser.
If both options are doable, which option would you prefer?
Given that you're only interested in Chromium, I'd pick puppeteer. Puppeteer scripts generally don't require throwing in "sleep()" calls - instead, there are powerful primitives to await conditions, e.g. page.waitForSelector, page.waitFoRequest e.t.c.

switch between applications in silk4j

I have a test thant launches a desktop application and from this application a browser application with authentication window is launched. The problem is when running the test it executes all steps that are related to the desktop application and when it comes to the browser it fails to detect it
any help?
Which version of Silk Test and which browser + version are you testing against? As older versions of Silk Test may not provide support for the more recent browser versions. That's why it is recommended to stay version current.
Also if you log an incident via supportline#microfocus.com we would be happy to have a look at the issue in detail.
After desktop application steps, to connect to the browser application (which has been opened through desktop app) you can use below code,
Desktop.attach("\BrowserApplication");
Desktop.< window >find ("\BrowserWindow[#caption='']").setActive();

E2E testing of Chat based application on different platform

I wonder if there is any possibility of testing a chat based application on multiple platforms using automation scripts. Let's say skype, facebook app, etc.
What I understand is that we can automate the app from either of the one side like Android or iOS or Web or Windows client.
Apparently, I wanted to test the e2e flow on multiple platforms.
My scenarios says as:
1.Login in mobile Android client with User A
2.Send message to User B
3.Login in windows client as User B
4.Verify the received message.
Is there any way or tool to verify such scenarios?
Thanks in advance
You can do that via selenium-webdriver or appium (or some similar tools) first 2 steps of your scenario, second 2 steps on windows you can achieve with TestComplete. Unfortunately, that's all that came to my mind when you do not have source codes.

Resources