New answers tagged

0

Uploading files using Webdriver (Locally) I present below two ways to upload a file. The first uses Python Selenium in a special case (invisible input), the second handles a Windows Dialog Box. Invisible input If the input is hidden, make it visible. Here is an example (Python). The input is hidden at the bottom of the page and looks like this: ...


0

You should use xpath. If your text 'IPS' is the text inside tag use this: //*[contains(.,'IPS')]. If 'IPS' is for example part of @class atrribute use this: //*[contains(@class,'IPS')]. If 'IPS' is always at the begginig of the text you can use starts-with command instead of contains. Unfortunately web browsers dont support Xpath 2.0 which provides ...


0

Use contains() or starts-with() function in xpah : Solution : With contains : //*[contains(@id,'IPS')] With starts-with : //*[starts-with(@id,'IPS')] Where * means any element. Let me know If any query.


1

WebElement element=driver.findElement(By.xpath("(//div[@class='selectItemText'])[2]")); Thread.sleep(5000); element.click(); Thread.sleep(10000); driver.findElement(By.xpath("(//nobr[text( )='MDialog'])[4]")).click(); //driver.findElement(By.xpath("//nobr[text()='MDialog']")).click(); ...


0

First of all Select is not working with Div or any other element. Select are use only with element is having Select tag and inside it, only having option tags. Solution : WebElement element=driver.findElement(By.xpath("//div[contains(@id,'isc_FX')]")); element.click(); driver.findElement(By.xpath("//*[text()='MDialog']")).click(); Try this. ...


1

Javascript support for webdriver is pretty rough, so here's an example of this in Javascript, in case you're like me and need to go spend another half hour digging through documentation to find the right method names in JS: let profile = new firefox.Profile(); profile.setPreference('network.automatic-ntlm-auth.trusted-uris', '.company.com') let options = ...


0

Check with different xpath & use implicitly wait instead of 'Thread.sleep' -See below driver.switchTo().frame(driver.findElement(By.id("frmmenusuperior"))); driver.manage().timeouts().implicitlyWait(5, TimeUnit.SECONDS); WebElement menu = driver.findElement(By.xpath("//li[@id='i_ACAD']/a")); Actions actions = new Actions(driver); ...


0

setAssumeUntrustedCertificateIssuer is likely the problem. It is easy to find out if a certificate has expired or does not match the host from which it was served, but hard to find out if the issuer of the certificate is untrusted. Setting setAssumeUntrustedCertificateIssuer to true means assume untrusted which is the opposite of what you want. Try: ...


2

multiCapabilities: [ {'browserName': 'internet explorer'}, {'browserName': 'chrome'} ], maxSessions: 1,


0

You may try with javascriptexecutor- Check below code- driver.switchTo().frame("WallItemItemDetail_ifr"); Thread.sleep(2000); // select the editor nad do the input WebElement TextBox = driver.findElement(By.id("tinymce")); String input= "editor done"; TextBox.getAttribute("name"); JavascriptExecutor jst= (JavascriptExecutor) driver; ...


0

Here is an example from the tests of the project of how to use this method: public function testElementsKnowTheirTagName() { $this->url('html/test_element_selection.html'); $element = $this->byClassName('theDivClass'); $this->assertEquals('div', $element->name()); }


0

From the error it looks like selenium is still searching for elements on the old window. Please make sure that line driver.switchTo().window(ar.get(ar.size()-1)); is actually switching to new window.


0

Page objects really should only be a control layer to the web page. Providing access to the individual operations a page can perform. If you want to group actions together, whether they are repeatable workflows, or groups of asserts, you could create page helper classes. Allow this helper class to accept your page object instance and then it can perform a ...


0

I tend to put very common assertions into either a POM or whatever class(es) I am extending to create the POM. Using BDD frameworks this makes it easier to write more dynamic statements while ensuring that no steps rely on another step. For the following verification step: Then the customer should be returned to Step3 I pull in the class associated with ...


1

I don't think you need anyone's permission to shift to SAP testing, but in case you feel you needed one, you have my permission :-) Regarding if someone will hire you, it depends on your skills and their need, no one here can answer that.


0

You are using Select class to manipulate an ul element (unordered list) and it will fail, as Select class was designed to cater select (i.e dropdowns) elements only. Now to solve your problem statement, say I have to select Kochi(COK) from the list, follow the below steps : Do a sendkeys. ...


0

I'll share my case: I had this issue with my Django selenium tests (django==1.7.12 and selenium==2.53.1) with ChromeDriver 2.21.371459 and Google Chrome 48.0.2564.116. I was able to isolate the issue. In my case it was happening only for pages referencing a static file (an image in a HTML tag for instance http://cdn.local.myproject.net/static/myimage.png) ...



Top 50 recent answers are included