Cov txheej txheem:

Cov lus txib twg yog siv rau kev ntaus ntawv hauv lub thawv ntawv hauv selenium?
Cov lus txib twg yog siv rau kev ntaus ntawv hauv lub thawv ntawv hauv selenium?

Video: Cov lus txib twg yog siv rau kev ntaus ntawv hauv lub thawv ntawv hauv selenium?

Video: Cov lus txib twg yog siv rau kev ntaus ntawv hauv lub thawv ntawv hauv selenium?
Video: Kawm Muas - Tuaj Txog Lub Tsev Kawm 2024, Kaum ib hlis
Anonim

hom lus txib yog ib tug ntawm Selenese lus txib hauv Selenium IDE thiab feem ntau yog siv rau hom text rau hauv lub thawv ntawv thiab cov ntaub ntawv cheeb tsam.

Ntawm no, kuv yuav muab cov ntawv sau rau hauv lub thawv ntawv siv selenium li cas?

-> sendkeys(): Webdriver hais kom ua nkag tus ntawv nyeem mus rau hauv qhov teev lub thawv ntawv txheeb xyuas siv qhov chaw. -> WebElement Fname: Reference of the lub thawv ntawv element yog khaws cia rau hauv Fname variable. 6. To nkag tus ntawv nyeem mus rau hauv lub thawv ntawv siv sendkeys method.

Ib yam li ntawd, koj ua li cas tshem lub thawv ntawv hauv selenium? meej () predefined method of Selenium ' WebDriver ' Chav kawm yog siv rau meej tus ntawv nyeem nkag los yog tso tawm nyob rau hauv lub ntawv nyeem teb. Pib nrog cia meej tus ntawv nyeem hauv cov Text Box teb siv cov meej () predefined method of Selenium ' WebDriver 'klas. 3. Tsim ib pob hais tias 'package31' nyob rau hauv qhov project tshiab tsim.

Tom qab ntawd, qhov txawv ntawm hom keys thiab hom commands yog dab tsi?

1. The sendKeys" lus txib tsis hloov cov ntsiab lus uas twb muaj lawm hauv text box hos tus " hom " lus txib hloov cov ntsiab lus uas twb muaj lawm ntawm lub thawv ntawv. 2. Nws yuav xa lus meej tus yuam sij xwm txheej zoo li tus neeg siv nias a tus yuam sij ntawm cov keyboard.

Dab tsi yog qhov txiaj ntsig ntawm cov lus txib ua?

Selenium IDE cov lus txib (Selenese)

  • Kev ua. Kev nqis tes ua yog cov lus txib uas feem ntau tswj hwm lub xeev ntawm daim ntawv thov.
  • Cov khoom siv. Cov lus txib no tshuaj xyuas lub xeev ntawm daim ntawv thov thiab khaws cov txiaj ntsig hauv qhov sib txawv, Zoo li storeTitle.
  • Kev lees paub.
  • Feem ntau siv Selenium IDE cov lus txib:

Pom zoo: