Untitled
raw download clone
JAVA
views 15
,
size 2168 b
else if (settings.equals("Tx/Rx Frequency")){
            String[] freqArray = value.split(",");
            String TxFreqValue = null;
            String RxFreqValue = null;
            TxFreqValue = freqArray[0];
                    RxFreqValue= freqArray[1];
            // Change A End 'Tx/Rx Frequency' to values 38360.5,39368.5
            String TxFreqXPath = "//tr/td//label[contains(text(),'Tx Frequency')]/following::" +
                    "tr/td/label[contains(text(),'Rx Frequency')]/../../../following::input[@class='textItemLite'][1]";
            String RxFreqXPath = "//tr/td//label[contains(text(),'Tx Frequency')]/following::" +
                    "tr/td/label[contains(text(),'Rx Frequency')]/../../../following::input[@class='textItemLite'][2]";

            WebElement TxFreq = SeleniumToolkit.webDriver_findElement(By.xpath(TxFreqXPath));
            Assert.assertTrue(TxFreq != null);
            TxFreq.sendKeys(TxFreqValue);
            WebElement RxFreq = SeleniumToolkit.webDriver_findElement(By.xpath(RxFreqXPath));
            Assert.assertTrue(RxFreq != null);
            RxFreq.sendKeys(RxFreqValue);
            // Click top Cancel button
            String lastCancelBtnXPath = "(" + SeleniumToolkit.xPathRepository
                    .getDialogWindowCancelButtonXPath() + ")[last()]";
            wait.until(ExpectedConditions.elementToBeClickable(By.xpath(lastCancelBtnXPath))).click();
            // click Edit Z End
            wait.until(ExpectedConditions
                    .elementToBeClickable(By.xpath(SeleniumToolkit.xPathRepository.getActiveDialogButton("Edit Z End"))))
                    .click();
            // check that 'Diversity Frequency' exists in tab Tx/Rx
            diversityElement = SeleniumToolkit.getVisibleElement(diversityFreqXPath, 10);
            Assert.assertTrue("Could not find 'Diversity Frequency' in Tx/Rx tab", diversityElement != null);
            wait.until(ExpectedConditions.elementToBeClickable(By.xpath(lastCancelBtnXPath))).click();
            wait.until(ExpectedConditions.elementToBeClickable(By.xpath(lastCancelBtnXPath))).click();
        }
close fullscreen
Login or Register to edit or fork this paste. It's free.