Skip to content

Instantly share code, notes, and snippets.

View adiralashiva8's full-sized avatar

Shiva Prasad Adirala adiralashiva8

  • Hyderabad
  • 18:56 (UTC +05:30)
View GitHub Profile
@adiralashiva8
adiralashiva8 / driver.robot
Created October 19, 2023 02:38
python webdriver manager in robotframework
*** Test Cases ***
Hello World
${path}= Evaluate webdriver_manager.chrome.ChromeDriverManager().install() modules=webdriver_manager.chrome
Log To Console ${path}
Create Webdriver chrome executable_path=${path}
@adiralashiva8
adiralashiva8 / ReadMe.md
Created July 30, 2023 06:57 — forked from leeuwe/ReadMe.md
Base file to speed up your migration from Robot Framework® SeleniumLibrary to Browser

This is a base file to speed up your migration from Robot Framework® SeleniumLibrary to Browser library. The file contains over 40 SeleniumLibrary keywords and may require adjustment to your specific situation.

You should import this resource file INSTEAD of the SeleniumLibrary, NOT in combination with the SeleniumLibrary.

@adiralashiva8
adiralashiva8 / #selenium-chrome-authentication-extension
Created March 15, 2023 06:24 — forked from florentbr/#selenium-chrome-authentication-extension
Chrome extension to automatically set the credentials.
To build the extension, update the username/password and zip `background.js` and `manifest.json` in a single archive.
@adiralashiva8
adiralashiva8 / JenkinsPipelineForRobotTestRuns
Created December 21, 2022 03:09 — forked from gvasanka/JenkinsPipelineForRobotTestRuns
Jenkins pipeline script run robot test cases, re-run test cases, merge report and pass the test report
pipeline {
agent {
label 'qatest'
}
environment {
QA_SERVER = 'https://qa.application.com/'
CT_SERVER = 'http://ct.application.com/'
}
stages {
@adiralashiva8
adiralashiva8 / locators.txt
Created June 7, 2021 06:26
Webelement locators link
Web Locators:
Basic: https://www.guru99.com/xpath-selenium.html
Bit More Info: https://www.w3schools.com/xml/xpath_intro.asp
Advanced: https://devhints.io/xpath
System.setProperty("hudson.model.DirectoryBrowserSupport.CSP", "sandbox allow-scripts; default-src *; style-src * http://* 'unsafe-inline' 'unsafe-eval'; script-src 'self' http://* 'unsafe-inline' 'unsafe-eval'");
class RobotListener2:
ROBOT_LISTENER_API_VERSION = 2
def __init__(self):
print('Before Start Of Execution')
def start_suite(self, name, attrs):
self.test_count = len(attrs['tests'])
#header {
background-image: url('https://i.ibb.co/FwRDPCB/it-demo.jpg');
background-repeat: no-repeat;
background-size: auto 45px, cover;
background-position: 15px 10px;
}
#jenkins-home-link {
display: none !important;
}
*** Settings ***
Library SeleniumLibrary
Library flash_helper.py
*** Test Case ***
Allow Flash In Chrome
Open Browser https://www.google.com chrome
# go to chrome settings and enable flash
${CURRENT_URL} Get Location
from robot.libraries.BuiltIn import BuiltIn
from selenium.webdriver.common.by import By as WebBy
from selenium.webdriver.support.ui import Select as WebSelect
def allow_flash(url):
seleniumlib = BuiltIn().get_library_instance('SeleniumLibrary')
driver = seleniumlib.driver
def _shadow_root(driver, element):