<ruby id="rxdll"></ruby><strike id="rxdll"></strike>

    <rp id="rxdll"></rp>
      <del id="rxdll"><meter id="rxdll"></meter></del>
      <pre id="rxdll"><font id="rxdll"></font></pre>
        <pre id="rxdll"></pre>
      <p id="rxdll"><thead id="rxdll"></thead></p><dl id="rxdll"><progress id="rxdll"><form id="rxdll"></form></progress></dl>

      <ol id="rxdll"><thead id="rxdll"><track id="rxdll"></track></thead></ol>
      <i id="rxdll"><dfn id="rxdll"></dfn></i>
      <font id="rxdll"><meter id="rxdll"></meter></font>

        <mark id="rxdll"><dfn id="rxdll"></dfn></mark>
        • 軟件測試技術
        • 軟件測試博客
        • 軟件測試視頻
        • 開源軟件測試技術
        • 軟件測試論壇
        • 軟件測試沙龍
        • 軟件測試資料下載
        • 軟件測試雜志
        • 軟件測試人才招聘
          暫時沒有公告

        字號: | 推薦給好友 上一篇 | 下一篇

        SilkTest's replacement for the Exists() method

        發布: 2011-4-07 09:29 | 作者: 不詳 | 來源: 領測軟件測試網采編 | 查看: 10次 | 進入軟件測試論壇討論

        領測軟件測試網

          SilkTest's replacement for the Exists() method  軟件測試

          Posted by Stan Taylor on March 31, 2010

          I've recently started a new SilkTest project testing a web application, using SilkTest's new open agent and the 4Test scripting language. This post covers an aspect of what I've learned.

          In the SilkTest 'classic' agent, you used the 'Exists()' method to test whether an object exists in the application under test, e.g.,:

          if (Page.Object1.Object2.Object3.Exists())

          // do something...

          With the open agent's dynamic object recognition, the Find() method is what you need to use, but it took me some research to figure out how to do an if statement with the find() method. Here's a test:

          if (Desktop.Find("http://BrowserApplication//BrowserWindow//INPUT[@id='sysname']",{5, false}) != NULL)

          // do something

          You'll notice that I added an optional argument: {5,null}. These two values constitute a FINDOPTIONS data type record. The first one is the timeout. The second value is the important one for our purposes: it "determines whether the Find method throws an E_WINDOW_NOT_FOUND exception if no object is found or NULL is returned if no object is found. "

          So, you set that value to FALSE and then test to see whether or not the Find() method returns NULL. If not null, the object exists.

          --------------------------------------------------------------------------------

          Comments

          The following can be tried:

          [-] window BrowserChild AUTPage1

          [ ] tag "Jingle Bells"

          [ ] locator "http://BrowserApplication//BrowserWindow[@caption='Jingle Bells']"

          [ ]

          [-] DomElement HomePageImage

          [ ] locator "http://IMG[@title='You are on Home page.']"

          [ ]

          [ ]

          [-] void TestObjExists ()

          [ ]

          [-] if AUTPage1.HomePageImage.Exists()

          [ ] Print ("You got lucky & are on Home page.")

          [-] else

          [ ] LogWarning ("Sorry, you missed the bus.")

          Posted by: STU | April 5, 2010 02:03 PM

        延伸閱讀

        文章來源于領測軟件測試網 http://www.k11sc111.com/


        關于領測軟件測試網 | 領測軟件測試網合作伙伴 | 廣告服務 | 投稿指南 | 聯系我們 | 網站地圖 | 友情鏈接
        版權所有(C) 2003-2010 TestAge(領測軟件測試網)|領測國際科技(北京)有限公司|軟件測試工程師培訓網 All Rights Reserved
        北京市海淀區中關村南大街9號北京理工科技大廈1402室 京ICP備2023014753號-2
        技術支持和業務聯系:info@testage.com.cn 電話:010-51297073

        軟件測試 | 領測國際ISTQBISTQB官網TMMiTMMi認證國際軟件測試工程師認證領測軟件測試網

        国产女主播精品_国产片婬乱18一级毛片视频_国产午夜激无码av毛片不卡_国产精品欧美久久久天天影院
          <ruby id="rxdll"></ruby><strike id="rxdll"></strike>

          <rp id="rxdll"></rp>
            <del id="rxdll"><meter id="rxdll"></meter></del>
            <pre id="rxdll"><font id="rxdll"></font></pre>
              <pre id="rxdll"></pre>
            <p id="rxdll"><thead id="rxdll"></thead></p><dl id="rxdll"><progress id="rxdll"><form id="rxdll"></form></progress></dl>

            <ol id="rxdll"><thead id="rxdll"><track id="rxdll"></track></thead></ol>
            <i id="rxdll"><dfn id="rxdll"></dfn></i>
            <font id="rxdll"><meter id="rxdll"></meter></font>

              <mark id="rxdll"><dfn id="rxdll"></dfn></mark>