本文来介绍,如何把常用的几个webdriver的方法封装到自己写的一个类中去,这个封装过程叫二次封装Selenium方法。我们把打开站点,浏览器前进和后退,关闭和退出浏览器这这个方法封装到一个新写的类中去。 我们按照如下层次结构在PyCharm中新建两个包和两个.py文件: 上图,baidu_sea ...
                            
                            
                                分类:
编程语言   时间:
2020-07-24 21:37:57   
                                阅读次数:
75
                             
                    
                        
                            
                            
                                    import this The Zen of Python, by Tim Peters Beautiful is better than ugly. Explicit is better than implicit. Simple is better than complex. Complex i ...
                            
                            
                                分类:
编程语言   时间:
2020-07-24 21:08:55   
                                阅读次数:
66
                             
                    
                        
                            
                            
                                    一、隐士intent,紧接着上一次复习 得到第二个活动返回的数据之后,我们需要重写onActivityResult()来获取数据 protected void onActivityResult(int requestCode,int resultCode,Intent data){ switch(r ...
                            
                            
                                分类:
移动开发   时间:
2020-07-24 09:22:13   
                                阅读次数:
88
                             
                    
                        
                            
                            
                                    PreferenceScreen和fragment结合 一、监听事件 1.1、onPreferenceChange public boolean onPreferenceChange(Preference preference, Object objValue) { return false; }  ...
                            
                            
                                分类:
移动开发   时间:
2020-07-20 22:27:20   
                                阅读次数:
102
                             
                    
                        
                            
                            
                                    #使元素高亮def highlight_element(driver, element): driver.execute_script("arguments[0].setAttribute('style',arguments[1]);",element,"background:green ;bord ...
                            
                            
                         
                    
                        
                            
                            
                                public void clickKefu() { Intent intent = new Intent(Intent.ACTION_VIEW, Uri.parse("http://www.baidu.com")); getActivity().startActivity(intent); } ...
                            
                            
                                分类:
移动开发   时间:
2020-07-14 18:09:16   
                                阅读次数:
94
                             
                    
                        
                            
                            
                                    Makefile中的自动化变量 参考链接:https://seisman.github.io/how-to-write-makefile/implicit_rules.html#id8 简介 所谓自动化变量,就是这种变量会把模式中所定义的一系列的文件自动地挨个取出,直至所有的符合模式的文件都取完。这 ...
                            
                            
                                分类:
其他好文   时间:
2020-07-13 18:51:03   
                                阅读次数:
70
                             
                    
                        
                            
                            
                                    当我们执行make时出现如下错误 原因:表示打开gcc的所有警告 -Werror,它要求gcc将所有的警告当成错误进行处理 解决:vim objs/Makefile 再次进行make问题解决 ...
                            
                            
                                分类:
其他好文   时间:
2020-07-12 20:24:57   
                                阅读次数:
371
                             
                    
                        
                            
                            
                                解决:方案1 修改表结构ALTER TABLE `表名` CONVERT TO CHARACTER SET utf8 collate utf8_unicode_ci1方案2 使用 CONVERT 。之前这个表使用的编码不同是有原因的 不能随便更改 于是乎…SELECT d.shopname, c.g ...
                            
                            
                                分类:
其他好文   时间:
2020-07-10 21:03:12   
                                阅读次数:
85
                             
                    
                        
                            
                            
                                Multi-View Attention Networks for Visual Dialog * 切入点:问题的重点是哪个 ,需要充分理解才能抓住重点——给定问题的语义意图 determining the semantic intent of the given question and then ...
                            
                            
                                分类:
其他好文   时间:
2020-07-04 20:39:09   
                                阅读次数:
69