Parenthesis in the data disappears when retrieved from excel using Selenium

113 Views Asked by At

I used the following code to retrieve data from an excel file using Selenium WebDriver. Data contains parenthesis in it, eg 'Golfo Dulce (Burica) Basin' I want to paste it in a text box.

cValue = sheet.getRow(i).getCell(aCell+1).toString();   // cell value = Golfo Dulce (Burica) Basin
driver.findElement(By.xpath("//input[@id='basinregioncountry']")).sendKeys(cValue);

It should retrieve 'Golfo Dulce (Burica) Basin' in the text box, but it displays 'Golfo Dulce Burica) Basin' .i.e. without opening parenthesis '('

I am not sure about the reason for this issue. Anyone please help me on this.

0

There are 0 best solutions below