Hi Selenium Group Team
I need help in following context: I have a test scenario, in which There is a text field on the web page, The field is called Search text field. In the Search Field I need to enter a searchtext and then need to click the Enter key from Keyboard.
I have tried to locate the element by following method:
WebElement SearchBox;
SearchBox = driver.findElement(By.xpath("//input[@title='Search Salesforce']"));
Actions actions = new Actions(driver);
actions.sendKeys(SearchBox, "Hospital").keyUp(Keys.CONTROL).perform();
Also I tried this one
WebElement Search = driver.findElement(By.xpath("//input[@title='Search Salesforce']"));
Search.sendKeys("Hospital");
Search.sendKeys(Keys.Enter);
After performing this The Search Field get blank and expected Search results does not appear.
Here is html script of the webElement
<input class="slds-input slds-text-color_default slds-p-left--none slds-size--1-of-1 input default uiInput uiInputTextForAutocomplete uiInput--{remove}" maxlength="100" role="combobox" id="159:0;p" aria-expanded="true" aria-autocomplete="list" type="text" aria-describedby="" aria-haspopup="true" placeholder="Search Salesforce" aria-activedescendant="" title="Search Salesforce" data-aura-rendered-by="183:0;p" data-aura-class="uiInput uiInputTextForAutocomplete uiInput--{remove}" data-interactive-lib-uid="2" autocomplete="off" spellcheck="false" keepfocusonnavigate="true">
I will Thankful for your reply..
Thank You
Narayan Boolchandani