switch between applications in silk4j - silktest

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();

Related

How to restart a Desktop Bridge app programmatically

I have a Desktop Bridge app which needs to have a "Restart" button.
I've got it calling RequestRestartAsync method on the CoreApplication (described in this blog post) - but at runtime it fails with reason "NotInForeground".
I wonder if this is because of the way the Desktop Bridge technology wraps the WPF application. Any ideas on how I can cause the app to restart?
This is a new feature which is introduced from Windows 10 Fall Creators Update (v10.0.16299.0). Please note that not all UWP APIs are available for desktop bridge apps. You could check this document UWP APIs available to a packaged desktop app (Desktop Bridge). The CoreApplication relevant APIs have not been listed on the document. So, you cannot use this APIs in desktop bridge app now.
You can restart a Desktop Bridge app in the same way you can restart any regular Win32/WPF app. Nothing specific about it being on the "desktop bridge". For example you could spin up a new process, exit the app, and then have the new process launch a new instance of your app (and then kill itself).
I agree we should make the RequestRestartAsync() API work for Desktop Bridge apps as well to make this easier. We have logged a workitem on our backlog based on your UserVoice post.

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.

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

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

Launch Silverlight out of the browser experience based on a url

So the user installs the Silverlight application to their desktop, could this desktop version be launched based on them visiting a url?
http://somesite.com/url?params
And the silverlight application could inspect the parameters of the url it was launched from?
No, only the user can initiate it becoming an out of browser application.
Not to mention that any application which does this without the user expecting it would probably be classed as a virus or at the very least spamming the machine. Not good for your reputation!

Silverlight 4 launch a trusted application into the browser?

I just lost 5 hours looking for a answer which i haven't been able to find :p
First, I'd like to force a trusted application (i need to access the file system) to display into the browser. Based on what i found on google a trusted application must be installed and launched as a desktop application (also called out-of-browser application).
So, i want to have an installed application on the client side but meanwhile, the user must also be able to start this same application into a browser window when he goes on my web site. Is this possible ?
Second, I'd like to give to the user the possibility to start the application from the browser. To be clear, the application is installed on the client computer but i want a button on my web site which starts the desktop application. How can i do that ?
Thanks
The answers are sort of and no.
Yes you can run an application that has been installed on the client also in the browser. However, not all of the installed application features will be available. Anything that requires elevated trust will not work inside the browser.
No you can't launch the installed application programmatically from within code running in the browser. The best you can do is display a polite message to the user to the effect that they have this app already installed and in order to access all of its feature they will need to launch it.
Yes, it is possbile since Silverlight 5, see my answer on silverlight-4-elevated-permission-inside-the-browser

Resources