When running tests against browsers on desktop or mobile devices, you can use the Robot Framework SeleniumLibrary
.
To integrate with SeleniumLibrary
:
Open Browser
or Create Webdriver
Provide the Perfecto remote WebDriver URL along with a set of capabilities, in dictionary format.
When the driver launches, interact with Perfecto browsers by using all regular SeleniumLibrary
keywords the same way you use them with local browsers.
*** Variables *** ${Perfecto_Webdriver_Url} https://Your_Cloud_Name.perfectomobile.com/nexperience/perfectomobile/wd/hub/fast ${Security_Token} Your_Perfecto_Security_Token *** Test Cases *** # Sample with Open Browser: ${caps}= create dictionary browserName=Safari platformName=iOS location=NA-CA-YYZ manufacturer=Apple model=iPhone-X securityToken=${Security_Token} Open Browser https://www.perfecto.io browser_name alias ${Perfecto_Webdriver_Url} ${caps} # Sample with Create Webdriver: ${caps}= create dictionary browserName=Safari platformName=iOS location=NA-CA-YYZ manufacturer=Apple model=iPhone-X securityToken=${Security_Token} Create Webdriver Remote command_executor=${Perfecto_Webdriver_Url} desired_capabilities=${caps} |
When running tests against native apps on mobile devices, you can use the Robotframework AppiumLibrary
.
To integrate with AppiumLibrary
:
Open Application
. Provide the Perfecto remote WebDriver URL along with a set of capabilities.
After the driver launches, interact with Perfecto mobile devices by using all regular AppiumLibrary
keywords the same way you use them with local devices.
*** Variables *** ${Perfecto_Webdriver_Url} https://Your_Cloud_Name.perfectomobile.com/nexperience/perfectomobile/wd/hub/fast ${Security_Token} Your_Perfecto_Security_Token ${Device_Id} Perfecto_Device_Id_you_want_to_launch ${Bundle_Id} The_IOS_Bundle_Id_you_want_to_launch # this is option, session will launch a default browser of the OS without this capability *** Test Cases *** Open Application ${Perfecto_Webdriver_Url} securityToken=${Security_Token} deviceName=${Device_Id} noReset=True bundleId=${bundleId} |
For details, see Integrate Perfecto Smart reporting with Robot Framework.