Unable to click Settings link - selenium-webdriver

scenario is:
1. login to google calendar
2. click on on settings icon on the top right corner of the page
3. click the settings link
When I search the element using the xpath in firebug I am able to find 1 match for each of them. But during the script execution, it is able to click on the settings icon, but unable to click on the settings link. Below is the code to find and click settings icon and settings link
//Select the settings icon : This is working
driver.findElement(By
.xpath(".//*[#id='mg-settings']/div")).click();
//click on Settings link : This is not working even though element is available
driver.findElements(By.xpath("//*[#id=':k']/div[text()=\"Settings\"]")).click();

Pay attention to the "s" at the end (you are using driver.findElements instead of driver.findElement). Probably that is just a typo.
Also I would not recommend tie to IDs like ":k". They are dynamic and can be changed any time.
Based on the Google Calendar structure I would recommend trying the following:
driver.findElement(By.xpath("//*div[contains(#class, 'goog-menuitem')]/div[contains(#class, 'goog-menuitem-content') and text() = 'Settings']")).click();

Related

Appium: Element is not interactable error is getting displayed while tapping on the checkbox

Tried: xpath= //*[#id="mktoCheckbox_52362_0"],
Console Error: Element is not interactable.
Tried: Xpath= //[#id="mktoForm_2768"]/div[10]/div[1]/div[2]/div[2]/label,
console error: Element is not interactable.
Tried: xpath= //*[text()='I agree to the '],
clicking on 'License Agreement' link and open pdf file in other tab.
Applied all the above xpath but still got no result. Please provide some solution to this problem.
Assuming you're trying to automate this page: https://info.couchbase.com/couchbase_server_mobile.html
If you want to open the license agreement in a new tab - the relevant XPath would be
//a[text()='License Agreement']
If you want to tick the checkbox associated with the license agreement you need this one:
//input[#name='termsandConditions']
In both case it's better to use Explicit Wait to ensure that the element is clickable prior to attempting to interact with it via i.e. ExpectedConditions.elementToBeClickable() function
Going forward if you're working on mobile automation you can consider using Appium Studio which provides Copy Unique XPath feature, it can make your life easier when it comes to defining an element locator

React-Native: Code compiling correctly but screens are empty

I am fairly new to react native and have been attempting to build a very simple registration app.
Currently I have 2 screens running, the first landingscreen.js includes a button to prompt the first registration screen.
This screen works fine but its title shows as blank. (I am using react-navigator)
Below is the screen and you can find the corresponding code here.
On clicking the register here button the next screen is prompted which should show two fields an email and password field with the title "Let's create an account". As you can see below , all that works is the next button but I have no compilation errors. The code pertaining to this screen may be accessed here.
Any help or way pointing would be more than appreciated.
Thanks,
J.
Change navigation(you have written navigtion) spelling
static navigationOptions= {
title: "Let's make an account",
}
The headers not being seen was solved as #Paras Watts noted by fixing a spelling mistake.
To get the fields to show I then put the jsx pertaining to the form in the same render as the navigation also changing any tags to view to stick to the format of jsx.

Can I search Bugzilla for all bugs I'm not associated to? Bugs I wouldn't currently get bugmail on. (CC, Reporter, Assignee, QA Contact)

I don't see a way to do this, even using Custom Search and negation.
My purpose is to find bugs with certain other characteristics that I'm not already getting bugmail on, then to add myself to their CC lists so I get bugmail for them.
It seems that the Custom Search "CC" entry searches for "any user on the CC list that matches". But I need it to look at the entire CC list to see if I'm on there.
I'm using Bugzilla 4.0.7, but we'll upgrade eventually so a 5.0-only solution would be okay.
I think the steps below might help you, it's important to try it using Internet Explorer browser:
1) On "Custom Search", select all available status for "Resolution"
2) Check the options for CC, Reporter, QA Contact and Assignee, leaving blank the text box where you normally input the email.
3) Click on "Search"
4) In the results page, scrolled down the page until you find "Change Columns" button and I click on it.
5) Select CC, Reporter, QA Contact and Assignee and click on "Change Columns"
6) Back on results page, right-click the page and click on "Export to Microsoft Excel"
7) Then on excel you can make the filter you want to and find the bugs you are not related to.
Please let me know if that helped you.

