Skip to main content

All Questions

73votes
7answers
38kviews

How do I simulate hitting enter in an input field with Capybara and ChromeDriver?

I have the following helper method to input a string into an input field and press the enter key, but it seems the enter key is never pressed. I see the string entered into the input field, but the ...
Eric M.'s user avatar
  • 5,559
2votes
2answers
1kviews

How to enter text in a div which has type=textbox?

I am trying to enter text in a div whose type is textbox. Refer below HTML snippet of the element before entering the text: <div class="_5yk2" tabindex="-1"> <div class="_5rp7"> ...
Ram's user avatar
  • 35
1vote
0answers
196views

How can I check a checkbox in a canvas element?

I have an application to automate using Selenium-Java where I need to check the checkbox which is inside the Canvas element. The canvas code looks like this: Can anyone suggest/guide me on how can I ...
Nits's user avatar
0votes
0answers
4kviews

Selenium + Headless Chrome + JS

I am using 2.33 chrome driver and trying to access variable defined in HTML as <script>var foo = "bar";</script> as follows: from selenium import webdriver from selenium.webdriver.chrome....
Tzoiker's user avatar
  • 1,432
0votes
1answer
88views

Fail to set web element state "selected' using js and Selenium

I have two lines of code that one is unhidding the web element since its hidden, and the other suppose to select it. js.executeScript("$('.select-upload_company_id>.center').html('Test')") js....
Joe's user avatar
  • 2,633
0votes
1answer
392views

How to selectByVisibleText using js executeScript?

I have this js code to remove some hidden dropdown element: //select account from dropdown using javascript val js: JavascriptExecutor = driver.asInstanceOf[JavascriptExecutor] js....
Joe's user avatar
  • 2,633

close