-1

I tried to login on my mobile webbrowser. After passing my username as string, it clears automatically.

My code is

loginId.click(); 
loginId.sendKeys(userName); 

The script fails only with the mobile browser. The login is a light box pop up.

I also tried javascript executor and actions. Nothing worked.

  • 3
    Can you share some more details. Like the DOM, code you tried and error screenshots if any. – Sandeep Chandra Sekhar Sep 12 '19 at 8:35
  • loginId.click(); loginId.sendKeys(userName); – user41454 Sep 12 '19 at 8:40
  • Script fails only with the mobile browser.The login is a light box pop up. – user41454 Sep 12 '19 at 8:42
  • I tried javascript executor and actions.Nothing works...! – user41454 Sep 12 '19 at 8:43
  • Plz, add all required details in the question. – Nitin Rastogi Sep 12 '19 at 10:28
0

This happens because of your application behavior. You can try with below code:

Actions action =new Actions(driver);
driver.findElement(By.xpath("")).sendkeys("textvalue");
action.sendkeys("Keys.TAB");
| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.