Selenium Webdriver Firefox clicks but chrome cannot

I am trying to click on element.
First, I need to hover a on menu, then I need to click on 3rd item in a list.
my code:
// open a list
driver.findElement(By.xpath("//li/span")).click();
// click on 3rd item
driver.findElement(By.xpath("//li[3]/a/span")).click();
it is strange because it works fine in firefox, but doesn't work in chrome
#lebs I'm having to write this as answer as I do not have enough rep points to add a comment. You need to provide some more information. What is being output in the stacktrace when running in Chrome? Have you debugged this issue in your IDE? Have you tried a Wait command before attempting to click the 3rd item?
When testing Google Web Toolkit applications, elements can get dropped in the DOM and replaced with virtually identical elements. Perhaps try declaring the element again.
WebElement openList = chromeDriver.fineElement(By.xpath("//li/span")).click();
new WebDriverWait(chromeDriver, 10,50).until(ExpectedConditions.visibilityOfElementLocated(By.xpath("//li[3]/a/span")));
WebElement thirdItem = chromeDriver.findElement(By.xpath("//li[3]/a/span")).click();
On a side note, I'd look at using css selectors if you can.

QTP Script is not recognizing the combo box object

My project is completely developed in ExtJs language(not in html).
Please observe the following code and I attached screenshot of my window. I want the combo box item(activePoll server1) to get selected as shown in the figure. Please suggest.
Option explicit
Dim bro,url
bro="C:\Program Files\Internet Explorer\iexplore.exe"
url="-------------------------------------------------------"
invokeapplication(bro&" "&url)
With Browser("Certificate Error: Navigation")
With .Page("Certificate Error: Navigation")
.Link("Continue to this website").Click
End With
End With
With Browser("Title:=WebiPer.*.*")
With .Page("title:=WebiPer.*")
.WebEdit("name:=userName").Set "Sai"
.WebEdit("name:=password").Set "Admin123"
.WebList("name:=loginType").Select "ManagementApps"
.WebButton("name:=Login").Click
End With
End With
With Browser("Title:=APS Configuration Client")
With .Page("title:=APS Configuration Client")
.WebEdit("name:=Image").Set"activePollServer1"
End With
End With
Sai, consider defining a virtual object. You can find it under (Tools > Virtual Objects > New Virtual Object). Here you're manually mapping unrecognised objects against standard objects that QTP knows about. There should be a combo or list box in the pre-defined objects that come with the Web add-in.
If it doesn't work try to install the Web Extensibility Add-In. It extends support for custom web controls and toolkits like Dojo and Ajax. It should be able to handle ExtJS as well.
I came across this issue and what we did is like the below.
If Dropdown is identifying as WebEdit then
B().P().WebEdit().click
Sendkeys {"DOWN"}
Sendkeys {"DOWN"}
Sendkeys {"ENTER"}
For us the dropdown was identified as a WebEdit so we had to click that first then had to use keyboard inputs for selecting value.
Pls let me know
Generally in ExtJs developers are not using combo box directly, they assigned an another Element for the data selection, and that element will be only visible when you click on the WebEdit, so do the following steps to select the item you want to select
step1) find the attribute name with the name "aria-owns" from WebEdit element's attributes and get its value to a variable ex: varId = "list-1234"
step2) click on WebEdit
step3) Click the Element Browser().Page().WebElement("html id:=" & varId).WebElement("innertext:=" & name of the Item to select).click
if direct click not work then use "Setting.WebPackage("ReplayType") = 2" option

Resources