S4064172 / Assessor

0 stars 0 forks source link

Code duplication #13

Open S4064172 opened 2 years ago

S4064172 commented 2 years ago

If you clicks for mistake on the same objcet several time you get the following code:

   driver.findElement(By.id("customer_edit_form_company")).click();
    driver.findElement(By.id("customer_edit_form_company")).clear();
    driver.findElement(By.id("customer_edit_form_company")).sendKeys(key3);
    driver.findElement(By.id("customer_edit_form_company")).click();
    driver.findElement(By.id("customer_edit_form_company")).clear();
    driver.findElement(By.id("customer_edit_form_company")).sendKeys(key4);

could be good if the tool is able to clean up the code and get this:

    driver.findElement(By.id("customer_edit_form_company")).click();
    driver.findElement(By.id("customer_edit_form_company")).clear();
    driver.findElement(By.id("customer_edit_form_company")).sendKeys(key4);
S4064172 commented 2 years ago

now the tool can andle it

Image