Appium Interview Questions For Freshers

36. What is command to start appium from command prompt?
Answer : "node appium" command from node_modules folder of appium will start appium server from command prompt. View start appium from command prompt example.

37. Is it possible to start and stop appium server programmatically?
Answer : Yes we can start appium server programmatically too. I have described two different methods on how to start and stop appium server programmatically. You can describe any one from them. View Method 1 and Method 2.


38. What is usage of platformName capabilities?
Answer : It will tell appium server that which mobile OS platform you wants to use to perform test. You can set it iOS, Android, or FirefoxOS. View platformName capabilities usage example.

39. Can you tell me how to perform screen orientation?
Answer : We can perform LANDSCAPE and PORTRAIT screen orientation in appium test using bellow given command syntax. or you can see full example of screen orientation in android.

LANDSCAPE to PORTRAIT :
driver.rotate(org.openqa.selenium.ScreenOrientation.PORTRAIT);

PORTRAIT to LANDSCAPE :
driver.rotate(org.openqa.selenium.ScreenOrientation.LANDSCAPE);

40. How to check element present or not?
Answer : We can check element present or not using bellow given syntax. or you can view element present or not example in appium.

Boolean iselementpresent = driver.findElementsByName("App").size() != 0;
<< PREVIOUS || NEXT >>

No comments:

Post a Comment