【发布时间】:2021-07-29 09:36:07
【问题描述】:
在将折扣值 79% 转换为 79 时出错。
**for (int i = 1; i
String str=DiscountValue;
System.out.println(str.substring(1,3));
int Discount = Integer.parseInt(DiscountValue);
if (Discount >= 85) {
String GameName=driver.findElement(By.xpath("/html[1]/body[1]/div[3]/main[1]/section[1]/div[1]/div[1]/ul[1]/li[3]/div[1]/a[1]/section[1]/span[1]")).getText();
System.out.println("Please add to Wishlist:"+ GameName);
} else {
System.out.println("Jump to next game" +i);
}**
【问题讨论】:
-
您好,您的代码格式不正确,请在发布前查看您帖子的预览。并且还建议添加您正在使用的语言的标签。无论如何,祝你有美好的一天!
标签: selenium parsing selenium-webdriver