back_suggest

package Ccwp;
import org.openqa.selenium.By;
//import org.openqa.selenium.JavascriptExecutor;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.WebDriver.Navigation;
import org.openqa.selenium.WebElement;
import org.openqa.selenium.chrome.ChromeDriver;
public class back_suggest {


/**
* @param args
*/
public static void main(String[] args) {
// TODO Auto-generated method stub
System.setProperty("webdriver.chrome.driver","E:\\autotest\\chromedriver_win3224\\chromedriver.exe");
//System.setProperty("webdriver.chrome.driver","E:\\GoogleChrome39/GoogleChrome39/GoogleChromePortable.exe");
 WebDriver driver1=new ChromeDriver();
// JavascriptExecutor jse=(JavascriptExecutor) driver1;
 Navigation navigation1=driver1.navigate();
navigation1.to("http://ccwp.sit.sf-express.com/service/setLogin?openId=OuoHUVYgQ7C%2BK4IjT3f8pWcTDbmpvKZWm7oa%2BWtN3mUQCYxETDvGao%2BZLzOHbRwk01&phone=13692212840&channel=1");
try{Thread.sleep(4000);
}catch(InterruptedException e){e.printStackTrace();}
navigation1.to("http://ccwp.sit.sf-express.com/page/alipay/index.html");
try{Thread.sleep(3000);
}catch(InterruptedException e){e.printStackTrace();}
driver1.manage().window().maximize();
try{Thread.sleep(3000);
}catch(InterruptedException e){e.printStackTrace();}
//点击反馈建议
WebElement re_suggest=driver1.findElement(By.xpath("//*[@id='wrapper']/section[3]/ul[1]/li[3]/a/span"));
re_suggest.click();
try{Thread.sleep(2000);
}catch(InterruptedException e){e.printStackTrace();}
WebElement suggest_input=driver1.findElement(By.xpath("//*[@id='backSuggest']"));
suggest_input.sendKeys("顺丰速度快,有保证!");
WebElement tijiao_button=driver1.findElement(By.xpath("//*[@id='addButon']"));
tijiao_button.click();
try{Thread.sleep(3000);
}catch(InterruptedException e){e.printStackTrace();}
String currenturl=driver1.getCurrentUrl();
System.out.println(currenturl);
String firsturl="http://ccwp.sit.sf-express.com/page/alipay/index.html";
if(currenturl.equals(firsturl))
System.out.println("填写反馈建议成功");
else
System.out.println("填写反馈建议成失败");
 
 


}


}
void LCD_Init(void) { LCD_WriteCommand(0xe2); //config PLL to 200MHz LCD_WriteData(0x3B); LCD_WriteData(0x02); LCD_WriteData(0x04); Delay_ms(1); LCD_WriteCommand(0xe0); // enable PLL LCD_WriteData(0x01); Delay_ms(10); LCD_WriteCommand(0xe0); // switch to use PLL clock LCD_WriteData(0x03); Delay_ms(1); LCD_WriteCommand(0x11); // exit_sleep_mode LCD_WriteCommand(0x13); // enter_normal_mode (exit_partial_mode) LCD_WriteCommand(0x20); // exit_invert_mode LCD_WriteCommand(0x38); // exit_idle_mode (using full color) LCD_WriteCommand(0xB8); // set_gpio_conf LCD_WriteData(0x0f); // GPIO[0~3] controlled by host LCD_WriteData(0x01); // GPIO as normal GPIO LCD_WriteCommand(0xba); // GPIO[0~3]=0001, TFT /DISPOFF set to Hi LCD_WriteData(0x01); Delay_ms(1); LCD_WriteCommand(0xba); // GPIO[0~3]=0011, enable backlight booster LCD_WriteData(0x03); Delay_ms(1); LCD_WriteCommand(0xf0); // set_pixel_data_interface (MCU) 16bit(5:6:5) LCD_WriteData(0x03); LCD_WriteCommand(0xb0); // set_lcd_mode LCD_WriteData(0x00); LCD_WriteData(0x20); LCD_WriteData(0x03); LCD_WriteData(0x1f); // panel size 800-1 LCD_WriteData(0x01); LCD_WriteData(0xdf); // panel size 480-1 LCD_WriteData(0x00); // odd line and even line are in RGB seq LCD_WriteCommand(0xb4); // set_hori_period LCD_WriteData(0x03); LCD_WriteData(0x9f); // total pluse per line, HT=928-1 LCD_WriteData(0x00); LCD_WriteData(0x58); // horizontal back porch, HPS=88 LCD_WriteData(0x2f); // HPW=48-1 (suggested value) LCD_WriteData(0x00); LCD_WriteData(0x00); // LPS=0x0000(default), not use LCD_WriteData(0x00); // LPSPP=0x00(default), not use LCD_WriteCommand(0xb6); // set_vert_period LCD_WriteData(0x02); LCD_WriteData(0x0c); // total line per frame, VT=525-1 LCD_WriteData(0x00); LCD_WriteData(0x20); // vertical back porch, VPS=32 LCD_WriteData(0x02); // VPW=3-1(suggest value) LCD_WriteData(0x00); LCD_WriteData(0x00); LCD_WriteData(0x00); // FPS=0x0000(default),not use LCD_WriteCommand(0xe6); // config PCLK=32ns(PLL@200MHz) LCD_WriteData(0x02); LCD_WriteData(0x70); LCD_WriteData(0x00); LCD_WriteCommand(0x36); // set_address_mode LCD_WriteData(0x00); // top to bottom, left to right, RGB, normal // 设置显示屏开启 LCD_WriteCommand(0x29); } 在这里插入代码片 ———————————————— 分析代码
最新发布
08-11
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值