Executing Your Local Web Automation Robot Code
Executing Your Local Web Automation Robot Code
Robot Framework is a generic open-source automation framework. Robot Framework can be integrated with virtually any other tool to create powerful and flexible automation solutions such as Appium and Selenium. Robot Framework is free to use without licensing costs.
Robot Framework has an easy syntax, utilising human-readable keywords. Its capabilities can be extended by libraries implemented with Python, Java or many other programming languages. Robot Framework has a rich ecosystem around it, consisting of libraries and tools that are developed as separate projects.
Prerequisites
- TestGrid login credentials and Device cloud link
- Robot Framework Set Up. (Using python pip/pip3)
- You need to add your desired remote Browser URL from TestGrid device cloud inside ${TG_DEVICE_CLOUD} variable in your robot code.
Additionally, Remote Execution of Code can also be viewed live on TestGrid Device Cloud.
You can find Detailed steps on https://github.com/robotframework/SeleniumLibrary
*** Settings *** Library SeleniumLibrary timeout=10 *** Variables *** ${BROWSER_TYPE} chrome ${TG_DEVICE_CLOUD} http://demo.testgrid.io:64111/wd/hub *** Test Cases *** TC001 Open Browser https://seen.io/ browser=${BROWSER_TYPE} remote_url=${TG_DEVICE_CLOUD} Sleep 13s Wait Until Element Is Visible //a[contains(text(),'accept all')] Click Element //a[contains(text(),'accept all')] Sleep 2s execute javascript $(document).ready(function(){ $('body,html').animate({scrollTop: 1000}, 800); }); Sleep 2s Click Element //p[contains(text(),'learn more')] Sleep 2s execute javascript $(document).ready(function(){ $('body,html').animate({scrollTop: 1000}, 800); }); Sleep 2s Click Element //p[contains(text(),'plans')] Sleep 2s execute javascript $(document).ready(function(){ $('body,html').animate({scrollTop: 1050}, 810); }); Sleep 2s Click Element //div[@id='w-node-dc077cae-d85a-df24-e635-a8e20f2065dd-12277237'] Sleep 3s Click Element //body/div[7]/div[1]/div[2]/div[1]/form[1]/div[1]/div[1]/input[1] Press Keys None Jay Sleep 1s Click Element //body/div[7]/div[1]/div[2]/div[1]/form[1]/div[2]/div[1]/input[1] Press Keys None Kadam Sleep 1s Click Element //body/div[7]/div[1]/div[2]/div[1]/form[1]/div[3]/div[1]/input[1] Press Keys None kadamjay@gmail.com Sleep 1s Click Element //body/div[7]/div[1]/div[2]/div[1]/form[1]/div[4]/div[1]/div[1]/input[1] Press keys None 7155222126 Sleep 1s Click Element //body/div[7]/div[1]/div[2]/div[1]/form[1]/div[5]/div[1]/input[1] Press keys None jourrapide Sleep 1s Click Element //body/div[7]/div[1]/div[2]/div[1]/form[1]/div[6]/div[1]/textarea[1] Press keys None We need marketing technology which provides fully automated solutions. Sleep 2s Click Element //body/div[7]/div[1]/div[3]/div[1] Sleep 2s Mouse Over //body/div[3]/div[1]/div[1]/div[1]/ul[1]/li[1]/div[1]/div[1]/figure[1] Sleep 2s execute javascript window.scrollBy(0,850) Sleep 2s Click Element //a[@id='w-tabs-0-data-w-tab-1'] Sleep 2s Click Element //a[@id='w-tabs-0-data-w-tab-2'] Sleep 2s execute javascript window.scrollBy(0,500) Sleep 2s Click Element //p[contains(text(),'How does it work?')] Sleep 3s Click Element //p[contains(text(),'How does it work?')] Sleep 2s Click Element //body/div[1]/div[1]/div[1]/nav[1]/div[1]/a[2] Sleep 4s Click Element //body/div[2]/div[1]/div[1]/div[3]/div[1]/div[1] Sleep 2s Click Element //body/div[2]/div[1]/div[1]/div[3]/div[1]/div[1] Sleep 2s Click Element //body/div[2]/div[1]/div[1]/div[3]/div[1]/div[1] Sleep 2s execute javascript window.scrollBy(0,500) Sleep 2s Mouse Over //body/div[3]/div[2]/div[1]/div[1]/div[3]/div[1]/div[1] Sleep 2s Click Element //a[contains(text(),'Loyalty')] Sleep 2s Click Element //a[contains(text(),'Campaign')] Sleep 2s Go To https://seen.io/ Sleep 5s Close Browser
As simple as that! Happy Testing 🙂