robotframework

Robot Framework Get Text

有些话、适合烂在心里 提交于 2019-12-11 14:55:37
问题 I am using Robot Framework Selenium using python. I need help with grabbing a certain part of the string, without getting an exterior library. lets say the text says " Your range price for your product is from $0- 400" So i want to be able to get the 400 and paste is somewhere else in the test. The number isnt always 400 sometimes it may be 55 or something different. So i think i would need a GET TEXT Starting from the dollar sign count two spaces and take whatever is left. or i can get the

Robotframework selenium execution through jenkins not working

生来就可爱ヽ(ⅴ<●) 提交于 2019-12-11 14:50:09
问题 I am not able to execute selenium test cases using robotframework through Jenkins. Installed Firefox, geekodriver. Works without using Jenkins. Getting the exception WebDriverException: Message: Process unexpectedly closed with status: 1 Its a simple test case that has *** Settings **** Library Selenium2Library *** Test Cases *** Testing Selenium Open Browser http://google.com Firefox Jenkins shell command configuration pybot test.robot 回答1: Install xvfb in the robotframework server. Also use

Selenium Python Script, InvalidElementStateException

徘徊边缘 提交于 2019-12-11 14:46:24
问题 So I'm getting this error every so often when running the exact same test. StaleElementReferenceException: Message: stale element reference: element is not attached to the page document (Session info: chrome=69.0.3497.100) (Driver info: chromedriver=2.41.578706 (5f725d1b4f0a4acbf5259df887244095596231db),platform=Mac OS X 10.12.6 x86_64) The only problem is that it seems to happen inconsistently to different areas of the code. It's when trying to access DOM elements, like a search field, of my

How Do I Open a browser on Emulator using Robot Framework and Appium

这一生的挚爱 提交于 2019-12-11 14:33:27
问题 I am trying to configure Robot Framework to open Chrome Browser in an android emulator. I have this code to do that: *** Settings *** Suite Setup Set Library Search Order SeleniumLibrary Test Setup Open page Test Teardown Close Page Library SeleniumLibrary Library Collections Library requests Library AppiumLibrary *** Test Cases *** Test_case_sample Go To https://www.google.com Sleep 10s *** Keywords *** Open Page ${desired_capabilities}= Create Dictionary Set to Dictionary ${desired

Calling Robot Framework files from within Python

北城余情 提交于 2019-12-11 12:46:03
问题 Have been in a bind over the weekend. I am attempting to create a Python Application that will give users the ability to run .Robot files (or Test Cases) (from within Python) I am attempting to run these files through the use of the 'subprocess' module, but I continually receive the following error message : 'FileNotFoundError: [WinError 2] The system cannot find the file specified' I have included 'import subprocess' I have also declared the location of the .Robot Test Case as a variable:

Robot framework - UnicodeDecodeError: 'ascii' codec can't decode byte 0xe9 in position 49: ordinal not in range(128) while inputting text

可紊 提交于 2019-12-11 10:24:59
问题 I'm querying values from database to enter in the input field using selenium. However, for certain values I get the following error: UnicodeDecodeError: 'ascii' codec can't decode byte 0xe9 in position 49: ordinal not in range(128) I'm getting the error when the value to enter in the text field is something like 'Décor' . I understand that the issue with the character "é" . How can I overcome this error? Robot code: *** Settings *** Library SeleniumLibrary Library DatabaseLibrary *** Test

Run suite of suites using argumentfile option

杀马特。学长 韩版系。学妹 提交于 2019-12-11 09:53:23
问题 I have two suite files, child1, child2 each having multiple test cases under them. Now, i have a top file called as master-suite that has two lines - child1 and child2 , indicating that it needs to run those two suites. But running, pybot --argumentfile master-suite throws error as, [ ERROR ] Parsing '/home/sk/master-suite' failed: Unsupported file format ''. I have hundreds of test cases and i would like to group them under different features and keep them in smaller files. And maintain one

RobotFramework: Keyword 'Selenium2Library.Input Text' Error Keyword 'Input Username' expected 1 arguments, got 0

非 Y 不嫁゛ 提交于 2019-12-11 09:52:31
问题 Code: Input Username [Arguments] ${username} Input Text login_username_id ${username} Error:- Keyword 'Input Username' expected 1 arguments, got 0 May i know why am i getting this error? 回答1: Pass in self as the first argument in your method. Something like: def input_username(self, arg1): 回答2: The error message is telling you exactly what the problem is: your keyword Input Username expects exactly one argument, but the place where you are calling it is only providing one argument. 来源: https:

How to make permanent settings to chrome driver

筅森魡賤 提交于 2019-12-11 09:36:59
问题 As chrome has blocked Java, Silverlight and other plugins by default now. So to make it work we need to Enable the NPAPI in chrome://flags and restart the browser to make the setting into effect,the same needs to be done in chrome driver however the setting gets lost after restarting the chrome driver, is there any way to make the permanent settings into chrome driver? 回答1: My earlier comment was wrong because desired capabilities is for non-browser specific settings like proxy address. If

Use Existing Chrome Browser with remote-debugging-port using RobotFramework

大城市里の小女人 提交于 2019-12-11 09:09:19
问题 I am trying to use existing google chrome instance using RobotFramework (SeleniumLibrary). I am starting the chrome instance like this chrome.exe --remote-debugging-port=9289 --user-data-dir="D:\gcdata" This my code in robotframework ${options}= Evaluat sys.modules['selenium.webdriver'].ChromeOptions() sys,selenium.webdriver ${prefs}= Create Dictionary debuggerAddress 127.0.0.1:9289 Call Method ${options} add_experimental_option prefs ${prefs} Create WebDriver Chrome chrome_options=${options}