File tree Expand file tree Collapse file tree 1 file changed +10
-21
lines changed 
docs_source_files/content/driver_idiosyncrasies Expand file tree Collapse file tree 1 file changed +10
-21
lines changed Original file line number Diff line number Diff line change 11--- 
2- title : " Shared capabilities " 
2+ title : " 共享的功能 " 
33weight : 1 
44--- 
5+  
6+ ### 页面加载策略  
7+ 通过URL导航到新页面时,默认情况下,Selenium将等待页面完全加载后再进行响应。这对于初学者来说效果很好,但是在加载大量第三方资源的页面上可能会导致较长的等待时间。在这种情况下,使用非默认策略可以使测试的执行速度更快,但是也可能导致不稳定,即页面上的元素随元素加载和大小变化而改变位置.
58
6- {{% notice info %}}
7- <i  class =" fas fa-language " ></i > 页面需要从英语翻译为简体中文。
8- 您熟悉英语与简体中文吗?帮助我们翻译它,通过 pull requests 给我们!
9- {{% /notice %}}
10- 
11- ### pageLoadStrategy  
12- When navigating to a new page via URL, by default Selenium will wait
13- until the page has fully loaded before responding. This works well for
14- beginners, but can cause long wait times on pages that load a large
15- number of third party resources. Using a non default strategy can make
16- test execution faster in cases like this, but can also introduce flakiness
17- where elements on the page change position as elements load in and change
18- size.
19- 
20- The page load strategy queries the
9+ 页面加载策略可以参考链接
2110[ document.readyState] ( //developer.mozilla.org/en-US/docs/Web/API/Document/readyState ) 
22- as described in the table below :
11+ 如下述表格的描述 :
2312
24- |  Strategy  |  Ready State  |  Notes  | 
13+ |  策略  |  准备完成的状态  |  备注  | 
2514|  -------- |  ----------- |  ----- | 
26- |  normal |  complete |  Used by default, waits for all resources to download  | 
27- |  eager |  interactive |  DOM access is ready, but other resources like images may still be loading  | 
28- |  none |  Any |  Does not block WebDriver at all  | 
15+ |  normal |  complete |  默认情况下使用,等待所有资源下载完成  | 
16+ |  eager |  interactive |  DOM访问已准备就绪,但其他资源(如图像)可能仍在加载中  | 
17+ |  none |  Any |  完全不阻塞WebDriver | 
    
 
   
 
     
   
   
          
     
  
    
     
 
    
      
     
 
     
    You can’t perform that action at this time.
  
 
    
  
     
    
      
        
     
 
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments