Skip to content

incompréhension sur robot framework #1929

Open

Description

@Cedclaud237

bonjour je suis nouveau dans le dev surtout celui de l'automatisation j'ai essyé ce script comme dans les docs que jai eu à lire mais il ne passe pas , quelqu'un pourrait m'aider à comprendre mon erreur ?
*** Settings ***
Library seleniumlibrary

*** Variables ***
${URL} https://www.google.com/
${BROWSER} firefox

*** Test Cases ***

Menu behavior
open browser https://www.google.com/

*** Keywords ***
open browser
open browser ${URL} ${BROWSER}
maximize browser windown
sleep 4s
[Teardown] browser

Activity

  1. emanlove commented on Feb 7, 2025

    @emanlove
    Member

    @Cedclaud237 It may be that your custom keyword is using the same name as the library keyword for "Open Browser". Try something like instead ..

    Il se peut que votre mot-clé personnalisé utilise le même nom que le mot-clé de la bibliothèque pour "Open Browser". Essayez plutôt quelque chose comme ..

    *** Settings ***
    Library    SeleniumLibrary
    
    *** Variables ***
    ${URL}    https://www.google.com/
    ${BROWSER}    firefox
    
    *** Test Cases ***
    Menu behavior
        My Custom Open Browser
    
    *** Keywords ***
    My Custom Open Browser
        [Teardown] Close All Browsers
        open browser ${URL} ${BROWSER} 
        maximize browser window
        sleep 4s

    [note I have not tried out this code .. Remarque : je n'ai pas essayé ce code]

  2. emanlove commented on Feb 7, 2025

    @emanlove
    Member

    Also be careful with spaces and capitalization as Robot Framework can take this into consideration in many places. Like the name of the library you import. It needs to be "SeleniumLibrary" and not "seleniumlibrary".

    Faites également attention aux espaces et aux majuscules, car Robot Framework peut en tenir compte à de nombreux endroits. Comme le nom de la bibliothèque que vous importez. Il doit s'agir de "SeleniumLibrary" et non de "seleniumlibrary".

    Here is a good introductory course by Paul Merrill that covers some of the syntax and concepts if helpful. Sorry it is in English only.

    Voici un bon cours d'introduction de Paul Merrill qui couvre une partie de la syntaxe et des concepts si cela peut être utile. Désolé, il n'est disponible qu'en anglais.

    https://testautomationu.applitools.com/robot-framework-refresh/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions