$this->type("xpath=//input[@id='price_{$textFieldId}']", '1');
// select sold option for select field, check for form rule
- $this->select("price_{$selectFieldId}", "value={$selectFieldOp1}");
- $this->click('_qf_Register_upload-bottom');
- $this->waitForPageToLoad($this->getTimeoutMsec());
-
- $this->assertStringsPresent(array('Sorry, this option is currently sold out.'));
+ $this->assertElementContainsText("xpath=//select[@id='price_{$selectFieldId}']//option[@value='crm_disabled_opt-{$selectFieldOp1}']", "(Sold out)");
// fill correct available option for select field
$this->select("price_{$selectFieldId}", "value={$selectFieldOp2}");
$this->type("xpath=//input[@id='price_{$textFieldId}']", '1');
// check for sold option for select field
- $this->select("price_{$selectFieldId}", "value={$selectFieldOp1}");
-
- $this->click('_qf_Register_upload-bottom');
- $this->waitForPageToLoad($this->getTimeoutMsec());
-
- $this->assertStringsPresent(array('Sorry, this option is currently sold out.'));
+ $this->assertElementContainsText("xpath=//select[@id='price_{$selectFieldId}']//option[@value='crm_disabled_opt-{$selectFieldOp1}']", "(Sold out)");
// check for sold option for select field
$this->select("price_{$selectFieldId}", "value={$selectFieldOp2}");
$this->type("xpath=//input[@id='price_{$textFieldId}']", '1');
// check for select
- $this->select("price_{$selectFieldId}", "value={$selectFieldOp2}");
-
- $this->click('_qf_Participant_2_next-Array');
- $this->waitForPageToLoad($this->getTimeoutMsec());
-
- $this->assertStringsPresent(array('Sorry, currently only 2 seats are available for this option.'));
+ $this->assertElementContainsText("xpath=//select[@id='price_{$selectFieldId}']//option[@value='crm_disabled_opt-{$selectFieldOp2}']", "(Sold out)");
// Skip participant3 and register
$this->click('_qf_Participant_2_next_skip-Array');
$this->type("xpath=//input[@id='price_{$textFieldId}']", '1');
// check for select field
- $this->select("price_{$selectFieldId}", "value={$selectFieldOp2}");
-
- $this->click('_qf_Register_upload-bottom');
- $this->waitForPageToLoad($this->getTimeoutMsec());
-
- $this->assertStringsPresent(array('Sorry, this option is currently sold out.'));
+ $this->assertElementContainsText("xpath=//select[@id='price_{$selectFieldId}']//option[@value='crm_disabled_opt-{$selectFieldOp2}']", "(Sold out)");
// fill available value for select
$this->select("price_{$selectFieldId}", "value={$selectFieldOp1}");
$this->type("xpath=//input[@id='price_{$textFieldId}']", '1');
// check for select field
- $this->select("price_{$selectFieldId}", "value={$selectFieldOp2}");
-
- $this->click('_qf_Participant_1_next-Array');
- $this->waitForPageToLoad($this->getTimeoutMsec());
-
- $this->assertStringsPresent(array('Sorry, this option is currently sold out.'));
+ $this->assertElementContainsText("xpath=//select[@id='price_{$selectFieldId}']//option[@value='crm_disabled_opt-{$selectFieldOp2}']", "(Sold out)");
// fill available value for select
$this->select("price_{$selectFieldId}", "value={$selectFieldOp1}");
$this->type("xpath=//input[@id='price_{$textFieldId}']", '1');
// check for select
- $this->select("price_{$selectFieldId}", "value={$selectFieldOp2}");
-
- $this->click('_qf_Participant_2_next-Array');
- $this->waitForPageToLoad($this->getTimeoutMsec());
-
- $this->assertStringsPresent(array('Sorry, this option is currently sold out.'));
+ $this->assertElementContainsText("xpath=//select[@id='price_{$selectFieldId}']//option[@value='crm_disabled_opt-{$selectFieldOp2}']", "(Sold out)");
// Skip participant3 and register
$this->click('_qf_Participant_2_next_skip-Array');
$this->type("xpath=//input[@id='price_{$textFieldId}']", '1');
// check for select field
- $this->select("price_{$selectFieldId}", "value={$selectFieldOp2}");
-
- $this->click('_qf_Register_upload-bottom');
- $this->waitForPageToLoad($this->getTimeoutMsec());
-
- $this->assertStringsPresent(array('Sorry, this option is currently sold out.'));
+ $this->assertElementContainsText("xpath=//select[@id='price_{$selectFieldId}']//option[@value='crm_disabled_opt-{$selectFieldOp2}']", "(Sold out)");
// fill available value for select
$this->select("price_{$selectFieldId}", "value={$selectFieldOp1}");
$this->type("xpath=//input[@id='price_{$textFieldId}']", '1');
// check for select field
- $this->select("price_{$selectFieldId}", "value={$selectFieldOp2}");
-
- $this->click('_qf_Participant_1_next-Array');
- $this->waitForPageToLoad($this->getTimeoutMsec());
-
- $this->assertStringsPresent(array('Sorry, this option is currently sold out.'));
+ $this->assertElementContainsText("xpath=//select[@id='price_{$selectFieldId}']//option[@value='crm_disabled_opt-{$selectFieldOp2}']", "(Sold out)");
// fill available value for select
$this->select("price_{$selectFieldId}", "value={$selectFieldOp1}");