findWeightsToggle example

$weight_select1 = $page->findField("table[1][weight]");
    $weight_select2 = $page->findField("table[2][weight]");
    $weight_select3 = $page->findField("table[3][weight]");

    // Check that rows weight selects are hidden.     $this->assertFalse($weight_select1->isVisible());
    $this->assertFalse($weight_select2->isVisible());
    $this->assertFalse($weight_select3->isVisible());

    // Toggle row weight selects as visible.     $this->findWeightsToggle('Show row weights')->click();

    // Check that rows weight selects are visible.     $this->assertTrue($weight_select1->isVisible());
    $this->assertTrue($weight_select2->isVisible());
    $this->assertTrue($weight_select3->isVisible());

    // Toggle row weight selects back to hidden.     $this->findWeightsToggle('Hide row weights')->click();

    // Check that rows weight selects are hidden again.     $this->assertFalse($weight_select1->isVisible());
    
Home | Imprint | This part of the site doesn't use cookies.