小编Pet*_*son的帖子

在testng.xml中使用组时,Testng忽略@AfterMethod调用

所以我有一个测试,其中包含以下代码:

public class ViewLineList 
{

Browser browser = new Browser();
WebDriver driver;


public void viewLineList(String driverName)
{
    driver = browser.getDriver(driverName);

    //Navigate to System Facing
    driver.manage().window().maximize();
    driver.navigate().to("URL GOES HERE");
    driver.manage().timeouts().implicitlyWait(5, TimeUnit.SECONDS);


    //Verify Line List is present
    WebElement lineList = driver.findElement(By.xpath("/html/body/div/div/div/div/form/div/div[2]/div/div[2]/div"));
    Assert.assertNotNull(lineList, "The Line List is empty");
    Assert.assertEquals(true, lineList.isDisplayed(), "The line list is not displayed");

    //Verify Columns are present

    WebElement poEligibleColumn = driver.findElement(By.linkText("PO Eligible"));
    WebElement patientColumn = driver.findElement(By.linkText("Patient/SSN"));
    WebElement wardColumn = driver.findElement(By.linkText("Ward/Room"));
    WebElement drugColumn = driver.findElement(By.linkText("Drug"));
    WebElement dosageColumn = driver.findElement(By.linkText("Dosage"));
    WebElement startDateColumn …
Run Code Online (Sandbox Code Playgroud)

java testing testng qa

5
推荐指数
1
解决办法
3080
查看次数

忽略Python中的异常

我在python中有try-except块,我想在发生异常时什么都不做.我的代码如下:

for i in range(len(grid)):
    for j in range(len(grid[i])):
        try:
            count = count > int(grid[i][j]) ? count : int(grid[i][j])
        except:
            //Do nothing here
Run Code Online (Sandbox Code Playgroud)

如果发现异常,我该怎么办?

谢谢.

python try-except

3
推荐指数
3
解决办法
1万
查看次数

标签 统计

java ×1

python ×1

qa ×1

testing ×1

testng ×1

try-except ×1