• “我转头,看见你走来,在阳光里,于是笑容从我心里溢出。”
    看见就忍不住开心

  • 大佬,加油。喜欢这句话---我们是做技术的,需要有自己的技术价值观,内心的强大需要锻炼,尽量减少其他职能角色对核心工作的影响。

  • Author only
  • --作业1--

    java

    public class XueQiu1 {
    protected AndroidDriver driver;
    @Before
    public void setup()throws MalformedURLException {
    DesiredCapabilities capabilities = new DesiredCapabilities();
    capabilities.setCapability("deviceName", "Android Emulator");
    capabilities.setCapability("platformName", "Android");
    capabilities.setCapability("platformVersion", "6.0");
    capabilities.setCapability("appPackage", "com.xueqiu.android");
    capabilities.setCapability("appActivity", ".view.WelcomeActivityAlias");
    driver = new AndroidDriver(new URL("http://127.0.0.1:4723/wd/hub"), capabilities);
    driver.manage().timeouts().implicitlyWait(200, TimeUnit.SECONDS);
    }
    @Test
    public void test() {
    driver.findElement(By.id("home_search")).click();
    driver.manage().timeouts().implicitlyWait(5, TimeUnit.SECONDS);
    driver.findElement(By.id("search_input_text")).sendKeys("pdd");
    driver.findElement(By.id("stockName")).click();
    driver.manage().timeouts().implicitlyWait(5, TimeUnit.SECONDS);

    }
    @After
    public void teardown(){
    driver.quit();
    }
    }

    --作业2--

    java
    public class XueQiuALi {
    protected AndroidDriver driver;
    @Before
    public void setup()throws MalformedURLException {
    DesiredCapabilities capabilities = new DesiredCapabilities();
    capabilities.setCapability("deviceName", "Demo");
    capabilities.setCapability("platformName", "Android");
    capabilities.setCapability("platformVersion", "6.0");
    capabilities.setCapability("appPackage", "com.xueqiu.android");
    capabilities.setCapability("appActivity", ".view.WelcomeActivityAlias");
    capabilities.setCapability("autoGrantPermissions", "true");

    driver = new AndroidDriver(new URL("http://127.0.0.1:4723/wd/hub"), capabilities);
    driver.manage().timeouts().implicitlyWait(200, TimeUnit.SECONDS);
    }
    @Test
    public void test() {
    //app 页面信息位置可能会变,解决方法:多次定位
    driver.findElement(By.xpath("//*[@text='自选' and contains(@resource-id,tab_name)]"));
    driver.findElement(By.xpath("//*[@text='自选' and contains(@resource-id,tab_name)]"));
    driver.findElement(By.xpath("//*[@text='自选' and contains(@resource-id,tab_name)]"));
    driver.findElement(By.xpath("//*[contains(@resource-id,tab_name) and @text='自选']")).click();

    driver.findElement(By.id("action_create_cube")).click();
    driver.findElement(By.id("search_input_text")).sendKeys("ali");
    //判断是否已点击
    if(driver.findElementById("follow_btn").isDisplayed()) {
    driver.findElement(By.id("follow_btn")).click();
    driver.findElement(By.xpath("//*[@text='下次再说']")).click();
    }
    driver.findElement(By.id("action_close")).click();
    try{
    driver.findElements(By.xpath("//*[contains(@resource-id,'portfolio_stockName') and @text='阿里巴巴']"));
    System.out.println("OK");
    }catch (Exception e) {
    System.out.println("没有找到 "+e);
    }
    driver.manage().timeouts().implicitlyWait(5, TimeUnit.SECONDS);
    }
    @After
    public void teardown(){
    driver.quit();
    }
    }
  • 第八期 Java 基础课-20190127 at January 28, 2019

    package fordemo;

    import org.junit.Test;

    /**

    • @Date:2019/1/28 11:10
      /
      public class ForEachDemoTest {
      @Test
      public void main(){
      for (int i = 1; i < 10; i++) {
      for (int j = 1; j < i+1; j++) {
      System.out.printf(i+"
      "+j+"="+i*j+" ");
      }
      System.out.println();
      }
      System.out.println();

      fun();
      fun1();
      fun2();

      }
      // 倒直角三角形
      public void fun(){
      for (int i = 1; i < 10; i++) {
      for (int j = i; j < 10; j++) {
      System.out.printf("*");
      }
      System.out.println();
      }
      System.out.println();

      }

      // 直角三角形
      public void fun1(){
      for (int i = 1; i < 10; i++) {
      for (int j = 1; j < i+1; j++) {
      System.out.printf("*");
      }
      System.out.println();
      }
      System.out.println();

      }

      // 等腰三角形
      public void fun2(){
      for (int i = 0; i < 9; i++) {
      for (int k = 1; k < 9-i; k++) {
      System.out.printf(" ");
      }
      for (int j = 0; j < 2*i+1; j++) {
      System.out.printf("*");
      }
      System.out.println();
      }
      System.out.println();

      }
      }

  • 论程序员的最大梦想 at January 06, 2019

    脱单不脱发

  • Author only
  • I've got presents ? -Yeah.哈利由内到外的开心从屏幕感染了我,开心又心疼。每次看到这里就会想起小时候自己收到的觉得不可能会收到的一份礼物的心情。圣诞节到了,已经是平安夜了,唔~我想收到的礼物还没有收到😌 ,你们呢?祝社区平安夜快乐,社区的大佬们、小伙伴们平安夜快乐,圣诞快乐🍭 🍭 🍭 🍭 🍭