久久久久久久av_日韩在线中文_看一级毛片视频_日本精品二区_成人深夜福利视频_武道仙尊动漫在线观看

      <legend id='gFoJt'><style id='gFoJt'><dir id='gFoJt'><q id='gFoJt'></q></dir></style></legend>
      <i id='gFoJt'><tr id='gFoJt'><dt id='gFoJt'><q id='gFoJt'><span id='gFoJt'><b id='gFoJt'><form id='gFoJt'><ins id='gFoJt'></ins><ul id='gFoJt'></ul><sub id='gFoJt'></sub></form><legend id='gFoJt'></legend><bdo id='gFoJt'><pre id='gFoJt'><center id='gFoJt'></center></pre></bdo></b><th id='gFoJt'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='gFoJt'><tfoot id='gFoJt'></tfoot><dl id='gFoJt'><fieldset id='gFoJt'></fieldset></dl></div>

      <small id='gFoJt'></small><noframes id='gFoJt'>

    1. <tfoot id='gFoJt'></tfoot>

          <bdo id='gFoJt'></bdo><ul id='gFoJt'></ul>

        帶有變量分配的機器人框架中的 IF ELSE

        IF ELSE in robot framework with variables assignment(帶有變量分配的機器人框架中的 IF ELSE)
        <tfoot id='IpuDr'></tfoot>

              • <bdo id='IpuDr'></bdo><ul id='IpuDr'></ul>

                <small id='IpuDr'></small><noframes id='IpuDr'>

              • <i id='IpuDr'><tr id='IpuDr'><dt id='IpuDr'><q id='IpuDr'><span id='IpuDr'><b id='IpuDr'><form id='IpuDr'><ins id='IpuDr'></ins><ul id='IpuDr'></ul><sub id='IpuDr'></sub></form><legend id='IpuDr'></legend><bdo id='IpuDr'><pre id='IpuDr'><center id='IpuDr'></center></pre></bdo></b><th id='IpuDr'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='IpuDr'><tfoot id='IpuDr'></tfoot><dl id='IpuDr'><fieldset id='IpuDr'></fieldset></dl></div>
                <legend id='IpuDr'><style id='IpuDr'><dir id='IpuDr'><q id='IpuDr'></q></dir></style></legend>
                    <tbody id='IpuDr'></tbody>
                  本文介紹了帶有變量分配的機器人框架中的 IF ELSE的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學習吧!

                  問題描述

                  我需要在機器人框架中有條件地執行一些關鍵字,但我不知道該怎么做,它不起作用.我嘗試了很多選項,但我想我的IF-ELSE"語句完全錯誤..

                  I need to execute some keywords conditionally in robot framework, but I dont know how to do it, it does not work. I tried many options, but I guess I have the "IF-ELSE" statement completely wrong..

                  Choose Particular Filter ${FILTER} And Uncheck All Values
                      ${bool}=   is filter opened   ${AVAILABLE FILTERS}   ${FILTER}
                      ${uncheck_all_button}=    run keyword  if    "${bool}" == "True"   uncheck all in filter  ${AVAILABLE FILTERS}   ${FILTER}
                      ...                       click element   ${uncheck_all_button}
                      ...                       ELSE
                      ...                       Set variable    ${particular_filter}:    find particular filter   ${AVAILABLE FILTERS}  ${FILTER}
                      ...                       click element   ${particular_filter}
                      ...                       Set variable    ${uncheck_all_button}:   uncheck all in filter  ${AVAILABLE FILTERS}   ${FILTER}
                      ...                       click element   ${uncheck_all_button}
                  

                  它失敗了:Variable '${particular_filter}' not found.但是如果我運行它,它甚至不應該去 ELSE 分支,因為 ${bool} 是 True...我的自定義函數 is filter opens 只是檢查過濾器是否已經打開 - 如果是,則返回 True.我的自定義函數 uncheck all in filter 只返回uncheck all"按鈕的 XPATH.我的自定義函數 find specific filter 返回filter dropdown"按鈕的 XPATH.在這整個關鍵字中,我需要檢查過濾器下拉菜單是否已經打開 - 如果是,那么我必須直接點擊 ${uncheck_all_button},否則如果過濾器下拉菜單尚未打開,我需要首先點擊過濾器本身 ${particular_filter} 然后我可以點擊 ${uncheck_all_button}

                  It fails with: Variable '${particular_filter}' not found. But in case I run it it should not even go to ELSE branch because ${bool} is True... My custom function is filter opened just checks whether filter is already opened - if so, returns True. My custom function uncheck all in filter just returns XPATH of "uncheck all" button. My custom function find particular filter returns XPATH of "filter dropdown" button. In this whole keyword I need to check whether the filter dropdown is already opened - if so, then I have to click directly on ${uncheck_all_button}, else if the filter dropdown is not opened yet, I need to first click on the filter itself ${particular_filter} and after that I can click on ${uncheck_all_button}

                  我還嘗試了運行關鍵字"這一行:

                  I also tried the "run keyword" line to have like this:

                  ${uncheck_all_button}=    run keyword  if    "${bool}" == "True"    Set Variable    uncheck all in filter    ${AVAILABLE FILTERS}    ${FILTER}
                  

                  或者這個:

                  run keyword  if    "${bool}" == "True"   ${uncheck_all_button}=    uncheck all in filter    ${AVAILABLE FILTERS}    ${FILTER}
                  

                  我也試過 ${bool} == "True"${bool} == True

                  但沒有什么真正起作用,仍然是同樣的錯誤:(

                  But nothing really works, still the same error :(

                  非常感謝您的幫助!

                  推薦答案

                  在每個塊中使用帶有多個語句的 IF/THEN/ELSE 在 Robot 中不起作用(或者我想您將不得不使用運行關鍵字",但是將變得不可讀).所以我會用這種方式重構你的代碼:

                  Having IF/THEN/ELSE with multiple statements in each block does not work in Robot (or you would have to use "Run Keywords" I suppose, but that would become unreadable). So I would refactor your code this way:

                  Choose Particular Filter ${FILTER} And Uncheck All Values
                      ${is_filter_opened}=   is filter opened   ${AVAILABLE FILTERS}   ${FILTER}
                      run keyword  if    ${is_filter_opened}    actions_when_unchecked
                      ...                ELSE  actions_when_checked
                  
                  actions_when_unchecked
                      uncheck all in filter  ${AVAILABLE FILTERS}   ${FILTER}
                      click element   ${uncheck_all_button}
                  
                  actions_when_checked    
                      ${particular_filter}:    find particular filter   ${AVAILABLE FILTERS}  ${FILTER}
                      click element   ${particular_filter}
                      ${uncheck_all_button}:   uncheck all in filter  ${AVAILABLE FILTERS}   ${FILTER}
                      click element   ${uncheck_all_button}   
                  

                  希望這會有所幫助.

                  這篇關于帶有變量分配的機器人框架中的 IF ELSE的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網!

                  【網站聲明】本站部分內容來源于互聯網,旨在幫助大家更快的解決問題,如果有圖片或者內容侵犯了您的權益,請聯系我們刪除處理,感謝您的支持!

                  相關文檔推薦

                  python: Two modules and classes with the same name under different packages(python:不同包下同名的兩個模塊和類)
                  Configuring Python to use additional locations for site-packages(配置 Python 以使用站點包的其他位置)
                  How to structure python packages without repeating top level name for import(如何在不重復導入頂級名稱的情況下構造python包)
                  Install python packages on OpenShift(在 OpenShift 上安裝 python 包)
                  How to refresh sys.path?(如何刷新 sys.path?)
                  Distribute a Python package with a compiled dynamic shared library(分發帶有已編譯動態共享庫的 Python 包)

                    <tbody id='vj1uA'></tbody>
                  • <small id='vj1uA'></small><noframes id='vj1uA'>

                    • <i id='vj1uA'><tr id='vj1uA'><dt id='vj1uA'><q id='vj1uA'><span id='vj1uA'><b id='vj1uA'><form id='vj1uA'><ins id='vj1uA'></ins><ul id='vj1uA'></ul><sub id='vj1uA'></sub></form><legend id='vj1uA'></legend><bdo id='vj1uA'><pre id='vj1uA'><center id='vj1uA'></center></pre></bdo></b><th id='vj1uA'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='vj1uA'><tfoot id='vj1uA'></tfoot><dl id='vj1uA'><fieldset id='vj1uA'></fieldset></dl></div>
                        <bdo id='vj1uA'></bdo><ul id='vj1uA'></ul>

                          1. <tfoot id='vj1uA'></tfoot>
                            <legend id='vj1uA'><style id='vj1uA'><dir id='vj1uA'><q id='vj1uA'></q></dir></style></legend>

                            主站蜘蛛池模板: 蜜桃色一区二区三区 | 成人免费精品 | 午夜精品福利视频 | 久久精品日韩 | 久久动态图 | 午夜影院在线免费观看 | 伊人9999| 国产一区高清 | 日韩精品一区在线 | 在线免费av网站 | 一区二区三区精品 | 深夜福利av | 一区二区高清 | 中文字幕国产视频 | 伊人9999| 免费成人黄色网址 | 国产高清视频在线播放 | 成人在线a | 宅男噜噜噜66一区二区 | 特一级毛片 | 国产一区二区三区在线看 | 69福利视频| 精品久久久久久 | 国产白丝精品91爽爽久久 | 国产一二 | 成人在线观看网址 | 国产精品久久久久久久成人午夜 | 国产中文在线 | 精品久久久一区二区 | 欧美视频在线观看免费 | 欧美性猛交xxxx黑人猛交 | www.色日本| 成人性色生活片 | 一区二区av| 亚洲视频一区在线观看 | 国产又粗又黄又爽又硬的视频 | 国产美女精品视频 | 午夜www | 中文天堂在线观看 | 精品国产999久久久免费 | 一区二区三区黄色 |