Scroll Down Method in Mobile Karate Framework [duplicate] - mobile

This question already has answers here:
Karate Mobile - Is there a way in Karate to perform TouchActions or scrollIntoView
(2 answers)
Closed 1 year ago.
There is a scroll down method for Web UI test in the Karate framework, but it does not work in the mobile framework. Can you let us know how we use the scroll down function in the mobile karate framework?
Thanks in advance

you can try an alternative option like mobile command with driver.script()
eg:
driver.script("mobile: scroll", { "direction" : "down"})
for iOS refer to: https://github.com/appium/appium-xcuitest-driver#mobile-scroll
for android refer to: https://github.com/appium/appium-uiautomator2-driver#mobile-scroll
incase you need elementId try:
def locatorElementId = driver.elementId('<locator>')

Related

Scroll method in Karate Mobile framework [duplicate]

This question already has answers here:
Karate Mobile - Is there a way in Karate to perform TouchActions or scrollIntoView
(2 answers)
Closed 1 year ago.
There is a scroll down method for Web UI test in the Karate framework, but it does not work in the mobile framework. Can you let us know how we use the scroll down function in the mobile karate framework?
Thanks in advance
you can try an alternative option like mobile command with driver.script()
eg:
driver.script("mobile: scroll", { "direction" : "down"})
for iOS refer to: https://github.com/appium/appium-xcuitest-driver#mobile-scroll
for android refer to: https://github.com/appium/appium-uiautomator2-driver#mobile-scroll
incase you need elementId try:
def locatorElementId = driver.elementId('<locator>')

Calling a function when a user comeback to a page from a different tab in react js app [duplicate]

This question already has answers here:
Detect If Browser Tab Has Focus
(9 answers)
Closed 3 years ago.
I am trying to call a function to authorize a user when it comes back from a different tab or opens the browser which is minimized. How can I do this in react js app?
You can use document.hasFocus function. It is native and works and all browsers.
You can see in this example

How to download file using primefaces and jsf? [duplicate]

This question already has answers here:
How to provide a file download from a JSF backing bean?
(5 answers)
Closed 3 years ago.
I am developing a jsf/primefaces web application which utilizes primefaces FileUpload and FileDownload. I am able to upload the image to the database as a blob. However i am unsure on how to retrieve it.
The picture above shows the id of the images in a data table. And when the user clicks download the image corresponding to that id should download. However i am unsure on how to do this. Can anyone link me to a tutorial or give me some pointers on how to achieve this?
You can find the solution from the jsf2-export-pdf-portlet created by Neil Griffin. It shows you how to develop Jsf Resource and ResourceHandler. It gives you information about how the bridge uses Resource_Phase for generating Url.

how to navigate to page without angular in protractor? [duplicate]

This question already has answers here:
how to use Protractor on non angularjs website?
(13 answers)
Closed 7 years ago.
How can I go to a page that does not contain angular with protractor? My test looks like this:
browser.driver.get('https://www.mysitewithlogin.com');
The result is:
Message:Error while waiting for Protractor to sync with the page: "angular could not be found on the window"
So the site starts with a login page and does not contain angular. Is it uberhaupt possible?
Use below line of code before launching application.
browser.ignoreSynchronization=true;
By writing above line, it wont wait for angular. It considers the app as normal app.
you can move back a page by using this line "browser.navigate().back();"

Launch SMS from a mobile browser [duplicate]

This question already has answers here:
Closed 10 years ago.
Possible Duplicate:
Sending an SMS from mobile browser
Is it possible to launch SMS/Texting application from a link in a website on a mobile browser? I doubt it's possible globally, but maybe it's possilbe for certain subsets (Blackberry, Windows Mobile, Google Android, etc etc), which we can detect and display.
You can use wap wtai primite: Send SMS. It runs on great majority of browsers.
I don't think it comes out of the box but you might be able to install a webkit widget on a recent series60 phone (samsung innov8, nokia n85...) to link the browser with the messaging application.
iOS specific docs:
http://developer.apple.com/library/ios/#featuredarticles/iPhoneURLScheme_Reference/Articles/sms.html
examples on other platforms such as Android here:
http://beradrian.wordpress.com/2010/01/15/special-links/

Resources