3

You should get the CSS value instead of attribute.Below sample code will print the background colour before and after click WebElement.getCssValue("cssproperty") will return respective css property of the element WebElement body=driver.findElement(By.tagName("body")); WebElement button=driver.findElement(By.id("slide"));...


2

We would get colors as expected if we had developed code like: <button id="slide" type="button" onclick="dem_func();" style="color:orange;">Slide right</button> The below line is trying to get the color name from the 'inline' color element instead of "<style//>" css block: document....


2

I found the solution to this myself. For anyone who's having the same issue: What I did wrong was I used driver = new ChromeDriver(options); in my code instead of driver = new RemoteWebDriver(new URL("http://my.aws.ip:4444/wd/hub"), options); After making this change, I downloaded selenium-server-standalone.jar to in EC2. Then, before starting the ...


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