selenium2library

How to run headless REMOTE chrome using robot framework

随声附和 提交于 2019-12-18 11:44:31
问题 I'm trying to run chrome headless with my robot framework tests suites. I managed to do it independtly with python using selenium as follows: options = webdriver.ChromeOptions() options.add_argument('--headless') my_driver = webdriver.Remote(command_executer=my_remote_address, desired_capabilities=options.to_capabilities) The following code is what I did in robot but didn't work: ${options}= Evaluate sys.modules['selenium.webdriver'].ChromeOptions() sys, selenium.webdriver ${options.add

Centralizing XPath in resource file, how to pass arguement from robot file?

☆樱花仙子☆ 提交于 2019-12-18 09:35:10
问题 I am centralizing all particular XPath strings to a resource file and importing the variables in that resource file in my test suite (robot framework). This way, they can be maintained in one place and I can use variable names that make the robot file readable. Is that something that is good practice? Sometimes I want to pass an argument to the variable, to make it more dynamic. However, the value of the variable contains and XPath, which sometimes has //div[path...etc][text()='MyString'].

Handling mozilla firefox download box through robot framework using Selenium2Library

可紊 提交于 2019-12-13 08:37:58
问题 Page Should Contain Button xpath = /html/body/blockquote/form/p/input Click Button xpath = /html/body/blockquote/form/p/input Confirm Action The 'Confirm Action' keyword is supposedly used to select OK in an alert box, which is not happening in the above case. In my opinion, Selenium2Library is not treating the download box as an alert box, because when I tried Get Alert Message, I'm receiving an output saying 'No alert box found'. In what way can I select the OK in the download box? Also,

How to Upload file from windows directory using selenium2library and Robot Framework

纵饮孤独 提交于 2019-12-10 10:01:56
问题 Can someone help me How to Upload file from windows directory using selenium2library and Robot Framework.I have tried using Choose File command in selenium2library but I am getting error as File doesn't exist in local file system.I am not sure whether directory path is not considered or any other issue. Please give me valid code or any alternate solution.Any help would be appreciated.Following is the command I have tried Choose file xpath = //input[@firmware-upgrade='firmware'] /Downloads

'chromedriver' executable needs to be in PATH. Robot framework pycharm

久未见 提交于 2019-12-08 10:37:55
问题 I am new to Robot framework and I have followed all set up related steps from this link, however, I am getting some error which I am not able to identify. Anybody, please help. *** Settings *** Documentation Simple example using SeleniumLibrary. Library Selenium2Library Library OperatingSystem *** Variables *** ${LOGIN URL} https://www.google.com/ ${BROWSER} Chrome ${EXECDIR} C:\chromedriver_win32\chromedriver.exe *** Test Cases *** Checking browser to login page Setup chromedriver Open

Can't fill in the Hidden text area element

十年热恋 提交于 2019-12-08 09:14:15
问题 F1, need some help or hints with Hidden element using Robotframework. The problem consist that to fill any text in the text area, I need to change the state of text area from display:none; to display:block; Needed text area for input Code that I see from WebDev Tool The code itself: <div class="col-md-12"> <div class="cazary" style="width: 664px;"> <div class="cazary-commands-wrapper"> <ul class="cazary-commands-list"> <li unselectable="on" title="Size" class="cazary-command-fontsize">Size<

How to handle dynamic elements using Robot Framework

有些话、适合烂在心里 提交于 2019-12-06 15:53:49
问题 I am currently working on the Robot Framework and using Selenium2Libraries to work on a Web Application. I'm working on a Form and I'm dealing with a dynamic elements which is an editable text area and drop down list.. I really hope someone would be able to guide me on how I can do this. An example of what I am doing is, [Example element code] input id="textfield-1237-inputEl" class="x-form-field x-form-text x-form-text-default x-form-focus x-field-form-focus x-field-default-form-focus" data

How to Upload file from windows directory using selenium2library and Robot Framework

亡梦爱人 提交于 2019-12-05 22:01:21
Can someone help me How to Upload file from windows directory using selenium2library and Robot Framework.I have tried using Choose File command in selenium2library but I am getting error as File doesn't exist in local file system.I am not sure whether directory path is not considered or any other issue. Please give me valid code or any alternate solution.Any help would be appreciated.Following is the command I have tried Choose file xpath = //input[@firmware-upgrade='firmware'] /Downloads/Cambium_Builds/Falcon/ePMP1000-Hotspot-2.5.1-b3.tar HTML tag is ` ` Thanks every one for your answers and

Unhandled error “Cannot find context with specified id” using Robot framework

拟墨画扇 提交于 2019-12-05 14:42:42
I have a problem when working with iframe using Robot framework and Selenium2Library. It throws error: WebDriverException: Message: unknown error: unhandled inspector error: {"code":- 32000,"message":"Cannot find context with specified id"} (Session info: chrome=55.0.2883.87) (Driver info: chromedriver=2.25.426923 (0390b88869384d6eb0d5d09729679f934aab9eed),platform=Windows NT 6.1.7601 SP1 x86_64) My test code is: Fill In Description ${description} Wait Until Element Is Visible ${FRAME} 40 Select Frame ${FRAME} wait until page contains element ${IFRAME BODY} Click Element ${IFRAME BODY} wait

How to handle dynamic elements using Robot Framework

不羁的心 提交于 2019-12-04 22:26:08
I am currently working on the Robot Framework and using Selenium2Libraries to work on a Web Application. I'm working on a Form and I'm dealing with a dynamic elements which is an editable text area and drop down list.. I really hope someone would be able to guide me on how I can do this. An example of what I am doing is, [Example element code] input id="textfield-1237-inputEl" class="x-form-field x-form-text x-form-text-default x-form-focus x-field-form-focus x-field-default-form-focus" data-ref="inputEl" size="1" name="textfield-1237-inputEl" maxlength="200" role="textbox" aria-hidden="false"