selenium-webdriver

webdriver-manager update throwing Error: connect ETIMEDOUT

情到浓时终转凉″ 提交于 2021-02-20 19:30:09
问题 I'm getting ETIMEDOUT error while installing webdriver-manager updated . Find the error details as below: C:\Users\....> webdriver-manager update webdriver-manager: using global installed version 12.0.6 events.js:160 throw er; // Unhandled 'error' event ^ Error: connect ETIMEDOUT XX.XXX.XX.XXX:XXX at Object.exports._errnoException (util.js:1018:11) at exports._exceptionWithHostPort (util.js:1041:20) at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1086:14) Also when I tried to ping the

How to change the text of a span that acts like a button

我的未来我决定 提交于 2021-02-20 13:36:37
问题 I am working on writing automation tests for a custom web application. I am running into a problem where I can't change the text of a span. I have tried using driver.execute_script but have had no luck. (It would really help if I knew javascript better) As far as I know you can't click a span and the list is populated as a list of . What is the best way to change this text? 回答1: You need to set the innerHTML using execute_script(): driver.execute_script('arguments[0].innerHTML = "New value";'

How to change the text of a span that acts like a button

女生的网名这么多〃 提交于 2021-02-20 13:29:30
问题 I am working on writing automation tests for a custom web application. I am running into a problem where I can't change the text of a span. I have tried using driver.execute_script but have had no luck. (It would really help if I knew javascript better) As far as I know you can't click a span and the list is populated as a list of . What is the best way to change this text? 回答1: You need to set the innerHTML using execute_script(): driver.execute_script('arguments[0].innerHTML = "New value";'

How to compare to List<WebElement> in webdriver?

北城以北 提交于 2021-02-20 05:20:48
问题 I am trying to automate Dual list Box testing. I want to compare the selected values(left side) vs moved values (into right side list). Here is the code. Select allFromListData = new Select(listData); // values selection allFromListData.selectByIndex(0); allFromListData.selectByVisibleText("Helena"); List<WebElement> selectedList=allFromListData.getAllSelectedOptions(); //clicking on add button for(int i=0;i<selectedList.size();i++) System.out.println(selectedList.get(i).getText());

Why we don't need server in Selenium Webdriver?

心已入冬 提交于 2021-02-20 05:16:29
问题 Selenium RC requires starting the server to kick of the execution of Selenium Automated RC test suites. The Selenium server is the inter mediator between browser and Selenium RC because Selenium RC won’t make direct call to browser. So we have to start Selenium server prior to start running Selenium RC test cases. In case of Selenium Web Driver , it does not required to start Selenium Server for executing test scripts. Selenium Web Driver makes the calls between browser & automation script.

handling submenu item with webdriver selenium

佐手、 提交于 2021-02-20 03:54:29
问题 I want to click submenu item using selenium webdriver which is invisible bydefault. It becomes visible on mousehover . I tried with some code and it is giving error as shown below Caused by: org.openqa.selenium.remote.ErrorHandler$UnknownServerException: Element is not currently visible and so may not be interacted with. Here the code: Actions actions = new Actions(driver); WebElement menuHoverLink = driver.findElement(By.linkText("RENT")); //WebElement menuHoverLink = driver.findElement(By

Unable to detect Alert using ChromeDriver?

孤街醉人 提交于 2021-02-19 09:07:20
问题 I am currently doing some automation testing using Selenium WebDriver . The issue I am facing is that my script is unable to detect alerts. Scenario: I open the application, pass my credentials and press Confirm. On Confirm, the application opens with an Alert. Screenshot of the Alert Shown below: I am using Java, Selenium WebDriver, ChromeDriver, and testng. i am using the codes shows below : uk.setLogin("", ""); uk.getLogin(); WebDriverWait wait = new WebDriverWait(Driver, 10); wait.until

Unable to detect Alert using ChromeDriver?

。_饼干妹妹 提交于 2021-02-19 09:04:32
问题 I am currently doing some automation testing using Selenium WebDriver . The issue I am facing is that my script is unable to detect alerts. Scenario: I open the application, pass my credentials and press Confirm. On Confirm, the application opens with an Alert. Screenshot of the Alert Shown below: I am using Java, Selenium WebDriver, ChromeDriver, and testng. i am using the codes shows below : uk.setLogin("", ""); uk.getLogin(); WebDriverWait wait = new WebDriverWait(Driver, 10); wait.until

How to determine if a page is loaded using selenium?

心已入冬 提交于 2021-02-19 07:14:12
问题 I am interacting with a database that returns the newspaper reports about a event using selenium. Every time I implement a search query, the database opens a new page and starts to load all newspaper reports about the event. The webpage has an element that reports the total number of relevant reports found. The number changes before the page is fully loaded. My question is there a way to determine if the page is loaded. My current strategy is to check the number of total reports in a loop and

How to determine if a page is loaded using selenium?

时间秒杀一切 提交于 2021-02-19 07:07:23
问题 I am interacting with a database that returns the newspaper reports about a event using selenium. Every time I implement a search query, the database opens a new page and starts to load all newspaper reports about the event. The webpage has an element that reports the total number of relevant reports found. The number changes before the page is fully loaded. My question is there a way to determine if the page is loaded. My current strategy is to check the number of total reports in a loop and