Cov txheej txheem:

Kuv yuav nrhiav tau xpath ntawm ib lub caij hauv Chrome li cas?
Kuv yuav nrhiav tau xpath ntawm ib lub caij hauv Chrome li cas?

Video: Kuv yuav nrhiav tau xpath ntawm ib lub caij hauv Chrome li cas?

Video: Kuv yuav nrhiav tau xpath ntawm ib lub caij hauv Chrome li cas?
Video: Nujsua Nkauj tshisb-Yog Koj Yuav Nrhiav Xwb Yeej taus 2024, Kaum ib hlis
Anonim

Txoj nyem rau ib qho twg keeb koj xav xpath forand nias rau "Inspect Element "Thiab tom qab ntawd dua hauv Inspector, txoj nyem rau ntawm keeb thiab nyem rau ntawm "Copy Xpath ".

Los ntawm Chrome:

  1. Txoj nyem rau ntawm "saib" ntawm cov khoom koj tab tom nrhiav nrhiav xpath .
  2. Txoj nyem rau ntawm qhov chaw tseem ceeb ntawm lub console.
  3. Mus rau Copy xpath .

Ib yam li ntawd, tib neeg nug, Kuv yuav tshawb nrhiav cov ntsiab lus hauv Chrome li cas?

Txhawm rau nkag mus rau DevTools, ntawm ib nplooj ntawv web lossis app hauv GoogleChrome koj tuaj yeem siv ib qho ntawm cov kev xaiv no:

  1. Qhib Chrome ntawv qhia zaub mov nyob rau sab xis ntawm koj lub qhov rais browser, tom qab ntawd xaiv Cov Cuab Yeej> Cov cuab yeej tsim tawm.
  2. Txoj cai-nias ntawm txhua nplooj ntawv keeb kwm thiab xaiv InspectElement.

Tsis tas li ntawd, kuv yuav siv ChroPath hauv Chrome li cas? Right-click rau ntawm nplooj ntawv web, thiab tom qab ntawd nyem Tshawb xyuas. 3. Nyob rau sab xis ntawm Cov Ntsiab Lus tab, nyem rau ntawm ChroPath tab. Note- Yog ChroPath yog tsis pom ces nyem rau ntawm lub arrowicon raws li qhia nyob rau hauv lub Screenshot.

Yog li, kuv yuav siv Xpath pab hauv Chrome li cas?

  1. Qhib lub tab tshiab thiab mus rau txhua lub vev xaib.
  2. Ntaus Ctrl-Shift-X (lossis Command-Shift-X ntawm OS X), lossis nyem lub pob XPath Helper hauv lub toolbar, qhib XPath Helperconsole.
  3. Tuav Shift thaum koj nas hla cov ntsiab lus ntawm nplooj ntawv.
  4. Yog xav tau, kho cov lus nug XPath ncaj qha hauv lub console.

Kuv yuav kho qhov Web page li cas?

Yuav ua li cas kho cov nplooj ntawv Web

  1. Qhib cov nplooj ntawv web hauv Chrome thiab xaiv cov ntawv ntawm nplooj ntawv web uas koj xav hloov.
  2. Right-click cov ntawv nyeem thiab xaiv Inspect Element hauv cov ntawv qhia zaub mov.
  3. Cov cuab yeej tsim tawm yuav qhib nyob rau hauv qis dua ib nrab ntawm koj lub browser thiab cov khoom siv DOM yuav raug xaiv.

Pom zoo: