6

Yes, Page Objects seem the right direction to encapsulate the frame in frames details from the test. Page objects are a classic example of encapsulation - they hide the details of the UI structure and widgetry from other components (the tests). https://martinfowler.com/bliki/PageObject.html var page = new Page(); page.DoSomeNavigation(); var ...


5

The first rule of test automation is that there are no hard rules but just recommendations, so don't take the page object model "literally". The concept of page object was there long before the pages were so complex. Now "Page Object model" just means modularising your web page to reduce automation efforts, improve maintenance efficiency, faster execution, ...


4

Selenium IDE has no version control integration, at least for now. All the test info is written in a .side file (unless you are using code export to another language). If you've set up git correctly, you should be OK, provided you are not trying to work at the same file at the same time. Just commit different tests in folders you agreed on. However, I ...


3

The below command , DISM.exe /Online /Add-Capability /CapabilityName:Microsoft.WebDriver~~~~0.0.1.0 downloads the web driver usually to system32 folder which is already in PATH variable. That's why your protractor scripts work fine in your local system. To run it in the other system to which you copied the webdriver, follow any of the below approaches: ...


2

Yes, you can assign a particular port explicitly to your web-driver execution. If you know the port you want to connect to, then you can directly connect to it using selenium with below code. System.setProperty("webdriver.chrome.driver", "C:\\selenium\\chromedriver.exe"); chromeOptions options = new ChromeOptions(); options.setExperimentalOption("...


2

Did you try: elem.sendKeys(Keys.CONTROL,"a"); Output And about your code: It is failing because you are passing WebElement password = driver.findElement(By.id("passwd-login")); highlight1(high,password); Instead of WebElement password = driver.findElement(By.id("passwd-login")); highlight1(driver,password); Highlighted output:


2

Use the below function public static void highlight(WebDriver driver,WebElement element) { JavascriptExecutor js = (JavascriptExecutor) driver; js.executeScript("arguments[0].setAttribute('style', 'background: yellow; border: 2px solid red;');", element); } Where driver is your WebDriver instance and element is the WebElement which is to be ...


2

I have always found frames wicked confusing 'cos you view src, see an element but then when you write the finder, unless you take into account the frame you get element not found and are confused. After experiencing this a few times with ruby-selecium-rspec I got used to having to 'look up the page' for the frame, then use a couple of techniques shown below ...


2

For 20 years now, there's been a huge gap between QA and DEV teams. Most QA people are not programmers and many don't want to become programmers. This gap has never really closed, rather it's being masked a bit; that on Agile teams today, the developers are expected to write Unit Tests on each Sprint. Unfortunately due dates make it impossible to spend ...


1

Please provide the date picker html DOM , and also your code in page object . Assuming you are using getText() to get value from a field eg day.getText() , change it to day.getAttribute('textContent') ,or day.getAttribute('value') and see either of them works


1

Below is the code for doing that in java , you can use the same logic in python. The logic is: Get all displayed review, store the length to a variable 'tmp' Scroll to last review Check whether show more is displayed, if displayed then click it Get all reviews again, check whether the current length == 'tmp' , set tmp to new value Continue scrolling to ...


1

As @Gkalnytskyi has already pointed out, web scraping is the area you should approach for your objective. Python and BeautifulSoup together with the headless Chrome driver are a combination that you could go with. BeautifulSoup is a Python library for pulling data out of HTML and XML files. Chrome Headless is a socalled headless web browser that can be ...


1

Use browser actions, Actions builder = new Actions(driver); builder.moveToElement(driver.findElement(By.xpath("//input[@type='file']"))).click().build().perform(); The input element may not support the click action that's why you are getting the invalid argument error.


1

Use click and hold instead of click, the click will just click the mouse and releases it suddenly. The below code is an example: System.setProperty("webdriver.chrome.driver","c:/chromedriver.exe"); WebDriver driver = new ChromeDriver(); driver.manage().window().maximize(); driver.manage().timeouts()....


1

the exception shown is: FAILED CONFIGURATION: @BeforeMethod setUp java.lang.NullPointerException at com.ecinteractive.base.TestBase.initialization(TestBase.java:50) So from (TestBase.java:50), we can say that the exception was thrown at line 50 of TestBase class. On analyzing the line 50 of TestBase, we can see the code that throws the error is: ...


1

What happens if you use: //div[@data-bind=\"control: ExpirationDate\"]/input and //div[@data-bind=\"control: EffectiveDate\"]/input


1

use this: obj.FindElementByCss('[class="afpaas-quick-link ng-scope afpaas-condition-mobile-display"]') Also check iframe, waits etc as mentioned in the link in comment


1

There is a nice article about progressive testing by Mphasis: https://www.mphasis.com/home/thought-leadership/blog/test-automation-regressive-vs-progressive-automation.html Progressive automation is to automate almost every test case instead of executing test cases manually. This is typically seen with the projects that run in agile methodology. You ...


1

Runnin chromedriver on a specific port: You should use ChromeDriverService for starting chrome in a different port: import org.openqa.selenium.chrome.WebDriver; import org.openqa.selenium.chrome.ChromeDriverService; import org.openqa.selenium.chrome.ChromeOptions; import org.openqa.selenium.remote.RemoteWebDriver; ...


1

This may help you to assign a particular port explicitly to web-driver execution System.setProperty("webdriver.chrome.driver", "your driver path"); chromeOptions options = new ChromeOptions(); options.setExperimentalOption("debuggerAddress", "yourcustomport"); WebDriver driver = new ChromeDriver(options);` Custom port should be provided along with your ...


1

You can also suppress error message using ChromeDriverService class: WebDriver browser = null; ChromeDriverService service = new ChromeDriverService.Builder() .usingDriverExecutable(new File("C:\\chromedriver.exe")).usingPort(4444).withSilent(true) .build(); service.start(); browser = new RemoteWebDriver(...


Only top voted, non community-wiki answers of a minimum length are eligible