I want to know how could we input a variable and some keys in only one sendkeys method. In fact in a textfield, I want to input "Ctrl+A" to select the current value, and replace it with a new value which is stocked in a varialbe called "orderNumber".
For example :
driver.findElement(By.xpath("//tr[@class='nodrag nodrop filter row_hover']/th[@class='text-center'
[2]/input[@class='filter']")).sendKeys(Keys.CONTROL +"a");
Then
driver.findElement(By.xpath("//tr[@class='nodrag nodrop filter row_hover']/th[@class='text-center'
[2]/input[@class='filter']")).sendKeys(orderNumber);
Is there a way to combine these 2 lines into 1 line? I tried this it doesn't work.
driver.findElement(By.xpath("//tr[@class='nodrag nodrop filter row_hover']/th[@class='text-center'
[2]/input[@class='filter']")).sendKeys(Keys.CONTROL +"a" , orderNumber);
Thank you in advance for your answers.